STRUCT BATADV_DHCP_PACKET(9)
π
struct batadv_dhcp_packet β a Kernel API Manual moment (manual: struct batadv_dhcp_packet(9))
okay so bestie, listen β this is the struct batadv_dhcp_packet, and it's literally the BOOTP/DHCP packet header. That's the NAME, that's the whole vibe. It's the shape your bytes have to be in when you're talking DHCP out here in batman-adv land. π
β¨ SYNOPSIS β¨
Like, here's the whole layout, every single field, no shortcuts:
struct batadv_dhcp_packet {
__u8 op;
__u8 htype;
__u8 hlen;
__u8 hops;
__be32 xid;
__be16 secs;
__be16 flags;
__be32 ciaddr;
__be32 yiaddr;
__be32 siaddr;
__be32 giaddr;
__u8 chaddr[16];
__u8 sname[64];
__u8 file[128];
__be32 magic;
};
π¦ Members (aka the whole cast, and yes they all ate) π¦
opβ the message op code / message type. It's giving "what kind of packet is this".htypeβ hardware address type. what flavour of hardware addr are we dealing with.hlenβ hardware address length. how long that hardware addr actually is.hopsβ number of relay hops.xidβ transaction identifier. the little tag that ties a convo together.secsβ seconds elapsed since the client started trying to boot. the "how long have you been standing there" counter.flagsβ BOOTP/DHCP flags.ciaddrβ client IP address.yiaddrβ "your" (client) IP address as assigned by the server. yes the quotes are canon, that's literally the field's whole personality.siaddrβ IP address of next server to use in bootstrap.giaddrβ relay agent IP address.chaddrβ client hardware address.snameβ optional server host name.fileβ boot file name.magicβ BOOTP/DHCP magic cookie identifying the start of options. the little "options start HERE" signal, iconic behavior honestly π₯
π SEE ALSO π
Kernel file ./net/batman-adv/distributed-arp-table.c and, like, an entire friend group of symbols β all of them, in order, no one left out:
enum batadv_bootpop(9)enum batadv_boothtype(9)enum batadv_dhcpoptioncode(9)enum batadv_dhcptype(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_snoop_incoming_dhcp_ack(9)batadv_dat_drop_broadcast_packet(9)
quick vibe check: every field name, every type, every one of those (9) references above is straight-up load-bearing. don't be out here editing the struct in your head, bestie β copy it fr fr. π
and that's the page! π«Ά brought to you by ./net/batman-adv, dated October 2026 β go off, kernel docs, you ate βππ
π¦ 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