diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-09-23 17:07:49 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-09-23 17:33:30 +0200 |
commit | a03717380c5802c4f5f3105516badd4ceb4213e7 (patch) | |
tree | fcd48831fcfbcdaded9998edfb746453f2d5d169 /print-pgm.c | |
parent | 0536c98eee29f9eae2540cba32f44860a5cb472c (diff) | |
download | tcpdump-a03717380c5802c4f5f3105516badd4ceb4213e7.tar.gz |
PGM: Use GET_IPADDR_STRING()/GET_IP6ADDR_STRING() calls
Replace the calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.
Diffstat (limited to 'print-pgm.c')
-rw-r--r-- | print-pgm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/print-pgm.c b/print-pgm.c index 97ff0e10..7c47b12b 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: ", |