cipso_v4_gentag_loc(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… cipso_v4_gentag_loc โ€” bestie, it's giving local tag generation

okay so real quick: this page lives in the Kernel API Manual section (section 9, kernel devs only, iykyk) and it's about cipso_v4_gentag_loc โ€” a function that generates a CIPSO local tag. And yes, it's the non-standard one. Not me calling it that, the manpage said it first. ๐Ÿ’€


โœจ NAME โœจ

cipso_v4_gentag_loc โ€” Generate a CIPSO local tag (non-standard)


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

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

๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • doi_def โ€” the DOI definition. that's the whole vibe of what you're working with ๐Ÿซถ
  • secattr โ€” the security attributes. the actual content bestie โœจ
  • buffer โ€” the option buffer. where the tag goes to live its life ๐Ÿ’–
  • buffer_len โ€” length of buffer in bytes. keep count, no cap ๐Ÿงฎ

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So what it does: it generates a CIPSO option using the local tag. That's it, that's the whole gig. ๐Ÿ‘‘

And the tea on return values: it returns the size of the tag on success, and negative values on failure. Lowkey simple, highkey important โ€” check that return, bestie, don't just ignore it. ๐Ÿ˜ญ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

The kernel file it lives in is ./net/ipv4/cipso_ipv4.c โ€” that's home base, that's main character energy ๐Ÿ’…

And here's the whole squad it runs with, no gatekeeping, every single one:

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_gentag_enum(9), cipso_v4_parsetag_enum(9),
cipso_v4_gentag_rng(9), cipso_v4_parsetag_rng(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)

notice how cipso_v4_parsetag_loc(9) is right there too โ€” the reading half of the duo, obsessed with the symmetry ๐Ÿงš

also don't come for me about the "non-standard" in the NAME section, that's literally what the page says and I refuse to editorialize ๐ŸŒˆ

โญ and that's the page!! sourced straight from the ./net/ipv4 corner of the kernel, dated October 2026, Kernel API Manual, section 9. slay, go generate some tags, ily, bye ๐Ÿ’œ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from