diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2021-01-12 13:37:50 +0000 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2021-01-13 00:21:24 +0000 |
commit | 5599c4f2cc70a0b9f70528caea5ab912ac51084c (patch) | |
tree | 1b5188be737cbdd2c181cded0654fe8a11430604 /ip.h | |
parent | e6cf3b7fdbac28fde2b588692866cfdfb9a21818 (diff) | |
download | tcpdump-5599c4f2cc70a0b9f70528caea5ab912ac51084c.tar.gz |
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().
Diffstat (limited to 'ip.h')
0 files changed, 0 insertions, 0 deletions