xdr_stream_decode_be32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xdr_stream_decode_be32 β€” from the Kernel API Manual, bestie ✨

Okay so picture this: you're deep in kernel land, XDR buffers everywhere, and you just need one little big-endian 32-bit integer out of the stream. That's literally this function. She's xdr_stream_decode_be32, and she's about to be your new fave 🫢


✨ NAME ✨

xdr_stream_decode_be32 β€” decode a big-endian 32-bit integer πŸŽ€

No cap, that's the whole job. She decodes. She's big-endian. She's 32 bits. Iconic behavior only.


🌸 SYNOPSIS 🌸

ssize_t xdr_stream_decode_be32 (struct xdr_stream *xdr , __be32 *ptr );

Look at her go 😭 Two args, one return value, zero drama.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • xdr β€” pointer to xdr_stream. This is the stream bestie, the main character, the source of all the bytes we're about to read πŸ’–
  • ptr β€” location to store integer. Yes, the location. The spot. Where the decoded number goes to live. 🏠

⭐ RETURN ⭐

  • 0 on success β€” slay, we ate, everything went perfectly ✨
  • -EBADMSG on XDR buffer overflow β€” the buffer said "nope, nothing left for you here" πŸ’€
Heads up bestie: watch for that -EBADMSG. If the XDR buffer overflows, that's what you're getting back, so like… check your return value, fr fr πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/sunrpc/xdr.h β€” and honestly the whole friend group showed up for this one, so let's give them all their flowers 🌈

Like… the entire encode-and-decode squad, all in one place πŸ§šπŸ’œ


Written and blessed by the good people over at ./include/linux/sunrpc, dated October 2026 β€” this has been your girl, signing off, mwah πŸ’‹πŸ’…πŸ“

πŸ“¦ where this page comes from