lowpan_header_compress(9)
π lowpan_header_compress(9)
okay so bestie, welcome to the Kernel API Manual β¨ this one's all about lowpan_header_compress, and honestly? it's giving glow-up energy for packets π
πΈ NAME
lowpan_header_compress β replaces the IPv6 header with a 6LoWPAN header π
β¨ SYNOPSIS
int lowpan_header_compress (struct sk_buff *skb , const struct
net_device *dev , const void *daddr , const void *saddr );
like, that's the whole signature, no cap π
π¦ ARGUMENTS
skbβ the buffer that's gonna get manipulated π«Ά (yes, that's the buffer being done dirty, it's fine, it consented)devβ the lowpan net device pointer πdaddrβ the destination lladdr of the mac header, and it's the one used for the compression methods πsaddrβ the source lladdr of the mac header, also used for the compression methods β
π DESCRIPTION
okay so here's the tea π β this function replaces the IPv6 header with the IPHC 6LoWPAN header. and which IPv6 header, you ask? the one that should be pointed at by skb->data and skb_network_header. iconic behavior, truly π
but listen, bestie, there are rules π the caller needs to be sure of two things:
- the sk buffer is not shared π
- it has at least a headroom which is smaller or equal to
LOWPAN_IPHC_MAX_HEADER_LENβ which, and I cannot stress this enough, is the IPHC "more bytes than IPv6 header" at worst case π
fr fr, do the vibe check on your buffer before you call this. the worst-case sizing is not a suggestion, it's the whole point π§
π SEE ALSO
- Kernel file
./include/net/6lowpan.h lowpan_fetch_skb(9)lowpan_header_decompress(9)
iykyk, go read the friends too π
and that's the whole page, bestie π huge thanks to ./include/net for dropping this one in October 2026 β mwah, slay, periodt π
β¨
π¦ 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