netlbl_cache_add(9)
π netlbl_cache_add(9) π
okay so this is netlbl_cache_add(9) from the Kernel API Manual β yes bestie, we're in kernel-doc territory and it's giving very "I read the source for fun" energy π§β¨
β¨ NAME β¨
netlbl_cache_add β add an entry to a NetLabel protocol cache π
πΈ SYNOPSIS πΈ
int netlbl_cache_add (const struct sk_buff *skb , u16 family ,
const struct netlbl_lsm_secattr *secattr );
like literally that's the whole signature, no cap π
π¦ ARGUMENTS π¦
skbβ the packet π¦ (the actual sk_buff we're talking about here)familyβ the family π (that's the address family arg, exactly as named)secattrβ the packet's security attributes π (aconst struct netlbl_lsm_secattr *)
π DESCRIPTION π
so what this does π is it takes the LSM security attributes for the given packet and adds them to the underlying NetLabel protocol's label mapping cache. that's it, that's the whole vibe π«Ά
return value check, bestie, do not skip:
- returns zero on success β
- returns negative values on error π
ngl, always check the return. zero is the slay outcome, negatives are the "we have a problem" outcome π
π₯ SEE ALSO π₯
Kernel file ./net/netlabel/netlabel_kapi.c and honestly the whole NetLabel friend group π«Ά:
netlbl_cfg_map_del(9)netlbl_cfg_unlbl_map_add(9)netlbl_cfg_unlbl_static_add(9)netlbl_cfg_unlbl_static_del(9)netlbl_cfg_cipsov4_add(9)netlbl_cfg_cipsov4_del(9)netlbl_cfg_cipsov4_map_add(9)netlbl_cfg_calipso_add(9)netlbl_cfg_calipso_del(9)netlbl_cfg_calipso_map_add(9)_netlbl_catmap_getnode(9)netlbl_catmap_walk(9)netlbl_catmap_walkrng(9)netlbl_catmap_getlong(9)netlbl_catmap_setbit(9)netlbl_catmap_setrng(9)netlbl_catmap_setlong(9)netlbl_bitmap_walk(9)netlbl_bitmap_setbit(9)netlbl_enabled(9)netlbl_sock_setattr(9)netlbl_sock_delattr(9)netlbl_sock_getattr(9)netlbl_sk_lock_check(9)netlbl_conn_setattr(9)netlbl_req_setattr(9)netlbl_req_delattr(9)netlbl_skbuff_setattr(9)netlbl_skbuff_getattr(9)netlbl_skbuff_err(9)netlbl_cache_invalidate(9)netlbl_audit_start(9)netlbl_init(9)
and that's the page bestie π this gem lives in ./net/netlabel, dated October 2026, and it's filed under netlbl_cache_add(9) β go forth and cache those labels ππβ¨
π¦ 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