netlbl_catmap_getlong(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netlbl_catmap_getlong(9) β€” a Kernel API Manual moment

okay so bestie, this is a page from the Kernel API Manual (yes, the netlbl_catmap_getlong(9) one, we're doing this ✨) and honestly it's giving "tiny function, big responsibilities." let's get into it 🫢


🌸 NAME 🌸

netlbl_catmap_getlong β€” export an unsigned long bitmap πŸ’–


✨ SYNOPSIS ✨

int netlbl_catmap_getlong (struct netlbl_lsm_catmap *catmap , u32
*offset , unsigned long *bitmap );

like, that's the whole signature, no notes πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • catmap β€” pointer to the category bitmap. this is the source of truth, the main character of the whole operation πŸ‘‘
  • offset β€” pointer to the requested offset. you ask for a spot, it tells you where you actually landed πŸ¦‹
  • bitmap β€” the exported bitmap. where the good stuff gets written πŸ’«

πŸ’œ DESCRIPTION πŸ’œ

so what it does: it exports a bitmap with an offset greater than or equal to offset, and returns it in bitmap. slay πŸ’…

now the important part, no cap β€” offset must be aligned to an unsigned long. periodt. and it will be updated on return if it's different from what you requested, so don't be surprised when your offset comes back changed, that's literally the function doing its job πŸ™ˆ

if the catmap is empty at the requested offset and beyond, then offset gets set to (u32)-1. yep. that's the signal. it's giving "nothing here, bestie" πŸ’€

returns zero on success, negative values on failure. that's the whole vibe check 😌


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./net/netlabel/netlabel_kapi.c and the whole friend group:

like, that's the entire group chat and they ALL showed up 🌈


okay that's the page!! source path ./net/netlabel, dated October 2026, and it's netlbl_catmap_getlong(9) all the way down. mwah πŸ’‹ go read your bitmaps bestie πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from