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
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 */