gsm_stuff_frame(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gsm_stuff_frame(9) β€” like, the kernel API manual bestie

okay so we're deep in the Kernel API Manual today and the star of the show is gsm_stuff_frame(9). yes it's a real function name. yes it's giving "cursed but iconic". let's get into it πŸŽ€


✨ NAME ✨

gsm_stuff_frame β€” bytestuff a packet πŸ¦‹

✨ SYNOPSIS ✨

int gsm_stuff_frame (const u8 *input , u8 *output , int len );

🌸 ARGUMENTS 🌸

  • input β€” the input buffer, aka where the raw stuff lives πŸ’œ
  • output β€” the output buffer, aka where the glow-up happens ✨
  • len β€” length of input, like how much we're working with, no cap

πŸ”₯ DESCRIPTION πŸ”₯

so this one expands a buffer by bytestuffing it. that's it, that's the whole vibe πŸ’…

the worst case size change is doubling β€” literally twice the size, so plan accordingly bestie. and the caller is responsible for handing out suitably sized buffers. that's on you, not on the function. the function is just doing its little bytestuff thing πŸ™ˆ

⚠️ fr fr: worst case is doubling and you own the buffer sizing. don't come crying to gsm_stuff_frame when your buffer's too smol 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/tty/n_gsm.c β€” and honestly the whole n_gsm extended family showed up to the party, so here's everyone, in the order they rolled in πŸ‘‘

like, eighty-ish functions and not one of them skipped πŸ’€ slay.


and that's the whole page bestie!! 🫢 sign-off time: this one lives in ./drivers/tty and it's dated October 2026, and yeah β€” it's gsm_stuff_frame(9) all the way down. go stuff some frames responsibly, ily, bye πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from