]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-raw.c
There's no link-layer header on Linux ARPHRD_ATM packets; there's
[tcpdump] / print-raw.c
index dbba479b0dcbe739b14356ade52ec6d6786b2bc5..979b5f8f01f038a04fdd65647288c1a8266e3e99 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.26 2000-07-01 03:39:08 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.34 2001-07-05 18:54:17 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -34,18 +34,7 @@ static const char rcsid[] =
 #include <sys/file.h>
 #include <sys/ioctl.h>
 
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-
 #include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/if_ether.h>
-#include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <pcap.h>
 #include <stdio.h>
@@ -54,10 +43,6 @@ struct rtentry;
 #include "addrtoname.h"
 #include "interface.h"
 
-#ifndef AF_NS
-#define AF_NS          6               /* XEROX NS protocols */
-#endif
-
 /*
  * The DLT_RAW packet has no header. It contains a raw IP packet.
  */
@@ -68,6 +53,7 @@ raw_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        u_int length = h->len;
        u_int caplen = h->caplen;
 
+       ++infodelay;
        ts_print(&h->ts);
 
        /*
@@ -81,9 +67,12 @@ raw_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        if (eflag)
                printf("ip: ");
 
-       ip_print(p, length);
+       ipN_print(p, length);
 
        if (xflag)
                default_print(p, caplen);
        putchar('\n');
+       --infodelay;
+       if (infoprint)
+               info(0);
 }