batadv_dat_put_dhcp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, slay
  • yiaddr β€” 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 bestie
  • vid β€” 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:

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