sel_netnode_sid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sel_netnode_sid (9) β€” like, the Kernel API Manual, bestie ✨

okay so we're deep in the kernel docs rn, specifically the sel_netnode_sid page from the Kernel API Manual, and honestly? it's a little baddie πŸŽ€


🌸 NAME 🌸

sel_netnode_sid β€” Lookup the SID of a network address πŸ‘‘ no cap, that's literally the whole job


✨ SYNOPSIS ✨

int sel_netnode_sid (const void *addr , u16 family , u32 *sid );

like yes, that's the whole signature, don't @ me 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr β€” the IP address, the main character of this lil function fr
  • family β€” the address family, iykyk 🌈
  • sid β€” node SID, that's the output bestie πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe: this function determines the SID of a network address using the fastest method possible. ⚑ highkey efficient, we love to see it.

here's how it goes down:

  1. First the address table is queried πŸ‘€
  2. but if an entry can't be found, then the policy is queried 🧚
  3. and the result is added to the table to speedup future queries πŸ”₯ self-improving queen behaviour honestly

Returns zero on success, negative values on failure. 😭 that's the whole return contract, no notes.


🌟 SEE ALSO 🌟

Kernel file ./security/selinux/netnode.c and its whole friend group πŸ’…:

  • sel_netnode_hashfn_ipv4(9)
  • sel_netnode_hashfn_ipv6(9)
  • sel_netnode_find(9)
  • sel_netnode_insert(9)
  • sel_netnode_sid_slow(9)
  • sel_netnode_flush(9)

πŸ’€ quick vibe check: sel_netnode_sid_slow(9) is right there in the see-also list, so yes, there IS a slow version, and yes, this page is the fast one. slay.

that's the whole page bestie, mwah πŸ’‹

sign-off szn πŸŽ€ β€” this cutie lives under ./security/selinux, dated October 2026, per the Kernel API Manual. periodt. 🌈✨

πŸ“¦ where this page comes from