aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-01-30 14:59:17 -0500
committerAntonio Quartulli <ordex@autistici.org>2012-04-11 08:28:58 -0400
commitc1faead3335608d9c9bb58e07bbf9663d53d4b26 (patch)
treeebc23f62557135a9f8021bf7c8434f9bfc5061a8 /net/batman-adv
parent10e3cd6a251a2a24e5461e5ad242ea8708ff1866 (diff)
batman-adv: use ETH_ALEN instead of hardcoded numeric constants
In packet.h the numeric constant 6 is used instead of the more portable ETH_ALEN define. This patch substitute any hardcoded value with such define. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Acked-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/packet.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 441f3db1bd91..45e75ed6637d 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -100,8 +100,8 @@ struct batman_ogm_packet {
100 struct batman_header header; 100 struct batman_header header;
101 uint8_t flags; /* 0x40: DIRECTLINK flag, 0x20 VIS_SERVER flag... */ 101 uint8_t flags; /* 0x40: DIRECTLINK flag, 0x20 VIS_SERVER flag... */
102 uint32_t seqno; 102 uint32_t seqno;
103 uint8_t orig[6]; 103 uint8_t orig[ETH_ALEN];
104 uint8_t prev_sender[6]; 104 uint8_t prev_sender[ETH_ALEN];
105 uint8_t gw_flags; /* flags related to gateway class */ 105 uint8_t gw_flags; /* flags related to gateway class */
106 uint8_t tq; 106 uint8_t tq;
107 uint8_t tt_num_changes; 107 uint8_t tt_num_changes;
@@ -114,8 +114,8 @@ struct batman_ogm_packet {
114struct icmp_packet { 114struct icmp_packet {
115 struct batman_header header; 115 struct batman_header header;
116 uint8_t msg_type; /* see ICMP message types above */ 116 uint8_t msg_type; /* see ICMP message types above */
117 uint8_t dst[6]; 117 uint8_t dst[ETH_ALEN];
118 uint8_t orig[6]; 118 uint8_t orig[ETH_ALEN];
119 uint16_t seqno; 119 uint16_t seqno;
120 uint8_t uid; 120 uint8_t uid;
121 uint8_t reserved; 121 uint8_t reserved;
@@ -128,8 +128,8 @@ struct icmp_packet {
128struct icmp_packet_rr { 128struct icmp_packet_rr {
129 struct batman_header header; 129 struct batman_header header;
130 uint8_t msg_type; /* see ICMP message types above */ 130 uint8_t msg_type; /* see ICMP message types above */
131 uint8_t dst[6]; 131 uint8_t dst[ETH_ALEN];
132 uint8_t orig[6]; 132 uint8_t orig[ETH_ALEN];
133 uint16_t seqno; 133 uint16_t seqno;
134 uint8_t uid; 134 uint8_t uid;
135 uint8_t rr_cur; 135 uint8_t rr_cur;
@@ -139,16 +139,16 @@ struct icmp_packet_rr {
139struct unicast_packet { 139struct unicast_packet {
140 struct batman_header header; 140 struct batman_header header;
141 uint8_t ttvn; /* destination translation table version number */ 141 uint8_t ttvn; /* destination translation table version number */
142 uint8_t dest[6]; 142 uint8_t dest[ETH_ALEN];
143} __packed; 143} __packed;
144 144
145struct unicast_frag_packet { 145struct unicast_frag_packet {
146 struct batman_header header; 146 struct batman_header header;
147 uint8_t ttvn; /* destination translation table version number */ 147 uint8_t ttvn; /* destination translation table version number */
148 uint8_t dest[6]; 148 uint8_t dest[ETH_ALEN];
149 uint8_t flags; 149 uint8_t flags;
150 uint8_t align; 150 uint8_t align;
151 uint8_t orig[6]; 151 uint8_t orig[ETH_ALEN];
152 uint16_t seqno; 152 uint16_t seqno;
153} __packed; 153} __packed;
154 154
@@ -156,7 +156,7 @@ struct bcast_packet {
156 struct batman_header header; 156 struct batman_header header;
157 uint8_t reserved; 157 uint8_t reserved;
158 uint32_t seqno; 158 uint32_t seqno;
159 uint8_t orig[6]; 159 uint8_t orig[ETH_ALEN];
160} __packed; 160} __packed;
161 161
162struct vis_packet { 162struct vis_packet {
@@ -165,9 +165,9 @@ struct vis_packet {
165 uint32_t seqno; /* sequence number */ 165 uint32_t seqno; /* sequence number */
166 uint8_t entries; /* number of entries behind this struct */ 166 uint8_t entries; /* number of entries behind this struct */
167 uint8_t reserved; 167 uint8_t reserved;
168 uint8_t vis_orig[6]; /* originator that announces its neighbors */ 168 uint8_t vis_orig[ETH_ALEN]; /* originator reporting its neighbors */
169 uint8_t target_orig[6]; /* who should receive this packet */ 169 uint8_t target_orig[ETH_ALEN]; /* who should receive this packet */
170 uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ 170 uint8_t sender_orig[ETH_ALEN]; /* who sent or forwarded this packet */
171} __packed; 171} __packed;
172 172
173struct tt_query_packet { 173struct tt_query_packet {