rpc_pton(9)
π NAME π
rpc_pton β Construct a sockaddr in @sap β¨
Okay bestie, this is the rpc_pton(9) page from the Kernel API Manual, and itβs here to teach you how this function constructs a sockaddr in @sap. Not me being dramatic, itβs literally the name. π
πΈ SYNOPSIS πΈ
size_t rpc_pton (struct net *net , const char *buf , const size_t buflen
, struct sockaddr *sap , const size_t salen );
π ARGUMENTS π
netβ applicable network namespace.bufβ C string containing presentation format IP address.buflenβ length of presentation address in bytes.sapβ buffer into which to plant socket address.salenβ size of buffer in bytes.
π¦ DESCRIPTION π¦
So hereβs the vibe: this function returns the size of the socket address if itβs successful; otherwise zero is returned. Thatβs the success/failure check, no cap.
It plants a socket address in sap and returns the size of the socket address, if successful. Returns zero if an error occurred. Literally that simple: happy path gives you the size, error path gives you 0 and you can go touch grass. π
π SEE ALSO π
- Kernel file
./net/sunrpc/addr.c rpc_ntop(9)rpc_sockaddr2uaddr(9)rpc_uaddr2sockaddr(9)
Catch you later, bestie β this page is from ./net/sunrpc, dated October 2026 π
β¨
π¦ 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