Adding initial code jy.oak@samsung.com
[ric-app/kpimon.git] / asn1c_defs / all-defs / Port-Number.c
diff --git a/asn1c_defs/all-defs/Port-Number.c b/asn1c_defs/all-defs/Port-Number.c
new file mode 100755 (executable)
index 0000000..c72aecc
--- /dev/null
@@ -0,0 +1,62 @@
+/*\r
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)\r
+ * From ASN.1 module "X2AP-IEs"\r
+ *     found in "../../asn_defs/asn1/x2ap-modified-15-05.asn"\r
+ *     `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`\r
+ */\r
+\r
+#include "Port-Number.h"\r
+\r
+int\r
+Port_Number_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,\r
+                       asn_app_constraint_failed_f *ctfailcb, void *app_key) {\r
+       const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;\r
+       size_t size;\r
+       \r
+       if(!sptr) {\r
+               ASN__CTFAIL(app_key, td, sptr,\r
+                       "%s: value not given (%s:%d)",\r
+                       td->name, __FILE__, __LINE__);\r
+               return -1;\r
+       }\r
+       \r
+       size = st->size;\r
+       \r
+       if((size == 2)) {\r
+               /* Constraint check succeeded */\r
+               return 0;\r
+       } else {\r
+               ASN__CTFAIL(app_key, td, sptr,\r
+                       "%s: constraint failed (%s:%d)",\r
+                       td->name, __FILE__, __LINE__);\r
+               return -1;\r
+       }\r
+}\r
+\r
+/*\r
+ * This type is implemented using OCTET_STRING,\r
+ * so here we adjust the DEF accordingly.\r
+ */\r
+asn_per_constraints_t asn_PER_type_Port_Number_constr_1 CC_NOTUSED = {\r
+       { APC_UNCONSTRAINED,    -1, -1,  0,  0 },\r
+       { APC_CONSTRAINED,       0,  0,  2,  2 }        /* (SIZE(2..2)) */,\r
+       0, 0    /* No PER value map */\r
+};\r
+static const ber_tlv_tag_t asn_DEF_Port_Number_tags_1[] = {\r
+       (ASN_TAG_CLASS_UNIVERSAL | (4 << 2))\r
+};\r
+asn_TYPE_descriptor_t asn_DEF_Port_Number = {\r
+       "Port-Number",\r
+       "Port-Number",\r
+       &asn_OP_OCTET_STRING,\r
+       asn_DEF_Port_Number_tags_1,\r
+       sizeof(asn_DEF_Port_Number_tags_1)\r
+               /sizeof(asn_DEF_Port_Number_tags_1[0]), /* 1 */\r
+       asn_DEF_Port_Number_tags_1,     /* Same as above */\r
+       sizeof(asn_DEF_Port_Number_tags_1)\r
+               /sizeof(asn_DEF_Port_Number_tags_1[0]), /* 1 */\r
+       { 0, &asn_PER_type_Port_Number_constr_1, Port_Number_constraint },\r
+       0, 0,   /* No members */\r
+       &asn_SPC_OCTET_STRING_specs     /* Additional specs */\r
+};\r
+\r