cipso_v4_map_cat_rng_hton(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cipso_v4_map_cat_rng_hton(9) β€” the kernel API manual, but make it make sense πŸŽ€

okay so bestie, this is a page from the Kernel API Manual and honestly? it's kind of iconic. it's a <pink>section 9</pink> situation (that's kernel functions, iykyk), and it's all about translating your local MLS category bitmap into a CIPSO category list. slay. let's get into it πŸ’–


✨ NAME ✨

cipso_v4_map_cat_rng_hton β€” Perform a category mapping from host to network 🌐

like, literally the host-to-network glow-up for your categories. one direction only, bestie.


✨ SYNOPSIS ✨

int cipso_v4_map_cat_rng_hton (const struct cipso_v4_doi *doi_def ,
const struct netlbl_lsm_secattr *secattr , unsigned char *net_cat , u32
net_cat_len );

that's the whole signature, int return, four arguments, no notes. copy it exactly if you're writing it down, don't try to be cute with it πŸ™ˆ


✨ ARGUMENTS ✨

  • doi_def β€” the DOI definition 🫢 like, the rulebook for how this whole mapping thing goes down.
  • secattr β€” the security attributes πŸ’œ your local security vibes that need translating.
  • net_cat β€” the zero'd out category list in network/CIPSO format ⭐ key detail: it's zero'd out before it gets here. pre-cleared. main character energy only.
  • net_cat_len β€” the length of the CIPSO category list in bytes πŸ“ measured in bytes, not vibes.

✨ DESCRIPTION ✨

so what does it actually do? πŸ¦‹ Perform a label mapping to translate a local MLS category bitmap to the correct CIPSO category list using the given DOI definition.

that's the whole bit. local bitmap goes in, correct CIPSO category list comes out, and the DOI definition is the blueprint that makes it happen. no cap.

Returns the size in bytes of the network category bitmap on success πŸ”₯ β€” and negative values otherwise πŸ’€ so yeah, check your return value, bestie, negative means something went sideways and it's not trying to hide it.

lowkey important: those negative values on failure are the whole "otherwise" branch, so don't be out here assuming success and reading garbage. vibe check your int. πŸ’…

✨ SEE ALSO ✨

the lore is deep, and it lives in the kernel file ./net/ipv4/cipso_ipv4.c 🧚 β€” here's the full friend group, no one left out:


and that's the page, bestie 🫢 hope the category mapping is giving everything it needs to give for you. mwah πŸ’‹

πŸŽ€ sign-off szn: this one comes from ./net/ipv4, dated October 2026, and yes β€” the page is literally cipso_v4_map_cat_rng_hton(9). same name, top to bottom, no plot twist. 🌸
πŸ“¦ where this page comes from