xdr_stream_...paque_inline(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to xdr_stream_...paque_inline(9) from the Kernel API Manual πŸ’– the main character is xdr_stream_decode_opaque_inline, and she is here to decode variable length opaque xdr data. no cap.


✨ SYNOPSIS ✨

the whole signature, untouched, because we do not mess with the source:

ssize_t xdr_stream_decode_opaque_inline (struct xdr_stream *xdr , void
       **ptr , size_t maxlen );

πŸŽ€ ARGUMENTS πŸŽ€

  • xdr β€” pointer to xdr_stream. that's the stream we're reading from, bestie.
  • ptr β€” location to store pointer to opaque data. this is where the pointer goes, not the data itself πŸ’…
  • maxlen β€” maximum acceptable object size. respect the limit, fr fr.

⚠️ NOTE ⚠️

okay so this is the big one: the pointer stored in ptr cannot be assumed valid after the XDR buffer has been destroyed, or even after calling xdr_inline_decode on xdr. 😭 it is therefore expected that the object it points to should be processed immediately. do not save it for later, just process it right away 🫢

πŸ”₯ RETURN πŸ”₯

On success, returns size of object stored in *ptr. -EBADMSG on XDR buffer overflow. -EMSGSIZE if the size of the object would exceed maxlen. that's the whole return vibe, periodt ✨

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file is ./include/linux/sunrpc/xdr.h, and the whole squad is:


ciao for now πŸ’œ source/version: ./include/linux/sunrpc Β· date: October 2026 Β· page: xdr_stream_...paque_inline(9)

πŸ“¦ where this page comes from