aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r--net/batman-adv/main.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index ed488cbae80f..4f293b594475 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -42,15 +42,23 @@
42 * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */ 42 * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */
43#define PURGE_TIMEOUT 200 43#define PURGE_TIMEOUT 200
44#define TT_LOCAL_TIMEOUT 3600 /* in seconds */ 44#define TT_LOCAL_TIMEOUT 3600 /* in seconds */
45 45#define TT_CLIENT_ROAM_TIMEOUT 600
46/* sliding packet range of received originator messages in squence numbers 46/* sliding packet range of received originator messages in squence numbers
47 * (should be a multiple of our word size) */ 47 * (should be a multiple of our word size) */
48#define TQ_LOCAL_WINDOW_SIZE 64 48#define TQ_LOCAL_WINDOW_SIZE 64
49#define TT_REQUEST_TIMEOUT 3 /* seconds we have to keep pending tt_req */
50
49#define TQ_GLOBAL_WINDOW_SIZE 5 51#define TQ_GLOBAL_WINDOW_SIZE 5
50#define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 52#define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1
51#define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1 53#define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1
52#define TQ_TOTAL_BIDRECT_LIMIT 1 54#define TQ_TOTAL_BIDRECT_LIMIT 1
53 55
56#define TT_OGM_APPEND_MAX 3 /* number of OGMs sent with the last tt diff */
57
58#define ROAMING_MAX_TIME 20 /* Time in which a client can roam at most
59 * ROAMING_MAX_COUNT times */
60#define ROAMING_MAX_COUNT 5
61
54#define NO_FLAGS 0 62#define NO_FLAGS 0
55 63
56#define NUM_WORDS (TQ_LOCAL_WINDOW_SIZE / WORD_BIT_SIZE) 64#define NUM_WORDS (TQ_LOCAL_WINDOW_SIZE / WORD_BIT_SIZE)
@@ -83,6 +91,18 @@ enum mesh_state {
83#define BCAST_QUEUE_LEN 256 91#define BCAST_QUEUE_LEN 256
84#define BATMAN_QUEUE_LEN 256 92#define BATMAN_QUEUE_LEN 256
85 93
94enum uev_action {
95 UEV_ADD = 0,
96 UEV_DEL,
97 UEV_CHANGE
98};
99
100enum uev_type {
101 UEV_GW = 0
102};
103
104#define GW_THRESHOLD 50
105
86/* 106/*
87 * Debug Messages 107 * Debug Messages
88 */ 108 */
@@ -96,7 +116,8 @@ enum mesh_state {
96enum dbg_level { 116enum dbg_level {
97 DBG_BATMAN = 1 << 0, 117 DBG_BATMAN = 1 << 0,
98 DBG_ROUTES = 1 << 1, /* route added / changed / deleted */ 118 DBG_ROUTES = 1 << 1, /* route added / changed / deleted */
99 DBG_ALL = 3 119 DBG_TT = 1 << 2, /* translation table operations */
120 DBG_ALL = 7
100}; 121};
101 122
102 123
@@ -151,7 +172,7 @@ int debug_log(struct bat_priv *bat_priv, const char *fmt, ...) __printf(2, 3);
151 while (0) 172 while (0)
152#else /* !CONFIG_BATMAN_ADV_DEBUG */ 173#else /* !CONFIG_BATMAN_ADV_DEBUG */
153__printf(3, 4) 174__printf(3, 4)
154static inline void bat_dbg(char type __always_unused, 175static inline void bat_dbg(int type __always_unused,
155 struct bat_priv *bat_priv __always_unused, 176 struct bat_priv *bat_priv __always_unused,
156 const char *fmt __always_unused, ...) 177 const char *fmt __always_unused, ...)
157{ 178{