summaryrefslogtreecommitdiff
path: root/print-fddi.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-fddi.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-fddi.c')
-rw-r--r--print-fddi.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/print-fddi.c b/print-fddi.c
index c97134a6..762feaca 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.58 2002-09-05 21:25:40 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.59 2002-12-18 08:53:21 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -249,23 +249,18 @@ fddi_print(const u_char *p, u_int length, u_int caplen)
printf("[|fddi]");
return;
}
+
/*
* Get the FDDI addresses into a canonical form
*/
extract_fddi_addrs(fddip, (char *)ESRC(&ehdr), (char *)EDST(&ehdr));
+
/*
- * Some printers want to get back at the link level addresses,
- * and/or check that they're not walking off the end of the packet.
- * Rather than pass them all the way down, we set these globals.
+ * Some printers want to check that they're not walking off the
+ * end of the packet.
+ * Rather than pass it all the way down, we set this global.
*/
snapend = p + caplen;
- /*
- * 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 (eflag)
fddi_hdr_print(fddip, length, ESRC(&ehdr), EDST(&ehdr));