Change in osmo-msc[master]: mncc: rework passing GCR over the MNCC interface

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Wed Oct 27 14:08:35 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/25982 )


Change subject: mncc: rework passing GCR over the MNCC interface
......................................................................

mncc: rework passing GCR over the MNCC interface

Using *unpacked* 'struct osmo_gcr_parsed' in the MNCC PDUs makes
the protocol even more complicated than it currently is, and
moreover complicates implementing MNCCv8 in the ttcn3-sip-test.

Replace 'struct osmo_gcr_parsed' in 'struct gsm_mncc' with a
fixed-length buffer, which is supposed to hold the Global Call
Reference encoded as per 3GPP TS 29.205.

Indicate presence of GCR using the MNCC_F_GCR flag.

Change-Id: I259b6d7e4cbe26159b9b496356fc7c1c27d54521
Fixes: I705c860e51637b4537cad65a330ecbaaca96dd5b
Related: OS#5164, OS#5282
---
M include/osmocom/msc/mncc.h
M src/libmsc/gsm_04_08_cc.c
2 files changed, 15 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/82/25982/1

diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h
index 5002227..d4d3f96 100644
--- a/include/osmocom/msc/mncc.h
+++ b/include/osmocom/msc/mncc.h
@@ -26,7 +26,6 @@
 
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/gsm/mncc.h>
-#include <osmocom/gsm/gsm29205.h>
 
 #include <stdint.h>
 #include <netinet/in.h>
@@ -161,7 +160,10 @@
 
 	unsigned char	lchan_type;
 	unsigned char	lchan_mode;
-	struct osmo_gcr_parsed gcr;
+
+	/* Global Call Reference (encoded as per 3GPP TS 29.205) */
+	uint8_t		gcr[16];
+
 	/* A buffer to contain SDP ('\0' terminated) */
 	char		sdp[1024];
 };
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index d6a2864..42f6bf0 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -517,8 +517,17 @@
 		trans->cc.lcls = trans_lcls_compose(trans, true);
 
 	/* Pass the LCLS GCR on to the MT call leg via MNCC */
-	if (trans->cc.lcls)
-		setup.gcr = trans->cc.lcls->gcr;
+	if (trans->cc.lcls) {
+		struct msgb *_msg = msgb_alloc(sizeof(setup.gcr), "MNCC GCR");
+		const struct osmo_gcr_parsed gcr = &trans->cc.lcls->gcr;
+		int rc;
+
+		if (msg == NULL || (rc = osmo_enc_gcr(msg, gcr)) == 0)
+			LOG_TRANS(trans, LOGL_ERROR, "Failed to encode GCR\n");
+		else
+			memcpy(&setup.gcr[0], msg->data, rc);
+		msgb_free(msg);
+	}
 
 	tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0);
 	/* emergency setup is identified by msg_type */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/25982
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I259b6d7e4cbe26159b9b496356fc7c1c27d54521
Gerrit-Change-Number: 25982
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211027/4fcdf3d8/attachment.htm>


More information about the gerrit-log mailing list