xdr_stream_move_subsegment(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

xdr_stream_move_subsegment β€” okay so this one literally moves a chunk of a stream somewhere else, bestie, no cap ✨

Also hi, welcome to the (9) Kernel API Manual section, she's iconic πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

unsigned int xdr_stream_move_subsegment (struct xdr_stream *xdr ,
unsigned int offset , unsigned int target , unsigned int length );

🌸 ARGUMENTS 🌸

  • xdr β€” the source xdr_stream, aka the stream we're stealing from 🫢
  • offset β€” the source offset of the segment, like where the segment currently lives
  • target β€” the target offset of the segment, aka where it's moving to, main character energy
  • length β€” the number of bytes to move, the size of the whole vibe check πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜•: it moves length bytes from offset to target in the xdr_stream, and it's overwriting anything in its space β€” like, anything sitting at the target? gone, not me being dramatic, that's literally what it does 😭

Then it returns the number of bytes in the segment. That's it, that's the whole function, slay ✨

⚠️ fr fr do not forget: whatever was already chillin' at target is getting clobbered. It says "overwriting anything in its space" and it means it πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./net/sunrpc/xdr.c β€” and the whole friend group, gathered here for you πŸ‘‘

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_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)


And that's the whole page, bestie πŸ“ Little sign-off moment: this one comes to you from ./net/sunrpc, dated October 2026 β€” go off, king πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from