xdr_stream_decode_u32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

Okay so real talk: this page is all about xdr_stream_decode_u32(9), a lil kernel function that pulls a 32-bit integer out of an XDR stream. That's it. That's the whole vibe. Slay. πŸŽ€


✨ SYNOPSIS ✨

ssize_t xdr_stream_decode_u32 (struct xdr_stream *xdr , __u32 *ptr );

That's the whole signature, no cap β€” it hands you back an ssize_t, takes a pointer to your xdr_stream, and a spot to drop the number. 🫢


🌸 ARGUMENTS 🌸

  • xdr β€” pointer to the xdr_stream. This is the stream bestie, the main character, the thing you're reading from.
  • ptr β€” location to store the integer. Yes queen, this is where the decoded 32-bit number goes. πŸ“

⭐ RETURN ⭐

  • 0 on success. Iconic, flawless, no notes. πŸ‘‘
  • -EBADMSG on XDR buffer overflow. Yeah that's the vibe check failing β€” your buffer ran out, and the kernel is telling you about it very directly. 😭

πŸ”₯ SEE ALSO πŸ”₯

Everything lives in the kernel file ./include/linux/sunrpc/xdr.h β€” that's the mothership. And here is the entire friend group, alphabetically-ish and in order, no skips, no cap, fr fr:

Like… go read those too, they're literally all cousins of this function. Go off. 🌈


πŸ’– and that's the page, bestie πŸ’–

Shoutout to the source <pink>./include/linux/sunrpc</pink> and the date stamp <purple>October 2026</purple> β€” that's the era this page is serving, and honestly? Ate. πŸ¦‹βœ¨

πŸ“¦ where this page comes from