X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8863fc0e5d6cc6bf64875fa4156ddfd54c6cf9c9..486704db7c840dcfb51f70f1812d9c3ad37ad39c:/print-dvmrp.c diff --git a/print-dvmrp.c b/print-dvmrp.c index 2d712d82..8e008326 100644 --- a/print-dvmrp.c +++ b/print-dvmrp.c @@ -19,7 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -62,7 +61,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 +162,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 +172,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 +220,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 +238,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 +266,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 +301,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,7 +333,7 @@ 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(ndo, EXTRACT_32BITS(bp)); @@ -348,7 +347,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 +358,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);