n_hdlc_tty_receive(9)
π n_hdlc_tty_receive π
okay bestie, welcome to the Kernel API Manual entry for n_hdlc_tty_receive(9) β yes that's the full name, yes it's a mouthful, no we're not shortening it, it's iconic as is π
β¨ NAME β¨
n_hdlc_tty_receive β literally the function your tty driver calls when there's receive data ready to go. That's the whole job. She's a notifier, not a personality π
πΈ SYNOPSIS πΈ
void n_hdlc_tty_receive (struct tty_struct *tty , const u8 *data , const
u8 *flags , size_t count );
she returns void, meaning she gives you nothing back β no return value, no drama, no cap. The vibes are the gift π«Ά
π¦ ARGUMENTS π¦
ttyβ pointer to the tty instance data. it's giving "which tty are we even talking about" energy, and honestly? valid question. this answers it πdataβ pointer to the received data. the actual payload, the main character of this whole operation βflagsβ pointer to flags for data. lil metadata bestie riding along with the data πcountβ count of received data in bytes. so you know exactly how much data you're dealing with, no guessing, no vibes-based sizing π
π DESCRIPTION π
so here's the tea β β this function gets called by the tty low level driver when receive data is available. that's it, that's the trigger. data shows up, she gets the call π
and the important part, the part you cannot skip: the data is interpreted as one HDLC frame. one. single. frame. whole thing. no splitting, no "eh close enough", it's one frame periodt π₯
like, that's the whole contract bestie, don't come for her with half a frame π
π SEE ALSO π
okay this list is LONG but every single one of these is a real one, so let's go, no skipping, we respect the whole squad π«‘
Kernel file ./drivers/tty/n_hdlc.c plus:
struct n_hdlc(9)n_hdlc_tty_close(9)n_hdlc_tty_open(9)n_hdlc_send_frames(9)n_hdlc_tty_write_work(9)n_hdlc_tty_wakeup(9)n_hdlc_tty_read(9)n_hdlc_tty_write(9)n_hdlc_tty_ioctl(9)n_hdlc_tty_poll(9)n_hdlc_alloc(9)n_hdlc_buf_return(9)n_hdlc_buf_put(9)n_hdlc_buf_get(9)
that's the whole friend group, go read them, iykyk π
and that's a wrap bestie!! this lil page comes to you from ./drivers/tty, dated October 2026, under the Kernel API Manual banner β slay, ate, left absolutely no crumbs π§ββοΈβ¨π
π¦ 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