* Prepend some bytes to an mbuf. */
| 2457 | * Prepend some bytes to an mbuf. |
| 2458 | */ |
| 2459 | static struct mbuf * |
| 2460 | ng_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 |
no test coverage detected