batadv_tvlv_call_handler(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_tvlv_call_handler(9) πŸ’–

okay so we're deep in the kernel docs rn β€” this one lives in the Kernel API Manual, and it's literally the function that takes your tvlv buffer and goes "bestie, let me find the right handler for you" 🫢


✨ NAME ✨

batadv_tvlv_call_handler β€” parse the given tvlv buffer to call the appropriate handlers

the way this one function just runs the whole group chat of handlers… main character energy fr fr πŸ‘‘


🌸 SYNOPSIS 🌸

int batadv_tvlv_call_handler (struct batadv_priv *bat_priv , struct
batadv_tvlv_handler *tvlv_handler , u8 packet_type , struct
batadv_orig_node *orig_node , struct sk_buff *skb , void *tvlv_value ,
u16 tvlv_value_len );

seven args, no cap. she's got a lot going on and we love her for it πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • bat_priv β€” the bat priv with all the mesh interface information ✨ like, all of it. every last mesh interface detail is in here.
  • tvlv_handler β€” the tvlv callback function handling the tvlv content. this is the lil bestie that actually does the work 🫢
  • packet_type β€” indicates for which packet type the TVLV handler is called πŸ‘€ so she knows what kind of packet we're dealing with.
  • orig_node β€” orig node emitting the ogm packet πŸ“‘ yup, the origin node, the one sending the ogm.
  • skb β€” the skb the TVLV handler is called for πŸ¦‹ the socket buffer in question, periodt.
  • tvlv_value β€” tvlv content. the actual goods πŸ’–
  • tvlv_value_len β€” tvlv content length πŸ“ gotta know how long the content is, obviously.

⭐ RETURN ⭐

so what do you get back? glad you asked πŸ’…

NET_RX_SUCCESS if the handler was not found β€” yeah, not found still gets you a success, iconic β€” or the return value of the handler callback. and that latter one is NET_RX_SUCCESS or NET_RX_DROP for the unicast handler, and additionally a negative errno code for the mcast handler 🌈

ngl the mcast handler has extra range β€” she can hit you with an errno too. keep an eye on it 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./net/batman-adv/tvlv.c β€” and literally the whole tvlv extended family, we're doing a reunion πŸŽ‰


and that's the whole thing bestie, go forth and call your handlers πŸŒΈπŸ§šπŸ’œ

πŸ’Œ lil sign-off: this page came from ./net/batman-adv and it's dated October 2026 β€” so yeah, she's from the future, slay. mwah πŸ’‹
πŸ“¦ where this page comes from