cipso_v4_map_cat_enum_ntoh(9)
πΈ cipso_v4_map_cat_enum_ntoh(9) πΈ
okay so bestie, we're in the Kernel API Manual today and this one is a cryptography-adjacent little icon from the networking corner of the kernel. no cap, she's doing label translation work and she does it well. come learn her whole deal with me π
β¨ NAME β¨
cipso_v4_map_cat_enum_ntoh β basically she performs a category mapping from network to host. like, she takes the network-side vibe and translates it into the local one. it's giving translator bestie, it's giving cultural exchange π¦
β¨ SYNOPSIS β¨
int cipso_v4_map_cat_enum_ntoh (const struct cipso_v4_doi *doi_def ,
const unsigned char *net_cat , u32 net_cat_len , struct
netlbl_lsm_secattr *secattr );
she returns an int, she takes four things, that's the whole lewk. main character energy fr fr π
β¨ ARGUMENTS β¨
doi_defβ the DOI definition. this is the rulebook she's working off of, the little reference doc that tells her how to do the mapping πnet_catβ the category list in network/CIPSO format. this is the incoming category situation, straight off the wire πnet_cat_lenβ the length of the CIPSO bitmap in bytes. yes, bitmap β that's literally what the original says, no I'm not making it up, she says bitmap and she means it πsecattrβ the security attributes. this is where the translated result ends up hanging out π
β¨ DESCRIPTION β¨
so what does she actually do? she performs a label mapping β translating a CIPSO category list into the correct local MLS category bitmap, using the DOI definition you handed her. that's it, that's the job. input network category, output local category, DOI definition as the translator's dictionary π§
returns zero on success, negative values on failure. that's the contract, bestie, respect it π
ngl, if you're not checking that return value, what are you even doing. negative means something went sideways. be a responsible icon π₯
β¨ SEE ALSO β¨
the kernel file for this is ./net/ipv4/cipso_ipv4.c β go read it, it's right there π«Ά
and now, the full friend group, in order, no one left out because that would be rude:
cipso_v4_cache_entry_free(9)cipso_v4_map_cache_hash(9)cipso_v4_cache_init(9)cipso_v4_cache_invalidate(9)cipso_v4_cache_check(9)cipso_v4_cache_add(9)cipso_v4_doi_search(9)cipso_v4_doi_add(9)cipso_v4_doi_free(9)cipso_v4_doi_free_rcu(9)cipso_v4_doi_remove(9)cipso_v4_doi_getdef(9)cipso_v4_doi_putdef(9)cipso_v4_doi_walk(9)cipso_v4_map_lvl_valid(9)cipso_v4_map_lvl_hton(9)cipso_v4_map_lvl_ntoh(9)cipso_v4_map_cat_rbm_valid(9)cipso_v4_map_cat_rbm_hton(9)cipso_v4_map_cat_rbm_ntoh(9)cipso_v4_map_cat_enum_valid(9)cipso_v4_map_cat_enum_hton(9)cipso_v4_map_cat_rng_valid(9)cipso_v4_map_cat_rng_hton(9)cipso_v4_map_cat_rng_ntoh(9)cipso_v4_gentag_hdr(9)cipso_v4_gentag_rbm(9)cipso_v4_parsetag_rbm(9)cipso_v4_gentag_enum(9)cipso_v4_parsetag_enum(9)cipso_v4_gentag_rng(9)cipso_v4_parsetag_rng(9)cipso_v4_gentag_loc(9)cipso_v4_parsetag_loc(9)cipso_v4_optptr(9)cipso_v4_validate(9)cipso_v4_error(9)cipso_v4_genopt(9)cipso_v4_sock_setattr(9)cipso_v4_req_setattr(9)cipso_v4_delopt(9)cipso_v4_sock_delattr(9)cipso_v4_req_delattr(9)cipso_v4_getattr(9)cipso_v4_sock_getattr(9)cipso_v4_skbuff_setattr(9)cipso_v4_skbuff_delattr(9)cipso_v4_init(9)
like, that's the whole squad π literally every CIPSO function showed up to the group chat.
and that's the page, bestie!! π source-wise this all comes from ./net/ipv4, the date on it is October 2026, and the manual section header is cipso_v4_map_cat_enum_ntoh(9). go forth and map those categories, you've got this πβ¨
π¦ 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