]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-igrp.c
There's no link-layer header on Linux ARPHRD_ATM packets; there's
[tcpdump] / print-igrp.c
index b3eead128fb84514773bfeece511e58ee7277a73..2580ca5ee05594e5b33eb73abb973b1143b556cc 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.13 2000-09-23 08:26:34 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.16 2001-06-15 22:17:32 fenner Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -35,9 +35,6 @@ static const char rcsid[] =
 #include <sys/socket.h>
 
 #include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
 
 #include <errno.h>
 #include <stdio.h>
@@ -45,6 +42,7 @@ static const char rcsid[] =
 #include "interface.h"
 #include "addrtoname.h"
 #include "igrp.h"
+#include "ip.h"
 #include "extract.h"                   /* must come after interface.h */
 
 static void
@@ -94,9 +92,7 @@ igrp_print(register const u_char *bp, u_int length, register const u_char *bp2)
        hdr = (struct igrphdr *)bp;
        ip = (struct ip *)bp2;
        cp = (u_char *)(hdr + 1);
-        (void)printf("%s > %s: igrp: ",
-           ipaddr_string(&ip->ip_src),
-           ipaddr_string(&ip->ip_dst));
+        (void)printf("igrp:");
 
        /* Header */
        TCHECK(*hdr);
@@ -128,7 +124,7 @@ igrp_print(register const u_char *bp, u_int length, register const u_char *bp2)
                        igrp_entry_print((struct igrprte *)cp, 0, 1);
                        --next;
                } else {
-                       (void)printf("[extra bytes %d]", length);
+                       (void)printf(" [extra bytes %d]", length);
                        break;
                }
                cp += IGRP_RTE_SIZE;
@@ -137,5 +133,5 @@ igrp_print(register const u_char *bp, u_int length, register const u_char *bp2)
        if (nint == 0 && nsys == 0 && next == 0)
                return;
 trunc:
-       fputs("[|igrp]", stdout);
+       fputs(" [|igrp]", stdout);
 }