MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lacp_input

Function lacp_input

freebsd/net/ieee8023ad_lacp.c:238–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236};
237
238struct mbuf *
239lacp_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

Callers 1

lagg_lacp_inputFunction · 0.85

Calls 4

m_copydataFunction · 0.85
lacp_pdu_inputFunction · 0.85
lacp_marker_inputFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected