getpeername
get name of connected TCP/IP peer
- Provided by: tcputils (Version: 0.6.2-10build1)
- Report a bug
get name of connected TCP/IP peer
getpeername [-n] [-p protocol]
getpeername prints the IP address and service name (port number) of the remote peer connected to standard input. The IP address and the service name are printed on the same line, separated by one space.
Only works on IP sockets.