From fe4ab901cc00f88e644e5640c2988f52c79f4183 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 12 May 2010 17:19:53 +0000 Subject: NS: Make all timers configurable from VTY --- openbsc/include/openbsc/gprs_ns.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'openbsc/include') 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 #include @@ -83,6 +82,25 @@ enum ns_cause { #include #include +#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; -- cgit v1.2.3