X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/d6af516cbc7c874404cb07456a6e80a8e9ddd9b4..6c8ef0eb86a39c277d1a43802dd8ea01b51cfb2a:/print-ip6opts.c diff --git a/print-ip6opts.c b/print-ip6opts.c index 835fe411..14768deb 100644 --- a/print-ip6opts.c +++ b/print-ip6opts.c @@ -27,20 +27,20 @@ * SUCH DAMAGE. */ -#define NETDISSECT_REWORKED +/* \summary: IPv6 header option printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#ifdef INET6 -#include - -#include "ip6.h" +#include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" #include "extract.h" +#include "ip6.h" + static void ip6_sopt_print(netdissect_options *ndo, const u_char *bp, int len) { @@ -147,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)); @@ -173,7 +173,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 +193,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); @@ -211,4 +211,3 @@ dstopt_print(netdissect_options *ndo, register const u_char *bp) ND_PRINT((ndo, "[|DSTOPT]")); return(-1); } -#endif /* INET6 */