xdr_stream_subsegment(9)
π
xdr_stream_subsegment(9) π
okay bestie, welcome to the Kernel API Manual β this is the page for xdr_stream_subsegment(9), and it is lowkey iconic for doing exactly one little slice-of-XDR job. π
β¨ NAME β¨
xdr_stream_subsegment β set @subbuf to a portion of @xdr. That's the whole name, and it ate. π
π¦ SYNOPSIS π¦
bool xdr_stream_subsegment (struct xdr_stream *xdr , struct xdr_buf
*subbuf , unsigned int nbytes );
π ARGUMENTS π
xdrβ anxdr_streamset up for decoding. Like your notes app, but for XDR data, and it's ready to scroll. β¨subbufβ the result buffer. This is where the little portion lands. π«Άnbytesβ length ofxdrto extract, in bytes. Actual bytes, not vibes. π
πΈ DESCRIPTION πΈ
Sets up subbuf to represent a portion of xdr. The portion starts at the current offset in xdr, and extends for a length of nbytes. If this is successful, xdr is advanced to the next XDR data item following that portion.
Return values: true: subbuf has been initialized, and xdr has been advanced. false: a bounds error has occurred.
bestie, the false case is a bounds error β that's the vibe check failing, so don't ignore it. π
π SEE ALSO π
The kernel file ./net/sunrpc/xdr.c is on the list, and honestly the whole XDR friend group pulled up too:
xdr_encode_opaque_fixed(9)xdr_encode_opaque(9)xdr_terminate_string(9)xdr_buf_to_bvec(9)xdr_buf_to_sg(9)xdr_buf_to_sg_alloc(9)xdr_inline_pages(9)_shift_data_left_pages(9)_shift_data_right_pages(9)_copy_to_pages(9)_copy_from_pages(9)xdr_buf_pages_zero(9)xdr_shrink_bufhead(9)xdr_shrink_pagelen(9)xdr_stream_pos(9)xdr_page_pos(9)xdr_init_encode(9)xdr_init_encode_pages(9)__xdr_commit_encode(9)xdr_reserve_space(9)xdr_reserve_space_vec(9)xdr_truncate_encode(9)xdr_truncate_decode(9)xdr_restrict_buflen(9)xdr_write_pages(9)xdr_init_decode(9)xdr_init_decode_pages(9)xdr_finish_decode(9)xdr_inline_decode(9)xdr_read_pages(9)xdr_set_pagelen(9)xdr_enter_page(9)xdr_buf_subsegment(9)xdr_stream_move_subsegment(9)xdr_stream_zero(9)xdr_buf_trim(9)xdr_stream_decode_string_dup(9)xdr_stream_decode_opaque_auth(9)xdr_stream_encode_opaque_auth(9)
Signed, sealed, and delivered with main-character energy by ./net/sunrpc, dated October 2026. Periodt. πβ¨
π¦ 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