diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2017-02-28 18:00:50 +0100 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2017-03-15 14:14:05 +0100 |
commit | ee605f731a7f8a3a58a1f90b4ecc594397fa662b (patch) | |
tree | 179c9bad895a10f69aada0abb55c887e38cf912b | |
parent | 634eca0f75d468f5c6d18df320c84c16d31cc69b (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.
-rw-r--r-- | openbsc/include/openbsc/bsc_nat.h | 11 | ||||
-rw-r--r-- | openbsc/include/openbsc/vty.h | 1 | ||||
-rw-r--r-- | openbsc/src/libcommon/common_vty.c | 7 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 6 |
4 files changed, 25 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 027b6ded4..3f88aec44 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> @@ -223,6 +224,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 bc30e2357..d0c985703 100644 --- a/openbsc/include/openbsc/vty.h +++ b/openbsc/include/openbsc/vty.h @@ -37,6 +37,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 a0674f0f1..372eeeb64 100644 --- a/openbsc/src/libcommon/common_vty.c +++ b/openbsc/src/libcommon/common_vty.c @@ -98,6 +98,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 cd8293cc9..fc645972f 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -54,6 +54,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)# ", |