diff options
author | guy <guy> | 2000-12-22 22:45:09 +0000 |
---|---|---|
committer | guy <guy> | 2000-12-22 22:45:09 +0000 |
commit | 737c58073a86c184adf636b0bf4e15a8808f0f46 (patch) | |
tree | e8e987a7d482712e674b9acee103514952f76c8a /print-lane.c | |
parent | 4154b2a823b8212691334a0b6d33e50cc9d95e07 (diff) | |
download | tcpdump-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-lane.c')
-rw-r--r-- | print-lane.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/print-lane.c b/print-lane.c index 149a5aed..6aadad46 100644 --- a/print-lane.c +++ b/print-lane.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.10 2000-12-18 05:42:00 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.11 2000-12-22 22:45:11 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -116,7 +116,7 @@ lane_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) &extracted_ethertype) == 0) { /* ether_type not known, print raw packet */ if (!eflag) - lane_print((u_char *)ep, length); + lane_print((u_char *)ep, length + sizeof(*ep)); if (extracted_ethertype) { printf("(LLC %s) ", etherproto_string(htons(extracted_ethertype))); |