RPC_XDR(3)

πŸ’– RPC_XDR πŸ’–

okay bestie, sit down, hydrate, and let me tell you about RPC_XDR(3) from the Library Functions Manual section 3, because this one is the XDR glow-up for remote procedure calls and it's honestly so useful it's giving main character energy.


✨ NAME ✨

xdr_accepted_reply, xdr_authsys_parms, xdr_callhdr, xdr_callmsg, xdr_opaque_auth, xdr_rejected_reply, xdr_replymsg β€” XDR library routines for remote procedure calls 🫢


🌈 SYNOPSIS 🌈

#include <rpc/rpc.h>

bool_t
xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

bool_t
xdr_authsys_parms(XDR *xdrs, struct authsys_parms *aupp);

bool_t
xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

bool_t
xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

bool_t
xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

bool_t
xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

bool_t
xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

like. look at all those bool_t returns. so consistent. so iconic. πŸ’…


🌸 DESCRIPTION 🌸

so these routines are the ones you call when you wanna describe RPC messages in the XDR language. the whole point is that they're for the girlies who do not wanna use the RPC package directly β€” you're doing it by hand, on purpose, and that's valid. ✨

and the returns? simple. clean. no drama:

  • they return TRUE if they succeed πŸ’–
  • they return FALSE otherwise πŸ’€

periodt.


πŸŽ€ Routines πŸŽ€

first things first, go read rpc(3) for the definition of the XDR data structure, because we're not re-explaining that here, iykyk.

  • xdr_accepted_reply() β€” translates between RPC reply messages and their external representation. it's got the status of the RPC call in the XDR language format tucked inside. and if it went well? it ALSO carries the call results. bestie ate and left no crumbs. πŸ‘‘
  • xdr_authsys_parms() β€” this one describes Unix operating system credentials. we're talking machine-name, uid, gid list, etc. the whole little ID card. πŸͺͺ
  • xdr_callhdr() β€” describes RPC call header messages. it encodes the static part of the call message header in the XDR language format, and it's carrying info like transaction ID, RPC version number, program and version number. the essentials only. ✨
  • xdr_callmsg() β€” describes RPC call messages, and it's the full package: all the RPC call information such as transaction ID, RPC version number, program number, version number, authentication information, etc. normally used by servers to figure out what the client's RPC call is even about. servers love gossip, no cap. πŸ™ˆ
  • xdr_opaque_auth() β€” describes RPC opaque authentication information messages. mysterious. opaque. we respect the privacy. πŸ¦‹
  • xdr_rejected_reply() β€” describes RPC reply messages, encoding the rejected RPC message in the XDR language format. and why would a message get rejected, you ask? either because of a version number mis-match, or because of authentication errors. it's giving "we need to talk". πŸ’€
  • xdr_replymsg() β€” describes RPC reply messages too, translating between the RPC reply message and its external representation. and this reply could be an acceptance, a rejection, or NULL. the three moods. 🌈

πŸ’œ AVAILABILITY πŸ’œ

these functions are part of libtirpc. that's it, that's the availability. go check your packages, bestie. πŸŽ€


⭐ SEE ALSO ⭐


and that's the whole page, bestie!! we did it!! πŸ₯³ this lil manual page is from Debian and it's dated May 3, 1993 β€” yes, 1993, she's been serving for decades and she's still relevant, we stan an ageless queen πŸ‘‘πŸ’– now go forth and XDR responsibly, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from