batadv_dat_check_dhcp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ batadv_dat_check_dhcp(9) β€” the Kernel API Manual moment πŸ’–

okay so bestie, this one is a kernel API page, like from the batman-adv manual set, and it's actually so much less scary than the name looks. it's giving "small function, big job" energy ✨ let's get into it.


✨ SYNOPSIS ✨

int batadv_dat_check_dhcp (struct sk_buff *skb , __be16 proto , __be32
*ip_src );

literally three args, one return value, no cap. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the packet you want checked. the star of the show πŸ‘‘
  • proto β€” an ethernet protocol hint, and lowkey the important detail: this one sits behind a potential vlan, so it's the hint, not always the raw thing you'd expect.
  • ip_src β€” a buffer where the IPv4 source address gets stored. you bring the buffer, it does the filling πŸ“

πŸ’… DESCRIPTION πŸ’…

so what does it even do?? it checks whether the skb you handed it is a valid DHCP packet. that's the whole vibe check. and if it passes β€” slay β€” it stores the IPv4 source address in the buffer you provided. πŸŽ€

⚠️ but here's the thing, bestie: the caller has to make sure the skb's network header is set correctly. that's not this function's job. it's not gonna go fix that for you, so do it before you call it, fr fr. πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • if skb is a valid DHCP packet β†’ you get back its op code (think BOOTREPLY vs. BOOTREQUEST). iconic. πŸ’–
  • otherwise β†’ -EINVAL. not iconic, but very informative πŸ’€

🌈 SEE ALSO 🌈

the whole friend group, no one left out β€” kernel file ./net/batman-adv/distributed-arp-table.c and all of these legends:


and that's the whole page, bestie β€” go read some of that DHCP lore, it's lowkey fascinating πŸ¦‹

okay ily, bye πŸ’œ β€” this cute little sign-off comes to you from ./net/batman-adv, dated October 2026, and the function is still out here doing its DHCP checks. periodt. ✨

πŸ“¦ where this page comes from