batadv_tt_pr..._global_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_tt_prepare_tvlv_global_data(9) πŸ’–

okay bestie, so this one is a page from the Kernel API Manual, and the function name is a whole mouthful that got cut off in the title: batadv_tt_prepare_tvlv_global_data. it's giving "my name is longer than your attention span" energy, but we're gonna get through it together 🫢


✨ NAME ✨

batadv_tt_prepare_tvlv_global_data β€” prepare the TVLV TT header to send within a TT Response directed to another node πŸ’…

like, literally, you're building the little header package that goes out in a TT Response so another node can read it. no cap, that's the whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

u16 batadv_tt_prepare_tvlv_global_data (struct batadv_orig_node
*orig_node , struct batadv_tvlv_tt_data **tt_data , struct
batadv_tvlv_tt_change **tt_change , s32 *tt_len );

note the return type is u16, bestie. remember that, it comes back later πŸ‘€


🌸 ARGUMENTS 🌸

here's where the plot thickens. four params, each with main character energy:

  • orig_node β€” the originator for which the TT data has to be prepared. this is the node you're doing all this prep for, okay? everything below is in service of this one πŸ’–
  • tt_data β€” an uninitialised pointer to the address of the TVLV buffer. uninitialised, so don't go reading through it like you already know what's in there πŸ™ˆ
  • tt_change β€” an uninitialised pointer to the address of the area where the TT change*s* can be stored. same deal, it's uninitialised, treat it with respect ✨
  • tt_len β€” pointer to the length to reserve for the tt_change. and here's the iconic part: if it's -1, this function reserves the amount of space needed to send the entire global TT table. on success the value gets updated with the real amount of reserved bytes πŸ”₯
and then the description keeps rolling inside the tt_len entry, so here it is in full: Allocate the needed amount of memory for the entire TT TVLV and write its header made up of one tvlv_tt_data object and a series of tvlv_tt_vlan_data objects, one per active VLAN served by the originator node. which is honestly the real vibe of the whole function β€” allocate the memory, write the header, one tvlv_tt_data object plus a whole little parade of tvlv_tt_vlan_data objects, one for each active VLAN that originator node serves πŸŽ€

πŸ‘‘ RETURN πŸ‘‘

  • the size of the allocated buffer β€” slay ✨
  • 0 in case of failure β€” 😭 not slay, but at least you know

🌈 SEE ALSO 🌈

okay so this is the part where I need you to lock in, because the kernel file is ./net/batman-adv/translation-table.c and it brought its entire friend group. every single one, no skipping, iykyk:

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_local_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)

that's the whole group chat bestie, every (9) intact, don't @ me πŸ’€


and that's the page!! πŸŽ€ tiny little sign-off for you: this one lives in ./net/batman-adv, and the doc itself is dated October 2026. go forth and prepare those TVLV headers, queen πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from