STRUCT HDLC_GREYBUS_FRAME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct hdlc_greybus_frame(9) πŸ¦‹

okay bestie, welcome to the kernel API manual for struct hdlc_greybus_frame β€” yes, that's the whole title, and yes, it's giving very "I live in ./drivers/greybus" energy. buckle up, this one's short but she's iconic πŸ’…


✨ NAME ✨

struct hdlc_greybus_frame β€” the structure that represents a greybus HDLC frame payload πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole vibe, copied exactly so you can't mess it up:

struct hdlc_greybus_frame {
    __le16 cport;
    struct gb_operation_msg_hdr hdr;
    u8 payload[];
 };

like, look at her. __le16 first, then the header, then a flexible array member doing its little [] thing at the end. no cap, that trailing [] is the main character 🫢


πŸ’– Members πŸ’–

  • cport β€” the cport id, literally just the id of the cport. that's it, that's the field 🌈
  • hdr β€” the greybus operation header (struct gb_operation_msg_hdr), sitting there holding the operation info 🧚
  • payload β€” the greybus message payload, chillin' as a u8 payload[] flexible array member at the end ⭐

πŸ‘‘ Description πŸ‘‘

so here's the lore: the HDLC payload that gets sent over UART for a greybus address has the cport preappended to the greybus message. that's literally the whole point of this struct β€” cport first, then the greybus message right behind it. periodt πŸ’…

ngl, "preappended" is exactly what the original says, so I'm keeping it β€” she's iconic, don't @ me 😭

πŸ”₯ SEE ALSO πŸ”₯

all the besties this struct rolls with, and also the kernel file that keeps them all in ./drivers/greybus/gb-beagleplay.c:

go read them, they're all slaying in their own little ways πŸ’œ


and that's the whole page, bestie 🌸 this gem lives over in ./drivers/greybus, dated October 2026, and it's filed under struct hdlc_greybus_frame(9) β€” go forth and preappend your cports responsibly πŸ¦‹πŸ’–

πŸ“¦ where this page comes from