aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2017-02-28 18:00:50 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2018-01-25 16:35:18 +0100
commite4890cc3c35bcec3d9538983f4c22393f1f3e25e (patch)
tree060f6deb9cea6dda0ca7c398a64891db2eaf0c17 /openbsc
parentdb815752587cd6e0f666c554f0d03adbbbe8a6bb (diff)
osmo-bsc_nat: Add infrastructure for multiple MSC connections
Add some common defines and structs Change-Id: I9cdfc5b32f2500f47be8caaa281bcca3231db5ea Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h11
-rw-r--r--openbsc/include/openbsc/vty.h1
-rw-r--r--openbsc/src/libcommon/common_vty.c7
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c6
4 files changed, 25 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 94ab0e5ff..0425d84fd 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -23,6 +23,7 @@
#include "mgcp.h"
#include "bsc_msg_filter.h"
+#include "bsc_msc.h"
#include <osmocom/core/select.h>
@@ -228,6 +229,16 @@ struct bsc_nat_statistics {
} ussd;
};
+struct msc_config {
+ struct llist_head entry;
+ struct llist_head dests;
+ struct bsc_msc_dest *main_dest;
+ struct bsc_msc_connection *msc_con;
+ char *token;
+ int nr;
+ struct bsc_nat *nat;
+};
+
/**
* the structure of the "nat" network
*/
diff --git a/openbsc/include/openbsc/vty.h b/openbsc/include/openbsc/vty.h
index 60b7d2d76..9e34eda7c 100644
--- a/openbsc/include/openbsc/vty.h
+++ b/openbsc/include/openbsc/vty.h
@@ -38,6 +38,7 @@ enum bsc_vty_node {
SMPP_NODE,
SMPP_ESME_NODE,
GTPHUB_NODE,
+ NAT_MSC_NODE
};
extern int bsc_vty_is_config_node(struct vty *vty, int node);
diff --git a/openbsc/src/libcommon/common_vty.c b/openbsc/src/libcommon/common_vty.c
index 6e1c10b00..4d34a265d 100644
--- a/openbsc/src/libcommon/common_vty.c
+++ b/openbsc/src/libcommon/common_vty.c
@@ -108,6 +108,13 @@ int bsc_vty_go_parent(struct vty *vty)
vty->node = SMPP_NODE;
vty->index = NULL;
break;
+ case NAT_MSC_NODE:
+ vty->node = NAT_NODE;
+ {
+ struct msc_config *msc_config = vty->index;
+ vty->index = msc_config->nat;
+ }
+ break;
case SMPP_NODE:
case MGCP_NODE:
case GBPROXY_NODE:
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index d4cef5dbe..dfca04779 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -55,6 +55,12 @@ static struct cmd_node nat_node = {
1,
};
+static struct cmd_node msc_node = {
+ NAT_MSC_NODE,
+ "%s(config-nat-msc)# ",
+ 1,
+};
+
static struct cmd_node bsc_node = {
NAT_BSC_NODE,
"%s(config-nat-bsc)# ",