SOCKET_...AMEINFO(1p)

πŸ“¦
version 0.22 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so <pink>socket_getnameinfo</pink> β€” it's a command-line tool that wraps up the <purple>getnameinfo(3)</purple> resolver, bestie. that's the whole vibe ✨


🌸 SYNOPSIS 🌸

socket_getnameinfo [options...] address port

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically this tool is a cute lil convenient command-line wrapper around the <purple>getnameinfo(3)</purple> resolver function. it does one single reverse lookup and turns an address plus a port number into their host and service names. periodt πŸ’…

and like, why do you care? because it's mainly useful when you're debugging name resolution problems πŸ•΅οΈβ™€οΈ β€” it lets you peek directly at what <purple>getnameinfo(3)</purple> is doing itself, totally outside of any real program that's trying to use it. no middleman, no extra chaos, just the raw behaviour. iconic honestly πŸŽ€


✨ OPTIONS ✨

  • --address, -A ADDR β€” the numerical form of the address you wanna look up. if you don't pass it, it'll just use the first positional argument instead 🫢
  • --port, -P PORT β€” the port number you wanna look up. if you don't pass it, it'll use the second positional argument πŸ’–
  • --dgram β€” sets the <purple>NI_DGRAM</purple> flag, so it looks up a <purple>SOCK_DGRAM</purple> (udp) port allocation instead of <purple>SOCK_STREAM</purple> (tcp). lowkey important, don't skip it πŸ”₯
  • --help β€” shows a help summary and dips out ✌️

πŸ“ NOTE πŸ“

upstream, this script is actually called <pink>getnameinfo</pink> β€” but on Debian it got renamed. so if you're out here looking for getnameinfo and it's giving nothing, that's why bestie 😭


πŸ‘‘ AUTHOR πŸ‘‘

Paul Evans <leonerd@leonerd.org.uk>


and that's the whole page, no cap ✨ this lil gem is part of the User Contributed Perl Documentation for perl v5.40.0, dated 2025-02-01 β€” so like, if you're running something older, maybe don't come for me πŸ’€. go resolve some names, you main character πŸŒˆπŸ’œ

πŸ“¦ where this page comes from