summaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-12 17:19:53 +0000
committerHarald Welte <laforge@gnumonks.org>2010-05-12 20:22:55 +0200
commitfe4ab901cc00f88e644e5640c2988f52c79f4183 (patch)
treea90e87671b53ad1645992831bafa3e2fa5661e5b /openbsc/include
parentef5324fc94b8beb958ded2e9a5d31b32bc757e6b (diff)
NS: Make all timers configurable from VTY
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gprs_ns.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gprs_ns.h b/openbsc/include/openbsc/gprs_ns.h
index 60051d13..847e8f9c 100644
--- a/openbsc/include/openbsc/gprs_ns.h
+++ b/openbsc/include/openbsc/gprs_ns.h
@@ -75,7 +75,6 @@ enum ns_cause {
NS_CAUSE_UNKN_IP_TEST_FAILED = 0x14,
};
-
/* Our Implementation */
#include <netinet/in.h>
#include <osmocore/linuxlist.h>
@@ -83,6 +82,25 @@ enum ns_cause {
#include <osmocore/timer.h>
#include <osmocore/select.h>
+#define NS_TIMERS_COUNT 7
+#define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries)"
+#define NS_TIMERS_HELP \
+ "(un)blocking Timer (Tns-block) timeout\n" \
+ "(un)blocking Timer (Tns-block) number of retries\n" \
+ "Reset Timer (Tns-reset) timeout\n" \
+ "Reset Timer (Tns-reset) number of retries\n" \
+ "Test Timer (Tns-test) timeout\n" \
+
+enum ns_timeout {
+ NS_TOUT_TNS_BLOCK,
+ NS_TOUT_TNS_BLOCK_RETRIES,
+ NS_TOUT_TNS_RESET,
+ NS_TOUT_TNS_RESET_RETRIES,
+ NS_TOUT_TNS_TEST,
+ NS_TOUT_TNS_ALIVE,
+ NS_TOUT_TNS_ALIVE_RETRIES,
+};
+
#define NSE_S_BLOCKED 0x0001
#define NSE_S_ALIVE 0x0002
@@ -107,6 +125,8 @@ struct gprs_ns_inst {
/* linked lists of all NSVC in this instance */
struct llist_head gprs_nsvcs;
+ uint16_t timeout[NS_TIMERS_COUNT];
+
/* which link-layer are we based on? */
enum gprs_ns_ll ll;