STRUCT LOWPAN_NHC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct lowpan_nhc β€” the lil struct that holds all the 6lowpan next hdr compression info πŸ’…


🌸 SYNOPSIS 🌸

struct lowpan_nhc {
    const char      *name;
    u8 nexthdr;
    size_t nexthdrlen;
    u8 id;
    u8 idmask;
    int (*uncompress)(struct sk_buff *skb, size_t needed);
    int (*compress)(struct sk_buff *skb, u8 **hc_ptr);
 };

okay bestie, she's got seven fields and two of them are function pointers, so we're already in main character territory πŸŽ€


πŸ’– Members πŸ’–

  • name β€” the name of this specific next header compression. literally her government name, no cap 🫢
  • nexthdr β€” the next header value of the protocol that's supposed to get compressed. this is the one we're squishing ✨
  • nexthdrlen β€” the ipv6 nexthdr len for the reserved space. yes, you need the length too, don't skip it πŸ™ˆ
  • id β€” one byte nhc id value. one (1) single byte, she's compact, she's iconic πŸ‘‘
  • idmask β€” one byte nhc id mask value. also one byte. the mask does the matchy-matchy part, iykyk 🌈
  • uncompress β€” callback that does the header uncompression. she expands the vibe back out πŸ¦‹
  • compress β€” callback that does the header compression. and she squishes it down. two icons, opposite jobs, both slaying πŸ’€
fr fr, both callbacks get a struct sk_buff *skb β€” keep that signature exactly as written, do not come for it 🫢

⭐ SEE ALSO ⭐

Kernel file ./net/6lowpan/nhc.h LOWPAN_NHC(9), lowpan_nhc_by_nexthdr(9), lowpan_nhc_check_compression(9), lowpan_nhc_do_compression(9), lowpan_nhc_do_uncompression(9), lowpan_nhc_add(9), lowpan_nhc_del(9), lowpan_nhc_init(9)

like the whole friend group, go read them too, they're all linked and they all ate πŸ’œ


and that's the page, bestie 🧚 from ./net/6lowpan, dated October 2026, and it's the struct lowpan_nhc(9) manual page β€” mwah, go compress some headers πŸ’…πŸ’–

πŸ“¦ where this page comes from