diff options
author | fenner <fenner@FreeBSD.org> | 2001-04-03 07:45:48 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2001-04-03 07:45:48 +0000 |
commit | f7d9a5e270bfcbb075a637a52416185441d33d8d (patch) | |
tree | e79d9e6f58638911260708c956a0d44069782cda /contrib/tcpdump/print-lane.c | |
parent | 04f715925eb0f85e1b7d21424cdbb3f6f1fa0b41 (diff) | |
parent | ace14a2b50f2cc05c079d0b9137b49066dbb1206 (diff) | |
download | FreeBSD-src-f7d9a5e270bfcbb075a637a52416185441d33d8d.zip FreeBSD-src-f7d9a5e270bfcbb075a637a52416185441d33d8d.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r75115,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/tcpdump/print-lane.c')
-rw-r--r-- | contrib/tcpdump/print-lane.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/contrib/tcpdump/print-lane.c b/contrib/tcpdump/print-lane.c index 19061de..db38ef7 100644 --- a/contrib/tcpdump/print-lane.c +++ b/contrib/tcpdump/print-lane.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.2 1999/11/21 09:36:56 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.11 2000/12/22 22:45:11 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -34,28 +34,17 @@ static const char rcsid[] = #include <sys/types.h> #include <sys/socket.h> -#include <net/if.h> #include <netinet/in.h> -#include <netinet/if_ether.h> -#include <netinet/in_systm.h> -#include <netinet/ip.h> -#include <netinet/ip_var.h> -#include <netinet/udp.h> -#include <netinet/udp_var.h> -#include <netinet/tcp.h> -#include <netinet/tcpip.h> #include <stdio.h> #include <pcap.h> #include "interface.h" #include "addrtoname.h" +#include "ether.h" #include "lane.h" -static const u_char *packetp; -static const u_char *snapend; - static inline void lane_print(register const u_char *bp, int length) { @@ -123,10 +112,11 @@ lane_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) 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))); @@ -134,7 +124,8 @@ lane_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) 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)); |