fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35792?usp=email )


Change subject: Add support for M3UA-over-TCP, clarify default SCTP
......................................................................

Add support for M3UA-over-TCP, clarify default SCTP

Change-Id: I078da51abc3511a4854f9c8fbca8eafd2bed78da
Depends: libosmo-sccp.git Ife0ae7a4956980da40ee045b0b7eb5cd0ccd1aef
Depends: libosmo-sccp.git I8c76d271472befacbeb998a93bbdc9e8660d9b5d
Related: SYS#5424
---
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M doc/manuals/chapters/running.adoc
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/lb.c
M src/osmo-bsc/osmo_bsc_msc.c
6 files changed, 35 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/35792/1

diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index f10221e..434b996 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -80,7 +80,7 @@
     hopping enabled 0
 cs7 instance 0
  point-code 0.42.1
- !asp asp-clnt-OsmoBSC 2905 0 m3ua
+ !asp asp-clnt-OsmoBSC 2905 0 m3ua-sctp
  ! remote-ip 10.23.24.1  ! where to reach the STP
  ! role asp
  ! sctp-role client
diff --git a/doc/manuals/chapters/running.adoc 
b/doc/manuals/chapters/running.adoc
index 0c6d4fb..2bcffdd 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -98,12 +98,12 @@

 An example configuration of OsmoBSC's AoIP SCCP link, assuming the BSC at
 point-code 1.23.3 and the MSC reachable at point-code 0.23.1 via an SG
-listening for M3UA at 127.0.0.1:2905:
+listening for M3UA (SCTP) at 127.0.0.1:2905:

 ----
 cs7 instance 0
  point-code 1.23.3
- asp asp-clnt-msc-0 2905 0 m3ua
+ asp asp-clnt-msc-0 2905 0 m3ua-sctp
   remote-ip 127.0.0.1
   role asp
   sctp-role client
diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index ae29725..b762695 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -255,7 +255,8 @@
 {
        switch (msc->a.asp_proto) {
        case OSMO_SS7_ASP_PROT_SUA:
-       case OSMO_SS7_ASP_PROT_M3UA:
+       case OSMO_SS7_ASP_PROT_M3UA_SCTP:
+       case OSMO_SS7_ASP_PROT_M3UA_TCP:
                return true;
        default:
                return false;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 8690a47..8a9b1d7 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -3031,18 +3031,30 @@

 DEFUN(cfg_msc_cs7_asp_proto,
       cfg_msc_cs7_asp_proto_cmd,
-      "asp-protocol (m3ua|sua|ipa)",
+      "asp-protocol (m3ua-sctp|m3ua-tcp|sua|ipa)",
       "A interface protocol to use for this MSC)\n"
-      "MTP3 User Adaptation\n"
+      "MTP3 User Adaptation (over SCTP)\n"
+      "MTP3 User Adaptation (over TCP)\n"
       "SCCP User Adaptation\n"
       "IPA Multiplex (SCCP Lite)\n")
 {
        struct bsc_msc_data *msc = bsc_msc_data(vty);
+       int val;

-       msc->a.asp_proto = get_string_value(osmo_ss7_asp_protocol_vals, 
argv[0]);
+       val = get_string_value(osmo_ss7_asp_protocol_vals, argv[0]);
+       if (val < 0)
+               return CMD_WARNING;
+       msc->a.asp_proto = (enum osmo_ss7_asp_protocol)val;
+
        return CMD_SUCCESS;
 }

+ALIAS_DEPRECATED(cfg_msc_cs7_asp_proto,
+                cfg_msc_cs7_asp_proto_m3ua_cmd,
+                "asp-protocol m3ua",
+                "A interface protocol to use for this MSC)\n"
+                "MTP3 User Adaptation (over SCTP)\n");
+
 DEFUN_USRATTR(cfg_net_msc_lcls_mode,
              cfg_net_msc_lcls_mode_cmd,
              X(BSC_VTY_ATTR_NEW_LCHAN),
@@ -3764,6 +3776,7 @@
        install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd);
        install_element(MSC_NODE, &cfg_msc_cs7_msc_addr_cmd);
        install_element(MSC_NODE, &cfg_msc_cs7_asp_proto_cmd);
+       install_element(MSC_NODE, &cfg_msc_cs7_asp_proto_m3ua_cmd);
        install_element(MSC_NODE, &cfg_msc_nri_add_cmd);
        install_element(MSC_NODE, &cfg_msc_nri_del_cmd);
        install_element(MSC_NODE, &cfg_msc_show_nri_cmd);
diff --git a/src/osmo-bsc/lb.c b/src/osmo-bsc/lb.c
index 72905b8..7bc35fa 100644
--- a/src/osmo-bsc/lb.c
+++ b/src/osmo-bsc/lb.c
@@ -425,7 +425,7 @@
        uint32_t default_pc;
        struct osmo_ss7_instance *cs7_inst = NULL;
        struct osmo_sccp_instance *sccp;
-       enum osmo_ss7_asp_protocol used_proto = OSMO_SS7_ASP_PROT_M3UA;
+       enum osmo_ss7_asp_protocol used_proto = OSMO_SS7_ASP_PROT_M3UA_SCTP;
        char inst_name[32];
        const char *smlc_name = "smlc";
        struct bsc_sccp_inst *bsc_sccp;
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 2425592..ed37bf9 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -444,7 +444,7 @@

        msc_data->nr = nr;
        msc_data->allow_emerg = 1;
-       msc_data->a.asp_proto = OSMO_SS7_ASP_PROT_M3UA;
+       msc_data->a.asp_proto = OSMO_SS7_ASP_PROT_M3UA_SCTP;

        /* Defaults for the audio setup */
        msc_data->amr_conf.m5_90 = 1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35792?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I078da51abc3511a4854f9c8fbca8eafd2bed78da
Gerrit-Change-Number: 35792
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to