From 1b85bf3a3dd699d66af8684c2f696cafa3f8c4f7 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 3 May 2019 00:49:25 +0200 Subject: BSSGP_Emulation: Implement LLC sending also for SGSN-role We used to support sending of LLC messages only for the MS role, where we generated BSSGP UL UNITDATA. Let's also support the SGSN role, where we have to generate BSSGP DL UNITDATA Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124 --- library/BSSGP_Emulation.ttcn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 849e1476..c60868e2 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -597,11 +597,18 @@ altstep as_unblocked() runs on BSSGP_CT { BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); } - [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { + /* ConnHdlr sends raw LLC: Encode and send as UL_UD / DL_UD */ + [not g_cfg.sgsn_role] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); var octetstring llc_enc := enc_PDU_LLC(llc); BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); } + [g_cfg.sgsn_role] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { + var integer idx := f_tbl_idx_by_comp(vc_conn); + var octetstring llc_enc := enc_PDU_LLC(llc); + BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); + } + } function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t { -- cgit v1.2.3