rpcb_v4_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the Kernel API Manual page for rpcb_v4_register(9) β€” and it's literally about setting or unsetting a port registration with the local rpcbind. no cap, that's the whole vibe: rpcb_v4_register β€” set or unset a port registration with the local rpcbind. πŸ’…

✨ SYNOPSIS ✨

int rpcb_v4_register (struct net *net , const u32 program , const u32 version , const struct sockaddr *address , const char *netid );

🫢 ARGUMENTS 🫢

  • net β€” the target network namespace. yes, that's the whole namespace situation.
  • program β€” RPC program number of service to (un)register. πŸŽ€
  • version β€” RPC version number of service to (un)register. ⭐
  • address β€” address family, IP address, and port to (un)register. the whole little address package.
  • netid β€” netid of transport protocol to (un)register. transport tea. πŸ“

πŸ’– DESCRIPTION πŸ’–

so here's the tea: this function returns zero if the registration request was dispatched successfully and the rpcbind daemon returned success. otherwise? it returns an errno value that reflects the nature of the error β€” like the request could not be dispatched, it timed out, or rpcbind returned an error. 😭

RPC services invoke this function to advertise their contact information via the system's rpcbind daemon. they invoke this function once for each [program, version, address, netid] tuple they wish to advertise. one tuple, one call β€” that's the vibe. ✨

callers may also unregister RPC services that are registered at a specific address by setting the port number in address to zero. they may unregister all registered protocol families at once for a service by passing a NULL address argument. and if netid is "" then all netids for [program, version, address] are unregistered. poof, gone. 🫧

this function uses rpcbind protocol version 4 to contact the local rpcbind daemon. the local rpcbind daemon must support version 4 of the rpcbind protocol in order for these functions to register a service successfully. no v4? no successful registration, bestie. πŸ’€

supported netids include "udp" and "tcp" for UDP and TCP over IPv4, and "udp6" and "tcp6" for UDP and TCP over IPv6, respectively. cute lil protocol family menu. πŸ“

the contents of address determine the address family and the port to be registered. the usual practice is to pass INADDR_ANY as the raw address, but specifying a non-zero address is also supported by this API if the caller wishes to advertise an RPC service on a specific network interface. main character interface energy. πŸ‘‘

note bestie: passing in INADDR_ANY does not create the same service registration as IN6ADDR_ANY. the former advertises an RPC service on any IPv4 address, but not on IPv6. the latter advertises the service on all IPv4 and IPv6 addresses. so yes, they are different β€” do not conflate them. πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the page, bestie. source/version says ./net/sunrpc, date says October 2026, and the page itself is rpcb_v4_register(9). mwah, go register responsibly. πŸ’–πŸŽ€

πŸ“¦ where this page comes from