diff options
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r-- | net/batman-adv/main.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index d40910dfc8ea..59a0d6af15c8 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define BATADV_DRIVER_DEVICE "batman-adv" | 26 | #define BATADV_DRIVER_DEVICE "batman-adv" |
27 | 27 | ||
28 | #ifndef BATADV_SOURCE_VERSION | 28 | #ifndef BATADV_SOURCE_VERSION |
29 | #define BATADV_SOURCE_VERSION "2013.1.0" | 29 | #define BATADV_SOURCE_VERSION "2013.2.0" |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* B.A.T.M.A.N. parameters */ | 32 | /* B.A.T.M.A.N. parameters */ |
@@ -105,6 +105,8 @@ | |||
105 | #define BATADV_RESET_PROTECTION_MS 30000 | 105 | #define BATADV_RESET_PROTECTION_MS 30000 |
106 | #define BATADV_EXPECTED_SEQNO_RANGE 65536 | 106 | #define BATADV_EXPECTED_SEQNO_RANGE 65536 |
107 | 107 | ||
108 | #define BATADV_NC_NODE_TIMEOUT 10000 /* Milliseconds */ | ||
109 | |||
108 | enum batadv_mesh_state { | 110 | enum batadv_mesh_state { |
109 | BATADV_MESH_INACTIVE, | 111 | BATADV_MESH_INACTIVE, |
110 | BATADV_MESH_ACTIVE, | 112 | BATADV_MESH_ACTIVE, |
@@ -150,6 +152,7 @@ enum batadv_uev_type { | |||
150 | #include <linux/percpu.h> | 152 | #include <linux/percpu.h> |
151 | #include <linux/slab.h> | 153 | #include <linux/slab.h> |
152 | #include <net/sock.h> /* struct sock */ | 154 | #include <net/sock.h> /* struct sock */ |
155 | #include <net/rtnetlink.h> | ||
153 | #include <linux/jiffies.h> | 156 | #include <linux/jiffies.h> |
154 | #include <linux/seq_file.h> | 157 | #include <linux/seq_file.h> |
155 | #include "types.h" | 158 | #include "types.h" |
@@ -185,6 +188,7 @@ __be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr); | |||
185 | * @BATADV_DBG_TT: translation table messages | 188 | * @BATADV_DBG_TT: translation table messages |
186 | * @BATADV_DBG_BLA: bridge loop avoidance messages | 189 | * @BATADV_DBG_BLA: bridge loop avoidance messages |
187 | * @BATADV_DBG_DAT: ARP snooping and DAT related messages | 190 | * @BATADV_DBG_DAT: ARP snooping and DAT related messages |
191 | * @BATADV_DBG_NC: network coding related messages | ||
188 | * @BATADV_DBG_ALL: the union of all the above log levels | 192 | * @BATADV_DBG_ALL: the union of all the above log levels |
189 | */ | 193 | */ |
190 | enum batadv_dbg_level { | 194 | enum batadv_dbg_level { |
@@ -193,7 +197,8 @@ enum batadv_dbg_level { | |||
193 | BATADV_DBG_TT = BIT(2), | 197 | BATADV_DBG_TT = BIT(2), |
194 | BATADV_DBG_BLA = BIT(3), | 198 | BATADV_DBG_BLA = BIT(3), |
195 | BATADV_DBG_DAT = BIT(4), | 199 | BATADV_DBG_DAT = BIT(4), |
196 | BATADV_DBG_ALL = 31, | 200 | BATADV_DBG_NC = BIT(5), |
201 | BATADV_DBG_ALL = 63, | ||
197 | }; | 202 | }; |
198 | 203 | ||
199 | #ifdef CONFIG_BATMAN_ADV_DEBUG | 204 | #ifdef CONFIG_BATMAN_ADV_DEBUG |
@@ -298,4 +303,10 @@ static inline uint64_t batadv_sum_counter(struct batadv_priv *bat_priv, | |||
298 | return sum; | 303 | return sum; |
299 | } | 304 | } |
300 | 305 | ||
306 | /* Define a macro to reach the control buffer of the skb. The members of the | ||
307 | * control buffer are defined in struct batadv_skb_cb in types.h. | ||
308 | * The macro is inspired by the similar macro TCP_SKB_CB() in tcp.h. | ||
309 | */ | ||
310 | #define BATADV_SKB_CB(__skb) ((struct batadv_skb_cb *)&((__skb)->cb[0])) | ||
311 | |||
301 | #endif /* _NET_BATMAN_ADV_MAIN_H_ */ | 312 | #endif /* _NET_BATMAN_ADV_MAIN_H_ */ |