#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.7 2000-09-23 08:54:34 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.12 2001-07-05 18:54:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include <sys/types.h>
#include <sys/socket.h>
-#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include <stdio.h>
#include <pcap.h>
u_short ether_type;
u_short extracted_ethertype;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < sizeof(struct lecdatahdr_8023)) {
extracted_ethertype = 0;
if (ether_type < ETHERMTU) {
/* Try to print the LLC-layer header & higher layers */
- if (llc_print(p, length, caplen, ep->h_source,ep->h_dest)==0) {
+ if (llc_print(p, length, caplen, ep->h_source, ep->h_dest,
+ &extracted_ethertype) == 0) {
/* ether_type not known, print raw packet */
if (!eflag)
- lane_print((u_char *)ep, length);
+ lane_print((u_char *)ep, length + sizeof(*ep));
if (extracted_ethertype) {
printf("(LLC %s) ",
etherproto_string(htons(extracted_ethertype)));
if (!xflag && !qflag)
default_print(p, caplen);
}
- } else if (ether_encap_print(ether_type, p, length, caplen) == 0) {
+ } else if (ether_encap_print(ether_type, p, length, caplen,
+ &extracted_ethertype) == 0) {
/* ether_type not known, print raw packet */
if (!eflag)
lane_print((u_char *)ep, length + sizeof(*ep));
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}