cipso_v4_map_cat_rng_ntoh(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cipso_v4_map_cat_rng_ntoh β€” the kernel API manual, bestie edition

okay so bestie, imagine this page lives in the Kernel API Manual, and today's main character is cipso_v4_map_cat_rng_ntoh. yes that name is a mouthful, no we are not shortening it, it's iconic and we respect it πŸŽ€


✨ NAME ✨

cipso_v4_map_cat_rng_ntoh β€” literally does a category mapping, but like… from network to host. that's the whole vibe. πŸ¦‹


🫢 SYNOPSIS 🫢

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

she takes four things and returns an int, periodt. πŸ’…


πŸ‘‘ ARGUMENTS πŸ‘‘

  • doi_def β€” the DOI definition. that's her whole reference point, the blueprint, the source of truth ✨
  • net_cat β€” the category list in network/CIPSO format. i.e. the data still dressed in its network-format little outfit 🌸
  • net_cat_len β€” the length of the CIPSO bitmap in bytes. yes, bytes, note it, write it down πŸŽ€
  • secattr β€” the security attributes. this is where the mapped result is headed 🧚

πŸ’– DESCRIPTION πŸ’–

so what she actually does is perform a label mapping β€” translating a CIPSO category list into the correct local MLS category bitmap, using the DOI definition you handed her. like a translator but for categories, no cap 🌈

and the return situation? she returns zero on success, and negative values on failure. that's it, that's the contract, don't @ me. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

bestie there are SO many siblings, okay, they all live in the kernel file ./net/ipv4/cipso_ipv4.c β€” here's the full family scroll, not skipping a single one 🫢


ok and one little lore drop before you go: this page comes from the kernel file ./net/ipv4/cipso_ipv4.c, the source is ./net/ipv4, and the date on it is October 2026. so like, future-core of the kernel API manual 🌸

and that's the whole page, bestie β€” you ate it up, i'm obsessed, mwah πŸ’‹πŸ’œ

πŸ“¦ where this page comes from