diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-28 17:00:20 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-03-06 23:01:40 +0100 |
commit | 253bf2fdb73218aef1e86436146146049ce63d55 (patch) | |
tree | e317a280074f43582ab9d4f3ff124004b48367e1 /openbsc/src/libbsc/bsc_ctrl_commands.c | |
parent | 448117963d0794013a24dc6d051aacd6088c9826 (diff) |
nitb: Add ctrl command for setting the global timers
Diffstat (limited to 'openbsc/src/libbsc/bsc_ctrl_commands.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_ctrl_commands.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 63212542a..53693300f 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -36,6 +36,14 @@ static struct ctrl_cmd_element cmd_##cmdname = { \ .verify = verify_vty_description_string, \ } +CTRL_HELPER_VERIFY_RANGE(net_timer, 0, 65535); +#define CTRL_CMD_TIMER(timer) \ + CTRL_HELPER_GET_INT(net_timer_t##timer, struct gsm_network, T##timer); \ + CTRL_HELPER_SET_INT(net_timer_t##timer, struct gsm_network, T##timer); \ + CTRL_CMD_RAW(net_timer_t##timer, "t"#timer, \ + get_net_timer_t##timer, set_net_timer_t##timer, \ + verify_net_timer); + /** * Check that there are no newlines or comments or other things * that could make the VTY configuration unparsable. @@ -65,6 +73,18 @@ CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999); CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999); CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); +CTRL_CMD_TIMER(3101); +CTRL_CMD_TIMER(3103); +CTRL_CMD_TIMER(3105); +CTRL_CMD_TIMER(3107); +CTRL_CMD_TIMER(3109); +CTRL_CMD_TIMER(3111); +CTRL_CMD_TIMER(3113); +CTRL_CMD_TIMER(3115); +CTRL_CMD_TIMER(3117); +CTRL_CMD_TIMER(3119); +CTRL_CMD_TIMER(3122); +CTRL_CMD_TIMER(3141); static int verify_net_save_config(struct ctrl_cmd *cmd, const char *v, void *d) { @@ -188,6 +208,18 @@ int bsc_base_ctrl_cmds_install(void) rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_save_config); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3101); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3103); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3105); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3107); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3109); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3111); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3113); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3115); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3117); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3119); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3122); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timer_t3141); return rc; } |