struct asn_value
Overview
ASN.1 Value internal presentation More…
#include <asn_impl.h> struct asn_value { // fields const asn_type* asn_type; asn_tag_t tag; asn_syntax syntax; char* name; size_t len; int integer; asn_value** array; void* other; union asn_value::@6 data; int mark; int txt_len; int c_indent; int c_lines; char* path; };
Detailed Documentation
ASN.1 Value internal presentation
Fields
const asn_type* asn_type
ASN.1 type of value.
asn_tag_t tag
ASN.1 tag of value.
asn_syntax syntax
ASN.1 syntax of value.
char* name
Name of value itself or field label, may be NULL or empty string.
size_t len
length of value. semantic is depended on syntax:
primitive syntax:
INTEGER zero for usual native ‘int’ or number of bits used.
LONG_INT, CHAR_STRING, OCT_STRING, REAL number of used octets;
OBJECT IDENTIFIER number of sub-ids, which sub-id has usual for current architecture size of ‘int’;
BIT_STRING number of bits;
compound syntax: number of sub-values, This field should be one or zero (for non-complete values) for CHOICE and TAGGED syntaxes.
int integer
for INTEGER-based syntaxes
asn_value** array
for COMPOUND syntaxes
void* other
Other syntaxes: octet and character strings, long ints, etc. Pointer is casted explicitly in internal sources.
unnamed-union data
Syntax-specific data
int txt_len
Length of textual presentation of value, may be unknown, this is denoted by -1. Zero value means incomplete value.
char* path
Path to this value from root of some container. It is valid ONLY inside asn_walk_depth function. Root container is a container which was passed to asn_walk_depth. Use asn_get_value_path from walk_func to obtain this path