parent
1134623173
commit
ce4a64f787
|
@ -951,3 +951,19 @@ m_copyback(m0, off, len, cp)
|
|||
out: if (((m = m0)->m_flags & M_PKTHDR) && (m->m_pkthdr.len < totlen))
|
||||
m->m_pkthdr.len = totlen;
|
||||
}
|
||||
|
||||
void
|
||||
m_print(const struct mbuf *m)
|
||||
{
|
||||
int len;
|
||||
struct mbuf *m2;
|
||||
|
||||
len = m->m_pkthdr.len;
|
||||
m2 = m;
|
||||
while (len) {
|
||||
printf("%p %*D\n", m2, m2->m_len, (u_char *)m2->m_data, "-");
|
||||
len -= m2->m_len;
|
||||
m2 = m2->m_next;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -418,6 +418,7 @@ struct mbuf *m_get __P((int, int));
|
|||
struct mbuf *m_getclr __P((int, int));
|
||||
struct mbuf *m_gethdr __P((int, int));
|
||||
struct mbuf *m_prepend __P((struct mbuf *,int,int));
|
||||
void m_print __P((const struct mbuf *m));
|
||||
struct mbuf *m_pullup __P((struct mbuf *, int));
|
||||
struct mbuf *m_retry __P((int, int));
|
||||
struct mbuf *m_retryhdr __P((int, int));
|
||||
|
|
Loading…
Reference in New Issue