STRUCT LOWPAN_NHC(9)
β¨ 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
- 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