]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-frag6.c
Add SunATM support, based on code from Yen Yen Lim at North Dakota State
[tcpdump] / print-frag6.c
index f064d0b407f1459ca3198135a50ab9f394304be9..533d730d07aaaa7b05c1ba5bc139575199761e85 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.5 2000-02-03 18:16:40 itojun Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.13 2001-09-17 21:58:02 fenner Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -35,21 +35,12 @@ 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_icmp.h>
-#include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 
-#include <netinet/ip6.h>
+#include "ip6.h"
 
 #include "interface.h"
 #include "addrtoname.h"
@@ -61,14 +52,10 @@ frag6_print(register const u_char *bp, register const u_char *bp2)
        register const struct ip6_hdr *ip6;
        register const u_char *ep;
 
-#if 0
-#define TCHECK(var) if ((u_char *)&(var) >= ep - sizeof(var)) goto trunc
-#endif
-
-       dp = (struct ip6_frag *)bp;
-       ip6 = (struct ip6_hdr *)bp2;
+       dp = (const struct ip6_frag *)bp;
+       ip6 = (const struct ip6_hdr *)bp2;
 
-       /* 'ep' points to the end of avaible data. */
+       /* 'ep' points to the end of available data. */
        ep = snapend;
 
        TCHECK(dp->ip6f_offlg);