xdr_stream_...paque_inline(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xdr_stream_encode_opaque_inline β€” the kernel API manual, bestie edition ✨

okay so this is a page from the Kernel API Manual (manual name: xdr_stream_...paque_inline(9), yes the title got truncated mid-word, she's doing her best 🫢) and it's literally all about squishing opaque xdr data into a stream. it's giving "short page, important job" energy.


✨ NAME ✨

xdr_stream_encode_opaque_inline β€” Encode opaque xdr data πŸ’–

like, that's it, that's the whole vibe. she encodes. she's opaque. she's inline. iconic.


πŸŽ€ SYNOPSIS πŸŽ€

ssize_t xdr_stream_encode_opaque_inline (struct xdr_stream *xdr , void
**ptr , size_t len );

no cap, that's the exact signature β€” three args, one ssize_t return, and she's wrapped across two lines in the original and we're keeping it that way because we respect the source material πŸ™ˆ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • xdr β€” pointer to xdr_stream. this is the stream, the main character, the thing everything happens inside of. πŸ‘‘
  • ptr β€” pointer to void pointer. yes bestie, a pointer to a pointer, double-indirection is a whole aesthetic and we're living for it. πŸ’€
  • len β€” size of object. how big the thing is. that's the whole note. ✨

🌸 RETURN 🌸

  • On success β€” returns length in bytes of XDR buffer consumed. so she tells u exactly how much buffer she ate, which is honestly so considerate of her πŸ“
  • -EMSGSIZE β€” on XDR buffer overflow. translation: the buffer ran out of room and she's not happy about it, so u get this negative errno instead. 😭
fr fr, check that return value. success gives u a byte count (a non-negative number), overflow gives u -EMSGSIZE. those are very different situations and u do not want to mix them up πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/sunrpc/xdr.h β€” that's the header where all the xdr lore lives, go read it, she's thick with content πŸ‘‘

and then the whole friend group, in order, because every single one of these deserves a mention:

note the last few β€” the decode_* girlies are the mirror-image counterparts of the encode_* ones, and notably xdr_stream_decode_opaque_inline(9) is literally this function's sibling. family reunion πŸ§šπŸ’œ


okay that's the page!! mwah πŸ’– big kiss, go encode some opaque data responsibly.

sign-off moment: this gem comes from ./include/linux/sunrpc, dated October 2026, and it's filed under the xdr_stream_...paque_inline(9) entry in the Kernel API Manual. slay, documented, periodt. πŸŒˆβ­πŸ‘‘

πŸ“¦ where this page comes from