The following commit has been merged in the next branch: commit 64ab6b50819d247c46876596e412d1bc83a9543e Author: Antonio Quartulli ordex@autistici.org Date: Sat Feb 4 16:52:12 2012 +0100
batctl: use ETH_ALEN instead of hardcoded numeric constants
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
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 {