cipso_v4_map_cat_enum_hton(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cipso_v4_map_cat_enum_hton(9) β€” the kernel API manual, bestie edition ✨

okay so this is a page from the Kernel API Manual and honestly? it's giving niche-but-iconic. it's all about cipso_v4_map_cat_enum_hton, and if you've ever needed to translate a category bitmap from host vibes into network vibes, this is literally your girl 🫢


✨ NAME ✨

cipso_v4_map_cat_enum_hton β€” do a category mapping from host to network, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

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

πŸŽ€ ARGUMENTS πŸŽ€

  • doi_def β€” the DOI definition, aka the main character of this whole operation πŸ‘‘
  • secattr β€” the security attributes, our source material basically
  • net_cat β€” the zero'd out category list in network/CIPSO format β€” yes, zero'd out, it's already prepped for you, don't come in with leftovers 🌸
  • net_cat_len β€” the length of the CIPSO category list, in bytes, so the function knows how much room it's working with

πŸ”₯ DESCRIPTION πŸ”₯

so what does it actually do? it performs a label mapping β€” translating a local MLS category bitmap into the correct CIPSO category list using the DOI definition you handed it. think of it as the glow-up pipeline from local bitmap to network-ready category list πŸ’–

on success it returns the size in bytes of the network category bitmap. otherwise? negative values 😭 that's the fail state, and yes, you should check for it, bestie.


🌈 SEE ALSO 🌈

kernel file ./net/ipv4/cipso_ipv4.c, plus the whole friend group β€” every single one of these cuties is on the list:

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_ntoh(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)

ngl if you're reading all of these in one sitting, hydrate first πŸ“

and that's the page!! sign-off time: this one lives in <pink>./net/ipv4</pink>, dated October 2026, filed right back under cipso_v4_map_cat_enum_hton(9) β€” periodt, go map some categories, bestie πŸ’œβœ¨

πŸ“¦ where this page comes from