netlbl_catmap_getlong(9)
π 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:
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_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)
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
- 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