pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41410?usp=email )
Change subject: mtp: Support MTP-TRANSFER.req of raw IPA messages
......................................................................
mtp: Support MTP-TRANSFER.req of raw IPA messages
This is needed ie. in SCCPLite, where MGCP and CTRL messages need to be
sent over the same IPA multiplex TCP conn as the SCCPLite (SCCP/IPA) one
towards a given MSC.
Prior to this, osmo-bsc-sccplite was doing lots of manual
libosmo-sigtran APIs to obtain a route, an AS, and ASP, sending over an
ASP, etc. Tons of stuff which should really be done properly inside
libosmo-sigtran.
Related: SYS#6880
Change-Id: I9fedb26ccd3434fc7f272feb3c45cf4bdb80c7ae
---
M TODO-RELEASE
M include/osmocom/sigtran/protocol/mtp.h
M src/ipa.c
3 files changed, 40 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/10/41410/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 2ecfd57..6f04a07 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,3 +10,4 @@
libosmo-netif >1.6.0 stream OSMO_STREAM_{CLI,SRV}_TCP_SOCKOPT_KEEP*
libosmo-sigtran add enum mtp_network_indicator, mtp_network_indicator_vals
libosmo-sigtran add osmo_ss7_instance_get_network_indicator()
+libosmo-sigtran add MTP_SI_NI11_OSMO_IPA
diff --git a/include/osmocom/sigtran/protocol/mtp.h b/include/osmocom/sigtran/protocol/mtp.h
index 21e3d60..c0a1230 100644
--- a/include/osmocom/sigtran/protocol/mtp.h
+++ b/include/osmocom/sigtran/protocol/mtp.h
@@ -23,6 +23,18 @@
};
extern const struct value_string mtp_si_vals[];
+/* Q.704 14.2.2: "In the case of only one national signalling network the spare code of the
+ * network indicator reserved for national use can be used, for example, to define an additional
+ * 16 User Parts (making a total of 32 User Parts) for that national signalling network."
+ * Hence, we keep service indicators for Network Indicator "International network" (00) the same
+ * as for "National network" (10), and use "Reserved for national use" to specify extension
+ * service indicators.
+ * Note we pick enum values reserved in NI00 above in order to allow forming a
+ * superset so it can still be used with other NI values. */
+enum mtp_si_ni11 {
+ MTP_SI_NI11_OSMO_IPA = 2, /* Contains an IPA header + payload */
+};
+
/* Q.704 14.2.2 Sub-service field (Network Indicator) */
enum mtp_network_indicator {
MTP_NI_INTERNATIONAL = 0,
diff --git a/src/ipa.c b/src/ipa.c
index c748f22..46c611b 100644
--- a/src/ipa.c
+++ b/src/ipa.c
@@ -81,28 +81,39 @@
return NULL;
data_hdr = (struct m3ua_data_hdr *) data_ie->dat;
- if (data_hdr->si != MTP_SI_SCCP) {
- LOGP(DLSS7, LOGL_ERROR, "Cannot transmit non-SCCP SI (%u) to IPA peer\n",
- data_hdr->si);
- return NULL;
- }
-
/* and even the data part still has the header prepended */
src = data_ie->dat + sizeof(struct m3ua_data_hdr);
src_len = data_ie->len - sizeof(struct m3ua_data_hdr);
- /* sufficient headroom for osmo_ipa_msg_push_header() */
- msg = ipa_msg_alloc(16);
- if (!msg)
+ if (src_len == 0) {
+ LOGP(DLSS7, LOGL_NOTICE, "Discarding Tx empty IPA msg/payload\n");
return NULL;
+ }
- dst = msgb_put(msg, src_len);
- memcpy(dst, src, src_len);
-
- /* TODO: if we ever need something beyond SCCP, we can use the
- * M3UA SIO to determine the protocol */
- osmo_ipa_msg_push_header(msg, IPAC_PROTO_SCCP);
- return msg;
+ switch (data_hdr->si) {
+ case MTP_SI_SCCP:
+ /* sufficient headroom for osmo_ipa_msg_push_header() */
+ msg = ipa_msg_alloc(16);
+ if (!msg)
+ return NULL;
+ dst = msgb_put(msg, src_len);
+ memcpy(dst, src, src_len);
+ osmo_ipa_msg_push_header(msg, IPAC_PROTO_SCCP);
+ return msg;
+ case MTP_SI_NI11_OSMO_IPA:
+ /* Process our SI extension: full IPA with hdr + payload, used in SCCPlite
+ * between BSC and MSC to send MGCP and CTRL over IPA multiplex */
+ msg = msgb_alloc(src_len, "MTP_SI_NI11_OSMO_IPA");
+ if (!msg)
+ return NULL;
+ dst = msgb_put(msg, src_len);
+ memcpy(dst, src, src_len);
+ return msg;
+ default:
+ LOGP(DLSS7, LOGL_ERROR, "Cannot transmit non-SCCP SI (%u) to IPA peer\n",
+ data_hdr->si);
+ return NULL;
+ }
}
/*! \brief Send a given xUA message via a given IPA "Application Server"
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41410?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I9fedb26ccd3434fc7f272feb3c45cf4bdb80c7ae
Gerrit-Change-Number: 41410
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41408?usp=email )
Change subject: m3ua: Drop rx packets with unexpected Network Indicator
......................................................................
Patch Set 2:
(1 comment)
File src/m3ua.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/41408/comment/40c0dca2_8b942… :
PS2, Line 639:
> is there actually a requirement in the MTP spec that requests us to do this? It makes sense, but I […]
I looked at Cisco ITP manual and they are doing this, grep for "network ind" and you'll see counters for exactly this. According to its user manual if you want to have different networks then you declare different cs7 instance and configure translation between them, see "Configuring Multiple Instances and Instance
Translation".
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41408?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I54de65b16949851062914ca5d3362d1e46158b8b
Gerrit-Change-Number: 41408
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 12 Nov 2025 17:50:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/41357?usp=email )
Change subject: Omit all-zero octets in MS Classmark 3
......................................................................
Omit all-zero octets in MS Classmark 3
TS 24.008 Clause 10.5.7.1 allows us to omit all-zero octets at the end
of the information element. The decoder will add them if needed.
Older specs tell us to include the supported bands, a5 bits and radio
capability. Therefore we don't omit them, even if their encoded octets
are all-zero.
Change-Id: I3f05893e60f37f349b77fbd15a20b7708c4c3481
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index 1750c57..c04193c 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1270,6 +1270,7 @@
struct gsm_support *sup = &ms->support;
struct gsm_settings *set = &ms->settings;
struct bitvec bv;
+ int minimum_len;
memset(&bv, 0, sizeof(bv));
bv.data = buf;
@@ -1328,6 +1329,8 @@
bitvec_set_uint(&bv, 0, 4);
bitvec_set_uint(&bv, set->class_900, 4);
}
+ /* These octets above shall be included according to GSM 04.08 Version 5.3.0. */
+ minimum_len = (bv.cur_bit + 7) >> 3;
/* r support */
if (set->r_gsm) {
bitvec_set_bit(&bv, ONE);
@@ -1442,6 +1445,16 @@
*len = (bv.cur_bit + 7) >> 3;
bitvec_fill(&bv, (*len*8) - bv.cur_bit, ZERO);
+ /* Remove all all-zero octets at the end. See the rule in Clause 10.5.7.1:
+ "Typically, the number of spare bits at the end is the minimum to reach an octet boundary.
+ The receiver may add any number of bits set to "0" at the end of the received string
+ if needed for correct decoding."
+ GSM 04.08 Version 5.3.0 states that spare octets after "octet 3" and "octet 3bis" may be omitted.
+ Note that "octet 3" refers to the first value (buf[0]) in this TLV information element.
+ */
+ while (*len > minimum_len && buf[*len - 1] == 0x00)
+ (*len)--;
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/41357?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3f05893e60f37f349b77fbd15a20b7708c4c3481
Gerrit-Change-Number: 41357
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/41358?usp=email )
Change subject: RSSI app: Use correct BSIC for RACH bursts
......................................................................
RSSI app: Use correct BSIC for RACH bursts
A regular RACH burst uses the BSIC of the cell. A 'UIC' (uplink identity
code) value is used for ASCI group calls. The value 0xff disables 'UIC'.
Fixes: 23d46f003 ("ASCI: Add UIC support to random access burst")
Change-Id: I63ed20160d9d45cbc3f70cec8b1c0af262fdde19
---
M src/target/firmware/apps/rssi/main.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/src/target/firmware/apps/rssi/main.c b/src/target/firmware/apps/rssi/main.c
index 29c5430..a871714 100644
--- a/src/target/firmware/apps/rssi/main.c
+++ b/src/target/firmware/apps/rssi/main.c
@@ -1209,6 +1209,7 @@
rach_req->ra = rach_ra;
rach_req->offset = 0;
rach_req->combined = (ccch_conf == 1);
+ rach_req->uic = 0xff; /* disable, use BSIC instead */
l1a_l23_rx(SC_DLCI_L1A_L23, msg1);
l1a_l23_rx(SC_DLCI_L1A_L23, msg2);
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/41358?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I63ed20160d9d45cbc3f70cec8b1c0af262fdde19
Gerrit-Change-Number: 41358
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>