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

Function ng_ppp_prepend

freebsd/netgraph/ng_ppp.c:2459–2467  ·  view source on GitHub ↗

* Prepend some bytes to an mbuf. */

Source from the content-addressed store, hash-verified

2457 * Prepend some bytes to an mbuf.
2458 */
2459static struct mbuf *
2460ng_ppp_prepend(struct mbuf *m, const void *buf, int len)
2461{
2462 M_PREPEND(m, len, M_NOWAIT);
2463 if (m == NULL || (m->m_len < len && (m = m_pullup(m, len)) == NULL))
2464 return (NULL);
2465 bcopy(buf, mtod(m, uint8_t *), len);
2466 return (m);
2467}
2468
2469/*
2470 * Update private information that is derived from other private information

Callers 4

ng_ppp_bypassFunction · 0.85
ng_ppp_link_xmitFunction · 0.85
ng_ppp_mp_xmitFunction · 0.85
ng_ppp_addprotoFunction · 0.85

Calls 1

m_pullupFunction · 0.85

Tested by

no test coverage detected