batadv_tvlv_hdr_next(9)
β¨ batadv_tvlv_hdr_next β the cursor-glowup function π
okay bestie, so this is a kernel API manual page from the batman-adv world, and it's called batadv_tvlv_hdr_next π It's literally the lil helper that walks your tvlv buffer cursor forward to the next container. No cap, it's short and sweet.
πΈ SYNOPSIS πΈ
struct batadv_tvlv_hdr * batadv_tvlv_hdr_next (void **tvlv_value , u16
*tvlv_value_len );
that's the whole vibe right there π
π¦ ARGUMENTS π¦
tvlv_valueβ this is your cursor into the tvlv buffer, bestie. On success it gets advanced past the returned container's content. it's avoid **so yes, it's pointer-to-pointer, we love a double indirection moment πtvlv_value_lenβ the remaining length of the tvlv buffer, au16 *. On success it gets reduced by the returned container's size. so it just gets shorter. as it should π
π DESCRIPTION π
so basically it parses a single container header at the current cursor position, andβif a complete container is actually availableβit advances the cursor and the remaining length past it. iconic behavior.
the returned header stays valid, which is the serve of it all β¨ its content is located at (returned header + 1) and is ntohs(hdr->len) bytes long. yes, ntohs, network-to-host short, we love an endianness moment π§
π₯ RETURN π₯
it returns a pointer to the next tvlv container header π«Ά
or NULL if there's no further complete container present in the buffer. no container, no pointer, that's the deal π
β SEE ALSO β
the kernel file lives at ./net/batman-adv/tvlv.c and here's the whole squad of related functions, no skipping, i love you but i'm listing all of them:
batadv_tvlv_handler_release(9)batadv_tvlv_handler_put(9)batadv_tvlv_handler_get(9)batadv_tvlv_container_release(9)batadv_tvlv_container_put(9)batadv_tvlv_container_get(9)batadv_tvlv_container_list_size(9)batadv_tvlv_container_remove(9)batadv_tvlv_container_unregister(9)batadv_tvlv_container_register(9)batadv_tvlv_realloc_packet_buff(9)batadv_tvlv_container_ogm_append(9)batadv_tvlv_call_handler(9)batadv_tvlv_containers_contain(9)batadv_tvlv_containers_process(9)batadv_tvlv_ogm_receive(9)batadv_tvlv_handler_register(9)batadv_tvlv_handler_unregister(9)batadv_tvlv_unicast_send(9)
that's nineteen functions, periodt π
heads up bestie:tvlv_valueandtvlv_value_lenonly get advanced/reduced on success β so if you getNULLback, nothing moved. don't be out here assuming the cursor shifted anyway π
π that's the whole page, fr fr! this one comes from the kernel source at ./net/batman-adv, dated October 2026, and the manpage is batadv_tvlv_hdr_next(9) β mwah, go read your kernel API docs, i'm obsessed with u π«Άπβ¨
π¦ 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