Subject: Re: panic: ipsec4_splithdr: first mbuf too short
To: None <tech-net@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 06/15/2006 09:51:05
On Thu, Jun 15, 2006 at 02:31:02PM +0000, Emmanuel Dreyfus wrote:
> Anyone has a simple way of printing the packet if I have a struct mbuf *?
I derived this from sys/netsmb/smb_subr.c:
static void
m_dumpm(struct mbuf *m, const char *func)
{
char *p;
int len;
printf("%s:", func);
for ( ; m != NULL; m = m->m_next) {
p = mtod(m, char *);
len = m->m_len;
printf(" (%d)",len);
while (--len >= 0)
printf(" %02x", 0xff & (int)*p++);
}
printf("\n");
}
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933