initial checkin of osmo-remsim

This adds some initial code, particularly the ASN.1 definition of the
RSPRO protocol, related makefile to build it using ffasn1c, and our
usual autoconf infrastructure to build it.

Change-Id: Ibaa993b59e9a65a0242b0f42b27d9cd29f8e1878
diff --git a/src/rspro/ComponentIdentity.c b/src/rspro/ComponentIdentity.c
new file mode 100644
index 0000000..0703952
--- /dev/null
+++ b/src/rspro/ComponentIdentity.c
@@ -0,0 +1,139 @@
+/*
+ * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
+ * From ASN.1 module "RSPRO"
+ * 	found in "../../asn1/RSPRO.asn"
+ */
+
+#include <osmocom/rspro/ComponentIdentity.h>
+
+static asn_TYPE_member_t asn_MBR_ComponentIdentity_1[] = {
+	{ ATF_NOFLAGS, 0, offsetof(struct ComponentIdentity, type),
+		(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
+		0,
+		&asn_DEF_ComponentType,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"type"
+		},
+	{ ATF_NOFLAGS, 0, offsetof(struct ComponentIdentity, name),
+		(ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
+		0,
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"name"
+		},
+	{ ATF_NOFLAGS, 0, offsetof(struct ComponentIdentity, software),
+		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"software"
+		},
+	{ ATF_NOFLAGS, 0, offsetof(struct ComponentIdentity, swVersion),
+		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"swVersion"
+		},
+	{ ATF_POINTER, 5, offsetof(struct ComponentIdentity, hwManufacturer),
+		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"hwManufacturer"
+		},
+	{ ATF_POINTER, 4, offsetof(struct ComponentIdentity, hwModel),
+		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"hwModel"
+		},
+	{ ATF_POINTER, 3, offsetof(struct ComponentIdentity, hwSerialNr),
+		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"hwSerialNr"
+		},
+	{ ATF_POINTER, 2, offsetof(struct ComponentIdentity, hwVersion),
+		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"hwVersion"
+		},
+	{ ATF_POINTER, 1, offsetof(struct ComponentIdentity, fwVersion),
+		(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_ComponentName,
+		0,	/* Defer constraints checking to the member type */
+		0,	/* PER is not compiled, use -gen-PER */
+		0,
+		"fwVersion"
+		},
+};
+static const ber_tlv_tag_t asn_DEF_ComponentIdentity_tags_1[] = {
+	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static const asn_TYPE_tag2member_t asn_MAP_ComponentIdentity_tag2el_1[] = {
+    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* type */
+    { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 }, /* name */
+    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* software */
+    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* swVersion */
+    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 }, /* hwManufacturer */
+    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 5, 0, 0 }, /* hwModel */
+    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 6, 0, 0 }, /* hwSerialNr */
+    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 7, 0, 0 }, /* hwVersion */
+    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 8, 0, 0 } /* fwVersion */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_ComponentIdentity_specs_1 = {
+	sizeof(struct ComponentIdentity),
+	offsetof(struct ComponentIdentity, _asn_ctx),
+	asn_MAP_ComponentIdentity_tag2el_1,
+	9,	/* Count of tags in the map */
+	0, 0, 0,	/* Optional elements (not needed) */
+	8,	/* Start extensions */
+	10	/* Stop extensions */
+};
+asn_TYPE_descriptor_t asn_DEF_ComponentIdentity = {
+	"ComponentIdentity",
+	"ComponentIdentity",
+	SEQUENCE_free,
+	SEQUENCE_print,
+	SEQUENCE_constraint,
+	SEQUENCE_decode_ber,
+	SEQUENCE_encode_der,
+	SEQUENCE_decode_xer,
+	SEQUENCE_encode_xer,
+	0, 0,	/* No UPER support, use "-gen-PER" to enable */
+	0, 0,	/* No APER support, use "-gen-PER" to enable */
+	0,	/* Use generic outmost tag fetcher */
+	asn_DEF_ComponentIdentity_tags_1,
+	sizeof(asn_DEF_ComponentIdentity_tags_1)
+		/sizeof(asn_DEF_ComponentIdentity_tags_1[0]), /* 1 */
+	asn_DEF_ComponentIdentity_tags_1,	/* Same as above */
+	sizeof(asn_DEF_ComponentIdentity_tags_1)
+		/sizeof(asn_DEF_ComponentIdentity_tags_1[0]), /* 1 */
+	0,	/* No PER visible constraints */
+	asn_MBR_ComponentIdentity_1,
+	9,	/* Elements count */
+	&asn_SPC_ComponentIdentity_specs_1	/* Additional specs */
+};
+