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
diff --git a/fr-net/FRNET_Tests.ttcn b/fr-net/FRNET_Tests.ttcn
index bc6e513..c3ec468 100644
--- a/fr-net/FRNET_Tests.ttcn
+++ b/fr-net/FRNET_Tests.ttcn
@@ -6,6 +6,8 @@
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 @@
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 {