xdr_stream_decode_be32(9)
π 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 toxdr_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 β
0on success β slay, we ate, everything went perfectly β¨-EBADMSGon 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 π
xdr_set_scratch_buffer(9)xdr_set_scratch_folio(9)xdr_reset_scratch_buffer(9)xdr_commit_encode(9)xdr_stream_remaining(9)xdr_align_size(9)xdr_pad_size(9)xdr_stream_encode_item_present(9)xdr_stream_encode_item_absent(9)xdr_encode_bool(9)xdr_stream_encode_bool(9)xdr_stream_encode_u32(9)xdr_stream_encode_be32(9)xdr_stream_encode_u64(9)xdr_stream_encode_opaque_inline(9)xdr_stream_encode_opaque_fixed(9)xdr_stream_encode_opaque(9)xdr_stream_encode_uint32_array(9)xdr_item_is_absent(9)xdr_item_is_present(9)xdr_stream_decode_bool(9)xdr_stream_decode_u32(9)xdr_stream_decode_u64(9)xdr_stream_decode_opaque_fixed(9)xdr_stream_decode_opaque_inline(9)xdr_stream_decode_uint32_array(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms