inet_pton_with_scope(9)
π NAME π
okay so bestie, this is inet_pton_with_scope(9) from the Kernel API Manual, and it is literally here to convert an IPv4/IPv6 and port to socket address. iconic behavior, no cap β¨
π SYNOPSIS π
int inet_pton_with_scope (struct net *net , __kernel_sa_family_t af ,
const char *src , const char *port , struct sockaddr_storage *addr );
πΈ ARGUMENTS πΈ
netβ the net namespace, and yes it's used for scope handling π«Άafβ address family:AF_INET,AF_INET6, orAF_UNSPECfor either πsrcβ the start of the address string βportβ the start of the port string, orNULLfor none πaddrβ output socket address π
π¦ DESCRIPTION π¦
bestie, the whole vibe check is this: return zero on success, and return errno when any error occurs πβ¨
like, that's the contract. zero = slay, errno = something went sideways. periodt π
π SEE ALSO π
Kernel file ./net/core/utils.c, plus in4_pton(9), in6_pton(9), and inet_proto_csum_replace16(9) β go read those too, iykyk ππ
mwah π signing off from ./net/core β October 2026 β inet_pton_with_scope(9), and that's the whole cute little manual page, bestie ππ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms