STRUCT BATADV_FRAG_PACKET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 header
  • ttl β€” 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 alignment
  • reserved β€” 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, and no each 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