[MERGED] osmo-ttcn3-hacks[master]: MNCC_Emulation: Send HELLO in "server" role

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Mar 26 21:13:57 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: MNCC_Emulation: Send HELLO in "server" role
......................................................................


MNCC_Emulation: Send HELLO in "server" role

Change-Id: I6ef9697ff365bae9fbf7c5888fdb0b88e63b13bb
---
M library/MNCC_Emulation.ttcn
M library/MNCC_Types.ttcn
2 files changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn
index 856575e..0669266 100644
--- a/library/MNCC_Emulation.ttcn
+++ b/library/MNCC_Emulation.ttcn
@@ -267,6 +267,7 @@
 
 	if (role_server) {
 		f_listen(sock);
+		MNCC.send(t_SD_MNCC(g_mncc_ud_id, ts_MNCC_HELLO));
 	} else {
 		f_connect(sock);
 	}
diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn
index 8d47efb..1818ff3 100644
--- a/library/MNCC_Types.ttcn
+++ b/library/MNCC_Types.ttcn
@@ -398,6 +398,20 @@
 
 external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU;
 
+template (value) MNCC_PDU ts_MNCC_HELLO(uint32_t version := 5) := {
+	msg_type := MNCC_SOCKET_HELLO,
+	u := {
+		hello := {
+			version := version,
+			mncc_size := 836,
+			data_frame_size := 8,
+			called_offset := 104,
+			signal_offset := 796,
+			emergency_offset := 812,
+			lchan_type_offset := 0
+		}
+	}
+}
 
 template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := {
 	msg_type := msg_type,

-- 
To view, visit https://gerrit.osmocom.org/7518
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ef9697ff365bae9fbf7c5888fdb0b88e63b13bb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list