The ASN.1 EXTERNAL type is a useful type used to include non-ASN.1 or other data within an ASN.1 encoded message. This type is described using the following ASN.1 SEQUENCE:
EXTERNAL ::= [UNIVERSAL 8] IMPLICIT SEQUENCE { direct-reference OBJECT IDENTIFIER OPTIONAL, indirect-reference INTEGER OPTIONAL, data-value-descriptor ObjectDescriptor OPTIONAL, encoding CHOICE { single-ASN1-type [0] ABSTRACT-SYNTAX.&Type, octet-aligned [1] IMPLICIT OCTET STRING, arbitrary [2] IMPLICIT BIT STRING } }
The ASN1C compiler is used to create a meta-definition for this structure. This code
will always be generated in the Asn1External.h
and
Asn1External.c/cpp
files. The code will only be generated if the given
ASN.1 source specification requires this definition. The resulting C structure is
populated just like any other compiler-generated structure for working with ASN.1 data.
NOTE: It is recommended that if a specification contains multiple ASN.1 source files that reference EXTERNAL, all of these source files be compiled with a single ASN1C call in order to ensure that only a single copy of the Asn1External source files are generated.