--- batman-adv_master.packet.h 2013-05-24 00:15:01.992097070 +0200 +++ batctl_master.packet.h 2013-05-24 00:15:02.008097284 +0200 @@ -91,6 +91,12 @@ BATADV_PARAMETER_PROBLEM = 12, };
+/* fragmentation defines */ +enum batadv_unicast_frag_flags { + BATADV_UNI_FRAG_HEAD = BIT(0), + BATADV_UNI_FRAG_LARGETAIL = BIT(1), +}; + /* tt data subtypes */ #define BATADV_TT_DATA_TYPE_MASK 0x0F
@@ -249,32 +255,15 @@ */ };
-/** - * struct batadv_frag_packet - fragmented packet - * @header: common batman packet header with type, compatversion, and ttl - * @dest: final destination used when routing fragments - * @orig: originator of the fragment used when merging the packet - * @no: fragment number within this sequence - * @reserved: reserved byte for alignment - * @seqno: sequence identification - * @total_size: size of the merged packet - */ -struct batadv_frag_packet { - struct batadv_header header; -#if defined(__BIG_ENDIAN_BITFIELD) - uint8_t no:4; - uint8_t reserved:4; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - uint8_t reserved:4; - uint8_t no:4; -#else -#error "unknown bitfield endianess" -#endif - uint8_t dest[ETH_ALEN]; - uint8_t orig[ETH_ALEN]; - __be16 seqno; - __be16 total_size; -}; +struct batadv_unicast_frag_packet { + struct batadv_header header; + uint8_t ttvn; /* destination translation table version number */ + uint8_t dest[ETH_ALEN]; + uint8_t flags; + uint8_t align; + uint8_t orig[ETH_ALEN]; + __be16 seqno; +} __packed;
struct batadv_bcast_packet { struct batadv_header header;
linux-merge@lists.open-mesh.org