STRUCT IP6T_SRH1(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ip6t_srh1(9)

okay so this is a page from the Kernel API Manual and bestie, it's literally all about struct ip6t_srh1 β€” the SRH match options, revision 1. that's the vibe. let's get into it πŸŽ€


✨ NAME ✨

struct ip6t_srh1 β€” SRH match options (revision 1). that's it, that's the whole name section, she's concise πŸ’…


🌸 SYNOPSIS 🌸

here's the struct in all her glory β€” copy it exactly, don't be weird about it:

struct ip6t_srh1 {
    __u8 next_hdr;
    __u8 hdr_len;
    __u8 segs_left;
    __u8 last_entry;
    __u16 tag;
    struct in6_addr         psid_addr;
    struct in6_addr         nsid_addr;
    struct in6_addr         lsid_addr;
    struct in6_addr         psid_msk;
    struct in6_addr         nsid_msk;
    struct in6_addr         lsid_msk;
    __u16 mt_flags;
    __u16 mt_invflags;
 };

like, look at her. six struct in6_addr fields in a row. main character energy fr fr πŸ‘‘


πŸ¦‹ Members πŸ¦‹

okay this is the part where we go member by member, no skipping, we respect every single field in this struct:

  • next_hdr β€” the Next header field of SRH 🫢
  • hdr_len β€” the Extension header length field of SRH
  • segs_left β€” the Segments left field of SRH
  • last_entry β€” the Last entry field of SRH
  • tag β€” the Tag field of SRH ✨
  • psid_addr β€” address of the previous SID in the SRH SID list
  • nsid_addr β€” address of the NEXT SID in the SRH SID list (yes, NEXT is shouting, she's excited, let her live)
  • lsid_addr β€” address of the LAST SID in the SRH SID list
  • psid_msk β€” mask of the previous SID in the SRH SID list
  • nsid_msk β€” mask of the next SID in the SRH SID list
  • lsid_msk β€” MAsk of the last SID in the SRH SID list (yes the original capitalisation is MAsk, we are NOT fixing it, that's canon πŸ’€)
  • mt_flags β€” match options
  • mt_invflags β€” invert the sense of match options πŸ”₯
ngl the three *sid_addr / *sid_msk pairs are giving previous / next / last and i'm obsessed β€” psid, nsid, lsid, one little family 🧚

πŸ’œ SEE ALSO πŸ’œ

go look at these, bestie, they're right there:

  • the kernel file ./include/uapi/linux/netfilter_ipv6/ip6t_srh.h
  • struct ip6t_srh(9) β€” the original, the blueprint, the mother πŸ‘‘

and that's the page!! 🌈 thanks for reading my whole essay about a netfilter struct, you're a real one 🫢

sign-off time: this little number lives under ./include/uapi/linux/netfilter... and it's dated October 2026, page name struct ip6t_srh1(9) β€” mwah, slay, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from