cipso_v4_map_cat_enum_ntoh(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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:

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