aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-07-24 09:03:44 +0000
committerLev Walkin <vlm@lionet.info>2005-07-24 09:03:44 +0000
commit21b41ac140874eeef8f4282deb44572858a01e9a (patch)
tree9d4f071f0168e2c3adfc2067fc87f3859bfaf5a8 /skeletons
parent72a0f5a1faa1a5b613f1f979ebd1a89eb744afff (diff)
extern "C" used in skeletons
Diffstat (limited to 'skeletons')
-rw-r--r--skeletons/ANY.h8
-rw-r--r--skeletons/BIT_STRING.h8
-rw-r--r--skeletons/BMPString.h8
-rw-r--r--skeletons/BOOLEAN.h8
-rw-r--r--skeletons/ENUMERATED.h8
-rw-r--r--skeletons/GeneralString.h8
-rw-r--r--skeletons/GeneralizedTime.h8
-rw-r--r--skeletons/GraphicString.h8
-rw-r--r--skeletons/IA5String.h8
-rw-r--r--skeletons/INTEGER.h8
-rw-r--r--skeletons/ISO646String.h8
-rw-r--r--skeletons/NULL.h8
-rw-r--r--skeletons/NativeEnumerated.h8
-rw-r--r--skeletons/NativeInteger.h8
-rw-r--r--skeletons/NativeReal.h8
-rw-r--r--skeletons/NumericString.h8
-rw-r--r--skeletons/OBJECT_IDENTIFIER.h8
-rw-r--r--skeletons/OCTET_STRING.h8
-rw-r--r--skeletons/ObjectDescriptor.h8
-rw-r--r--skeletons/PrintableString.h8
-rw-r--r--skeletons/REAL.h8
-rw-r--r--skeletons/RELATIVE-OID.h8
-rw-r--r--skeletons/T61String.h8
-rw-r--r--skeletons/TeletexString.h8
-rw-r--r--skeletons/UTCTime.h8
-rw-r--r--skeletons/UTF8String.h8
-rw-r--r--skeletons/UniversalString.h8
-rw-r--r--skeletons/VideotexString.h8
-rw-r--r--skeletons/VisibleString.h8
-rw-r--r--skeletons/asn_SEQUENCE_OF.h8
-rw-r--r--skeletons/asn_SET_OF.h8
-rw-r--r--skeletons/asn_application.h8
-rw-r--r--skeletons/asn_codecs.h13
-rw-r--r--skeletons/asn_codecs_prim.h8
-rw-r--r--skeletons/ber_decoder.h8
-rw-r--r--skeletons/ber_tlv_length.h8
-rw-r--r--skeletons/ber_tlv_tag.h8
-rw-r--r--skeletons/constr_CHOICE.h8
-rw-r--r--skeletons/constr_SEQUENCE.h8
-rw-r--r--skeletons/constr_SEQUENCE_OF.h8
-rw-r--r--skeletons/constr_SET.h8
-rw-r--r--skeletons/constr_SET_OF.h8
-rw-r--r--skeletons/constr_TYPE.h8
-rw-r--r--skeletons/constraints.h8
-rw-r--r--skeletons/der_encoder.h8
-rw-r--r--skeletons/xer_decoder.h8
-rw-r--r--skeletons/xer_encoder.h8
-rw-r--r--skeletons/xer_support.h8
48 files changed, 388 insertions, 1 deletions
diff --git a/skeletons/ANY.h b/skeletons/ANY.h
index cabc411b..c9b17dbf 100644
--- a/skeletons/ANY.h
+++ b/skeletons/ANY.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h> /* Implemented via OCTET STRING type */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct ANY {
uint8_t *buf; /* BER-encoded ANY contents */
int size; /* Size of the above buffer */
@@ -36,4 +40,8 @@ int ANY_to_type(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
#define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size))
#define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf((buf), (size))
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ASN_TYPE_ANY_H */
diff --git a/skeletons/BIT_STRING.h b/skeletons/BIT_STRING.h
index 1601231f..732e878b 100644
--- a/skeletons/BIT_STRING.h
+++ b/skeletons/BIT_STRING.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h> /* Some help from OCTET STRING */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct BIT_STRING_s {
uint8_t *buf; /* BIT STRING body */
int size; /* Size of the above buffer */
@@ -22,4 +26,8 @@ asn_struct_print_f BIT_STRING_print; /* Human-readable output */
asn_constr_check_f BIT_STRING_constraint;
xer_type_encoder_f BIT_STRING_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _BIT_STRING_H_ */
diff --git a/skeletons/BMPString.h b/skeletons/BMPString.h
index cd515973..a4725fa4 100644
--- a/skeletons/BMPString.h
+++ b/skeletons/BMPString.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t BMPString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_BMPString;
@@ -15,4 +19,8 @@ asn_struct_print_f BMPString_print; /* Human-readable output */
xer_type_decoder_f BMPString_decode_xer;
xer_type_encoder_f BMPString_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _BMPString_H_ */
diff --git a/skeletons/BOOLEAN.h b/skeletons/BOOLEAN.h
index fd173d11..ec4dbac8 100644
--- a/skeletons/BOOLEAN.h
+++ b/skeletons/BOOLEAN.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* The underlying integer may contain various values, but everything
* non-zero is capped to 0xff by the DER encoder. The BER decoder may
@@ -23,4 +27,8 @@ der_type_encoder_f BOOLEAN_encode_der;
xer_type_decoder_f BOOLEAN_decode_xer;
xer_type_encoder_f BOOLEAN_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _BOOLEAN_H_ */
diff --git a/skeletons/ENUMERATED.h b/skeletons/ENUMERATED.h
index 45733cb2..53cc273e 100644
--- a/skeletons/ENUMERATED.h
+++ b/skeletons/ENUMERATED.h
@@ -7,8 +7,16 @@
#include <INTEGER.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */
extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ENUMERATED_H_ */
diff --git a/skeletons/GeneralString.h b/skeletons/GeneralString.h
index d284674a..70ef1ab1 100644
--- a/skeletons/GeneralString.h
+++ b/skeletons/GeneralString.h
@@ -7,8 +7,16 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t GeneralString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_GeneralString;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GeneralString_H_ */
diff --git a/skeletons/GeneralizedTime.h b/skeletons/GeneralizedTime.h
index 6b4c1ecc..1ea06b06 100644
--- a/skeletons/GeneralizedTime.h
+++ b/skeletons/GeneralizedTime.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime;
@@ -58,4 +62,8 @@ GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt,
GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt,
const struct tm *, int frac_value, int frac_digits, int force_gmt);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GeneralizedTime_H_ */
diff --git a/skeletons/GraphicString.h b/skeletons/GraphicString.h
index ac78f3eb..7bc9492c 100644
--- a/skeletons/GraphicString.h
+++ b/skeletons/GraphicString.h
@@ -7,8 +7,16 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t GraphicString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_GraphicString;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GraphicString_H_ */
diff --git a/skeletons/IA5String.h b/skeletons/IA5String.h
index c20bc6b3..e2a909dd 100644
--- a/skeletons/IA5String.h
+++ b/skeletons/IA5String.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */
/*
@@ -16,4 +20,8 @@ extern asn_TYPE_descriptor_t asn_DEF_IA5String;
asn_constr_check_f IA5String_constraint;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _IA5String_H_ */
diff --git a/skeletons/INTEGER.h b/skeletons/INTEGER.h
index 416efd9a..165c055f 100644
--- a/skeletons/INTEGER.h
+++ b/skeletons/INTEGER.h
@@ -8,6 +8,10 @@
#include <asn_application.h>
#include <asn_codecs_prim.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef ASN__PRIMITIVE_TYPE_t INTEGER_t;
extern asn_TYPE_descriptor_t asn_DEF_INTEGER;
@@ -52,4 +56,8 @@ int asn_long2INTEGER(INTEGER_t *i, long l);
*/
const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _INTEGER_H_ */
diff --git a/skeletons/ISO646String.h b/skeletons/ISO646String.h
index 5c3c73a5..b42dd0d0 100644
--- a/skeletons/ISO646String.h
+++ b/skeletons/ISO646String.h
@@ -8,8 +8,16 @@
#include <asn_application.h>
#include <VisibleString.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef VisibleString_t ISO646String_t; /* Implemented using VisibleString */
extern asn_TYPE_descriptor_t asn_DEF_ISO646String;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ISO646String_H_ */
diff --git a/skeletons/NULL.h b/skeletons/NULL.h
index bce436bd..28a3630e 100644
--- a/skeletons/NULL.h
+++ b/skeletons/NULL.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* The value of the NULL type is meaningless: see BOOLEAN if you want to
* carry true/false semantics.
@@ -20,4 +24,8 @@ der_type_encoder_f NULL_encode_der;
xer_type_decoder_f NULL_decode_xer;
xer_type_encoder_f NULL_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* NULL_H */
diff --git a/skeletons/NativeEnumerated.h b/skeletons/NativeEnumerated.h
index 16f1bfdd..7e2bb1b9 100644
--- a/skeletons/NativeEnumerated.h
+++ b/skeletons/NativeEnumerated.h
@@ -14,8 +14,16 @@
#include <NativeInteger.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated;
xer_type_encoder_f NativeEnumerated_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _NativeEnumerated_H_ */
diff --git a/skeletons/NativeInteger.h b/skeletons/NativeInteger.h
index b66d29ad..f38fd477 100644
--- a/skeletons/NativeInteger.h
+++ b/skeletons/NativeInteger.h
@@ -15,6 +15,10 @@
#include <asn_application.h>
#include <INTEGER.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern asn_TYPE_descriptor_t asn_DEF_NativeInteger;
asn_struct_free_f NativeInteger_free;
@@ -24,4 +28,8 @@ der_type_encoder_f NativeInteger_encode_der;
xer_type_decoder_f NativeInteger_decode_xer;
xer_type_encoder_f NativeInteger_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _NativeInteger_H_ */
diff --git a/skeletons/NativeReal.h b/skeletons/NativeReal.h
index 32dd7f61..1f5266cc 100644
--- a/skeletons/NativeReal.h
+++ b/skeletons/NativeReal.h
@@ -13,6 +13,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern asn_TYPE_descriptor_t asn_DEF_NativeReal;
asn_struct_free_f NativeReal_free;
@@ -22,4 +26,8 @@ der_type_encoder_f NativeReal_encode_der;
xer_type_decoder_f NativeReal_decode_xer;
xer_type_encoder_f NativeReal_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ASN_TYPE_NativeReal_H */
diff --git a/skeletons/NumericString.h b/skeletons/NumericString.h
index 5ace1dda..51e24e83 100644
--- a/skeletons/NumericString.h
+++ b/skeletons/NumericString.h
@@ -7,10 +7,18 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t NumericString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_NumericString;
asn_constr_check_f NumericString_constraint;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _NumericString_H_ */
diff --git a/skeletons/OBJECT_IDENTIFIER.h b/skeletons/OBJECT_IDENTIFIER.h
index c1c9e2cf..56a1f76a 100644
--- a/skeletons/OBJECT_IDENTIFIER.h
+++ b/skeletons/OBJECT_IDENTIFIER.h
@@ -9,6 +9,10 @@
#include <asn_application.h>
#include <asn_codecs_prim.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef ASN__PRIMITIVE_TYPE_t OBJECT_IDENTIFIER_t;
extern asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER;
@@ -128,4 +132,8 @@ int OBJECT_IDENTIFIER_get_single_arc(uint8_t *arcbuf, unsigned int arclen,
int OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf,
void *arcval, unsigned int arcval_size, int _prepared_order);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _OBJECT_IDENTIFIER_H_ */
diff --git a/skeletons/OCTET_STRING.h b/skeletons/OCTET_STRING.h
index a4d5e41f..94c19a0b 100644
--- a/skeletons/OCTET_STRING.h
+++ b/skeletons/OCTET_STRING.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct OCTET_STRING {
uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */
int size; /* Size of the buffer */
@@ -67,4 +71,8 @@ typedef struct asn_OCTET_STRING_specifics_s {
int subvariant; /* {0,1,2} for O-S, BIT STRING or ANY */
} asn_OCTET_STRING_specifics_t;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _OCTET_STRING_H_ */
diff --git a/skeletons/ObjectDescriptor.h b/skeletons/ObjectDescriptor.h
index 54a0000f..fa1753ec 100644
--- a/skeletons/ObjectDescriptor.h
+++ b/skeletons/ObjectDescriptor.h
@@ -7,8 +7,16 @@
#include <GraphicString.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef GraphicString_t ObjectDescriptor_t; /* Implemented via GraphicString */
extern asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ObjectDescriptor_H_ */
diff --git a/skeletons/PrintableString.h b/skeletons/PrintableString.h
index e4a230de..2ece440e 100644
--- a/skeletons/PrintableString.h
+++ b/skeletons/PrintableString.h
@@ -7,10 +7,18 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t PrintableString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_PrintableString;
asn_constr_check_f PrintableString_constraint;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _PrintableString_H_ */
diff --git a/skeletons/REAL.h b/skeletons/REAL.h
index 114b7e56..28ccf28d 100644
--- a/skeletons/REAL.h
+++ b/skeletons/REAL.h
@@ -8,6 +8,10 @@
#include <asn_application.h>
#include <asn_codecs_prim.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef ASN__PRIMITIVE_TYPE_t REAL_t;
extern asn_TYPE_descriptor_t asn_DEF_REAL;
@@ -31,4 +35,8 @@ ssize_t REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *a
int asn_REAL2double(const REAL_t *real_ptr, double *d);
int asn_double2REAL(REAL_t *real_ptr, double d);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ASN_TYPE_REAL_H */
diff --git a/skeletons/RELATIVE-OID.h b/skeletons/RELATIVE-OID.h
index 2b7f13d3..2235cfdd 100644
--- a/skeletons/RELATIVE-OID.h
+++ b/skeletons/RELATIVE-OID.h
@@ -7,6 +7,10 @@
#include <OBJECT_IDENTIFIER.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Implemented via OBJECT IDENTIFIER */
typedef OBJECT_IDENTIFIER_t RELATIVE_OID_t;
@@ -28,4 +32,8 @@ int RELATIVE_OID_get_arcs(RELATIVE_OID_t *_roid,
int RELATIVE_OID_set_arcs(RELATIVE_OID_t *_roid,
void *arcs, unsigned int arc_type_size, unsigned int arcs_slots);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RELATIVE_OID_H_ */
diff --git a/skeletons/T61String.h b/skeletons/T61String.h
index 46b12ceb..f706338d 100644
--- a/skeletons/T61String.h
+++ b/skeletons/T61String.h
@@ -7,8 +7,16 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t T61String_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_T61String;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _T61String_H_ */
diff --git a/skeletons/TeletexString.h b/skeletons/TeletexString.h
index a408d584..ffd0f52e 100644
--- a/skeletons/TeletexString.h
+++ b/skeletons/TeletexString.h
@@ -7,8 +7,16 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t TeletexString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_TeletexString;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _TeletexString_H_ */
diff --git a/skeletons/UTCTime.h b/skeletons/UTCTime.h
index 6d26807b..8035b345 100644
--- a/skeletons/UTCTime.h
+++ b/skeletons/UTCTime.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t UTCTime_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_UTCTime;
@@ -27,4 +31,8 @@ time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt);
/* See asn_time2GT() in GeneralizedTime.h */
UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _UTCTime_H_ */
diff --git a/skeletons/UTF8String.h b/skeletons/UTF8String.h
index 84e6eaff..3bc8ea69 100644
--- a/skeletons/UTF8String.h
+++ b/skeletons/UTF8String.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t UTF8String_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_UTF8String;
@@ -38,4 +42,8 @@ ssize_t UTF8String_length(const UTF8String_t *st);
*/
size_t UTF8String_to_wcs(const UTF8String_t *st, uint32_t *dst, size_t dstlen);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _UTF8String_H_ */
diff --git a/skeletons/UniversalString.h b/skeletons/UniversalString.h
index 3be8cabd..1476a6f1 100644
--- a/skeletons/UniversalString.h
+++ b/skeletons/UniversalString.h
@@ -7,6 +7,10 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t UniversalString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_UniversalString;
@@ -15,4 +19,8 @@ asn_struct_print_f UniversalString_print; /* Human-readable output */
xer_type_decoder_f UniversalString_decode_xer;
xer_type_encoder_f UniversalString_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _UniversalString_H_ */
diff --git a/skeletons/VideotexString.h b/skeletons/VideotexString.h
index 0a156e24..3b551c33 100644
--- a/skeletons/VideotexString.h
+++ b/skeletons/VideotexString.h
@@ -7,8 +7,16 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t VideotexString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_VideotexString;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _VideotexString_H_ */
diff --git a/skeletons/VisibleString.h b/skeletons/VisibleString.h
index ca05beaf..20ba8cc5 100644
--- a/skeletons/VisibleString.h
+++ b/skeletons/VisibleString.h
@@ -7,10 +7,18 @@
#include <OCTET_STRING.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_VisibleString;
asn_constr_check_f VisibleString_constraint;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _VisibleString_H_ */
diff --git a/skeletons/asn_SEQUENCE_OF.h b/skeletons/asn_SEQUENCE_OF.h
index 1109f238..e678f034 100644
--- a/skeletons/asn_SEQUENCE_OF.h
+++ b/skeletons/asn_SEQUENCE_OF.h
@@ -7,6 +7,10 @@
#include <asn_SET_OF.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* SEQUENCE OF is the same as SET OF with a tiny difference:
* the delete operation preserves the initial order of elements
@@ -41,4 +45,8 @@ typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_;
#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr))
#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr))
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ASN_SEQUENCE_OF_H */
diff --git a/skeletons/asn_SET_OF.h b/skeletons/asn_SET_OF.h
index 774549fc..7edf14b5 100644
--- a/skeletons/asn_SET_OF.h
+++ b/skeletons/asn_SET_OF.h
@@ -5,6 +5,10 @@
#ifndef ASN_SET_OF_H
#define ASN_SET_OF_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define A_SET_OF(type) \
struct { \
type **array; \
@@ -51,4 +55,8 @@ typedef A_SET_OF(void) asn_anonymous_set_;
#define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr))
#define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr))
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ASN_SET_OF_H */
diff --git a/skeletons/asn_application.h b/skeletons/asn_application.h
index 4987e5cd..d6393416 100644
--- a/skeletons/asn_application.h
+++ b/skeletons/asn_application.h
@@ -11,6 +11,10 @@
#include <asn_system.h> /* for platform-dependent types */
#include <asn_codecs.h> /* for ASN.1 codecs specifics */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Generic type of an application-defined callback to return various
* types of data to the application.
@@ -23,4 +27,8 @@ typedef int (asn_app_consume_bytes_f)(const void *buffer, size_t size,
#include <constr_TYPE.h> /* for asn_TYPE_descriptor_t */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ASN_APPLICATION_H_ */
diff --git a/skeletons/asn_codecs.h b/skeletons/asn_codecs.h
index b08ce653..9250adab 100644
--- a/skeletons/asn_codecs.h
+++ b/skeletons/asn_codecs.h
@@ -5,6 +5,10 @@
#ifndef _ASN_CODECS_H_
#define _ASN_CODECS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
@@ -51,7 +55,10 @@ typedef struct asn_enc_rval_s {
void *structure_ptr;
} asn_enc_rval_t;
#define _ASN_ENCODE_FAILED do { \
- asn_enc_rval_t tmp_error = { -1, td, sptr }; \
+ asn_enc_rval_t tmp_error; \
+ tmp_error.encoded = -1; \
+ tmp_error.failed_type = td; \
+ tmp_error.structure_ptr = sptr; \
return tmp_error; \
} while(0)
@@ -73,4 +80,8 @@ typedef struct asn_dec_rval_s {
size_t consumed; /* Number of bytes consumed */
} asn_dec_rval_t;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ASN_CODECS_H_ */
diff --git a/skeletons/asn_codecs_prim.h b/skeletons/asn_codecs_prim.h
index 67658f47..0f683fdd 100644
--- a/skeletons/asn_codecs_prim.h
+++ b/skeletons/asn_codecs_prim.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct ASN__PRIMITIVE_TYPE_s {
uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */
int size; /* Size of the buffer */
@@ -42,4 +46,8 @@ asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx,
xer_primitive_body_decoder_f *prim_body_decoder
);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ASN_CODECS_PRIM_H */
diff --git a/skeletons/ber_decoder.h b/skeletons/ber_decoder.h
index af8d8e38..fc259843 100644
--- a/skeletons/ber_decoder.h
+++ b/skeletons/ber_decoder.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
struct asn_codec_ctx_s; /* Forward declaration */
@@ -52,4 +56,8 @@ asn_dec_rval_t ber_check_tags(
int *opt_tlv_form /* optional tag form */
);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _BER_DECODER_H_ */
diff --git a/skeletons/ber_tlv_length.h b/skeletons/ber_tlv_length.h
index b7d6f747..d9127061 100644
--- a/skeletons/ber_tlv_length.h
+++ b/skeletons/ber_tlv_length.h
@@ -5,6 +5,10 @@
#ifndef _BER_TLV_LENGTH_H_
#define _BER_TLV_LENGTH_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef ssize_t ber_tlv_len_t;
/*
@@ -40,4 +44,8 @@ ssize_t ber_skip_length(
*/
size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _BER_TLV_LENGTH_H_ */
diff --git a/skeletons/ber_tlv_tag.h b/skeletons/ber_tlv_tag.h
index 51c9a081..60e86686 100644
--- a/skeletons/ber_tlv_tag.h
+++ b/skeletons/ber_tlv_tag.h
@@ -5,6 +5,10 @@
#ifndef _BER_TLV_TAG_H_
#define _BER_TLV_TAG_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum asn_tag_class {
ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */
ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */
@@ -49,4 +53,8 @@ ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r);
*/
size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _BER_TLV_TAG_H_ */
diff --git a/skeletons/constr_CHOICE.h b/skeletons/constr_CHOICE.h
index ea32467c..859c5329 100644
--- a/skeletons/constr_CHOICE.h
+++ b/skeletons/constr_CHOICE.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct asn_CHOICE_specifics_s {
/*
* Target structure description.
@@ -40,4 +44,8 @@ xer_type_decoder_f CHOICE_decode_xer;
xer_type_encoder_f CHOICE_encode_xer;
asn_outmost_tag_f CHOICE_outmost_tag;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONSTR_CHOICE_H_ */
diff --git a/skeletons/constr_SEQUENCE.h b/skeletons/constr_SEQUENCE.h
index e7bb4fee..ab8a8ec1 100644
--- a/skeletons/constr_SEQUENCE.h
+++ b/skeletons/constr_SEQUENCE.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct asn_SEQUENCE_specifics_s {
/*
* Target structure description.
@@ -39,4 +43,8 @@ der_type_encoder_f SEQUENCE_encode_der;
xer_type_decoder_f SEQUENCE_decode_xer;
xer_type_encoder_f SEQUENCE_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONSTR_SEQUENCE_H_ */
diff --git a/skeletons/constr_SEQUENCE_OF.h b/skeletons/constr_SEQUENCE_OF.h
index 684ec264..94b04cdc 100644
--- a/skeletons/constr_SEQUENCE_OF.h
+++ b/skeletons/constr_SEQUENCE_OF.h
@@ -8,6 +8,10 @@
#include <asn_application.h>
#include <constr_SET_OF.h> /* Implemented using SET OF */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* A set specialized functions dealing with the SEQUENCE OF type.
* Generally implemented using SET OF.
@@ -20,4 +24,8 @@
der_type_encoder_f SEQUENCE_OF_encode_der;
xer_type_encoder_f SEQUENCE_OF_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONSTR_SET_OF_H_ */
diff --git a/skeletons/constr_SET.h b/skeletons/constr_SET.h
index 7e8af974..3adfb336 100644
--- a/skeletons/constr_SET.h
+++ b/skeletons/constr_SET.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct asn_SET_specifics_s {
/*
@@ -71,4 +75,8 @@ xer_type_encoder_f SET_encode_xer;
|= (1 << ((8 * sizeof(unsigned int)) - 1 \
- ((PR_x) % (8 * sizeof(unsigned int))))))
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONSTR_SET_H_ */
diff --git a/skeletons/constr_SET_OF.h b/skeletons/constr_SET_OF.h
index 8d2fb500..410be26b 100644
--- a/skeletons/constr_SET_OF.h
+++ b/skeletons/constr_SET_OF.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct asn_SET_OF_specifics_s {
/*
* Target structure description.
@@ -29,4 +33,8 @@ der_type_encoder_f SET_OF_encode_der;
xer_type_decoder_f SET_OF_decode_xer;
xer_type_encoder_f SET_OF_encode_xer;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONSTR_SET_OF_H_ */
diff --git a/skeletons/constr_TYPE.h b/skeletons/constr_TYPE.h
index e36f2932..90b6578c 100644
--- a/skeletons/constr_TYPE.h
+++ b/skeletons/constr_TYPE.h
@@ -14,6 +14,10 @@
#include <ber_tlv_length.h>
#include <ber_tlv_tag.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
struct asn_TYPE_member_s; /* Forward declaration */
@@ -157,4 +161,8 @@ int asn_fprint(FILE *stream, /* Destination stream descriptor */
asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */
const void *struct_ptr); /* Structure to be printed */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONSTR_TYPE_H_ */
diff --git a/skeletons/constraints.h b/skeletons/constraints.h
index d8434e4e..51fad8ed 100644
--- a/skeletons/constraints.h
+++ b/skeletons/constraints.h
@@ -7,6 +7,10 @@
#include <asn_system.h> /* Platform-dependent types */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
@@ -51,4 +55,8 @@ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */
void _asn_i_log_error(asn_app_consume_bytes_f *, void *key,
const char *fmt, ...) __attribute__ ((format(printf, 3, 4)));
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ASN1_CONSTRAINTS_VALIDATOR_H_ */
diff --git a/skeletons/der_encoder.h b/skeletons/der_encoder.h
index cb784d19..9e7867da 100644
--- a/skeletons/der_encoder.h
+++ b/skeletons/der_encoder.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
@@ -56,4 +60,8 @@ ssize_t der_write_tags(
void *app_key
);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _DER_ENCODER_H_ */
diff --git a/skeletons/xer_decoder.h b/skeletons/xer_decoder.h
index e372bbd6..349f349e 100644
--- a/skeletons/xer_decoder.h
+++ b/skeletons/xer_decoder.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
@@ -95,4 +99,8 @@ int xer_is_whitespace(const void *chunk_buf, size_t chunk_size);
*/
int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _XER_DECODER_H_ */
diff --git a/skeletons/xer_encoder.h b/skeletons/xer_encoder.h
index 5f9bbf2c..96d87b8a 100644
--- a/skeletons/xer_encoder.h
+++ b/skeletons/xer_encoder.h
@@ -7,6 +7,10 @@
#include <asn_application.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct asn_TYPE_descriptor_s; /* Forward declaration */
/* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */
@@ -48,4 +52,8 @@ typedef asn_enc_rval_t (xer_type_encoder_f)(
void *app_key /* Arbitrary callback argument */
);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _XER_ENCODER_H_ */
diff --git a/skeletons/xer_support.h b/skeletons/xer_support.h
index e25678c0..8b01944a 100644
--- a/skeletons/xer_support.h
+++ b/skeletons/xer_support.h
@@ -8,6 +8,10 @@
#include <asn_system.h> /* Platform-specific types */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Types of data transferred to the application.
*/
@@ -44,4 +48,8 @@ typedef int (pxml_callback_f)(pxml_chunk_type_e _type,
ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size,
pxml_callback_f *cb, void *_key);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _XER_SUPPORT_H_ */