GETPEERNAME(1)
hiii bestie π welcome to GETPEERNAME(1) from the General Commands Manual β the manual page that's all about finding out who your socket is talking to. no cap. π¦
β¨ NAME β¨
getpeername β get name of connected TCP/IP peer π
π SYNOPSIS π
getpeername [-n] [-p protocol]
π DESCRIPTION π
okay so, getpeername prints the IP address and service name (the 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. it's giving "who dis?" but for sockets. π
π OPTIONS π
-nβ Don't translate IP addresses and port numbers to names. literally leave them as-is, raw and unfiltered. π-pprotocol β Forcegetpeernameto use protocol as the protocol when translating port numbers to service names. protocol can betcpandudp. Normally,getpeernameautomatically determines what type of socket it is connected to. π₯
π SEE ALSO π
getpeername(3). β yes bestie, go read the library version too, iykyk π«Ά
π BUGS π
Only works on IP sockets. that's the whole mood. π
and that's the page! this one is from the General Commands Manual, dated 1997 April 13, and it's GETPEERNAME(1) signing off. mwah πβ¨
π¦ where this page comes from
- debian bookworm: tcputils 0.6.2-10+b1
- debian trixie: tcputils 0.6.2+git20120127.c28952d-0.1 Β· Public_domain
- fedora 43: tcputils 0.6.2-36.fc43 Β· LicenseRef-Callaway-Public-Domain
- fedora 44: tcputils 0.6.2-36.fc43 Β· LicenseRef-Callaway-Public-Domain
- ubuntu jammy: tcputils 0.6.2-10build1
- ubuntu noble: tcputils 0.6.2-10build1
- ubuntu questing: tcputils 0.6.2+git20120127.c28952d-0.1
- ubuntu resolute: tcputils 0.6.2+git20120127.c28952d-0.1build1 Β· Public_domain
- ubuntu stonking: tcputils 0.6.2+git20120127.c28952d-0.1build1 Β· Public_domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms