From cfabfb053b4bf5b50f4d98d59053e1cc97ff5014 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 18 Dec 2002 09:41:13 +0000 Subject: Add a new routine "default_print_packet()", which takes a pointer to the beginning of the raw packet data, the captured length of the raw packet data, and the length of the link-layer header, and: if "-e" was specified, prints all the raw packet data; if "-e" was not specified, prints all the raw packet data past the link-layer header, if there is any. Use that routine in all the "xxx_if_print()" routines if "-x" was specified. Make "arcnet_encap_print()" static - it's not used outside "print-arcnet.c". Add missing info printing code to "atm_if_print()". Print the packet data in "lane_if_print()", not in "lane_print()", as "lane_print()" can be called from other "xxx_if_print()" routines, and those routines will also print the packet data if "-x" was specified - no need to print it twice. --- print-ipfc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'print-ipfc.c') diff --git a/print-ipfc.c b/print-ipfc.c index a33cfbdf..3da01d65 100644 --- a/print-ipfc.c +++ b/print-ipfc.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.2 2002-12-18 08:53:21 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.3 2002-12-18 09:41:16 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -148,11 +148,10 @@ ipfc_if_print(u_char *pcap _U_, const struct pcap_pkthdr *h, ipfc_print(p, length, caplen); /* - * If "-x" was specified, print stuff past the Network_Header, - * if there's anything to print. + * If "-x" was specified, print packet data in hex. */ - if (xflag && caplen > IPFC_HDRLEN) - default_print(p + IPFC_HDRLEN, caplen - IPFC_HDRLEN); + if (xflag) + default_print_packet(p, caplen, IPFC_HDRLEN); putchar('\n'); -- cgit v1.2.1