calipso_opt_insert(9)
β¨ calipso_opt_insert(9) β¨
okay bestie, so this one lives in the kernel API manual (section 9, the fancy kernel club π ), and it's literally all about slipping a CALIPSO option into an IPv6 hop options header. let's get into it π
πΈ NAME πΈ
calipso_opt_insert β the function that inserts a CALIPSO option into an IPv6 hop opt hdr β¨
π¦ SYNOPSIS π¦
struct ipv6_opt_hdr * calipso_opt_insert (struct ipv6_opt_hdr *hop ,
const struct calipso_doi *doi_def , const struct netlbl_lsm_secattr
*secattr );
π ARGUMENTS π
hopβ the original hop options header, like the starting point we're building on π«Άdoi_defβ the CALIPSO DOI to use, that's the domain-of-interpretation we're rolling with π₯secattrβ the specific security attributes of the socket, i.e. the vibe check info for this socket π
π DESCRIPTION π
So basically this function creates a brand new hop options header based on hop, with a CALIPSO option added to it. Iconic behaviour honestly β¨
And here's the tea on how it decides where that option goes:
- if
hopalready contains a CALIPSO option, that one gets overwritten π«£ - otherwise, the new option is appended after any existing options π
- and if
hopisNULL, then the new header will contain just the CALIPSO option and any needed padding π
no cap, that's the whole flow πΈ
π SEE ALSO π
Kernel file ./net/ipv6/calipso.c and honestly the whole calipso bestie squad:
calipso_cache_entry_free(9)calipso_map_cache_hash(9)calipso_cache_init(9)calipso_cache_invalidate(9)calipso_cache_check(9)calipso_cache_add(9)calipso_doi_search(9)calipso_doi_add(9)calipso_doi_free(9)calipso_doi_free_rcu(9)calipso_doi_remove(9)calipso_doi_getdef(9)calipso_doi_putdef(9)calipso_doi_walk(9)calipso_validate(9)calipso_map_cat_hton(9)calipso_map_cat_ntoh(9)calipso_pad_write(9)calipso_genopt(9)calipso_opt_update(9)calipso_tlv_len(9)calipso_opt_find(9)calipso_opt_del(9)calipso_opt_getattr(9)calipso_sock_getattr(9)calipso_sock_setattr(9)calipso_sock_delattr(9)calipso_req_setattr(9)calipso_req_delattr(9)calipso_skbuff_optptr(9)calipso_skbuff_setattr(9)calipso_skbuff_delattr(9)calipso_init(9)
fr fr go read the whole squad, they're all in ./net/ipv6 and they all ate ππ₯
and that's a wrap bestie π§ this page is served up from the ./net/ipv6 source, dated October 2026, and it's the calipso_opt_insert(9) page in the Kernel API Manual β stay hydrated, keep your headers padded, and slay your options ππ
π¦ 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