diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2018-07-31 15:37:14 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-08-14 13:26:47 +0000 |
commit | cdfb7515ba8c08dfdc96efeae503dfb276fb4b31 (patch) | |
tree | 4d3e9eb9cf8d60d3769578fbb9d466ad19409d68 /library | |
parent | 6b449fbf841875c01eb7bf332ade853407573d92 (diff) |
BSSGP_Emulation: move LLC layer out of BSSGP
The LLC layer needs to be accessed by the SGSN tests
in order to do multi-BSSGP tests.
Otherwise the sgsn will see LLC frame with wrong sequence
numbers and drop them.
Change-Id: Ie9e9d7da0a78a96f4f431c9085b9e273a39535f1
Diffstat (limited to 'library')
-rw-r--r-- | library/BSSGP_Emulation.ttcn | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index ca97ccda..c650fd55 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -136,6 +136,14 @@ type record LLC_Entity { uint9_t n_u_rx_last optional }; +function f_llc_create(boolean sgsn_role := false) return LLC_Entities { + var LLC_Entities llc; + for (var integer i := 0; i < 16; i := i+1) { + llc[i] := valueof(t_LLC_init(sgsn_role)); + } + return llc; +} + private template LLC_Entity t_LLC_init(boolean sgsn_role := false) := { sgsn_role := sgsn_role, n_u_tx_next := 0, @@ -576,13 +584,13 @@ altstep as_unblocked() runs on BSSGP_CT { } } -private function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t { +function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t { var uint9_t ret := llc.n_u_tx_next; llc.n_u_tx_next := llc.n_u_tx_next + 1; return ret; } -private function f_llc_sapi_by_l3_mo(PDU_L3_MS_SGSN l3_mo) return BIT4 { +function f_llc_sapi_by_l3_mo(PDU_L3_MS_SGSN l3_mo) return BIT4 { if (ischosen(l3_mo.msgs.gprs_mm)) { return c_LLC_SAPI_LLGMM; } else if (ischosen(l3_mo.msgs.gprs_sm)) { |