summaryrefslogtreecommitdiff
path: root/print-atm.c
diff options
context:
space:
mode:
authorguy <guy>2002-12-18 08:53:18 +0000
committerguy <guy>2002-12-18 08:53:18 +0000
commite070cf232ffadbdbbca68b132ef369675890e566 (patch)
tree7695fa04e8833fd19a5461409caa9c85f7717763 /print-atm.c
parentc284d10cf4a5a2732b6a08036438f8b7611d67fb (diff)
downloadtcpdump-e070cf232ffadbdbbca68b132ef369675890e566.tar.gz
We no longer use "packetp" for anything, so eliminate it. (If any
dissector really needs source and destination MAC addresses, we should make global pointers to them - which would be null for packets lacking MAC addresses, so dissectors that need them will need to do something sensible if those pointers are null.) Don't fake up an Ethernet header if there aren't any MAC addresses to use when faking it up. "bp_chaddr" in "print-bootp.c" is an array, so "bp->bp_chaddr" cannot be null, and there's no need to test for it not being null.
Diffstat (limited to 'print-atm.c')
-rw-r--r--print-atm.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/print-atm.c b/print-atm.c
index b1e59850..77977b25 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.30 2002-12-11 06:55:08 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.31 2002-12-18 08:53:19 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -49,27 +49,9 @@ static const char rcsid[] =
static void
atm_llc_print(const u_char *p, int length, int caplen)
{
- struct ether_header ehdr;
u_short extracted_ethertype;
- /*
- * Fake up an Ethernet header for the benefit of printers that
- * insist on "packetp" pointing to an Ethernet header.
- */
- memset(&ehdr, '\0', sizeof ehdr);
-
- /*
- * Some printers want to get back at the ethernet addresses.
- * Rather than pass it all the way down, we set this global.
- *
- * Actually, the only printers that use packetp are print-arp.c
- * and print-bootp.c, and they assume that packetp points to an
- * Ethernet header. The right thing to do is to fix them to know
- * which link type is in use when they excavate. XXX
- */
- packetp = (u_char *)&ehdr;
-
- if (!llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
+ if (!llc_print(p, length, caplen, NULL, NULL,
&extracted_ethertype)) {
/* ether_type not known, print raw packet */
if (extracted_ethertype) {