xdr_stream_decode_u64(9)
π xdr_stream_decode_u64 β the kernel API manual, bestie edition β¨
okay so this is the page for xdr_stream_decode_u64(9) and likeβ¦ it does exactly one thing and it does it slayfully: Decode a 64-bit integer π that's the name, that's the whole vibe, no notes.
β¨ NAME β¨
xdr_stream_decode_u64 β decode a 64-bit integer π
πΈ SYNOPSIS πΈ
ssize_t xdr_stream_decode_u64 (struct xdr_stream *xdr , __u64 *ptr );
that's it. that's the whole signature. she's compact, she's iconic, she takes exactly two arguments and she does not do small talk π«Ά
π¦ ARGUMENTS π¦
xdrβ pointer toxdr_streamβ this is your stream, your main character, the thing you're reading out of.ptrβ location to store the 64-bit integer π you hand her somewhere to put the goods, and she puts the goods there.
π₯ RETURN π₯
0on success π everything went fine, no drama, we love a clean zero.-EBADMSGon XDR buffer overflow π the buffer said "not today" and there was more to read than there was buffer to read it from. ngl that one hurts but at least it's honest.
π SEE ALSO π
so the kernel file is ./include/linux/sunrpc/xdr.h β that's the home base, the mothership, the place where all of these live π§ and like, the whole friend group is here, so let's shout them out:
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_be32(9)xdr_stream_decode_opaque_fixed(9)xdr_stream_decode_opaque_inline(9)xdr_stream_decode_uint32_array(9)
likeβ¦ it's giving full ensemble cast π every single one of them, no cap, not a single name skipped π
lowkey reminder: if she returns -EBADMSG, that's your buffer overflow situation, not a you problem to ignore π check it fr fr.
and that's the page!! π this little gem lives in the kernel source under ./include/linux/sunrpc, it's from October 2026, and it's part of the Kernel API Manual β ily, go read your xdr headers, 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