_netlbl_catmap_getnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _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_ALLOC flag is set in cm_flags and 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_WALK flag is set in cm_flags and 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 NULL on 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:


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