get_ipv6_ext_hdrs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 get_ipv6_ext_hdrs(9) β€” kernel API manual, but make it make sense 🌸

okay bestie, so this one is a function from the kernel API manual (get_ipv6_ext_hdrs(9), section 9, the kernel-y one) and it's lowkey doing detective work on your packets. let's get into it πŸ’…


✨ NAME ✨

get_ipv6_ext_hdrs β€” parses a packet and sets the IPv6 extension header flags. that's it, that's the whole job. she reads, she flags, she slays πŸ”₯


πŸ¦‹ SYNOPSIS πŸ¦‹

void get_ipv6_ext_hdrs (struct sk_buff *skb , struct ipv6hdr *nh , u16
*ext_hdrs );

yes it returns void, no she does not give you a return value, she gives you flags instead. main character energy honestly πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the buffer where the extension header data starts in the packet 🫢
  • nh β€” the ipv6 header
  • ext_hdrs β€” this is where the flags get stored, so like, that's the output spot bestie πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so OFPIEH12_UNREP gets set if you unexpectedly run into more than one of a given IPv6 extension header. like, rude?? but there's a lil exception: two destination options headers may be expected, and those would not cause this bit to be set. so don't come for that one πŸ™ˆ

OFPIEH12_UNSEQ gets set if the IPv6 extension headers were not in the order that RFC 2460 prefers (key word: preferred, not required β€” she's not enforcing, she's just judging a little πŸ’…).

and when more than one extension header shows up in the same packet, the recommendation is that they appear in this exact order:

  1. IPv6 header
  2. Hop-by-Hop Options header
  3. Destination Options header
  4. Routing header
  5. Fragment header
  6. Authentication header
  7. Encapsulating Security Payload header
  8. Destination Options header
  9. upper-layer header

like the original spells it out as one long line, but bestie, a numbered list is right there β€” same headers, same order, no cap 🌈


🧚 SEE ALSO 🧚

go read those too, iykyk πŸ“šβœ¨


ngl this one's a vibe check for packets: repeat headers β†’ flag, wrong order β†’ flag. she's not mad, she's just setting bits πŸ“

and that's the page!! brought to you by ./net/openvswitch, dated October 2026, same as always β€” mwah, go touch some packets πŸ’‹πŸ‘‘πŸ’–

πŸ“¦ where this page comes from