cipso_v4_gentag_enum(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cipso_v4_gentag_enum β€” the Kernel API Manual tea 🫢

Okay bestie, so this one lives in the kernel API manual and it's literally called cipso_v4_gentag_enum ✨ β€” its whole ~vibe~ is generating a CIPSO enumerated tag, and that's tag type #2, no cap. πŸŽ€


🌸 SYNOPSIS 🌸

int cipso_v4_gentag_enum (const struct cipso_v4_doi *doi_def , const
       struct netlbl_lsm_secattr *secattr , unsigned char *buffer , u32
       buffer_len );

Like, she returns an int, she takes four things, that's the whole story πŸ’–


✨ ARGUMENTS ✨

  • doi_def β€” the DOI definition πŸ‘‘ this is the source of truth for the domain, periodt.
  • secattr β€” the security attributes 🌸 the actual label data she's gonna pack in.
  • buffer β€” the option buffer πŸŽ€ your scratch space where the tag gets written out.
  • buffer_len β€” length of buffer in bytes πŸ“ yes, in bytes, always in bytes, don't come at me.

πŸ’œ DESCRIPTION πŸ’œ

So what she does: she generates a CIPSO option using the enumerated tag β€” tag type #2 πŸ¦‹ (that's the enumerated one, iykyk).

On success she returns the size of the tag πŸ”₯ so you know exactly how much of your buffer got eaten. On failure? Negative values 😭 that's the "something went sideways" signal, so check her return before you do anything cute with that buffer.

Fr fr always check the return value β€” negative means it did not slay. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./net/ipv4/cipso_ipv4.c and honestly the whole friend group πŸ‘―β€β™€οΈ :

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_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_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)


Kay so that's the whole page, mwah πŸ’‹ this one's filed under ./net/ipv4 and it's dated October 2026, so yeah β€” future girlie behavior only. Go forth and generate those type #2 tags, bestie, you're gonna eat πŸ“βœ¨

πŸ“¦ where this page comes from