xdr_init_decode(9)
π xdr_init_decode β like, the Kernel API Manual page you actually wanna read π
okay bestie, listen. this is xdr_init_decode(9), straight out of the Kernel API Manual, and it's genuinely the setup girlie of the decoding world. it does not decode anything itself β it just gets your xdr_stream dressed and ready so the actual decoding can slay later. no cap. β¨
πΈ NAME πΈ
xdr_init_decode β Initialize an xdr_stream for decoding data.
that's it. that's the whole job. she's a setup function and she knows it. π
π¦ SYNOPSIS π¦
void xdr_init_decode (struct xdr_stream *xdr , struct xdr_buf *buf ,
__be32 *p , struct rpc_rqst *rqst );
literally just one call. void return, so nothing to check β she either sets things up or she doesn't, iykyk. π«Ά
β¨ ARGUMENTS β¨
four args, all of them pointers, all of them important. let's go through them like we're doing a vibe check on each one:
xdrβ pointer to thexdr_streamstruct. this is THE main character of the whole operation β the stream you're initializing. everything happens here, fr fr. πbufβ pointer to the XDR buffer from which to decode data. this is the source, the origin story, the place the bytes are actually coming from. πpβ current pointer inside the XDR buffer. you're telling the stream "okay, start right here," like dropping a pin on the map. πrqstβ pointer to the controllingrpc_rqst, and before you ask: it's for debugging. that's the whole reason it's here. ngl, a little iconic of it to be that honest. π
β οΈ heads up: all four are pointers, andxdr_init_decodereturnsvoidβ so no exit status, no error code, nothing to inspect. it's giving "trust me, I got this." π
π SEE ALSO π
okay this list is LONG, so buckle up bestie β every single one of these lives in the kernel file ./net/sunrpc/xdr.c, and we are NOT skipping a single one of them. they're all (9) pages, all part of the family, all getting their moment. π
the encode crowd β xdr_encode_opaque_fixed(9), xdr_encode_opaque(9), xdr_terminate_string(9)
the buffer-to-something glow-ups β xdr_buf_to_bvec(9), xdr_buf_to_sg(9), xdr_buf_to_sg_alloc(9), xdr_inline_pages(9)
the page-shifting girlies (note the leading underscores, they're built different) β _shift_data_left_pages(9), _shift_data_right_pages(9), _copy_to_pages(9), _copy_from_pages(9)
buffer maintenance era β xdr_buf_pages_zero(9), xdr_shrink_bufhead(9), xdr_shrink_pagelen(9), xdr_restrict_buflen(9), xdr_buf_trim(9), xdr_buf_subsegment(9)
positioning & math β xdr_stream_pos(9), xdr_page_pos(9)
the encode-side setup besties β 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)
the decode-side setup besties (hi, that's our family π) β xdr_init_decode_pages(9), xdr_finish_decode(9), xdr_inline_decode(9), xdr_read_pages(9), xdr_truncate_decode(9)
page navigation & subsegment movement β xdr_set_pagelen(9), xdr_enter_page(9), xdr_write_pages(9), xdr_stream_subsegment(9), xdr_stream_move_subsegment(9), xdr_stream_zero(9)
the auth & string decoders, absolute icons β xdr_stream_decode_string_dup(9), xdr_stream_decode_opaque_auth(9), xdr_stream_encode_opaque_auth(9)
and yeah β all of those, plus the kernel file itself: ./net/sunrpc/xdr.c. go read the source bestie, it's right there. π₯
okay that's the page!! and for the cute sign-off: this lil beauty comes to you from the source ./net/sunrpc and is dated October 2026 β so mark your calendar, she's fresh. πΈβ¨π«Ά
π¦ 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