Review at  https://gerrit.osmocom.org/7518

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/18/7518/1

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: newchange
Gerrit-Change-Id: I6ef9697ff365bae9fbf7c5888fdb0b88e63b13bb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to