diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-09-02 17:28:40 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-09-05 12:25:32 +0200 |
commit | 56cb7299071c8472a240a293036be3074f3eb4e0 (patch) | |
tree | 062373e9fa982a75bd088584360e65806baac230 /openbsc/src/osmo-bsc/osmo_bsc_vty.c | |
parent | 0169971a59e9822c094e82f3e4a28f2763ea0f34 (diff) |
bsc: Add a "IPA PING" to the SCCP CR messages
We want to reduce the background traffic and might set the ping
interval to be in the range of minutes. But this means that if
the TCP connection is frozen several "SCCP CR CM Service Requests"
will be stuck in the send queue without ever being answered. I
could have used the logic of not receiving the "SCCP CC" to close
the connection but instead I am introducing an overload to schedule
the ping as part of the normal SCCP connection establishment.
The VTY write case has been manually verified, I have also looked
at a single trace to see that the SCCP CR and the IPA PING is
transfered in the same ethernet frame.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_vty.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_vty.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index eb12287d4..b1d09f35d 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -112,6 +112,10 @@ static void write_msc(struct vty *vty, struct osmo_msc_data *msc) vty_out(vty, " ip.access rtp-base %d%s", msc->rtp_base, VTY_NEWLINE); vty_out(vty, " timeout-ping %d%s", msc->ping_timeout, VTY_NEWLINE); vty_out(vty, " timeout-pong %d%s", msc->pong_timeout, VTY_NEWLINE); + if (msc->advanced_ping) + vty_out(vty, " timeout-ping advanced%s", VTY_NEWLINE); + else + vty_out(vty, " no timeout-ping advanced%s", VTY_NEWLINE); if (msc->ussd_welcome_txt) vty_out(vty, " bsc-welcome-text %s%s", msc->ussd_welcome_txt, VTY_NEWLINE); @@ -372,6 +376,26 @@ DEFUN(cfg_net_msc_pong_time, return CMD_SUCCESS; } +DEFUN(cfg_net_msc_advanced_ping, + cfg_net_msc_advanced_ping_cmd, + "timeout-ping advanced", + "Ping timeout handling\nEnable advanced mode during SCCP\n") +{ + struct osmo_msc_data *data = osmo_msc_data(vty); + data->advanced_ping = 1; + return CMD_SUCCESS; +} + +DEFUN(cfg_no_net_msc_advanced_ping, + cfg_no_net_msc_advanced_ping_cmd, + "no timeout-ping advanced", + NO_STR "Ping timeout handling\nEnable advanced mode during SCCP\n") +{ + struct osmo_msc_data *data = osmo_msc_data(vty); + data->advanced_ping = 0; + return CMD_SUCCESS; +} + DEFUN(cfg_net_msc_welcome_ussd, cfg_net_msc_welcome_ussd_cmd, "bsc-welcome-text .TEXT", @@ -719,6 +743,8 @@ int bsc_vty_init_extra(void) install_element(MSC_NODE, &cfg_net_msc_no_dest_cmd); install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd); install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd); + install_element(MSC_NODE, &cfg_net_msc_advanced_ping_cmd); + install_element(MSC_NODE, &cfg_no_net_msc_advanced_ping_cmd); install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd); install_element(MSC_NODE, &cfg_net_msc_no_welcome_ussd_cmd); install_element(MSC_NODE, &cfg_net_msc_lost_ussd_cmd); |