#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.38 2000-10-07 05:53:13 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.39 2000-12-04 06:47:17 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
memcpy((char *)&family, (char *)p, sizeof(family));
- if (nflag) {
- /* XXX just dump the header */
- return;
- }
- switch (family) {
+ if (nflag)
+ printf("AF %d ", family);
+ else {
+ switch (family) {
- case AF_INET:
- printf("ip: ");
- break;
+ case AF_INET:
+ printf("ip ");
+ break;
#ifdef INET6
- case AF_INET6:
- printf("ip6: ");
- break;
+ case AF_INET6:
+ printf("ip6 ");
+ break;
#endif
- case AF_NS:
- printf("ns: ");
- break;
+ case AF_NS:
+ printf("ns ");
+ break;
- default:
- printf("AF %d: ", family);
- break;
+ default:
+ printf("AF %d ", family);
+ break;
+ }
}
+ printf("%d: ", length);
}
void
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.56 2000-11-08 09:41:39 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.57 2000-12-04 06:47:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
ppp_print(register const u_char *p, u_int length)
{
u_int proto;
+ u_int full_length = length;
/*
* Here, we assume that p points to the Address and Control
length -= 2;
}
- printf("%s: ", ppp_protoname(proto));
+ printf("%s %d: ", ppp_protoname(proto), full_length);
handle_ppp(proto, p, length);
return;
printf("] ");
}
}
- if (eflag)
- printf("%d ", length);
}
+ if (eflag)
+ printf("%d ", length);
if (p[SLC_CHL]) {
q = p + SLC_BPFHDRLEN + p[SLC_LLHL];