inet6_lookup_reuseport(9)
π inet6_lookup_reuseport(9) β like, the kernel API manual one, section 9 bestie β¨
okay so picture this: it's a Kernel API Manual page, section 9, and the whole thing is about inet6_lookup_reuseport β that's the function whose whole personality is "execute reuseport logic on AF_INET6 socket if necessary." slay. let's get into it π
β¨ NAME β¨
inet6_lookup_reuseport β executes the reuseport logic on an AF_INET6 socket if necessary. lowkey does what it says on the tin, no notes π
πΈ SYNOPSIS πΈ
struct sock * inet6_lookup_reuseport (const struct net *net , struct
sock *sk , struct sk_buff *skb , int doff , const struct in6_addr *saddr
, __be16 sport , const struct in6_addr *daddr , unsigned short hnum ,
inet6_ehashfn_t *ehashfn );
like yes that's a lot of parameters, but she ate and left no crumbs π
π¦ ARGUMENTS π¦
netβ the network namespace. that's her world, her main character setting β¨skβ anAF_INET6socket. important vibe check: it must be inTCP_LISTENstate for TCP, orTCP_CLOSEfor UDP. no exceptions bestie, that's the rule π¨skbβ the context for a potentialSK_REUSEPORTprogram. it's giving "here's where the program might happen" π«Άdoffβ the header offset. just an offset. iconic in its simplicity πsaddrβ source address π¬sportβ source port π’daddrβ destination address πhnumβ destination port, and bestie it's in host byte order β write that down, that detail matters fr fr πehashfnβ the hash function used to generate the fallback hash. the fallback hash's fallback bestie, we love a safety net π
β RETURN β
so what comes back? two possibilities, and honestly both are valid:
NULLifskdoesn't haveSO_REUSEPORTset π (like it literally didn't opt in, so)- otherwise, a pointer to the selected
sockor an error π₯
π SEE ALSO π
- Kernel file
./net/ipv6/inet6_hashtables.cβ go read her, she's got the lore πβ¨
π reminder bestie: the state requirements onskare not a suggestion βTCP_LISTENfor TCP,TCP_CLOSEfor UDP. don't be the person who ignores it π
and that's the whole page π§ from ./net/ipv6, dated October 2026 β mwah, periodt, inet6_lookup_reuseport(9) out π
π¦ 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