125 lines
3.3 KiB
Plaintext
125 lines
3.3 KiB
Plaintext
module MSC_ConnHdlr {
|
|
|
|
/* MSC connection handler for hnbgs tests in TTCN-3
|
|
* (C) sysmocom - s.f.m.c. GmbH
|
|
* All rights reserved.
|
|
*
|
|
* Released under the terms of GNU General Public License, Version 2 or
|
|
* (at your option) any later version.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
import from Misc_Helpers all;
|
|
import from General_Types all;
|
|
import from Osmocom_Types all;
|
|
import from IPL4asp_Types all;
|
|
|
|
import from Osmocom_CTRL_Functions all;
|
|
import from Osmocom_CTRL_Types all;
|
|
import from Osmocom_CTRL_Adapter all;
|
|
|
|
import from StatsD_Types all;
|
|
import from StatsD_CodecPort all;
|
|
import from StatsD_CodecPort_CtrlFunct all;
|
|
import from StatsD_Checker all;
|
|
|
|
import from Osmocom_VTY_Functions all;
|
|
import from TELNETasp_PortType all;
|
|
|
|
import from HNBAP_Templates all;
|
|
import from RUA_IEs all;
|
|
import from RUA_Templates all;
|
|
import from HNBAP_PDU_Descriptions all;
|
|
|
|
import from Iuh_Emulation all;
|
|
|
|
import from RANAP_Types all;
|
|
import from RANAP_PDU_Contents all;
|
|
import from RANAP_PDU_Descriptions all;
|
|
import from RANAP_Templates all;
|
|
import from RAN_Adapter all;
|
|
|
|
import from BSSAP_Types all;
|
|
import from RAN_Adapter all;
|
|
import from RAN_Emulation all;
|
|
import from BSSAP_CodecPort all;
|
|
import from IPA_Emulation all;
|
|
import from IPA_CodecPort all;
|
|
import from IPA_Types all;
|
|
|
|
import from MGCP_Emulation all;
|
|
import from MGCP_Types all;
|
|
import from MGCP_Templates all;
|
|
import from MGCP_CodecPort all;
|
|
import from SDP_Types all;
|
|
|
|
import from SCCPasp_Types all;
|
|
import from BSSAP_Types all;
|
|
|
|
import from MobileL3_Types all;
|
|
import from MobileL3_CommonIE_Types all;
|
|
import from MobileL3_RRM_Types all;
|
|
//import from L3_Templates all;
|
|
|
|
import from TELNETasp_PortType all;
|
|
import from Osmocom_VTY_Functions all;
|
|
import from TCCConversion_Functions all;
|
|
|
|
type record TestHdlrParams {
|
|
hexstring imsi,
|
|
integer media_nr
|
|
};
|
|
|
|
function f_get_test_hdlr_pars() return TestHdlrParams {
|
|
var TestHdlrParams pars := {
|
|
imsi := f_rnd_imsi('00101'H),
|
|
media_nr := 1
|
|
};
|
|
|
|
return pars;
|
|
}
|
|
|
|
type component MSC_ConnHdlr extends RAN_ConnHdlr, MGCP_ConnHdlr { /* RUA_ConnHdlr? Iuh_Emulation */
|
|
var integer g_sccp_conn_id;
|
|
|
|
port RAN_PROC_PT RAN;
|
|
port IPA_MGCP_PT MGCP_CLIENT;
|
|
var TestHdlrParams g_pars;
|
|
|
|
}
|
|
|
|
function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw) runs on MSC_ConnHdlr {
|
|
}
|
|
|
|
function UnitdataCallback(RANAP_PDU ranap) runs on RAN_Emulation_CT return template RANAP_PDU {
|
|
// FIXME
|
|
return ts_RANAP_Reset(ts_RanapCause_om_intervention, cs_domain);
|
|
}
|
|
|
|
const RanOps MSC_RanOps := {
|
|
ranap_create_cb := refers(RAN_Emulation.RanapExpectedCreateCallback),
|
|
ranap_unitdata_cb := refers(UnitdataCallback),
|
|
ps_domain := false,
|
|
decode_dtap := false,
|
|
role_ms := false,
|
|
protocol := RAN_PROTOCOL_RANAP,
|
|
transport := BSSAP_TRANSPORT_AoIP,
|
|
use_osmux := false,
|
|
sccp_addr_local := omit,
|
|
sccp_addr_peer := omit
|
|
}
|
|
|
|
const MGCPOps MSC_MGCPOps := {
|
|
create_cb := refers(MGCP_Emulation.ExpectedCreateCallback),
|
|
unitdata_cb := refers(MGCP_Emulation.DummyUnitdataCallback)
|
|
}
|
|
|
|
function f_create_ranap_exp(octetstring l3_enc) runs on MSC_ConnHdlr {
|
|
RAN.call(RAN_register:{l3_enc, self}) {
|
|
[] RAN.getreply(RAN_register:{?, ?}) {};
|
|
}
|
|
}
|
|
|
|
|
|
} |