]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip6opts.c
document SIGUSR1 in manual page
[tcpdump] / print-ip6opts.c
index f0dd45036d44671ee3f48d516c8ada8c533f3630..14ad42c3c99a6502fd26ddb2467d16d1306db30f 100644 (file)
@@ -27,6 +27,7 @@
  * SUCH DAMAGE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -36,7 +37,7 @@
 
 #include "ip6.h"
 
-#include "netdissect.h"
+#include "interface.h"
 #include "addrtoname.h"
 #include "extract.h"
 
@@ -146,7 +147,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));
@@ -185,7 +186,7 @@ hbhopt_print(netdissect_options *ndo, register const u_char *bp)
     return(hbhlen);
 
   trunc:
-    fputs("[|HBH]", stdout);
+    ND_PRINT((ndo, "[|HBH]"));
     return(-1);
 }
 
@@ -207,7 +208,7 @@ dstopt_print(netdissect_options *ndo, register const u_char *bp)
     return(dstoptlen);
 
   trunc:
-    fputs("[|DSTOPT]", stdout);
+    ND_PRINT((ndo, "[|DSTOPT]"));
     return(-1);
 }
 #endif /* INET6 */