* [B.A.T.M.A.N.] [PATCH] batctl: use ETH_ALEN instead of hardcoded numeric constants
@ 2012-02-04 15:52 Antonio Quartulli
2012-02-05 16:58 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2012-02-04 15:52 UTC (permalink / raw)
To: b.a.t.m.a.n
In tcpdump.h the numeric constants 6 is usedinstead of the more portable (and
readable) define ETH_ALEN. This patch substitute any hardcoded value with such
define.
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
tcpdump.h | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tcpdump.h b/tcpdump.h
index 2a2cc0a..96989b4 100644
--- a/tcpdump.h
+++ b/tcpdump.h
@@ -21,6 +21,7 @@
#include <netpacket/packet.h>
+#include <net/ethernet.h>
#include "list-batman.h"
#ifndef ARPHRD_IEEE80211_PRISM
@@ -65,11 +66,11 @@ struct vlanhdr {
struct ieee80211_hdr {
u_int16_t frame_control;
u_int16_t duration_id;
- u_int8_t addr1[6];
- u_int8_t addr2[6];
- u_int8_t addr3[6];
+ u_int8_t addr1[ETH_ALEN];
+ u_int8_t addr2[ETH_ALEN];
+ u_int8_t addr3[ETH_ALEN];
u_int16_t seq_ctrl;
- u_int8_t addr4[6];
+ u_int8_t addr4[ETH_ALEN];
} __attribute__ ((packed));
struct radiotap_header {
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-05 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 15:52 [B.A.T.M.A.N.] [PATCH] batctl: use ETH_ALEN instead of hardcoded numeric constants Antonio Quartulli
2012-02-05 16:58 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox