STRUCT BATADV_FRAG_PACKET(9)
π struct batadv_frag_packet(9) π
okay so bestie, welcome to the Kernel API Manual entry for struct batadv_frag_packet β literally the little packet wrapper that carries a fragmented packet around. it's giving "I got chopped into pieces and I need to be put back together" energy. let's get into it β¨
πΈ NAME πΈ
struct batadv_frag_packet β fragmented packet π§©
β¨ SYNOPSIS β¨
struct batadv_frag_packet {
__u8 packet_type;
__u8 version;
__u8 ttl;
#if defined(__BIG_ENDIAN_BITFIELD);
__u8 no:4;
__u8 priority:3;
__u8 reserved:1;
#elif defined(__LITTLE_ENDIAN_BITFIELD);
__u8 reserved:1;
__u8 priority:3;
__u8 no:4;
#else;
#error unknownbitfieldendianness";"
#endif;
__u8 dest[ETH_ALEN];
__u8 orig[ETH_ALEN];
__be16 seqno;
__be16 total_size;
};
no cap, those bitfield orderings flip depending on endianness β and if the compiler can't tell which one you're on, you get that #error right in your face π
π Members π
okay so here's the whole cast of characters, main character energy only π
packet_typeβ the batman-adv packet type, and it's part of the general header (so it's basically the intro card of the packet πͺͺ)versionβ the batman-adv protocol version, also part of the general headerttlβ time to live for this packet, again part of the general header. it's literally the packet's little lifespan hourglass β³noβ the fragment number within this sequence. like "which slice of the pizza is this" πpriorityβ priority of frame, pulled from ToS IP precedence or 802.1p. highkey the VIP pass πreservedβ a reserved byte for alignmentreservedβ ya, another reserved byte for alignment (it shows up in both bitfield branches, iykyk)priorityβ priority of frame, from ToS IP precedence or 802.1p β yes, again, because of the two endian branches πnoβ fragment number within this sequence β same deal, second branch βοΈdestβ final destination used when routing fragments. where the pieces are headed πΊοΈorigβ originator of the fragment used when merging the packet. who sent this little piece in the first place π¬seqnoβ sequence identification. the group-chat thread ID fr fr π§΅total_sizeβ size of the merged packet, i.e. what you get once all the fragments are stitched back together π§΅β¨
quick heads up:reserved,priority, andnoeach show up twice in the members list because the struct has a big-endian branch and a little-endian branch. not a typo, it's just the vibe check across both worlds π
π¦ SEE ALSO π¦
the whole friend group, all linked together π«Ά β from the kernel file ./include/uapi/linux/batadv_packet.h:
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_bcast_packet(9)struct batadv_mcast_packet(9)struct batadv_coded_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)
and that's the whole page bestie, you ate that π
signing off from ./include/uapi/linux, dated October 2026 β this was struct batadv_frag_packet(9), slay πππ¦
π¦ 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