summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-06-13 12:48:27 +0200
committerHarald Welte <laforge@gnumonks.org>2010-06-13 12:48:27 +0200
commit116b1023bcbac298b67c8fef79d474bcc41d1f50 (patch)
treea956526f4d9d0706c7ed5dd95e58d0edc006755b
parente00fd6cff805d6aab67d3702c1630b6d05778943 (diff)
Fix asn1c output in order to build at all
The asn1 definition for TCAP contains some bits that asn1c is unable to compile as-is. We manually fix this up here.
-rw-r--r--include/AARE-apdu.h2
-rw-r--r--include/AARQ-apdu.h7
-rw-r--r--include/AUDT-apdu.h5
-rw-r--r--include/EXTERNAL.h11
-rw-r--r--include/Makefile.am3
-rw-r--r--src/AARE-apdu.c4
-rw-r--r--src/AARQ-apdu.c4
7 files changed, 19 insertions, 17 deletions
diff --git a/include/AARE-apdu.h b/include/AARE-apdu.h
index 242a584..3f9eb34 100644
--- a/include/AARE-apdu.h
+++ b/include/AARE-apdu.h
@@ -35,7 +35,7 @@ typedef struct AARE_apdu {
OBJECT_IDENTIFIER_t application_context_name;
Associate_result_t result;
Associate_source_diagnostic_t result_source_diagnostic;
- struct user_information {
+ struct AARE_user_information {
A_SEQUENCE_OF(EXTERNAL_t) list;
/* Context for parsing across buffer boundaries */
diff --git a/include/AARQ-apdu.h b/include/AARQ-apdu.h
index 4edea7c..999bc66 100644
--- a/include/AARQ-apdu.h
+++ b/include/AARQ-apdu.h
@@ -22,16 +22,11 @@
extern "C" {
#endif
-/* Dependencies */
-typedef enum protocol_version {
- protocol_version_version1 = 0
-} e_protocol_version;
-
/* AARQ-apdu */
typedef struct AARQ_apdu {
BIT_STRING_t *protocol_version /* DEFAULT {version1} */;
OBJECT_IDENTIFIER_t application_context_name;
- struct user_information {
+ struct AARQ_user_information {
A_SEQUENCE_OF(EXTERNAL_t) list;
/* Context for parsing across buffer boundaries */
diff --git a/include/AUDT-apdu.h b/include/AUDT-apdu.h
index 5da32a0..4bf29f2 100644
--- a/include/AUDT-apdu.h
+++ b/include/AUDT-apdu.h
@@ -22,11 +22,6 @@
extern "C" {
#endif
-/* Dependencies */
-typedef enum protocol_version {
- protocol_version_version1 = 0
-} e_protocol_version;
-
/* AUDT-apdu */
typedef struct AUDT_apdu {
BIT_STRING_t *protocol_version /* DEFAULT {version1} */;
diff --git a/include/EXTERNAL.h b/include/EXTERNAL.h
new file mode 100644
index 0000000..d99af62
--- /dev/null
+++ b/include/EXTERNAL.h
@@ -0,0 +1,11 @@
+#ifndef _TCAP_EXTERNAL_h
+#define _TCAP_EXTERNAL_h
+
+/* This file is added manually to make asn1c output build at all */
+
+#include <ANY.h>
+
+typedef ANY_t EXTERNAL_t;
+#define asn_DEF_EXTERNAL asn_DEF_ANY
+
+#endif /* _TCAP_EXTERNAL_h */
diff --git a/include/Makefile.am b/include/Makefile.am
index 8490c7b..278abf5 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -40,7 +40,8 @@ osmo_asn1_tcap_HEADERS = \
ReturnErrorProblem.h \
ErrorCode.h \
UniDialoguePDU.h \
- AUDT-apdu.h
+ AUDT-apdu.h \
+ EXTERNAL.h # added manually
osmo_asn1_tcapdir = $(includedir)/osmocom/tcap
diff --git a/src/AARE-apdu.c b/src/AARE-apdu.c
index 2f41c3a..c560c0e 100644
--- a/src/AARE-apdu.c
+++ b/src/AARE-apdu.c
@@ -24,8 +24,8 @@ static ber_tlv_tag_t asn_DEF_user_information_tags_7[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_user_information_specs_7 = {
- sizeof(struct user_information),
- offsetof(struct user_information, _asn_ctx),
+ sizeof(struct AARE_user_information),
+ offsetof(struct AARE_user_information, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
diff --git a/src/AARQ-apdu.c b/src/AARQ-apdu.c
index bb2f908..f8de6f4 100644
--- a/src/AARQ-apdu.c
+++ b/src/AARQ-apdu.c
@@ -24,8 +24,8 @@ static ber_tlv_tag_t asn_DEF_user_information_tags_5[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_user_information_specs_5 = {
- sizeof(struct user_information),
- offsetof(struct user_information, _asn_ctx),
+ sizeof(struct AARQ_user_information),
+ offsetof(struct AARQ_user_information, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */