HomeFreeBSD

ping: Remove pr_retip()

Description

ping: Remove pr_retip()

Ping used to provide some sort of packet sniffing capabilities, this was
in an era where hubs were used and tcpdump wasn't invented.

pr_iph() is a function that prints the IP header of the packet.

pr_retip() is essentially a wrapper function to pr_iph(), that also
displays the source and destination ports of a TCP or UDP packet.

After ef9e6dc7eebe9830511602904d3ef5218d964080 some of this
functionality was almost removed, to only display packets sent by us
(26+ years ago).

At this point, reaching this code path was only possible by doctoring
the original packet.

After 46d7b45a267b3d78c5054b210ff7b6c55bfca42b this code path can never
be reached.

Remove the code.

Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38475

Details

Provenance
jlduran_gmail.comAuthored on Feb 9 2023, 9:05 PM
markjCommitted on Mar 19 2023, 4:23 PM
Reviewer
markj
Differential Revision
D38475: ping: Remove vestigial code
Parents
rG20b41303140e: ping: Print the IP options of the original packet
Branches
Unknown
Tags
Unknown