X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b374c49a582318ce0653494f6344911d4dcacb0f..10ac80fdecfa9b9b7d259d8f50d0b72ef1b18f12:/print-pgm.c diff --git a/print-pgm.c b/print-pgm.c index 00e53b82..ccb0b46a 100644 --- a/print-pgm.c +++ b/print-pgm.c @@ -167,12 +167,12 @@ pgm_print(netdissect_options *ndo, if (!ND_TTEST_2(pgm->pgm_dport)) { if (ip6) { ND_PRINT("%s > %s:", - ip6addr_string(ndo, ip6->ip6_src), - ip6addr_string(ndo, ip6->ip6_dst)); + GET_IP6ADDR_STRING(ip6->ip6_src), + GET_IP6ADDR_STRING(ip6->ip6_dst)); } else { ND_PRINT("%s > %s:", - ipaddr_string(ndo, ip->ip_src), - ipaddr_string(ndo, ip->ip_dst)); + GET_IPADDR_STRING(ip->ip_src), + GET_IPADDR_STRING(ip->ip_dst)); } nd_print_trunc(ndo); return; @@ -184,9 +184,9 @@ pgm_print(netdissect_options *ndo, if (ip6) { if (GET_U_1(ip6->ip6_nxt) == IPPROTO_PGM) { ND_PRINT("%s.%s > %s.%s: ", - ip6addr_string(ndo, ip6->ip6_src), + GET_IP6ADDR_STRING(ip6->ip6_src), tcpport_string(ndo, sport), - ip6addr_string(ndo, ip6->ip6_dst), + GET_IP6ADDR_STRING(ip6->ip6_dst), tcpport_string(ndo, dport)); } else { ND_PRINT("%s > %s: ", @@ -195,9 +195,9 @@ pgm_print(netdissect_options *ndo, } else { if (GET_U_1(ip->ip_p) == IPPROTO_PGM) { ND_PRINT("%s.%s > %s.%s: ", - ipaddr_string(ndo, ip->ip_src), + GET_IPADDR_STRING(ip->ip_src), tcpport_string(ndo, sport), - ipaddr_string(ndo, ip->ip_dst), + GET_IPADDR_STRING(ip->ip_dst), tcpport_string(ndo, dport)); } else { ND_PRINT("%s > %s: ", @@ -276,15 +276,12 @@ pgm_print(netdissect_options *ndo, break; } - ND_TCHECK_LEN(bp, sizeof(uint32_t)); ivl = GET_BE_U_4(bp); bp += sizeof(uint32_t); - ND_TCHECK_LEN(bp, sizeof(uint32_t)); rnd = GET_BE_U_4(bp); bp += sizeof(uint32_t); - ND_TCHECK_LEN(bp, sizeof(uint32_t)); mask = GET_BE_U_4(bp); bp += sizeof(uint32_t); @@ -364,7 +361,6 @@ pgm_print(netdissect_options *ndo, * and stopping if we don't have enough. */ bp += (2 * sizeof(uint16_t)); - ND_TCHECK_2(bp); switch (GET_BE_U_2(bp)) { case AFNUM_INET: ND_TCHECK_LEN(bp, sizeof(nd_ipv4)); @@ -459,7 +455,6 @@ pgm_print(netdissect_options *ndo, ND_PRINT("[Total option length leaves no room for final option]"); return; } - ND_TCHECK_2(bp); opt_type = GET_U_1(bp); bp++; opt_len = GET_U_1(bp); @@ -515,7 +510,6 @@ pgm_print(netdissect_options *ndo, ND_PRINT("[Option length not a multiple of 4]"); return; } - ND_TCHECK_4(bp); ND_PRINT(" %u", GET_BE_U_4(bp)); bp += 4; opt_len -= 4;