batadv_dat_put_dhcp(9)
π batadv_dat_put_dhcp(9)
okay so real talk bestie, we're in the Kernel API Manual today β yes, that Kernel β and the star of the show is batadv_dat_put_dhcp. It's a function, it lives in the kernel, and it's about to take your DHCP packet's addresses and yeet them directly into the DHT and the DAT cache. no cap, she does both. π«Ά
β¨ NAME β¨
batadv_dat_put_dhcp β puts addresses from a DHCP packet into the DHT and DAT cache π
like... that's literally her whole job. she takes addresses out of a DHCP packet and files them where they belong. iconic behavior, honestly.
π¦ SYNOPSIS π¦
void batadv_dat_put_dhcp (struct batadv_priv *bat_priv , u8 *chaddr ,
__be32 yiaddr , u8 *hw_dst , __be32 ip_dst , unsigned short vid );
returns void, so she's not giving you a return value. she just does it. main character energy fr fr β¨
π ARGUMENTS π
bat_privβ the bat priv that's holding all the mesh interface information. she's the whole context babe, everything lives in here πchaddrβ the DHCP client MAC address. the client's hardware identity, slayyiaddrβ the DHCP client IP address. yep, "your IP address" β that's the vibe πΈhw_dstβ the DHCP server MAC address. the one handing stuff out πip_dstβ the DHCP server IP address. her numeric bestievidβ VLAN identifier. because we stay segmented and organized, periodt π§
π₯ DESCRIPTION π₯
So what she actually does: she adds the given MAC/IP pairs to the local DAT cache and then propagates them further into the DHT. two destinations, one function call, we love a multitasker π
And for the DHT propagation specifically β listen, this part is lowkey important β the client MAC + IP will appear as the ARP Reply transmitter, and hw_dst/ip_dst will appear as the target. that's the exact framing of the thing, no cap. don't get it twisted π
π SEE ALSO π
Kernel file ./net/batman-adv/distributed-arp-table.c β go read the source bestie, it's giving lore β
And here's the full friend group, every single one, nobody left behind:
enum batadv_bootpop(9)enum batadv_boothtype(9)enum batadv_dhcpoptioncode(9)enum batadv_dhcptype(9)struct batadv_dhcp_packet(9)struct batadv_dhcp_header(9)struct batadv_dhcp_option_header(9)batadv_dat_start_timer(9)batadv_dat_entry_release(9)batadv_dat_entry_put(9)batadv_dat_to_purge(9)__batadv_dat_purge(9)batadv_dat_purge(9)batadv_compare_dat(9)batadv_arp_hw_src(9)batadv_arp_ip_src(9)batadv_arp_hw_dst(9)batadv_arp_ip_dst(9)batadv_hash_dat(9)batadv_dat_entry_hash_find(9)batadv_dat_entry_add(9)batadv_dbg_arp(9)batadv_is_orig_node_eligible(9)batadv_choose_next_candidate(9)batadv_dat_select_candidates(9)batadv_dat_forward_data(9)batadv_dat_tvlv_container_update(9)batadv_dat_status_update(9)batadv_dat_tvlv_ogm_handler_v1(9)batadv_dat_hash_free(9)batadv_dat_init(9)batadv_dat_free(9)batadv_dat_cache_dump_entry(9)batadv_dat_cache_dump_bucket(9)batadv_dat_cache_dump(9)batadv_arp_get_type(9)batadv_dat_get_vid(9)batadv_dat_arp_create_reply(9)batadv_dat_snoop_outgoing_arp_request(9)batadv_dat_snoop_incoming_arp_request(9)batadv_dat_snoop_outgoing_arp_reply(9)batadv_dat_snoop_incoming_arp_reply(9)batadv_dat_check_dhcp_ipudp(9)batadv_dat_check_dhcp(9)batadv_dat_get_dhcp_message_type(9)batadv_dat_dhcp_get_yiaddr(9)batadv_dat_get_dhcp_chaddr(9)batadv_dat_check_dhcp_ack(9)batadv_dat_snoop_outgoing_dhcp_ack(9)batadv_dat_snoop_incoming_dhcp_ack(9)batadv_dat_drop_broadcast_packet(9)
like, that's the whole squad π go read every one, iykyk π
okay that's the page!! this one came out of ./net/batman-adv and it's dated October 2026 β so mark your calendar bestie, and remember the title the whole time: batadv_dat_put_dhcp(9). mwah πππ¦
π¦ 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