Modify the display of the Target line in the header such that, for both the source and the destination, the hostname is only shown if it differs from the IP address.
For the destination, if the user supplies a target hostname it is resolved to an IP address and and both the IP address and provided hostname are shown. If the user supplies an IP address, a reverse DNS hostname lookup is attempted and, if successful, both the IP address and first resolved hostname are shown, otherwise only the IP address is shown.
For the source, a reverse DNS hostname lookup is attempted and if successful both the IP address and first resolved hostname are shown, otherwise only the IP address is shown.
The following is an example of the old and new Target line (for ICMP and UDP/TCP).
Modify the display of the
Target
line in the header such that, for both the source and the destination, the hostname is only shown if it differs from the IP address.For the destination, if the user supplies a target hostname it is resolved to an IP address and and both the IP address and provided hostname are shown. If the user supplies an IP address, a reverse DNS hostname lookup is attempted and, if successful, both the IP address and first resolved hostname are shown, otherwise only the IP address is shown.
For the source, a reverse DNS hostname lookup is attempted and if successful both the IP address and first resolved hostname are shown, otherwise only the IP address is shown.
The following is an example of the old and new
Target
line (for ICMP and UDP/TCP).Old (ICMP):
trip news.ycombinator.com:
trip 209.216.230.207:
New (ICMP):
trip news.ycombinator.com:
trip 209.216.230.207:
Old (UDP/TCP):
trip news.ycombinator.com --udp
trip 209.216.230.207 --udp:
New (UDP/TCP):
trip news.ycombinator.com --udp
trip 209.216.230.207 --udp: