| 236 | }; |
| 237 | |
| 238 | struct mbuf * |
| 239 | lacp_input(struct lagg_port *lgp, struct mbuf *m) |
| 240 | { |
| 241 | struct lacp_port *lp = LACP_PORT(lgp); |
| 242 | uint8_t subtype; |
| 243 | |
| 244 | if (m->m_pkthdr.len < sizeof(struct ether_header) + sizeof(subtype)) { |
| 245 | m_freem(m); |
| 246 | return (NULL); |
| 247 | } |
| 248 | |
| 249 | m_copydata(m, sizeof(struct ether_header), sizeof(subtype), &subtype); |
| 250 | switch (subtype) { |
| 251 | case SLOWPROTOCOLS_SUBTYPE_LACP: |
| 252 | lacp_pdu_input(lp, m); |
| 253 | return (NULL); |
| 254 | |
| 255 | case SLOWPROTOCOLS_SUBTYPE_MARKER: |
| 256 | lacp_marker_input(lp, m); |
| 257 | return (NULL); |
| 258 | } |
| 259 | |
| 260 | /* Not a subtype we are interested in */ |
| 261 | return (m); |
| 262 | } |
| 263 | |
| 264 | /* |
| 265 | * lacp_pdu_input: process lacpdu |
no test coverage detected