]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip6opts.c
Add program_name field in the netdissect_options structure
[tcpdump] / print-ip6opts.c
index 835fe4117a01cf15ec304a616f852eee29f52e6a..8be9113e6542255a28dd132442fbc1fbcb3c42f0 100644 (file)
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -37,7 +36,7 @@
 
 #include "ip6.h"
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 #include "extract.h"
 
@@ -147,7 +146,7 @@ ip6_opt_print(netdissect_options *ndo, const u_char *bp, int len)
                ND_PRINT((ndo, "(homeaddr: invalid len %d)", bp[i + 1]));
                goto trunc;
            }
-           ND_PRINT((ndo, "(homeaddr: %s", ip6addr_string(&bp[i + 2])));
+           ND_PRINT((ndo, "(homeaddr: %s", ip6addr_string(ndo, &bp[i + 2])));
             if (bp[i + 1] > IP6OPT_HOMEADDR_MINLEN - 2) {
                ip6_sopt_print(ndo, &bp[i + IP6OPT_HOMEADDR_MINLEN],
                    (optlen - IP6OPT_HOMEADDR_MINLEN));
@@ -173,7 +172,7 @@ trunc:
 int
 hbhopt_print(netdissect_options *ndo, register const u_char *bp)
 {
-    const struct ip6_hbh *dp = (struct ip6_hbh *)bp;
+    const struct ip6_hbh *dp = (const struct ip6_hbh *)bp;
     int hbhlen = 0;
 
     ND_TCHECK(dp->ip6h_len);
@@ -193,7 +192,7 @@ hbhopt_print(netdissect_options *ndo, register const u_char *bp)
 int
 dstopt_print(netdissect_options *ndo, register const u_char *bp)
 {
-    const struct ip6_dest *dp = (struct ip6_dest *)bp;
+    const struct ip6_dest *dp = (const struct ip6_dest *)bp;
     int dstoptlen = 0;
 
     ND_TCHECK(dp->ip6d_len);