netlbl_unlhsh_add(9)
π 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 fraddr_lenβ length of the address/mask β it's4for IPv4 and16for 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 π:
netlbl_unlhsh_free_iface(9)netlbl_unlhsh_hash(9)netlbl_unlhsh_search_iface(9)netlbl_unlhsh_add_addr4(9)netlbl_unlhsh_add_addr6(9)netlbl_unlhsh_add_iface(9)netlbl_unlhsh_remove_addr4(9)netlbl_unlhsh_remove_addr6(9)netlbl_unlhsh_condremove_iface(9)netlbl_unlhsh_remove(9)netlbl_unlhsh_netdev_handler(9)netlbl_unlabel_acceptflg_set(9)netlbl_unlabel_addrinfo_get(9)netlbl_unlabel_accept(9)netlbl_unlabel_list(9)netlbl_unlabel_staticadd(9)netlbl_unlabel_staticadddef(9)netlbl_unlabel_staticremove(9)netlbl_unlabel_staticremovedef(9)netlbl_unlabel_staticlist_gen(9)netlbl_unlabel_staticlist(9)netlbl_unlabel_staticlistdef(9)netlbl_unlabel_genl_init(9)netlbl_unlabel_init(9)netlbl_unlabel_getattr(9)netlbl_unlabel_defconf(9)
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
- 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