STRUCT MSGBUF(9)
π struct msgbuf β Kernel API Manual, section 9, bestie
okay so before we even get into it: this page lives in section 9 of the Kernel API Manual, and the thing we're talking about is struct msgbuf. that's the whole vibe. now let's go π«Ά
β¨ NAME β¨
struct msgbuf β the buffer struct you use to construct SSH messages. that's it, that's the job, and she does it slayfully π
πΈ SYNOPSIS πΈ
struct msgbuf {
u8 *begin;
u8 *end;
u8 *ptr;
};
literally just three pointers. three little icons. nothing else. no cap, that's the entire struct π
π Members π
beginβ pointer to the beginning of the allocated buffer space. she's the start of the party, the first element, the origin story β¨endβ pointer to the end (one past last element) of the allocated buffer space. yes bestie, one past the last element β that classic one-past-the-end situation, that's not a typo, that's the whole bit πptrβ pointer to the first free element in the buffer. this is where the next thing gets written. the empty seat at the table, the available vibe π
π SEE ALSO π
- Kernel file
./drivers/platform/surface/aggregator/ssh_msgb.hβ go read the source, iykyk π¦
and the whole msgb_ friend group, all iconics, all linked:
msgb_init(9)msgb_bytes_used(9)msgb_push_u16(9)msgb_push_syn(9)msgb_push_buf(9)msgb_push_crc(9)msgb_push_frame(9)msgb_push_ack(9)msgb_push_nak(9)msgb_push_cmd(9)
ok real talk for a sec: the pointers don't manage themselves, bestie.begin,endandptrare just describing the space β keeping them honest is on you π
and that's the page!! mwah π this came from the kernel source tree at ./drivers/platform/surface/agg..., dated October 2026, and it's filed under struct msgbuf(9). 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