Resources
The ASN.1 EXTERNAL type was originally meant to be used for types that were defined externally. The intent was to use EXTERNAL to represent all data exchanged via the OSI Presentation Layer.
The OSI presentation layer protocol defines mechanisms for negotiating pairs of abstract and transfer syntaxes to be used for communication. Each pair is called a presentation context. The protocol assigns a unique integer value to each active presentation context called the presentation context identifier (PCI). Data encoded using the EXTERNAL type may contain a PCI value (the presentation-context-id in the definition) identifying which presentation context this data belongs to. The context-negotiation is used mainly during the connection establishment phase to indicate the transfer syntax, and syntax is used to identify the abstract syntax that defines the type of the value in data-value. Once the connection has been fully established, the presentation-context-id is then used in values of the EXTERNAL type. In practice, the data-value-descriptor is rarely used. This definition of EXTERNAL is that of an "associated SEQUENCE type", and in BER and PER does not reflect how the values are actually encoded.
The EMBEDDED PDV type was introduced in 1994 to replace the EXTERNAL type.
EXTERNAL ::= SEQUENCE { identification CHOICE { syntaxes SEQUENCE { abstract OBJECT IDENTIFIER, transfer OBJECT IDENTIFIER }, syntax OBJECT IDENTIFIER, presentation-context-id INTEGER, --OSI only context-negotiation SEQUENCE { presentation-context-id INTEGER, transfer-syntax OBJECT IDENTIFIER }, transfer-syntax OBJECT IDENTIFIER, fixed NULL }, data-value-descriptor ObjectDescriptor OPTIONAL, data-value OCTET STRING}
The EXTERNAL type can be constrained by a single value and by constraints on its components (inner subtyping).