aboutsummaryrefslogtreecommitdiffstats
path: root/library/RAN_Emulation.ttcnpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/RAN_Emulation.ttcnpp')
-rw-r--r--library/RAN_Emulation.ttcnpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 85ae0840..ba018b40 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -445,6 +445,11 @@ runs on RAN_Emulation_CT return RAN_ConnHdlr;
type function BssmapUnitdataCallback(PDU_BSSAP bssap)
runs on RAN_Emulation_CT return template PDU_BSSAP;
+private function append_osmux_ie()
+runs on RAN_Emulation_CT return boolean {
+ return g_ran_ops.use_osmux and (g_ran_ops.transport == BSSAP_TRANSPORT_AoIP);
+}
+
/* handle common Unitdata such as Paging */
private function CommonBssmapUnitdataCallback(PDU_BSSAP bssap)
runs on RAN_Emulation_CT return template PDU_BSSAP {
@@ -469,14 +474,15 @@ runs on RAN_Emulation_CT return template PDU_BSSAP {
private function f_bssap_wait_for_reset() runs on RAN_Emulation_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
timer T := 20.0;
+ var boolean append_osmux_support := append_osmux_ie();
T.start;
alt {
- [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) -> value ud_ind {
+ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(append_osmux_support))) -> value ud_ind {
BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress,
- ts_BSSMAP_ResetAck(g_ran_ops.use_osmux)));
+ ts_BSSMAP_ResetAck(append_osmux_support)));
}
- [] as_reset_ack();
+ [] as_reset_ack(append_osmux_support);
[] BSSAP.receive {
repeat;
}
@@ -489,14 +495,15 @@ private function f_bssap_wait_for_reset() runs on RAN_Emulation_CT {
function f_bssap_reset(SCCP_PAR_Address peer, SCCP_PAR_Address own) runs on RAN_Emulation_CT {
timer T := 5.0;
+ var boolean append_osmux_support := append_osmux_ie();
- BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0, g_ran_ops.use_osmux)));
+ BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0, append_osmux_support)));
T.start;
alt {
- [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck(g_ran_ops.use_osmux))) {
+ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck(append_osmux_support))) {
log("Received RESET-ACK in response to RESET, we're ready to go!");
}
- [] as_reset_ack();
+ [] as_reset_ack(append_osmux_support);
[] BSSAP.receive { repeat };
[] T.timeout {
setverdict(fail, "Timeout waiting for RESET-ACK after sending RESET");
@@ -728,7 +735,7 @@ function f_ML3_patch_seq(inout ConnectionData cd, in PDU_ML3_MS_NW dtap, inout o
f_ML3_patch_seq_nr(seq_nr, enc_l3);
}
-private altstep as_reset_ack() runs on RAN_Emulation_CT {
+private altstep as_reset_ack(boolean append_osmux_support := false) runs on RAN_Emulation_CT {
#ifdef RAN_EMULATION_BSSAP
var BSSAP_N_UNITDATA_ind ud_ind;
#endif
@@ -736,10 +743,10 @@ private altstep as_reset_ack() runs on RAN_Emulation_CT {
var RANAP_N_UNITDATA_ind rud_ind;
#endif
#ifdef RAN_EMULATION_BSSAP
- [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) -> value ud_ind {
+ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(append_osmux_support))) -> value ud_ind {
log("Respoding to inbound RESET with RESET-ACK");
BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress,
- ts_BSSMAP_ResetAck(g_ran_ops.use_osmux)));
+ ts_BSSMAP_ResetAck(append_osmux_support)));
repeat;
}
#endif