diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-21 21:18:38 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-22 05:28:23 +0100 |
commit | c4d88ad9718a6cd4bd4bdfd57251bdd325d4db2f (patch) | |
tree | 5e1e274a730686593e1cb287e11310a709eb03d1 /openbsc/src/vty_interface.c | |
parent | d61654cf544e5aa1bec50724589bb76d31471709 (diff) |
[network] Make T3101 configurable and use it in abis_rsl
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r-- | openbsc/src/vty_interface.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 5712ca1c7..e6513513b 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -275,6 +275,7 @@ static int config_write_net(struct vty *vty) vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); + vty_out(vty, " timer t3101 %u%s", gsmnet->T3101, VTY_NEWLINE); return CMD_SUCCESS; } @@ -801,6 +802,27 @@ DEFUN(cfg_net_neci, return CMD_SUCCESS; } +#define DECLARE_TIMER(number) \ + DEFUN(cfg_net_T##number, \ + cfg_net_T##number##_cmd, \ + "timer t" #number " <0-65535>", \ + "Set the T" #number " value.") \ +{ \ + int value = atoi(argv[0]); \ + \ + if (value < 0 || value > 65535) { \ + vty_out(vty, "Timer value %s out of range.%s", \ + argv[0], VTY_NEWLINE); \ + return CMD_WARNING; \ + } \ + \ + gsmnet->T##number = value; \ + return CMD_SUCCESS; \ +} + +DECLARE_TIMER(3101) + + /* per-BTS configuration */ DEFUN(cfg_bts, cfg_bts_cmd, @@ -1241,6 +1263,7 @@ int bsc_vty_init(struct gsm_network *net) install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); + install_element(GSMNET_NODE, &cfg_net_T3101_cmd); install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); |