calipso_opt_find(9)
β¨ calipso_opt_find(9) β¨
okay so this is a page from the Kernel API Manual β the calipso_opt_find(9) one β and honestly it's a little sleeper hit but we're gonna make it iconic π
πΈ NAME πΈ
calipso_opt_find β finds the CALIPSO option in an IPv6 hop options header π
π¦ SYNOPSIS π¦
int calipso_opt_find (struct ipv6_opt_hdr *hop , unsigned int *start ,
unsigned int *end );
like yes that's the whole signature, no cap β¨
π ARGUMENTS π
hopβ the hop options header. that's the thing we're snooping through, bestie πstartβ on return this holds the offset of any leading padding πendβ on return this holds the offset of the first non-pad TLV after CALIPSO π―
π§ DESCRIPTION π§
so the whole vibe of this function is: it finds the space occupied by a CALIPSO option β including any leading and trailing padding π. like it's not just looking for the option itself, it's claiming the whole little neighborhood around it, padding and all.
if a CALIPSO option exists, it sets start and end to the offsets within hop of the start of padding before the first CALIPSO option, and the end of padding after the first CALIPSO option. and in this case? the function returns 0. slay β
but if there's no CALIPSO option anywhere? then start and end get set to the start and end of any trailing padding in the header instead. and this is actually so useful β it's giving "here's some free real estate" β because when you're appending a new option, the caller may want to overwrite some of that padding π«Ά. in this case though, the function returns -ENOENT. sad but honest π
π SEE ALSO π
Kernel file ./net/ipv6/calipso.c β and the whole CALIPSO friend group is here, fr fr:
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_insert(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)
π reminder: if there's no CALIPSO option you get-ENOENT, not0. don't get it twisted π€
and that's the page!! bai bestie π«Ά this one lives in ./net/ipv6 and it's dated October 2026, mwah πβ¨
π¦ 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