summaryrefslogtreecommitdiff
path: root/print-atm.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-atm.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-atm.c')
-rw-r--r--print-atm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/print-atm.c b/print-atm.c
index 2407b480..7458116f 100644
--- a/print-atm.c
+++ b/print-atm.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.19 2000-10-06 04:23:10 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.20 2000-12-22 22:45:09 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -131,8 +131,8 @@ atm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
/* ether_type not known, print raw packet */
if (!eflag)
printf("%02x %02x %02x %02x-%02x-%02x %04x: ",
- p[0], p[1], p[2], /* dsap/ssap/ctrl */
- p[3], p[4], p[5], /* manufacturer's code */
+ packetp[0], packetp[1], packetp[2], /* dsap/ssap/ctrl */
+ packetp[3], packetp[4], packetp[5], /* manufacturer's code */
ethertype);
if (!xflag && !qflag)
default_print(p, caplen);