[MERGED] osmo-ttcn3-hacks[master]: BSSGP_Emulation: Allow clients to send PDU_LLC directly

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
Sun Feb 18 19:24:22 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: BSSGP_Emulation: Allow clients to send PDU_LLC directly
......................................................................


BSSGP_Emulation: Allow clients to send PDU_LLC directly

If a client is sending a PDU_LLC on the BSSGP port, we will encode
it and wrap it in BSSGP before sending it down the stack towards the
IUT, just like we're doing with L3 PDUs already so far.

Change-Id: Ie3385dbb9aee793bdbd006376a69e0a551b23c3c
---
M library/BSSGP_Emulation.ttcn
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index a26e01f..9a48918 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -40,6 +40,7 @@
 /* port from our (internal) point of view */
 type port BSSGP_SP_PT message {
 	in	PDU_BSSGP,
+		PDU_LLC,
 		PDU_L3_MS_SGSN,
 		PDU_L3_SGSN_MS;
 	out	BssgpDecoded,
@@ -59,6 +60,7 @@
 		PDU_L3_MS_SGSN,
 		PDU_L3_SGSN_MS;
 	out	PDU_BSSGP,
+		PDU_LLC,
 		PDU_L3_SGSN_MS,
 		PDU_L3_MS_SGSN;
 } with { extension "internal" };
@@ -467,6 +469,7 @@
 	var BSSGP_Client_CT vc_conn;
 	var NsUnitdataIndication udi;
 	var PDU_BSSGP bs_pdu;
+	var PDU_LLC llc;
 	var PDU_L3_MS_SGSN l3_mo;
 	var PDU_L3_SGSN_MS l3_mt;
 
@@ -543,7 +546,6 @@
 		var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)));
 		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_L3_SGSN_MS:?) -> value l3_mt sender vc_conn {
 		var integer idx := f_tbl_idx_by_comp(vc_conn);
 		var octetstring l3_enc := enc_PDU_L3_SGSN_MS(l3_mt);
@@ -552,6 +554,12 @@
 		var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u)));
 		//BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc)), g_cfg.bvci);
 	}
+
+	[] 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));
+	}
 }
 
 private function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3385dbb9aee793bdbd006376a69e0a551b23c3c
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