1 musl does not allow including netinet/* and linux/* headers together.
2 batctl includes netinet/if_ether.h indirectly via net/ethernet.h,
3 so netinet/if_ether.h must be used instead of linux/if_ether.h.
5 __be16 and __be32 are linux-specific typedefs for uint16_t and
6 uint32_t with __attribute__((bitwise)) that has no effect
9 Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
11 --- batctl-2014.4.0/ping.c
12 +++ batctl-2014.4.0/ping.c
15 #include <sys/select.h>
17 -#include <linux/if_ether.h>
18 +#include <netinet/if_ether.h>
22 --- batctl-2014.4.0/tcpdump.h
23 +++ batctl-2014.4.0/tcpdump.h
25 #define _BATCTL_TCPDUMP_H
27 #include <netpacket/packet.h>
28 -#include <linux/if_ether.h>
29 +#include <netinet/if_ether.h>
30 #include <net/if_arp.h>
31 #include <sys/types.h>
33 --- batctl-2014.4.0/traceroute.c
34 +++ batctl-2014.4.0/traceroute.c
39 -#include <linux/if_ether.h>
40 +#include <netinet/if_ether.h>
42 #include <sys/select.h>
44 --- batctl-2014.4.0/packet.h
45 +++ batctl-2014.4.0/packet.h
47 struct batadv_bla_claim_dst {
48 uint8_t magic[3]; /* FF:43:05 */
49 uint8_t type; /* bla_claimframe */
50 - __be16 group; /* group id */
51 + uint16_t group; /* group id */
61 uint8_t orig[ETH_ALEN];
62 uint8_t prev_sender[ETH_ALEN];
67 /* __packed is not needed as the struct size is divisible by 4,
68 * and the largest data type in this struct has a size of 4.
71 uint8_t orig[ETH_ALEN];
78 #define BATADV_RR_LEN 16
80 uint8_t orig[ETH_ALEN];
85 uint8_t rr[BATADV_RR_LEN][ETH_ALEN];
90 uint8_t dest[ETH_ALEN];
91 uint8_t orig[ETH_ALEN];
95 + uint16_t total_size;
100 uint8_t version; /* batman version field */
105 uint8_t orig[ETH_ALEN];
106 /* "4 bytes boundary + 2 bytes" long to make the payload after the
107 * following ethernet header again 4 bytes boundary aligned
108 @@ -431,14 +431,14 @@
109 /* uint8_t first_dest[ETH_ALEN]; - saved in mac header destination */
110 uint8_t first_source[ETH_ALEN];
111 uint8_t first_orig_dest[ETH_ALEN];
113 + uint32_t first_crc;
116 uint8_t second_dest[ETH_ALEN];
117 uint8_t second_source[ETH_ALEN];
118 uint8_t second_orig_dest[ETH_ALEN];
121 + uint32_t second_crc;
122 + uint16_t coded_len;
128 uint8_t dst[ETH_ALEN];
129 uint8_t src[ETH_ALEN];
136 struct batadv_tvlv_hdr {
145 * @bandwidth_up: advertised uplink upload bandwidth
147 struct batadv_tvlv_gateway_data {
148 - __be32 bandwidth_down;
149 - __be32 bandwidth_up;
150 + uint32_t bandwidth_down;
151 + uint32_t bandwidth_up;
156 struct batadv_tvlv_tt_data {
165 * @reserved: unused, useful for alignment purposes
167 struct batadv_tvlv_tt_vlan_data {
178 uint8_t addr[ETH_ALEN];
186 struct batadv_tvlv_roam_adv {
187 uint8_t client[ETH_ALEN];