Introduce DIAMETER_rfc5447_Templates.ttcn

Add templates for RFC 5447 MIP6-Feature-Vector.
This AVP is a bitmask which as only a few bits defined in RFC 5447, with
other interfaces using this AVP adding interface-specific bits in the
spec of each interface.

The templates are added in a new separate file with the aim of start
splitting the tons of AVPs originating from different specs in order to
be able to quickly identify them and avoid confusion.

Change-Id: I0fc646e5354d78283a2f3e1b9bb9c4688cf744a1
diff --git a/library/DIAMETER_rfc5447_Templates.ttcn b/library/DIAMETER_rfc5447_Templates.ttcn
new file mode 100644
index 0000000..4c119c7
--- /dev/null
+++ b/library/DIAMETER_rfc5447_Templates.ttcn
@@ -0,0 +1,41 @@
+module DIAMETER_rfc5447_Templates {
+
+/* (C) 2023 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 General_Types all;
+import from DIAMETER_Types all;
+import from DIAMETER_Templates all;
+import from Osmocom_Types all;
+import from Misc_Helpers all;
+
+/* 4.2.5. MIP6-Feature-Vector AVP */
+const uint64_t DIA_RFC5447_MIP6_Feature_Vector_MIP6_INTEGRATED := hex2int('0000000000000001'H);
+const uint64_t DIA_RFC5447_MIP6_Feature_Vector_LOCAL_HOME_AGENT_ASSIGNMENT := hex2int('0000000000000002'H);
+
+
+/* 4.2.5. MIP6-Feature-Vector AVP */
+template (value) GenericAVP ts_AVP_MIP6FeatureVector(template (value) MIPv6_NONE_MIP6_Feature_Vector inp) := {
+	avp := {
+		avp_header := ts_DIA_Hdr(c_AVP_Code_MIPv6_NONE_MIP6_Feature_Vector),
+		avp_data := {
+			avp_MIPv6_NONE_MIP6_Feature_Vector := inp
+		}
+	}
+}
+template (present) GenericAVP tr_AVP_MIP6FeatureVector(template (present) MIPv6_NONE_MIP6_Feature_Vector inp := ?) := {
+	avp := {
+		avp_header := tr_DIA_Hdr(c_AVP_Code_MIPv6_NONE_MIP6_Feature_Vector),
+		avp_data := {
+			avp_MIPv6_NONE_MIP6_Feature_Vector := inp
+		}
+	}
+}
+
+}
\ No newline at end of file