*/
#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)";
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.61.2.2 2003-11-16 08:51:20 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
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.
- */
- 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));
* 'h->length' is the length of the packet off the wire, and 'h->caplen'
* is the number of bytes actually captured.
*/
-void
-fddi_if_print(u_char *pcap _U_, const struct pcap_pkthdr *h,
- register const u_char *p)
+u_int
+fddi_if_print(const struct pcap_pkthdr *h, register const u_char *p)
{
- u_int caplen = h->caplen;
- u_int length = h->len;
-
- ++infodelay;
- ts_print(&h->ts);
-
- fddi_print(p, length, caplen);
-
- /*
- * If "-x" was specified, print stuff past the FDDI header,
- * if there's anything to print.
- */
- if (xflag && caplen > FDDI_HDRLEN)
- default_print(p + FDDI_HDRLEN, caplen - FDDI_HDRLEN);
-
- putchar('\n');
+ fddi_print(p, h->len, h->caplen);
- --infodelay;
- if (infoprint)
- info(0);
+ return (FDDI_HDRLEN);
}