cipso_v4_parsetag_loc(9)
πΈ cipso_v4_parsetag_loc β it's in section 9 of the Kernel API Manual, bestie πΈ
Okay so picture this: you're deep in the kernel, someone hands you a CIPSO local tag, and you're like "what do I even do with this?" β that's literally this function's whole job. It's from the Kernel API Manual, section 9, and honestly it's giving "small function, big responsibility" energy π
β¨ NAME β¨
cipso_v4_parsetag_loc β okay so this one parses a CIPSO local tag. That's it. That's the whole name. Slay.
π SYNOPSIS π
int cipso_v4_parsetag_loc (const struct cipso_v4_doi *doi_def , const
unsigned char *tag , struct netlbl_lsm_secattr *secattr );
Three things in, one int out. Simple queen behavior π
π¦ ARGUMENTS π¦
doi_defβ the DOI definition. Like, the whole rulebook for this domain of interpretation. You need it, don't skip it πtagβ the CIPSO tag itself. The actual raw bytes we're about to read. Our main character, honestly.secattrβ the security attributes. This is the output spot β where all the parsed goodness lands β¨
π DESCRIPTION π
So the whole vibe is: parse a CIPSO local tag, and drop the resulting security attributes into secattr. That's it. That's the mission π«Ά
Return values, no cap:
- returns zero on success β we love a zero-return win π
- returns negative values on failure β not every tag is gonna make it, and that's okay π
Real talk: failure here means negative values, plural, so don't go assuming one specific error code, bestie. Just check the sign and move on π
π SEE ALSO π
The kernel file we're living in: ./net/ipv4/cipso_ipv4.c. Everything below is family. Neighbors. The whole CIPSO friend group π
The cache crew (they keep things fresh, iconic of them):
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)
The DOI delegation (bureaucracy but make it cute):
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)
The level mappers (they handle the levels, respectfully):
The category mappers β bitmap flavor π:
The category mappers β enumerated flavor β¨:
The category mappers β range flavor π:
The tag generator/parser squad (this function's direct besties):
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_optptr(9)
The validation / error / option girlies:
The socket & request attribute crew π₯:
cipso_v4_sock_setattr(9),cipso_v4_req_setattr(9),cipso_v4_sock_delattr(9),cipso_v4_req_delattr(9),cipso_v4_sock_getattr(9),cipso_v4_getattr(9)
The skbuff delegation (they carry the data, literally):
And the mother of them all π:
That's the whole page, bestie. Go parse some tags. π§π
Sign-off time: this little gem lives in ./net/ipv4, and the page is dated October 2026 β so yeah, future girlie energy fr fr. Go off, and remember: zero means slay, negative means try again ππΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms