pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35512?usp=email )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: S1AP_Emulation: Add port message to reset NAS count values ......................................................................
S1AP_Emulation: Add port message to reset NAS count values
It is sometimes needed to reset them to zero as per spec, like when moving GERAN/UTRAN->EUTRAN. This will be used by a follow-up patch.
Change-Id: I61d7b919aba8f58a020c18ae9b9bba4108d59010 --- M library/S1AP_Emulation.ttcn 1 file changed, 24 insertions(+), 1 deletion(-)
Approvals: daniel: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn index 7d91c36..1ef4a76 100644 --- a/library/S1AP_Emulation.ttcn +++ b/library/S1AP_Emulation.ttcn @@ -67,8 +67,12 @@ octetstring k_nas_int, octetstring k_nas_enc }; +type record ResetNAScounts { +/* empty */ +}; type union S1APEM_Config { - NAS_Keys set_nas_keys + NAS_Keys set_nas_keys, + ResetNAScounts reset_nas_counts };
type enumerated S1APEM_EventUpDown { @@ -442,6 +446,12 @@ S1apAssociationTable[assoc_id].nus.k_nas_int := s1cfg.set_nas_keys.k_nas_int; S1apAssociationTable[assoc_id].nus.k_nas_enc := s1cfg.set_nas_keys.k_nas_enc; } + /* Configuration primitive from client */ + [] S1AP_CLIENT.receive(S1APEM_Config:{reset_nas_counts:=?}) -> value s1cfg sender vc_conn { + var integer assoc_id := f_assoc_id_by_comp(vc_conn); + S1apAssociationTable[assoc_id].nus.rx_count := 0; + S1apAssociationTable[assoc_id].nus.tx_count := 0; + } /* S1AP from client: InitialUE */ [] S1AP_CLIENT.receive(tr_S1AP_InitialUE) -> value msg sender vc_conn { /* create a table entry about this connection */