_netlbl_catmap_getnode(9)
π
_netlbl_catmap_getnode β from the Kernel API Manual β¨
okay bestie, pull up a chair, because we're talking about a kernel function and honestly? she's lowkey iconic. this is _netlbl_catmap_getnode(9) and she does exactly one thing, but she does it well. π
πΈ NAME πΈ
_netlbl_catmap_getnode β get a individual node from a catmap π«Ά
π¦ SYNOPSIS π¦
struct netlbl_lsm_catmap * _netlbl_catmap_getnode (struct
netlbl_lsm_catmap **catmap , u32 offset , unsigned int cm_flags , gfp_t
gfp_flags );
likeβ¦ the signature is right there, she's not hiding. four arguments, one return, no cap. π
β¨ ARGUMENTS β¨
catmapβ pointer to the category bitmap. yes bestie, it's a double pointer, it's giving main-character energy, we love a pointer-to-pointer. π«Άoffsetβ the requested offset. this is the thing you're looking for. the vibe check target, iykyk.cm_flagsβ catmap flags, see_CM_F_*. these little guys change her whole behaviour, so pay attention. πgfp_flagsβ memory allocation flags. the "how do i get my memory" instructions, super important if she ends up making a new node. π§
π DESCRIPTION π
so what she does is: iterate through the catmap looking for the node associated with offset. that's it. that's the whole job. slay. β¨
but here's the tea, and it's a whole two-flavour situation:
- if the
_CM_F_ALLOCflag is set incm_flagsand there is no associated node β no worries bestie, one will be created and inserted into the catmap. she literally makes it happen. π - if the
_CM_F_WALKflag is set incm_flagsand there is no associated node β the next highest node will be returned instead. so you still get something, she's not gonna leave you hanging. π
and the return values, periodt:
- returns a pointer to the node on success π
- returns
NULLon failure π
bestie reminder: NULL means failure here. do not pass go, do not dereference it, just accept that it didn't work out this time. π
β SEE ALSO β
the source lives in the kernel file ./net/netlabel/netlabel_kapi.c β go read her in her natural habitat if you want the full lore π
and here is the entire extended friend group, all of them, no one left out because we don't do that here:
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_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_cache_add(9)netlbl_audit_start(9),netlbl_init(9)
aaaand that's the whole page bestie, you ate that reading it fr fr π
this little love letter came from ./net/netlabel, dated October 2026, and she's filed under _netlbl_catmap_getnode(9). mwah, go touch some kernel code ππ¦
π¦ 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