]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
Use double rather than float.
[tcpdump] / print-pim.c
index 16bfa62535f2a9374a55385bb40b1feb71cb6157..f023207d613603d819a6d1a3ac793e4f02785e3c 100644 (file)
@@ -23,9 +23,9 @@
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 #include "extract.h"
 
@@ -640,12 +640,14 @@ pimv2_check_checksum(const u_char *bp, const u_char *bp2, u_int len)
                vec[0].len = len;
                cksum = in_cksum(vec, 1);
                return (cksum ? INCORRECT : CORRECT);
+#ifdef INET6
        } else if (IP_V(ip) == 6) {
                const struct ip6_hdr *ip6;
 
                ip6 = (const struct ip6_hdr *)bp2;
                cksum = nextproto6_cksum(ip6, bp, len, len, IPPROTO_PIM);
                return (cksum ? INCORRECT : CORRECT);
+#endif
        } else {
                return (UNVERIFIED);
        }
@@ -785,8 +787,6 @@ pimv2_print(netdissect_options *ndo,
                                if (ndo->ndo_vflag > 1) {
                                        const u_char *ptr = bp;
                                        while (ptr < (bp+olen)) {
-                                               int advance;
-
                                                ND_PRINT((ndo, "\n\t    "));
                                                advance = pimv2_addr_print(ndo, ptr, pimv2_unicast, 0);
                                                if (advance < 0) {