enum asn_syntax

Overview

Enumerated type with ASN.1 syntax codes. More…

#include <asn_usr.h>

enum asn_syntax {
    SYNTAX_UNDEFINED  = 0,
    BOOL              = 1,
    INTEGER,
    PR_ASN_NULL,
    ENUMERATED,
    UINTEGER,
    PRIMITIVE_VAR_LEN = 0x10,
    LONG_INT          = PRIMITIVE_VAR_LEN | 1,
    BIT_STRING        = PRIMITIVE_VAR_LEN | 2,
    OCT_STRING        = PRIMITIVE_VAR_LEN | 3,
    CHAR_STRING       = PRIMITIVE_VAR_LEN | 4,
    REAL              = PRIMITIVE_VAR_LEN | 5,
    OID               = PRIMITIVE_VAR_LEN | 6,
    COMPOUND          = 0x20,
    TAGGED            = COMPOUND,
    CHOICE            = COMPOUND | ASN_SYN_NAMED,
    SET_OF            = COMPOUND    | ASN_SYN_ARRAY,
    SET               = SET_OF      | ASN_SYN_NAMED,
    SEQUENCE_OF       = SET_OF      | ASN_SYN_ORDER,
    SEQUENCE          = SEQUENCE_OF | ASN_SYN_NAMED,
};

Detailed Documentation

Enumerated type with ASN.1 syntax codes. All syntax codes are divided into the following groups:

  • primitive syntaxes, internal presentation of which does not require memory allocation.

  • primitive syntaxes, internal presentation of which requires memory allocation, because number of octets occupied depends on the value.

  • constructive syntaxes. Codes of types, which specification contain array of namedValues (with types), have lower bit zero.

Enum Values

SYNTAX_UNDEFINED

Undefined syntax, used as error mark.

BOOL

Boolean syntax

INTEGER

Integer syntax

PR_ASN_NULL

ASN_NULL syntax

ENUMERATED

Enum syntax

UINTEGER

Unsigned integer syntax (not a ASN.1 native type)

PRIMITIVE_VAR_LEN

value to be bit-anded with tag to determine primitive syntax with variable length

LONG_INT

This syntax differs from long int in C! length of its data in octets is specified by asn_type field ‘size’.

BIT_STRING

ASN.1 BIT STRING type

OCT_STRING

ASN.1 OCTET STRING type

CHAR_STRING

ASN.1 GeneralString type

REAL

ASN.1 REAL type

OID

ASN.1 OBJECT IDENTIFIER type

COMPOUND

flag of COMPOUND syntax