summaryrefslogtreecommitdiff
path: root/print-fddi.c
diff options
context:
space:
mode:
authorguy <guy>2000-12-22 22:45:09 +0000
committerguy <guy>2000-12-22 22:45:09 +0000
commit737c58073a86c184adf636b0bf4e15a8808f0f46 (patch)
treee8e987a7d482712e674b9acee103514952f76c8a /print-fddi.c
parent4154b2a823b8212691334a0b6d33e50cc9d95e07 (diff)
downloadtcpdump-737c58073a86c184adf636b0bf4e15a8808f0f46.tar.gz
Put the LINUX_SLL_P_ definitions back, and check for at least some of
them in "print-sll.c" - as a cooked-mode capture may be reading from non-Ethernet, non-802.x devices, it may well see some ETH_P_/LINUX_SLL_P_ types that don't mean "this is an 802.2 LLC frame". We currently assume that the ETH_P_ values won't change in the kernel, so we don't have to explicitly map them. In various link-layer packet printers, if we don't handle the next layer up of packet type, and are printing the link-layer header, use the correct pointer to that header (i.e., if we've stepped "p" past the link-layer header, don't use "p", use a pointer to the beginning of the packet), and use the correct length (i.e., if we've subtracted the length of the link-layer header, add it back in, so that we always print the full packet length).
Diffstat (limited to 'print-fddi.c')
-rw-r--r--print-fddi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/print-fddi.c b/print-fddi.c
index 6763ad4b..f8a2ffdd 100644
--- a/print-fddi.c
+++ b/print-fddi.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.48 2000-12-18 05:41:59 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.49 2000-12-22 22:45:11 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -305,7 +305,7 @@ fddi_if_print(u_char *pcap, const struct pcap_pkthdr *h,
* handle intelligently
*/
if (!eflag)
- fddi_print(fddip, length,
+ fddi_print(fddip, length + FDDI_HDRLEN,
ESRC(&ehdr), EDST(&ehdr));
if (extracted_ethertype) {
printf("(LLC %s) ",
@@ -319,7 +319,8 @@ fddi_if_print(u_char *pcap, const struct pcap_pkthdr *h,
else {
/* Some kinds of FDDI packet we cannot handle intelligently */
if (!eflag)
- fddi_print(fddip, length, ESRC(&ehdr), EDST(&ehdr));
+ fddi_print(fddip, length + FDDI_HDRLEN, ESRC(&ehdr),
+ EDST(&ehdr));
if (!xflag && !qflag)
default_print(p, caplen);
}