batadv_dat_s...ing_dhcp_ack(9)
π batadv_dat_s...ing_dhcp_ack(9) π
okay bestie, so this is a page from the Kernel API Manual β yes, the whole batadv_dat_s...ing_dhcp_ack(9) situation β and honestly? It's lowkey iconic. It's a tiny little function that quietly does its job in the batman-adv mesh world, and we're gonna go through it together, no cap. π¦
β¨ NAME β¨
batadv_dat_snoop_incoming_dhcp_ack β snoop DHCPACK and fill DAT cache πΈ
Like, it's literally a little eavesdropper that catches a DHCPACK and neatly files the info away. Main character energy fr.
π SYNOPSIS π
void batadv_dat_snoop_incoming_dhcp_ack (struct batadv_priv *bat_priv ,
struct sk_buff *skb , int hdr_size );
π ARGUMENTS π
bat_privβ the bat priv with all the mesh interface information π like, it's the whole vibe of your mesh interface, everything lives in thereskbβ the packet to snoop π΅οΈββοΈ yes bestie, we're being nosy on purpose, it's finehdr_sizeβ header size, up to the tail of the batman-adv header π
π DESCRIPTION π
So here's the tea, bestie. This function first checks whether the given skb is a valid DHCPACK. π If it is β slay β then its source MAC and IP, as well as its DHCP Client Hardware Address field and DHCP Your IP Address field, get added to the local DAT cache. Four little pieces of info, all tucked in. Periodt. β¨
β οΈ Warning, and this one is serious: This function may reallocate the skb data buffer viapskb_may_pull/batadv_dat_get_vid/... Any pointer into the skb data (e.g. obtained fromskb->dataoreth_hdr) before this call must be considered invalid afterwards and has to be reacquired. π Like, do NOT hold onto those pointers, they are gone, they are not coming back, reacquire or perish. π
π SEE ALSO π
Kernel file ./net/batman-adv/distributed-arp-table.c, plus the whole extended friend group:
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_put_dhcp(9)batadv_dat_check_dhcp_ack(9)batadv_dat_snoop_outgoing_dhcp_ack(9)batadv_dat_drop_broadcast_packet(9)
aaaand that's the whole page, bestie π«Ά this little corner of the kernel lives in ./net/batman-adv, dated October 2026 π go forth and snoop responsibly β¨ππ§
π¦ 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