X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/abc8c2d61c65757011d9d32abb01cd1e51232f3a..10ac80fdecfa9b9b7d259d8f50d0b72ef1b18f12:/print-udp.c diff --git a/print-udp.c b/print-udp.c index 1db9bed9..0efb0f1e 100644 --- a/print-udp.c +++ b/print-udp.c @@ -103,7 +103,6 @@ vat_print(netdissect_options *ndo, const u_char *hdr, u_int length) ND_PRINT("udp/va/vat, length %u < 2", length); return; } - ND_TCHECK_2((const u_int *)hdr); ts = GET_BE_U_2(hdr); if ((ts & 0xf060) != 0) { /* probably vt */ @@ -130,10 +129,6 @@ vat_print(netdissect_options *ndo, const u_char *hdr, u_int length) if (i0 & 0x3f000000) ND_PRINT(" s%u", (i0 >> 24) & 0x3f); } - return; - -trunc: - nd_print_trunc(ndo); } static void @@ -330,13 +325,13 @@ udpipaddr_print(netdissect_options *ndo, const struct ip *ip, int sport, int dpo if (GET_U_1(ip6->ip6_nxt) == IPPROTO_UDP) { if (sport == -1) { 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 > %s.%s: ", - ip6addr_string(ndo, ip6->ip6_src), + GET_IP6ADDR_STRING(ip6->ip6_src), udpport_string(ndo, (uint16_t)sport), - ip6addr_string(ndo, ip6->ip6_dst), + GET_IP6ADDR_STRING(ip6->ip6_dst), udpport_string(ndo, (uint16_t)dport)); } } else { @@ -350,13 +345,13 @@ udpipaddr_print(netdissect_options *ndo, const struct ip *ip, int sport, int dpo if (GET_U_1(ip->ip_p) == IPPROTO_UDP) { if (sport == -1) { 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)); } else { ND_PRINT("%s.%s > %s.%s: ", - ipaddr_string(ndo, ip->ip_src), + GET_IPADDR_STRING(ip->ip_src), udpport_string(ndo, (uint16_t)sport), - ipaddr_string(ndo, ip->ip_dst), + GET_IPADDR_STRING(ip->ip_dst), udpport_string(ndo, (uint16_t)dport)); } } else {