pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33378 )
Change subject: Use new libosmo-sccp APIs osmo_ss7_asp_get_{name,proto}()
......................................................................
Use new libosmo-sccp APIs osmo_ss7_asp_get_{name,proto}()
Depends: libosmo-sccp.git Change-Id If9acfca1abc9ab7eb6d2388f548d7ee577b9c5ac
Change-Id: I0479f7bfb8337a6a955ba66c7b403db3565659d6
---
M TODO-RELEASE
M src/osmo-bsc/bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_sigtran.c
4 files changed, 18 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/33378/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 4699dbd..2efa641 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -12,6 +12,6 @@
osmo-bsc CTRL,VTY osmo_fsm instance IDs now use new dynamic timeslot names 'DYNAMIC_OSMOCOM' and 'DYNAMIC_IPACCESS'
libosmogsm >1.8.0 circuit switched data stuff (gsm0808_enc/dec_channel_type etc.)
libosmo-abis >1.4.0 osmo_ortp.h: add RTP_PT_CSDATA
-libosmo-sccp >1.7.0 osmo_sccp_{get,set}_priv()
+libosmo-sccp >1.7.0 osmo_sccp_{get,set}_priv(), osmo_ss7_asp_get_name(), osmo_ss7_asp_get_proto()
libosmocore >1.8.0 GSM48_IE_CIP_MODE_SET_HO and GSM48_IE_SYNC_IND_HO
libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty(), mgcp_client_conf_alloc()
\ No newline at end of file
diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c
index 2df7aa3..38698e7 100644
--- a/src/osmo-bsc/bsc_ctrl.c
+++ b/src/osmo-bsc/bsc_ctrl.c
@@ -686,7 +686,7 @@
struct msgb *msg;
/* don't attempt to send CTRL on a non-SCCPlite ASP */
- if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA)
+ if (osmo_ss7_asp_get_proto(asp) != OSMO_SS7_ASP_PROT_IPA)
return 0;
msg = ctrl_cmd_make(cmd);
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 90a73e5..1b8e089 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -33,13 +33,14 @@
static struct bsc_msc_data *msc_from_asp(struct osmo_ss7_asp *asp)
{
int msc_nr;
+ const char *asp_name = osmo_ss7_asp_get_name(asp);
/* this is rather ugly, as we of course have MTP-level routing between
* the local SCCP user (BSC) and the AS/ASPs. However, for the most simple
* SCCPlite case, there is a 1:1 mapping between ASP and AS, and using
* the libosmo-sigtran "simple client", the names are "as[p]-clnt-msc-%u",
* as set in osmo_bsc_sigtran_init() */
- if (sscanf(asp->cfg.name, "asp-clnt-msc-%u", &msc_nr) != 1) {
- LOGP(DMSC, LOGL_ERROR, "Cannot find to which MSC the ASP %s belongs\n", asp->cfg.name);
+ if (!asp_name || sscanf(asp_name, "asp-clnt-msc-%u", &msc_nr) != 1) {
+ LOGP(DMSC, LOGL_ERROR, "Cannot find to which MSC the ASP '%s' belongs\n", asp_name);
return NULL;
}
return osmo_msc_data_find(bsc_gsmnet, msc_nr);
@@ -51,7 +52,8 @@
struct bsc_msc_data *msc;
int rc;
- LOGP(DMSC, LOGL_NOTICE, "%s: Received IPA-encapsulated MGCP: %s\n", asp->cfg.name, msg->l2h);
+ LOGP(DMSC, LOGL_NOTICE, "%s: Received IPA-encapsulated MGCP: %s\n",
+ osmo_ss7_asp_get_name(asp), msg->l2h);
msc = msc_from_asp(asp);
if (msc) {
/* we don't have a write queue here as we simply expect the socket buffers
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 64bddf6..a4d0f2d 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -729,7 +729,7 @@
struct ipaccess_head *iph;
struct ipaccess_head_ext *iph_ext;
- if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) {
+ if (osmo_ss7_asp_get_proto(asp) != OSMO_SS7_ASP_PROT_IPA) {
msgb_free(msg);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33378
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I0479f7bfb8337a6a955ba66c7b403db3565659d6
Gerrit-Change-Number: 33378
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33377 )
Change subject: Add osmo_ss7_asp getters for name and proto
......................................................................
Add osmo_ss7_asp getters for name and proto
Some apps such as osmo-bsc are accessing some of those fields, so better
add a getter API to make it easier to update the struct contents.
Change-Id: If9acfca1abc9ab7eb6d2388f548d7ee577b9c5ac
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
3 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/77/33377/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index ede41b5..5406d05 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,4 +8,5 @@
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
libosmocore >1.8.0 uses new osmo_prim_operation_name()
+libosmo-sccp add API osmo_ss7_asp_get_name(), osmo_ss7_asp_get_proto()
osmo_sccp_simple_client_on_ss7_id() behavior change: ASPs asp-clnt-* defined through VTY must explicitly configure "role" and "sctp-role"
\ No newline at end of file
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index f413983..3c72394 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -471,6 +471,8 @@
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
+const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp);
+enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp);
/*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
* This function can be overridden by application code to implement whatever handling
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 3dc0d51..aba14b3 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -2432,6 +2432,24 @@
}
}
+/*! \brief Get the name of a given ASP
+ * \param[in] asp The ASP for which the name is requested
+ * \returns The name of the ASP, or NULL if not set
+ */
+const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp)
+{
+ return asp->cfg.name;
+}
+
+/*! \brief Get the proto of a given ASP
+ * \param[in] asp The ASP for which the proto is requested
+ * \returns The proto of the ASP
+ */
+enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp)
+{
+ return asp->cfg.proto;
+}
+
/*! Register a call-back function for unknown SCTP PPID / IPA Stream ID */
void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb)
{
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33377
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If9acfca1abc9ab7eb6d2388f548d7ee577b9c5ac
Gerrit-Change-Number: 33377
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
Hello Jenkins Builder, fixeria, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/33335
to look at the new patch set (#8).
Change subject: Set stream_cli/srv name to contain ASP + sockname
......................................................................
Set stream_cli/srv name to contain ASP + sockname
Upon connect/accept, update the name to contain both the ASP and the
sockname of the established socked. This allows easily identifying the
stream based on IP layer as well as upper xUA layer.
Example logs:
"""
stream.c:1193 SRV(m3ua,::1:2905) accept()ed new link from ::1 to port 2905
stream.c:1672 SRVCONN(asp-dyn-0,(r=::1:43568<->l=::1:2905)) connected read/write (what=0x1)
stream.c:1589 SRVCONN(asp-dyn-0,(r=::1:43568<->l=::1:2905)) message received
"""
"""
stream.c:521 CLICONN(asp0){CONNECTING} connection established
stream.c:552 CLICONN(asp0,(r=::1:2905<->l=::ffff:127.0.0.2:35911)){CONNECTED} connected read
stream.c:401 CLICONN(asp0,(r=::1:2905<->l=::ffff:127.0.0.2:35911)){CONNECTED} message received
"""
Depends: libosmo-netif.git I539a0d29d11348efe702f971965a55cf56db5c59
Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475
---
M TODO-RELEASE
M src/osmo_ss7.c
2 files changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/35/33335/8
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33335
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475
Gerrit-Change-Number: 33335
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33337 )
Change subject: stream: Print socket info as part of the logging context
......................................................................
Patch Set 5:
(1 comment)
Patchset:
PS4:
> On second thoughts, I'm starting to think this patch should be better changing the sockname informat […]
I applied the changes mentioned above in the version I just submitted.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33337
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I17ef699dab72c1b613708070d22e9f040b0fe069
Gerrit-Change-Number: 33337
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 20 Jun 2023 11:52:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder, laforge, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/33343
to look at the new patch set (#3).
Change subject: stream: Drop name param from recently added API osmo_stream_srv_create2()
......................................................................
stream: Drop name param from recently added API osmo_stream_srv_create2()
It was later decided that since setting a name is not really required,
it is best to leave it out of the create() function and let the user use
the osmo_stream_srv_set_name() API if needed (otherwise a dynamic name
based on socket is selected)
Change-Id: I5d677ef57b7db0aedd8c43282568c845097cb12b
---
M examples/ipa-stream-server.c
M examples/stream-server.c
M include/osmocom/netif/stream.h
M src/stream.c
4 files changed, 21 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/43/33343/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33343
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I5d677ef57b7db0aedd8c43282568c845097cb12b
Gerrit-Change-Number: 33343
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Hello Jenkins Builder, laforge, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/33337
to look at the new patch set (#5).
Change subject: stream: Print socket info as part of the logging context
......................................................................
stream: Print socket info as part of the logging context
Since the local port is logged now in stream_test, it must be set to
a specific value in order to have deterministic log output being
validated.
Change-Id: I17ef699dab72c1b613708070d22e9f040b0fe069
---
M src/stream.c
M tests/stream/stream_test.c
M tests/stream/stream_test.err
3 files changed, 42 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/37/33337/5
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33337
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I17ef699dab72c1b613708070d22e9f040b0fe069
Gerrit-Change-Number: 33337
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33369 )
Change subject: Add initial CSD support with external MNCC
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/msc/transaction.h:
https://gerrit.osmocom.org/c/osmo-msc/+/33369/comment/2f0c0dfb_760b35ee
PS1, Line 113: struct csd_filter csd;
> This doesn't sound right to me, since the "audio" codec is always CLEARMODE:8000 for CSD. […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33369
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ide8b8321e0401dcbe35da2ec9cee0abca821d99a
Gerrit-Change-Number: 33369
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 20 Jun 2023 11:41:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33369 )
Change subject: Add initial CSD support with external MNCC
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/msc/transaction.h:
https://gerrit.osmocom.org/c/osmo-msc/+/33369/comment/1f1a4989_e92a9b28
PS1, Line 113: struct csd_filter csd;
This doesn't sound right to me, since the "audio" codec is always CLEARMODE:8000 for CSD. The bearer services aren't audio codecs or part of it, they are a combination of data rates, sync/asnc, transparent/non-transparent and rate adaption.
I think in theory union made sense here, but it doesn't work since we also need to set the audio codec to clearmode (the fake audio codec that was invented for CSD).
> I'm not saying it should be done that way, just raising concerns.
Sure, and thanks for that!
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33369
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ide8b8321e0401dcbe35da2ec9cee0abca821d99a
Gerrit-Change-Number: 33369
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 20 Jun 2023 11:40:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33369 )
Change subject: Add initial CSD support with external MNCC
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33369
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ide8b8321e0401dcbe35da2ec9cee0abca821d99a
Gerrit-Change-Number: 33369
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 20 Jun 2023 11:32:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33325 )
Change subject: Forbid partial VTY configurations of ASPs with name asp-clnt-*
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/sigtran/osmo_ss7.h:
https://gerrit.osmocom.org/c/libosmo-sccp/+/33325/comment/69a4670d_c2537d51
PS2, Line 433: bool role_set_by_vty;
> 1- Here I'm just readding some fields which used to be there.
So you're saying the API/ABI was already broken once, when the fields were removed?
> 2- These fields (.cfg) are basically set by VTY code which is also inside libosmo-sccp. Furthermore the ASP objects are allocated internally so there's no problem with struct size changing.
But I see for instance osmo-bsc.git is accessing `asp->cfg.proto` and `asp->cfg.name`. You're not touching these in this patch, but the overall struct layout gets changed, e.g. the compiler may rearrange padding.
Adding these new fields at the end of scope would be safer, IMO.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33325
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I65b5fad2ec06a9d9c521f1e3ce8aab633da95a47
Gerrit-Change-Number: 33325
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 20 Jun 2023 11:31:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment