]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip6.c
Add program_name field in the netdissect_options structure
[tcpdump] / print-ip6.c
index 7311c8ff869a4fa33dd9050d005a18dcb1f01163..4a876995fa7a807db8b5c55ab11f316bc619b49f 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#ifdef INET6
-
 #include <tcpdump-stdinc.h>
 
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 #include "extract.h"
 
+#ifdef INET6
+
 #include "ip6.h"
 #include "ipproto.h"
 
@@ -223,8 +222,7 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length)
                    }
 
                case IPPROTO_PIM:
-                       pim_print(ndo, cp, len, nextproto6_cksum(ip6, cp, len, len,
-                                                           IPPROTO_PIM));
+                       pim_print(ndo, cp, len, (const u_char *)ip6);
                        return;
 
                case IPPROTO_OSPF:
@@ -266,4 +264,12 @@ trunc:
        ND_PRINT((ndo, "[|ip6]"));
 }
 
+#else /* INET6 */
+
+void
+ip6_print(netdissect_options *ndo, const u_char *bp _U_, u_int length)
+{
+       ND_PRINT((ndo, "IP6, length: %u (printing not supported)", length));
+}
+
 #endif /* INET6 */