lowpan_header_compress(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

  1. the sk buffer is not shared 😭
  2. 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

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