]> The Tcpdump Group git mirrors - tcpdump/commit
UDP: Clean up address and port printing.
authorDenis Ovsienko <[email protected]>
Tue, 12 Jan 2021 13:37:50 +0000 (13:37 +0000)
committerDenis Ovsienko <[email protected]>
Wed, 13 Jan 2021 00:21:24 +0000 (00:21 +0000)
commit5599c4f2cc70a0b9f70528caea5ab912ac51084c
tree1b5188be737cbdd2c181cded0654fe8a11430604
parente6cf3b7fdbac28fde2b588692866cfdfb9a21818
UDP: Clean up address and port printing.

udp_print() always knows whether UDP port numbers are available or not,
so split udpipaddr_print() into two functions to lose some arity, much
branching and all type casting. In the new functions test for IPv4
explicitly. In udp_print() convert duplicate code into a conditional
call to udpipaddr_print().
CHANGES
print-udp.c