library: de-duplicate SCTP related templates

Change-Id: Ic2a0cba0cfb1909ccbd1ade9565d508fd239f78c
Related: SYS#6772
diff --git a/library/SCTP_Templates.ttcn b/library/SCTP_Templates.ttcn
new file mode 100644
index 0000000..f63637f
--- /dev/null
+++ b/library/SCTP_Templates.ttcn
@@ -0,0 +1,68 @@
+module SCTP_Templates {
+
+/* (C) 2024 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
+ *
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+import from Socket_API_Definitions all;
+
+template (value) SctpTuple
+ts_SctpTuple(template (omit) integer ppid := omit,
+	     template (omit) AssociationId assoc_id := omit) := {
+	sinfo_stream := omit,
+	sinfo_ppid := ppid,
+	remSocks := omit,
+	assocId := assoc_id
+};
+template SctpTuple
+tr_SctpTuple(template integer ppid := *,
+	     template AssociationId assoc_id := *) := {
+	sinfo_stream := *,
+	sinfo_ppid := ppid,
+	remSocks := *,
+	assocId := assoc_id
+};
+
+
+template Socket_API_Definitions.PortEvent
+tr_SctpAssocChange(template (present) SAC_STATE state := ?,
+		   template (present) ConnectionId conn_id := ?,
+		   template (present) SctpTuple sctp := ?) := {
+	sctpEvent := {
+		sctpAssocChange := {
+			clientId := conn_id,
+			proto := {
+				sctp := sctp
+			},
+			sac_state := state
+		}
+	}
+}
+
+template Socket_API_Definitions.PortEvent
+tr_SctpPeerAddrChange(template (present) SPC_STATE state := ?,
+		      template (present) ConnectionId conn_id := ?) := {
+	sctpEvent := {
+		sctpPeerAddrChange := {
+			clientId := conn_id,
+			spc_state := state
+		}
+	}
+}
+
+template Socket_API_Definitions.PortEvent
+tr_SctpShutDownEvent(template (present) ConnectionId conn_id := ?) := {
+	sctpEvent := {
+		sctpShutDownEvent := {
+			clientId := conn_id
+		}
+	}
+}
+
+}