batadv_tt_p...v_local_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_tt_p...v_local_data(9) β€” Kernel API Manual ✨

okay bestie, so we're deep in the batman-adv translation-table lore today, and honestly? This one is a whole vibe. It's batadv_tt_prepare_tvlv_local_data from the Kernel API Manual, and it's giving "let me just set up the buffer for you, queen." Buckle up πŸŽ€

🌸 NAME 🌸

batadv_tt_prepare_tvlv_local_data β€” allocate and prepare the TT TVLV for this node. no cap, that's literally the whole job πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

u16 batadv_tt_prepare_tvlv_local_data (struct batadv_priv *bat_priv ,
struct batadv_tvlv_tt_data **tt_data , struct batadv_tvlv_tt_change
**tt_change , s32 *tt_len );

She returns a u16, she takes four args, she's iconic. Periodt. πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • bat_priv β€” the bat priv with all the mesh interface information 🫢 like, the whole mesh interface situation lives in here, and she needs it.
  • tt_data β€” uninitialised pointer to the address of the TVLV buffer. yes bestie, uninitialised β€” this function is the one doing the initialising, okay? don't come in here with your own guesses πŸ™ˆ
  • tt_change β€” uninitialised pointer to the address of the area where the TT changes can be stored. same deal, also starting empty, also getting filled in πŸ’œ
  • tt_len β€” pointer to the length to reserve to the tt_change. and here's the fun part: if it's -1, this function reserves the amount of space needed to send the entire local TT table πŸ”₯ In case of success the value is updated with the real amount of reserved bytes β€” so you hand her a guess-ish number, she hands you back the truth ✨

⭐ DESCRIPTION ⭐

So what's she actually doing? She allocates the needed amount of memory for the entire TT TVLV, and then she writes its header β€” and that header is made up by one tvlv_tt_data object plus a series of tvlv_tt_vlan_data objects, one per active VLAN 🧚

Like, one per active VLAN. Not one per VLAN, not a random number β€” one per active VLAN. That's the whole shape of it, and honestly? Clean. Slay. πŸ¦‹

🌈 RETURN 🌈

She returns the size of the allocated buffer β€” or 0 in case of failure 😭 so if you get a 0 back, that's not a success, that's her telling you it did not work out. vibe check failed, bestie.

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./net/batman-adv/translation-table.c, plus the entire TT extended family, because this function has a lot of cousins and we do not leave anyone out πŸ‘‘:

batadv_compare_tt(9), batadv_choose_tt(9), batadv_tt_hash_find(9), batadv_tt_local_hash_find(9), batadv_tt_global_hash_find(9), batadv_tt_local_entry_release(9), batadv_tt_local_entry_put(9), batadv_tt_global_entry_release(9), batadv_tt_global_hash_count(9), batadv_tt_local_size_mod(9), batadv_tt_local_size_inc(9), batadv_tt_local_size_dec(9), batadv_tt_global_size_mod(9), batadv_tt_global_size_inc(9), batadv_tt_global_size_dec(9), batadv_tt_orig_list_entry_release(9), batadv_tt_orig_list_entry_put(9), batadv_tt_local_event(9), batadv_tt_len(9), batadv_tt_entries(9), batadv_tt_local_table_transmit_size(9), batadv_tt_local_init(9), batadv_tt_global_free(9), batadv_tt_local_add(9), batadv_tt_prepare_tvlv_global_data(9), batadv_tt_tvlv_container_update(9), batadv_tt_local_dump_entry(9), batadv_tt_local_dump_bucket(9), batadv_tt_local_dump(9), batadv_tt_local_set_pending(9), batadv_tt_local_remove(9), batadv_tt_local_purge_list(9), batadv_tt_local_purge(9), batadv_tt_local_table_free(9), batadv_tt_global_init(9), batadv_tt_changes_list_free(9), batadv_tt_global_orig_entry_find(9), batadv_tt_global_entry_has_orig(9), batadv_tt_global_sync_flags(9), batadv_tt_global_orig_entry_add(9), batadv_tt_global_add(9), batadv_transtable_best_orig(9), batadv_tt_global_dump_subentry(9), batadv_tt_global_dump_entry(9), batadv_tt_global_dump_bucket(9), batadv_tt_global_dump(9), _batadv_tt_global_del_orig_entry(9), batadv_tt_global_del_orig_list(9), batadv_tt_global_del_orig_node(9), batadv_tt_global_del_roaming(9), batadv_tt_global_del(9), batadv_tt_global_del_orig(9), batadv_tt_global_to_purge(9), batadv_tt_global_purge(9), batadv_tt_global_table_free(9), _batadv_is_ap_isolated(9), batadv_transtable_search(9), batadv_tt_global_crc(9), batadv_tt_local_crc(9), batadv_tt_req_node_release(9), batadv_tt_req_node_put(9), batadv_tt_req_list_free(9), batadv_tt_save_orig_buffer(9), batadv_tt_req_purge(9), batadv_tt_req_node_new(9), batadv_tt_local_valid(9), batadv_tt_global_valid(9), batadv_tt_tvlv_generate(9), batadv_tt_global_check_crc(9), batadv_tt_local_update_crc(9), batadv_tt_global_update_crc(9), batadv_send_tt_request(9), batadv_send_other_tt_response(9), batadv_send_my_tt_response(9), batadv_send_tt_response(9), _batadv_tt_update_changes(9), batadv_tt_fill_gtable(9), batadv_tt_update_changes(9), batadv_is_my_client(9), batadv_handle_tt_response(9), batadv_tt_roam_list_free(9), batadv_tt_roam_purge(9), batadv_tt_check_roam_count(9), batadv_send_roam_adv(9), batadv_tt_purge(9), batadv_tt_free(9), batadv_tt_local_set_flags(9), batadv_tt_local_purge_pending_clients(9), batadv_tt_local_commit_changes_nolock(9), batadv_tt_local_commit_changes(9), batadv_is_ap_isolated(9), batadv_tt_update_orig(9), batadv_tt_global_client_is_roaming(9), batadv_tt_local_client_is_roaming(9), batadv_tt_add_temporary_global_entry(9), batadv_tt_local_resize_to_mtu(9), batadv_tt_tvlv_ogm_handler_v1(9), batadv_tt_tvlv_unicast_handler_v1(9), batadv_roam_tvlv_unicast_handler_v1(9), batadv_tt_init(9), batadv_tt_global_is_isolated(9), batadv_tt_cache_init(9), batadv_tt_cache_destroy(9)


okay that's the whole page, bestie, and we did not skip one single entry πŸ’– this gem lives under ./net/batman-adv and the manual itself is dated October 2026 β€” go read the source, ily, bye 🫢✨

πŸ“¦ where this page comes from