batadv_tvlv_hdr_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 a void ** so yes, it's pointer-to-pointer, we love a double indirection moment πŸ’€
  • tvlv_value_len β€” the remaining length of the tvlv buffer, a u16 *. 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:

that's nineteen functions, periodt πŸ’…


heads up bestie: tvlv_value and tvlv_value_len only get advanced/reduced on success β€” so if you get NULL back, 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