DOKK / manpages / debian 12 / libsocket-getaddrinfo-perl / socket_getnameinfo.1p.en
SOCKET_GETNAMEINFO(1p) User Contributed Perl Documentation SOCKET_GETNAMEINFO(1p)

"socket_getnameinfo" - command-line tool to "getnameinfo(3)" resolver

socket_getnameinfo [options...] address port

This tool provides a convenient command-line wrapper around the getnameinfo(3) resolver function. It will perform a single reverse lookup to convert an address and port number into its host and service names. This is mainly useful when debugging names resolution problems, because it allows inspection of the getnameinfo(3) behaviour itself, outside of any real program that is trying to use it.

Numerical form of address to look up. If not supplied, will use the first positional argument.
Port number to look up. If not supplied, will use the second positional argument.
Sets the "NI_DGRAM" flag; looks up a "SOCK_DGRAM" (udp) port allocation rather than "SOCK_STREAM" (tcp).
Display a help summary and exit

Upstream this script is known as "getnameinfo", but was renamed on Debian.

Paul Evans <leonerd@leonerd.org.uk>

2022-10-13 perl v5.34.0