STRUCT BATADV_CODED_PACKET(9)
π struct batadv_coded_packet(9) β network coded packet
Okay bestie, so this is a page straight outta the Kernel API Manual, and it's literally the blueprint for a network coded packet. It's giving "two packets walked into a bar and left as one" energy, and honestly? Iconic. Let's get into it π¦
β¨ NAME β¨
struct batadv_coded_packet β network coded packet. That's it, that's the vibe. Lowkey the whole point of this struct is packing two packets into one coded situation, and I'm obsessed π
π SYNOPSIS π
struct batadv_coded_packet {
__u8 packet_type;
__u8 version;
__u8 ttl;
__u8 first_ttvn;
__u8 first_source[ETH_ALEN];
__u8 first_orig_dest[ETH_ALEN];
__be32 first_crc;
__u8 second_ttl;
__u8 second_ttvn;
__u8 second_dest[ETH_ALEN];
__u8 second_source[ETH_ALEN];
__u8 second_orig_dest[ETH_ALEN];
__be32 second_crc;
__be16 coded_len;
};
Copy that exactly babe, every field, every type, no freestyling π€
πΈ Members πΈ
Okay let's go field by field, main-character by main-character:
packet_typeβ batman-adv packet type, part of the general header π«Άversionβ batman-adv protocol version, part of the general headerttlβ time to live for this packet, part of the general headerfirst_ttvnβ tt-version number of first included packetfirst_sourceβ original source of first included packetfirst_orig_destβ original destination of first included packetfirst_crcβ checksum of first included packetsecond_ttlβ ttl of second packetsecond_ttvnβ tt version number of second included packetsecond_destβ second receiver of this coded packetsecond_sourceβ original source of second included packetsecond_orig_destβ original destination of second included packetsecond_crcβ checksum of second included packetcoded_lenβ length of network coded part of the payload
Notice how the whole struct is basically two packets holding hands π€ first-everything up top, second-everything in the middle, and coded_len tying it all together at the end. The way that structure ATE π
π SEE ALSO π
The kernel file ./include/uapi/linux/batadv_packet.h is where this lives, and here's the whole squad it runs with β every single one, no skipping:
batadv_tp_is_error(9)enum batadv_packettype(9)enum batadv_subtype(9)enum batadv_iv_flags(9)enum batadv_icmp_packettype(9)enum batadv_mcast_flags(9)enum batadv_tt_data_flags(9)enum batadv_vlan_flags(9)enum batadv_bla_claimframe(9)enum batadv_tvlv_type(9)struct batadv_bla_claim_dst(9)struct batadv_ogm_packet(9)struct batadv_ogm2_packet(9)struct batadv_elp_packet(9)struct batadv_icmp_header(9)struct batadv_icmp_packet(9)struct batadv_icmp_tp_packet(9)enum batadv_icmp_tp_subtype(9)struct batadv_icmp_packet_rr(9)struct batadv_unicast_packet(9)struct batadv_unicast_4addr_packet(9)struct batadv_frag_packet(9)struct batadv_bcast_packet(9)struct batadv_mcast_packet(9)struct batadv_unicast_tvlv_packet(9)struct batadv_tvlv_hdr(9)struct batadv_tvlv_gateway_data(9)struct batadv_tvlv_tt_vlan_data(9)struct batadv_tvlv_tt_data(9)struct batadv_tvlv_tt_change(9)struct batadv_tvlv_roam_adv(9)struct batadv_tvlv_mcast_data(9)struct batadv_tvlv_mcast_tracker(9)
That's the whole page bestie, go forth and code π
Source: ./include/uapi/linux Β· Date: October 2026 Β· fr fr that's the tea ββ¨
π¦ 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