lowpan_nhc_c..._compression(9)
π lowpan_nhc_check_compression β the kickoff of the lowpan_nhc_c..._compression(9) glow-up β¨
okay so real talk, bestie β we're in the Kernel API Manual today, and this little function is basically the vibe-check bouncer at the door of 6LoWPAN compression. It peeks at your nexthdr and is like "yeah, we stan, come in" or "nope, not on the list, sorry babe." π«Ά
β¨ NAME β¨
lowpan_nhc_check_compression β checks if we support compression format. If we support the nhc by nexthdr field, the function will return 0. If we don't support the nhc by nexthdr this function will return -ENOENT.
like... that's it. that's the whole personality. zero means slay, -ENOENT means the nexthdr showed up uninvited π
π SYNOPSIS π
int lowpan_nhc_check_compression (struct sk_buff *skb , const struct
ipv6hdr *hdr , u8 **hc_ptr );
three arguments, one int, no cap. π¦
πΈ ARGUMENTS πΈ
skbβ skb of 6LoWPAN header to read nhc and replace header. this is the main character right here, the packet we're rummaging through πhdrβipv6hdrto check thenexthdrvalue. literally just here so we can peek atnexthdr, no other business πhc_ptrβ pointer for 6LoWPAN header which should increment at the end of replaced header. heads up bestie: it moves forward once the header's been swapped, so don't be out here forgetting to bump it β¬οΈ
π₯ SEE ALSO π₯
- Kernel file
./net/6lowpan/nhc.h LOWPAN_NHC(9)struct lowpan_nhc(9)lowpan_nhc_by_nexthdr(9)lowpan_nhc_do_compression(9)lowpan_nhc_do_uncompression(9)lowpan_nhc_add(9)lowpan_nhc_del(9)lowpan_nhc_init(9)
the whole friend group fr fr, go read all of them π
ngl the only gotcha here is remembering that -ENOENT is the "we don't do that here" signal β it's not a crash, it's just the function being honest with you π
and that's the page!! π brought to you straight outta ./net/6lowpan β dated October 2026, filed under lowpan_nhc_c..._compression(9) β go forth and compress, bestie πβπ
π¦ 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