]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-token.c
Allow tcpdump to work with earlier libpcaps.
[tcpdump] / print-token.c
index cf627b1b2910215b35943ab710c30093f5b79412..156c61091f176fff6cf586f238613e6065f1a5d4 100644 (file)
@@ -25,7 +25,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.1 2000-07-25 05:28:11 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.8 2000-10-06 04:23:14 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,22 +36,17 @@ static const char rcsid[] =
 #include <sys/time.h>
 #include <sys/socket.h>
 
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-
 #include <netinet/in.h>
-#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
 
 #include <pcap.h>
 #include <stdio.h>
+#include <string.h>
 
 #include "interface.h"
 #include "addrtoname.h"
 #include "ethertype.h"
 
+#include "ether.h"
 #include "token.h"
 
 /* Extract src, dst addresses */
@@ -118,7 +113,6 @@ token_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        u_int caplen = h->caplen;
        u_int length = h->len;
        struct token_header *trp;
-       u_short ether_type;
        u_short extracted_ethertype;
        struct ether_header ehdr;
        u_int route_len = 0, seg;