diff options
author | sam <sam@FreeBSD.org> | 2006-09-04 20:04:42 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-09-04 20:04:42 +0000 |
commit | 498672d44881880f8839eb7839500652b77e08b9 (patch) | |
tree | 13652f8bd7a5a6bc4657d530dd6ddfbeef554e16 /contrib/tcpdump/print-chdlc.c | |
parent | 6dcc5281a5e8c0e636fcbf5736a3125dd9d14880 (diff) | |
download | FreeBSD-src-498672d44881880f8839eb7839500652b77e08b9.zip FreeBSD-src-498672d44881880f8839eb7839500652b77e08b9.tar.gz |
Import of tcpdump v3.9.4
Diffstat (limited to 'contrib/tcpdump/print-chdlc.c')
-rw-r--r-- | contrib/tcpdump/print-chdlc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/tcpdump/print-chdlc.c b/contrib/tcpdump/print-chdlc.c index d2b5611..244119f 100644 --- a/contrib/tcpdump/print-chdlc.c +++ b/contrib/tcpdump/print-chdlc.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.7 2005/04/27 14:35:56 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.8 2005/08/23 10:29:42 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -48,13 +48,18 @@ chdlc_if_print(const struct pcap_pkthdr *h, register const u_char *p) { register u_int length = h->len; register u_int caplen = h->caplen; - const struct ip *ip; - u_int proto; if (caplen < CHDLC_HDRLEN) { printf("[|chdlc]"); return (caplen); } + return (chdlc_print(p,length)); +} + +u_int +chdlc_print(register const u_char *p, u_int length) { + u_int proto; + const struct ip *ip; proto = EXTRACT_16BITS(&p[2]); if (eflag) { |