--- batman-adv_master.packet.h 2015-06-10 00:15:01.694683914 +0200 +++ batctl_master.packet.h 2015-06-10 00:15:01.706684716 +0200 @@ -197,8 +197,8 @@ * transport the claim type and the group id */ struct batadv_bla_claim_dst { - u8 magic[3]; /* FF:43:05 */ - u8 type; /* bla_claimframe */ + uint8_t magic[3]; /* FF:43:05 */ + uint8_t type; /* bla_claimframe */ __be16 group; /* group id */ };
@@ -213,16 +213,16 @@ * @tvlv_len: length of tvlv data following the ogm header */ struct batadv_ogm_packet { - u8 packet_type; - u8 version; - u8 ttl; - u8 flags; - __be32 seqno; - u8 orig[ETH_ALEN]; - u8 prev_sender[ETH_ALEN]; - u8 reserved; - u8 tq; - __be16 tvlv_len; + uint8_t packet_type; + uint8_t version; + uint8_t ttl; + uint8_t flags; + __be32 seqno; + uint8_t orig[ETH_ALEN]; + uint8_t prev_sender[ETH_ALEN]; + uint8_t reserved; + uint8_t tq; + __be16 tvlv_len; /* __packed is not needed as the struct size is divisible by 4, * and the largest data type in this struct has a size of 4. */ @@ -246,14 +246,14 @@ * members are padded the same way as they are in real packets. */ struct batadv_icmp_header { - u8 packet_type; - u8 version; - u8 ttl; - u8 msg_type; /* see ICMP message types above */ - u8 dst[ETH_ALEN]; - u8 orig[ETH_ALEN]; - u8 uid; - u8 align[3]; + uint8_t packet_type; + uint8_t version; + uint8_t ttl; + uint8_t msg_type; /* see ICMP message types above */ + uint8_t dst[ETH_ALEN]; + uint8_t orig[ETH_ALEN]; + uint8_t uid; + uint8_t align[3]; };
/** @@ -269,15 +269,15 @@ * @seqno: ICMP sequence number */ struct batadv_icmp_packet { - u8 packet_type; - u8 version; - u8 ttl; - u8 msg_type; /* see ICMP message types above */ - u8 dst[ETH_ALEN]; - u8 orig[ETH_ALEN]; - u8 uid; - u8 reserved; - __be16 seqno; + uint8_t packet_type; + uint8_t version; + uint8_t ttl; + uint8_t msg_type; /* see ICMP message types above */ + uint8_t dst[ETH_ALEN]; + uint8_t orig[ETH_ALEN]; + uint8_t uid; + uint8_t reserved; + __be16 seqno; };
#define BATADV_RR_LEN 16 @@ -296,16 +296,16 @@ * @rr: route record array */ struct batadv_icmp_packet_rr { - u8 packet_type; - u8 version; - u8 ttl; - u8 msg_type; /* see ICMP message types above */ - u8 dst[ETH_ALEN]; - u8 orig[ETH_ALEN]; - u8 uid; - u8 rr_cur; - __be16 seqno; - u8 rr[BATADV_RR_LEN][ETH_ALEN]; + uint8_t packet_type; + uint8_t version; + uint8_t ttl; + uint8_t msg_type; /* see ICMP message types above */ + uint8_t dst[ETH_ALEN]; + uint8_t orig[ETH_ALEN]; + uint8_t uid; + uint8_t rr_cur; + __be16 seqno; + uint8_t rr[BATADV_RR_LEN][ETH_ALEN]; };
#define BATADV_ICMP_MAX_PACKET_SIZE sizeof(struct batadv_icmp_packet_rr) @@ -331,11 +331,11 @@ * @dest: originator destination of the unicast packet */ struct batadv_unicast_packet { - u8 packet_type; - u8 version; - u8 ttl; - u8 ttvn; /* destination translation table version number */ - u8 dest[ETH_ALEN]; + uint8_t packet_type; + uint8_t version; + uint8_t ttl; + uint8_t ttvn; /* destination translation table version number */ + uint8_t dest[ETH_ALEN]; /* "4 bytes boundary + 2 bytes" long to make the payload after the * following ethernet header again 4 bytes boundary aligned */ @@ -349,9 +349,9 @@ */ struct batadv_unicast_4addr_packet { struct batadv_unicast_packet u; - u8 src[ETH_ALEN]; - u8 subtype; - u8 reserved; + uint8_t src[ETH_ALEN]; + uint8_t subtype; + uint8_t reserved; /* "4 bytes boundary + 2 bytes" long to make the payload after the * following ethernet header again 4 bytes boundary aligned */ @@ -370,22 +370,22 @@ * @total_size: size of the merged packet */ struct batadv_frag_packet { - u8 packet_type; - u8 version; /* batman version field */ - u8 ttl; + uint8_t packet_type; + uint8_t version; /* batman version field */ + uint8_t ttl; #if defined(__BIG_ENDIAN_BITFIELD) - u8 no:4; - u8 reserved:4; + uint8_t no:4; + uint8_t reserved:4; #elif defined(__LITTLE_ENDIAN_BITFIELD) - u8 reserved:4; - u8 no:4; + uint8_t reserved:4; + uint8_t no:4; #else #error "unknown bitfield endianness" #endif - u8 dest[ETH_ALEN]; - u8 orig[ETH_ALEN]; - __be16 seqno; - __be16 total_size; + uint8_t dest[ETH_ALEN]; + uint8_t orig[ETH_ALEN]; + __be16 seqno; + __be16 total_size; };
/** @@ -398,12 +398,12 @@ * @orig: originator of the broadcast packet */ struct batadv_bcast_packet { - u8 packet_type; - u8 version; /* batman version field */ - u8 ttl; - u8 reserved; - __be32 seqno; - u8 orig[ETH_ALEN]; + uint8_t packet_type; + uint8_t version; /* batman version field */ + uint8_t ttl; + uint8_t reserved; + __be32 seqno; + uint8_t orig[ETH_ALEN]; /* "4 bytes boundary + 2 bytes" long to make the payload after the * following ethernet header again 4 bytes boundary aligned */ @@ -428,21 +428,21 @@ * @coded_len: length of network coded part of the payload */ struct batadv_coded_packet { - u8 packet_type; - u8 version; /* batman version field */ - u8 ttl; - u8 first_ttvn; - /* u8 first_dest[ETH_ALEN]; - saved in mac header destination */ - 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; + uint8_t packet_type; + uint8_t version; /* batman version field */ + uint8_t ttl; + uint8_t first_ttvn; + /* uint8_t first_dest[ETH_ALEN]; - saved in mac header destination */ + uint8_t first_source[ETH_ALEN]; + uint8_t first_orig_dest[ETH_ALEN]; + __be32 first_crc; + uint8_t second_ttl; + uint8_t second_ttvn; + uint8_t second_dest[ETH_ALEN]; + uint8_t second_source[ETH_ALEN]; + uint8_t second_orig_dest[ETH_ALEN]; + __be32 second_crc; + __be16 coded_len; };
#pragma pack() @@ -459,14 +459,14 @@ * @align: 2 bytes to align the header to a 4 byte boundary */ struct batadv_unicast_tvlv_packet { - u8 packet_type; - u8 version; /* batman version field */ - u8 ttl; - u8 reserved; - u8 dst[ETH_ALEN]; - u8 src[ETH_ALEN]; - __be16 tvlv_len; - u16 align; + uint8_t packet_type; + uint8_t version; /* batman version field */ + uint8_t ttl; + uint8_t reserved; + uint8_t dst[ETH_ALEN]; + uint8_t src[ETH_ALEN]; + __be16 tvlv_len; + uint16_t align; };
/** @@ -476,9 +476,9 @@ * @len: tvlv container length */ struct batadv_tvlv_hdr { - u8 type; - u8 version; - __be16 len; + uint8_t type; + uint8_t version; + __be16 len; };
/** @@ -500,9 +500,9 @@ * one batadv_tvlv_tt_vlan_data object per announced vlan */ struct batadv_tvlv_tt_data { - u8 flags; - u8 ttvn; - __be16 num_vlan; + uint8_t flags; + uint8_t ttvn; + __be16 num_vlan; };
/** @@ -513,9 +513,9 @@ * @reserved: unused, useful for alignment purposes */ struct batadv_tvlv_tt_vlan_data { - __be32 crc; - __be16 vid; - u16 reserved; + __be32 crc; + __be16 vid; + uint16_t reserved; };
/** @@ -527,9 +527,9 @@ * @vid: VLAN identifier */ struct batadv_tvlv_tt_change { - u8 flags; - u8 reserved[3]; - u8 addr[ETH_ALEN]; + uint8_t flags; + uint8_t reserved[3]; + uint8_t addr[ETH_ALEN]; __be16 vid; };
@@ -539,7 +539,7 @@ * @vid: VLAN identifier */ struct batadv_tvlv_roam_adv { - u8 client[ETH_ALEN]; + uint8_t client[ETH_ALEN]; __be16 vid; };
@@ -549,8 +549,8 @@ * @reserved: reserved field */ struct batadv_tvlv_mcast_data { - u8 flags; - u8 reserved[3]; + uint8_t flags; + uint8_t reserved[3]; };
#endif /* _NET_BATMAN_ADV_PACKET_H_ */
linux-merge@lists.open-mesh.org