]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-dvmrp.c
Fix the pointer tests in the non-ndoified TTEST2() macro as well.
[tcpdump] / print-dvmrp.c
index 20af2cf5298d22657a972b57a21295ce148ab018..96a0ee73f578dfd53a22df520b01a895516bacc4 100644 (file)
@@ -62,7 +62,7 @@ static int print_prune(netdissect_options *, const u_char *);
 static int print_graft(netdissect_options *, const u_char *);
 static int print_graft_ack(netdissect_options *, const u_char *);
 
-static u_int32_t target_level;
+static uint32_t target_level;
 
 void
 dvmrp_print(netdissect_options *ndo,
@@ -163,7 +163,7 @@ print_report(netdissect_options *ndo,
              register const u_char *bp, register const u_char *ep,
              register u_int len)
 {
-       register u_int32_t mask, origin;
+       register uint32_t mask, origin;
        register int metric, done;
        register u_int i, width;
 
@@ -173,7 +173,7 @@ print_report(netdissect_options *ndo,
                        return (0);
                }
                ND_TCHECK2(bp[0], 3);
-               mask = (u_int32_t)0xff << 24 | bp[0] << 16 | bp[1] << 8 | bp[2];
+               mask = (uint32_t)0xff << 24 | bp[0] << 16 | bp[1] << 8 | bp[2];
                width = 1;
                if (bp[0])
                        width = 2;
@@ -221,7 +221,7 @@ print_probe(netdissect_options *ndo,
             register const u_char *bp, register const u_char *ep,
             register u_int len)
 {
-       register u_int32_t genid;
+       register uint32_t genid;
 
        ND_TCHECK2(bp[0], 4);
        if ((len < 4) || ((bp + 4) > ep)) {
@@ -239,7 +239,7 @@ print_probe(netdissect_options *ndo,
 
        while ((len > 0) && (bp < ep)) {
                ND_TCHECK2(bp[0], 4);
-               ND_PRINT((ndo, "\n\tneighbor %s", ipaddr_string(bp)));
+               ND_PRINT((ndo, "\n\tneighbor %s", ipaddr_string(ndo, bp)));
                bp += 4; len -= 4;
        }
        return (0);
@@ -267,9 +267,9 @@ print_neighbors(netdissect_options *ndo,
                len -= 7;
                while (--ncount >= 0) {
                        ND_TCHECK2(bp[0], 4);
-                       ND_PRINT((ndo, " [%s ->", ipaddr_string(laddr)));
+                       ND_PRINT((ndo, " [%s ->", ipaddr_string(ndo, laddr)));
                        ND_PRINT((ndo, " %s, (%d/%d)]",
-                                  ipaddr_string(bp), metric, thresh));
+                                  ipaddr_string(ndo, bp), metric, thresh));
                        bp += 4;
                        len -= 4;
                }
@@ -302,8 +302,8 @@ print_neighbors2(netdissect_options *ndo,
                ncount = *bp++;
                len -= 8;
                while (--ncount >= 0 && (len >= 4) && (bp + 4) <= ep) {
-                       ND_PRINT((ndo, " [%s -> ", ipaddr_string(laddr)));
-                       ND_PRINT((ndo, "%s (%d/%d", ipaddr_string(bp),
+                       ND_PRINT((ndo, " [%s -> ", ipaddr_string(ndo, laddr)));
+                       ND_PRINT((ndo, "%s (%d/%d", ipaddr_string(ndo, bp),
                                     metric, thresh));
                        if (flags & DVMRP_NF_TUNNEL)
                                ND_PRINT((ndo, "/tunnel"));
@@ -334,10 +334,10 @@ print_prune(netdissect_options *ndo,
             register const u_char *bp)
 {
        ND_TCHECK2(bp[0], 12);
-       ND_PRINT((ndo, " src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4)));
+       ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
        bp += 8;
        ND_PRINT((ndo, " timer "));
-       relts_print(EXTRACT_32BITS(bp));
+       relts_print(ndo, EXTRACT_32BITS(bp));
        return (0);
 trunc:
        return (-1);
@@ -348,7 +348,7 @@ print_graft(netdissect_options *ndo,
             register const u_char *bp)
 {
        ND_TCHECK2(bp[0], 8);
-       ND_PRINT((ndo, " src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4)));
+       ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
        return (0);
 trunc:
        return (-1);
@@ -359,7 +359,7 @@ print_graft_ack(netdissect_options *ndo,
                 register const u_char *bp)
 {
        ND_TCHECK2(bp[0], 8);
-       ND_PRINT((ndo, " src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4)));
+       ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
        return (0);
 trunc:
        return (-1);