aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-07-01 21:04:45 +0200
committerHarald Welte <laforge@gnumonks.org>2019-02-26 12:18:30 +0100
commit047f3872f511353e894659719a6c5346249bca40 (patch)
treee719164186b93e96cfca6daa86b95f7679bbe669 /src/gb/gprs_ns_vty.c
parent35042a29197bd086a545976e5fa38d01c434f8ac (diff)
NS: Add support for GPRS NS IP Sub-Network-Service (SNS)
The NS implementation part of the Gb implementation libosmogb so far implemented a rather classic dialect of Gb, with lots of heritage to FR (Frame Relay) transports. At least since Release 6 of the NS specification, there's an IP Sub-Network Service (SNS), which * permits for dynamic configuration of IP endpoints and their NS-VCs * abandons the concept of a NSVCI on IP transport * forbids the use of RESET/BLOCK/UNBLOCK procedures on IP transport This commit introduces BSS-side IP-SNS support to libosmogb in a minimally invasive way. It adds a corresponding SNS FSM to each NS instance, and implements the new SIZE/CONFIG/ADD/DELETE/CHANGE_WEIGHT procedures very closely aligned with the spec. In order to use the SNS flavor (rather than the classic one), a BSS implementation should use gprs_ns_nsip_connect_sns() instead of the existing gprs_ns_nsip_connect(). This implementation comes with a set of TTCN-3 tests in PCU_Tests_RAW_SNS.ttcn, see Change-ID I0fe3d4579960bab0494c294ec7ab8032feed4fb2 of osmo-ttcn3-hacks.git Closes: OS#3372 Closes: OS#3617 Change-Id: I84786c3b43a8ae34ef3b3ba84b33c90042d234ea
Diffstat (limited to 'src/gb/gprs_ns_vty.c')
-rw-r--r--src/gb/gprs_ns_vty.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c
index 15247639..53c71a9a 100644
--- a/src/gb/gprs_ns_vty.c
+++ b/src/gb/gprs_ns_vty.c
@@ -46,6 +46,7 @@
#include <osmocom/vty/misc.h>
#include "common_vty.h"
+#include "gb_internal.h"
static struct gprs_ns_inst *vty_nsi = NULL;
@@ -59,6 +60,7 @@ static const struct value_string gprs_ns_timer_strs[] = {
{ 4, "tns-test" },
{ 5, "tns-alive" },
{ 6, "tns-alive-retries" },
+ { 7, "tsns-prov" },
{ 0, NULL }
};
@@ -208,6 +210,8 @@ static void dump_ns(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats,
continue;
dump_nse(vty, nsvc, stats, persistent_only);
}
+
+ gprs_sns_dump_vty(vty, nsi, stats);
}
DEFUN(show_ns, show_ns_cmd, "show ns",
@@ -556,6 +560,12 @@ DEFUN(nsvc_nsei, nsvc_nsei_cmd,
return CMD_WARNING;
}
+ if (nsvc->nsi->bss_sns_fi) {
+ vty_out(vty, "A NS Instance using the IP Sub-Network doesn't use BLOCK/UNBLOCK/RESET%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
if (!strcmp(operation, "block"))
gprs_ns_tx_block(nsvc, NS_CAUSE_OM_INTERVENTION);
else if (!strcmp(operation, "unblock"))