rpc_pton(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌈

Catch you later, bestie β€” this page is from ./net/sunrpc, dated October 2026 πŸ’…βœ¨

πŸ“¦ where this page comes from