NAME

asn1_oid asn1_oid_decl asn1_oid_put asn1_oid_xput asn1_oid_get asn1_oid_copy asn1_oid_free asn1_oid_int asn1_int_oid

SYNOPSIS


#include "asn1.h"

asn1_oid_decl(s,oid)
char * s;
asn1_oid oid;

char * asn1_oid_put(s,oid)
char * s;
asn1_oid oid;

char * asn1_oid_xput(s,oid,mode)
char * s;
asn1_oid oid;
int mode;

asn1_oid asn1_oid_get(s,er)
char * s;
int * er;

asn1_oid asn1_oid_copy(oid)
asn1_oid oid;

int asn1_oid_free(v,l)
asn1 v;
int l;

int asn1_oid_int(l,v,x)
int l;
unsigned long *x;
asn1 v;

asn1 asn1_int_oid(v,x,l)
int l;
unsigned long *x;
asn1 v;

DESCRIPTION

The abstract syntax of an object identifier is a sequence of integers, each of which identifying a branch in the object identification tree, e.g.:

Is represented by the sequence of arcs But, in fact, that syntax is only used when the element is built, in order to guarantee its unicity. ASN.1 specifies that it should be transmitted as an octet string, encoding the value of the successive integers in a compact form, e.g.: The object identifiers are handled by MAVROS as short octet strings. An object oid of type asn1_oid will contain a pointer to an octet area, oid.v, and the length of that octet string, oid.l. The octet string contains in fact the compact form used by ASN.1, which is easy to use for comparisons and sort operations.

A set of routine is provided for handling the conversion between this representation and the textual format:

The following routines convert the internal representation from a compact octet string to a table of integers and vice versa:

Neither of these routines performs memory allocation. asn1_oid_int will use at most l long integers; asn1_int_oid at most 5 times l bytes.

"SEE ALSO"

mavcod (9x),
mavros (9x),
mavros-output (9x),
asn1_time(9x),
asn1_malloc(9x)
C. Huitema, "General Presentation of the MAVROS Compiler" ,INRIA, 1990