netlbl_unlhsh_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netlbl_unlhsh_add(9) β€” live from the Kernel API Manual πŸŽ€

okay so bestie, welcome to netlbl_unlhsh_add(9), straight out of the Kernel API Manual ✨ this one's a kernel-side function, not a command you type, so no shell prompt energy here β€” it's for the devs wiring up NetLabel internals 🧚


✨ NAME ✨

netlbl_unlhsh_add β€” adds a brand new entry to the unlabeled connection hash table πŸ’– like, it's literally the "put this in the table" function, no cap.


🌸 SYNOPSIS 🌸

int netlbl_unlhsh_add (struct net *net , const char *dev_name , const
void *addr , const void *mask , u32 addr_len , u32 secid , struct
netlbl_audit *audit_info );

she takes seven arguments and returns an int, periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • net β€” the network namespace, aka which little network world we're doing this in 🌈
  • dev_name β€” the interface name, you know, the device's lil name tag πŸŽ€
  • addr β€” the IP address, and it's gotta be in network byte order (yes, seriously, network byte order 🫢)
  • mask β€” the address mask, also in network byte order, matching energy fr fr
  • addr_len β€” length of the address/mask β€” it's 4 for IPv4 and 16 for IPv6, iykyk ⭐
  • secid β€” the LSM secid value for this entry πŸ‘‘
  • audit_info β€” the NetLabel audit information, for the receipts πŸ“

πŸ’œ DESCRIPTION πŸ’œ

So what she does: adds a new entry to the unlabeled connection hash table πŸ—‚οΈβœ¨ and that's the whole vibe. Returns zero on success, and negative values on failure β€” so like, zero is the slay outcome, negatives are the 😭 outcome.


πŸ”₯ SEE ALSO πŸ”₯

The kernel file lives at ./net/netlabel/netlabel_unlabeled.c β€” go read her, she's iconic πŸ‘‘

and then the whole friend group of related functions, all here, all accounted for πŸ’–:


and that's the whole page bestie 🫢 this one's sourced from ./net/netlabel, dated October 2026, and it's giving kernel API realness πŸ’€βœ¨ mwah, go add some hash entries responsibly πŸ’œ

πŸ“¦ where this page comes from