ipv6_rearrange_rthdr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay so welcome to ipv6_rearrange_rthdr(9) from the Kernel API Manual, section 9, bestie πŸ’… β€” this is the manual page for ipv6_rearrange_rthdr, aka rearrange IPv6 routing header. It’s giving address-order makeover energy, and we’re obsessed πŸŽ€


🌸 SYNOPSIS 🌸

int ipv6_rearrange_rthdr (struct ipv6hdr *iph , struct ipv6_rt_hdr
       *rthdr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • iph β€” the IPv6 header, bestie πŸ’–
  • rthdr β€” the routing header, the other main character in this little address-order situation ✨

πŸ’œ DESCRIPTION πŸ’œ

So here’s the vibe: ipv6_rearrange_rthdr rearranges the destination address in iph and the addresses in rthdr so that they appear in the order they will at the final destination. Literally final-destination ordering, no cap πŸ”₯

For the full details, see Appendix A2 of RFC 2402. Iykyk 🧚


🌈 RETURN 🌈

  • 0 β€” on success, slay πŸ’…
  • -EINVAL β€” if segments_left exceeds the number of addresses described by hdrlen, that’s the error you get 😭

πŸ‘‘ SEE ALSO πŸ‘‘


mwah πŸ’‹ β€” source/version ./net/ipv6, dated October 2026, page ipv6_rearrange_rthdr(9). Bye bestie! 🫢

πŸ“¦ where this page comes from