batadv_dat_check_dhcp_ack(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_dat_check_dhcp_ack(9) πŸ’–

okay so bestie, we're in the Kernel API Manual today and this one's a little function with a big job β€” think of it as the bouncer at the club door of your network stack, checking IDs for DHCP ACKs ✨


🌸 NAME 🌸

batadv_dat_check_dhcp_ack β€” examine a packet to see if it's a valid DHCP message, no cap πŸ•΅οΈβ€β™€οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

bool batadv_dat_check_dhcp_ack (struct sk_buff *skb , __be16 proto ,
       __be32 *ip_src , u8 *chaddr , __be32 *yiaddr );

like, that's the whole signature, literally all of it, don't @ me πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the packet we're checking, the main character of this whole situation πŸ“¦
  • proto β€” the ethernet protocol hint (and yeah, it's behind a potential vlan, so heads up for that)
  • ip_src β€” a buffer where we're gonna stash the IPv4 source address 🏠
  • chaddr β€” a buffer for the DHCP Client Hardware Address (the client's MAC, iykyk)
  • yiaddr β€” a buffer for the DHCP Your IP Address field, yes that's the actual name, iconic

πŸ”₯ DESCRIPTION πŸ”₯

So what it does: it checks whether the given skb is a valid DHCPACK. And if it is? It stores three things in the buffers you so kindly provided πŸ‘‘

  • the IPv4 server source address β†’ into ip_src
  • the client MAC address β†’ into chaddr
  • the client IPv4 address β†’ into yiaddr
⚠️ real talk, bestie: the caller needs to make sure the skb network header is set correctly. That's not this function's problem, that's yours. Don't set it wrong and then act surprised. πŸ™ˆ

⭐ RETURN ⭐

Returns True if the skb is a valid DHCPACK β€” slay πŸ’…

Returns False otherwise β€” not it, bestie πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./net/batman-adv/distributed-arp-table.c, plus a whole friend group of symbols:


and that's the whole page, bestie 🫢 this little love letter lives in ./net/batman-adv, dated October 2026, and yes the header said batadv_dat_check_dhcp_ack(9) twice because it's extra like that πŸ’…βœ¨ go read your network headers correctly, mwah πŸŽ€

πŸ“¦ where this page comes from