cipso_v4_skbuff_setattr(9)
π cipso_v4_skbuff_setattr(9) β like, the CIPSO packet glow-up function
okay so bestie, welcome to the Kernel API Manual π β this one's from the <pink>kernel API</pink> corner of the universe and it's literally about stamping a CIPSO option onto a packet. yes. we're doing networking lore today. buckle up π¦
β¨ NAME β¨
cipso_v4_skbuff_setattr β Set the CIPSO option on a packet π
that's it. that's the whole job. putting the CIPSO option on a packet. no cap.
πΈ SYNOPSIS πΈ
int cipso_v4_skbuff_setattr (struct sk_buff *skb , const struct
cipso_v4_doi *doi_def , const struct netlbl_lsm_secattr *secattr );
three things go in, one int comes out. the way that signature just sits there being all typed and const-correct? iconic. π
π¦ ARGUMENTS π¦
skbβ the packet π like, the actual packet we're about to decorate. main character energy fr.doi_defβ the DOI structure π that's the DOI definition, and yes it's aconst struct cipso_v4_doi *because we are not mutating it, we respect it too much.secattrβ the security attributes π₯ theconst struct netlbl_lsm_secattr *that tells us what security vibes this packet should be wearing.
β DESCRIPTION β
so what does it actually do? glazed donut explanation: it sets the CIPSO option on the given packet, based on the security attributes. that's the whole plot π
and the return? listen closely bestie:
Returns a pointer to the IP header on success and NULL on failure.
yep β that's exactly what the page says, so that's exactly what I'm telling you. success = pointer to the IP header. failure = NULL. no in-between, no "it depends", no talking stage π
ngl a NULL coming back is your vibe check failing, so handle it. π«Ά
π SEE ALSO π
okay this is the part where the manpage just dumps the whole friend group on you and honestly? obsessed. π
all of these live in the kernel file ./net/ipv4/cipso_ipv4.c:
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_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_delattr(9)cipso_v4_init(9)
like I said. the whole group chat. π«Ά iykyk.
π the cute sign-off π
and that's the page bestie!! this little beauty is served up fresh from <purple>./net/ipv4</purple> and it's dated <mint>October 2026</mint> π go set some CIPSO options, treat your packets right, and remember: <rainbow>pointer on success, NULL on failure</rainbow> β no cap, periodt. πβ¨π
π¦ 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