calipso_tlv_len(9)
π calipso_tlv_len(9) π
okay bestie, welcome to calipso_tlv_len(9) β straight outta the Kernel API Manual and ready to explain this tiny TLV-length moment. π This page is short, but itβs lowkey iconic.
β¨ NAME β¨
calipso_tlv_len β returns the length of the TLV. Thatβs the whole assignment, and she ate. π
π» SYNOPSIS π»
int calipso_tlv_len (struct ipv6_opt_hdr *opt , unsigned int offset );
π«Ά ARGUMENTS π«Ά
optβ the option header, bestie. Type check:struct ipv6_opt_hdr *. This is the header weβre looking inside. πΈoffsetβ the offset of the TLV within the header. Type check:unsigned int. Itβs giving βstart looking hereβ energy. β¨
π§ DESCRIPTION π§
okay so hereβs the tea: this function returns the length of the TLV option at offset offset within the option header opt. Before it hands you that length, it checks that the entire TLV actually fits inside the option header. If the whole TLV does not fit, it returns a negative value. π
if you get a negative value back, thatβs the βnope, it doesnβt fitβ signal. no cap. π©
π SEE ALSO π
the kernel file is ./net/ipv6/calipso.c, and the whole CALIPSO squad pulls up like:
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_opt_find(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)
xoxo, from ./net/ipv6 πΈ, dated October 2026 π, on page calipso_tlv_len(9) π
π¦ 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