diff options
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r-- | net/batman-adv/main.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 5d8fa075794..d57b746219d 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 "2012.3.0" | 29 | #define BATADV_SOURCE_VERSION "2012.4.0" |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* B.A.T.M.A.N. parameters */ | 32 | /* B.A.T.M.A.N. parameters */ |
@@ -41,13 +41,14 @@ | |||
41 | * -> TODO: check influence on BATADV_TQ_LOCAL_WINDOW_SIZE | 41 | * -> TODO: check influence on BATADV_TQ_LOCAL_WINDOW_SIZE |
42 | */ | 42 | */ |
43 | #define BATADV_PURGE_TIMEOUT 200000 /* 200 seconds */ | 43 | #define BATADV_PURGE_TIMEOUT 200000 /* 200 seconds */ |
44 | #define BATADV_TT_LOCAL_TIMEOUT 3600000 /* in miliseconds */ | 44 | #define BATADV_TT_LOCAL_TIMEOUT 3600000 /* in milliseconds */ |
45 | #define BATADV_TT_CLIENT_ROAM_TIMEOUT 600000 /* in miliseconds */ | 45 | #define BATADV_TT_CLIENT_ROAM_TIMEOUT 600000 /* in milliseconds */ |
46 | #define BATADV_TT_CLIENT_TEMP_TIMEOUT 600000 /* in milliseconds */ | ||
46 | /* sliding packet range of received originator messages in sequence numbers | 47 | /* sliding packet range of received originator messages in sequence numbers |
47 | * (should be a multiple of our word size) | 48 | * (should be a multiple of our word size) |
48 | */ | 49 | */ |
49 | #define BATADV_TQ_LOCAL_WINDOW_SIZE 64 | 50 | #define BATADV_TQ_LOCAL_WINDOW_SIZE 64 |
50 | /* miliseconds we have to keep pending tt_req */ | 51 | /* milliseconds we have to keep pending tt_req */ |
51 | #define BATADV_TT_REQUEST_TIMEOUT 3000 | 52 | #define BATADV_TT_REQUEST_TIMEOUT 3000 |
52 | 53 | ||
53 | #define BATADV_TQ_GLOBAL_WINDOW_SIZE 5 | 54 | #define BATADV_TQ_GLOBAL_WINDOW_SIZE 5 |
@@ -59,7 +60,7 @@ | |||
59 | #define BATADV_TT_OGM_APPEND_MAX 3 | 60 | #define BATADV_TT_OGM_APPEND_MAX 3 |
60 | 61 | ||
61 | /* Time in which a client can roam at most ROAMING_MAX_COUNT times in | 62 | /* Time in which a client can roam at most ROAMING_MAX_COUNT times in |
62 | * miliseconds | 63 | * milliseconds |
63 | */ | 64 | */ |
64 | #define BATADV_ROAMING_MAX_TIME 20000 | 65 | #define BATADV_ROAMING_MAX_TIME 20000 |
65 | #define BATADV_ROAMING_MAX_COUNT 5 | 66 | #define BATADV_ROAMING_MAX_COUNT 5 |
@@ -123,15 +124,6 @@ enum batadv_uev_type { | |||
123 | /* Append 'batman-adv: ' before kernel messages */ | 124 | /* Append 'batman-adv: ' before kernel messages */ |
124 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 125 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
125 | 126 | ||
126 | /* all messages related to routing / flooding / broadcasting / etc */ | ||
127 | enum batadv_dbg_level { | ||
128 | BATADV_DBG_BATMAN = 1 << 0, | ||
129 | BATADV_DBG_ROUTES = 1 << 1, /* route added / changed / deleted */ | ||
130 | BATADV_DBG_TT = 1 << 2, /* translation table operations */ | ||
131 | BATADV_DBG_BLA = 1 << 3, /* bridge loop avoidance */ | ||
132 | BATADV_DBG_ALL = 15, | ||
133 | }; | ||
134 | |||
135 | /* Kernel headers */ | 127 | /* Kernel headers */ |
136 | 128 | ||
137 | #include <linux/mutex.h> /* mutex */ | 129 | #include <linux/mutex.h> /* mutex */ |
@@ -173,6 +165,15 @@ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops); | |||
173 | int batadv_algo_select(struct batadv_priv *bat_priv, char *name); | 165 | int batadv_algo_select(struct batadv_priv *bat_priv, char *name); |
174 | int batadv_algo_seq_print_text(struct seq_file *seq, void *offset); | 166 | int batadv_algo_seq_print_text(struct seq_file *seq, void *offset); |
175 | 167 | ||
168 | /* all messages related to routing / flooding / broadcasting / etc */ | ||
169 | enum batadv_dbg_level { | ||
170 | BATADV_DBG_BATMAN = BIT(0), | ||
171 | BATADV_DBG_ROUTES = BIT(1), /* route added / changed / deleted */ | ||
172 | BATADV_DBG_TT = BIT(2), /* translation table operations */ | ||
173 | BATADV_DBG_BLA = BIT(3), /* bridge loop avoidance */ | ||
174 | BATADV_DBG_ALL = 15, | ||
175 | }; | ||
176 | |||
176 | #ifdef CONFIG_BATMAN_ADV_DEBUG | 177 | #ifdef CONFIG_BATMAN_ADV_DEBUG |
177 | int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) | 178 | int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) |
178 | __printf(2, 3); | 179 | __printf(2, 3); |