diff options
author | Harald Welte <laforge@osmocom.org> | 2021-02-04 13:20:29 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2021-02-04 14:58:22 +0100 |
commit | e58e5b74da5777b2664751c3de28be5adcfee782 (patch) | |
tree | 4528eee48ae5f083db537ae76a0b25bfdcfb963c /fr-net | |
parent | 8525764791397edf8a14b9350b2a3348e30a28bc (diff) |
fr-net: Echo back DL-UD in UL-UD when LLC SAPI '0010'B is used
This allows us to have bi-directional tests
Change-Id: I7637ee5f1a7cce0ed282c972b9cd0702ba86cbaa
Diffstat (limited to 'fr-net')
-rw-r--r-- | fr-net/FRNET_Tests.ttcn | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fr-net/FRNET_Tests.ttcn b/fr-net/FRNET_Tests.ttcn index bc6e5130..c3ec468a 100644 --- a/fr-net/FRNET_Tests.ttcn +++ b/fr-net/FRNET_Tests.ttcn @@ -6,6 +6,8 @@ import from Osmocom_Gb_Types all; import from NS_Emulation all; import from BSSGP_Emulation all; +import from LLC_Types all; +import from LLC_Templates all; modulepar { integer mp_num_bvc := 10; @@ -69,7 +71,19 @@ type component test_CT { private function CreateCallback(BssgpBvci bvci, BssgpCellId cell_id, OCT4 tlli, BssgpDecoded dec) runs on BSSGP_BVC_CT { - /* simply ignore any inbound traffic for now */ + if (ischosen(dec.bssgp.pDU_BSSGP_UL_UNITDATA)) { + var PDU_LLC llc_rx := dec_PDU_LLC(dec.bssgp.pDU_BSSGP_UL_UNITDATA.lLC_PDU.lLC_PDU) + select (llc_rx) { + case (tr_LLC_UI(sapi := '0010'B)) { + //log("BVCI=", bvci, ", CellId=", cell_id, ", TLLI=", tlli, ", BSSGP=", dec); + /* mirror back as DL-UNITDATA */ + BVC.send(ts_ptp_BnsUdReq(ts_BSSGP_DL_UD(tlli, dec.bssgp.pDU_BSSGP_UL_UNITDATA.lLC_PDU.lLC_PDU), bvci, oct2int(tlli))); + } + case else { + /* simply ignore any inbound traffic for now */ + } + } + } } private function f_init_gb(inout GbInstance gb, charstring id, integer offset) runs on test_CT { |