xdr_init_decode_pages(9)
๐ xdr_init_decode_pages โ a Kernel API Manual moment (section 9, bestie)
Okay so picture this: you're deep in net/sunrpc land, and you need an xdr_stream that decodes straight into pages instead of some boring contiguous buffer. That's literally what this function is for. It's xdr_init_decode_pages, it lives in section 9 of the Kernel API Manual, and it's here to set your stream up so the decoding can slay across page boundaries. ๐ฆ
โจ NAME โจ
xdr_init_decode_pages โ Initialize an xdr_stream for decoding into pages. That's it, that's the whole vibe. Setup era. ๐
๐ธ SYNOPSIS ๐ธ
void xdr_init_decode_pages (struct xdr_stream *xdr , struct xdr_buf *buf
, struct page **pages , unsigned int len );
Yup, returns void โ it's giving "I just initialize things, I don't report back". No cap. ๐
๐ ARGUMENTS ๐
Four args, all of them main characters in their own way:
xdrโ pointer to thexdr_streamstruct. This is the stream you're setting up, the one getting all the attention. ๐bufโ pointer to the XDR buffer from which to decode data. The source, the origin story, the place the bytes are coming from. ๐pagesโ list of pages to decode into. This is the destination, the landing zone, the page-shaped besties receiving the data. ๐ซถlenโ length in bytes of the buffer inpages. Yes, bytes. Not vibes. Bytes. ๐ฅ
๐ฎ SEE ALSO ๐ฎ
Kernel file ./net/sunrpc/xdr.c โ go read it, it's iconic. And then the whole extended friend group:
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_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_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)
Like, the entire XDR friend group showed up to the group chat. Obsessed. ๐ญ๐
Ngl bestie, if you came here looking for a return value or an error code โ there isn't one. It's void. It initializes and it dips. Periodt. ๐
That's the whole page, babe! ๐ This lil guy came from ./net/sunrpc, dated October 2026, and it's xdr_init_decode_pages(9) โ go forth and decode into pages, you absolute icon. โญ๐ง๐
๐ฆ 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