*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.67 2002-04-07 09:50:31 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.68 2002-05-29 10:06:26 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
if (caplen < ETHER_HDRLEN) {
printf("[|ether]");
- goto out;
+ return;
}
if (eflag)
if (!xflag && !qflag)
default_print(p, caplen);
}
- if (xflag)
- default_print(p, caplen);
- out:
- putchar('\n');
}
/*
ether_print(p, length, caplen);
+ /*
+ * If "-x" was specified, print stuff past the Ethernet header,
+ * if there's anything to print.
+ */
+ if (xflag && caplen > ETHER_HDRLEN)
+ default_print(p + ETHER_HDRLEN, caplen - ETHER_HDRLEN);
+
+ putchar('\n');
+
--infodelay;
if (infoprint)
info(0);