2
* Object Identifier definition.
4
#ifndef ASN1_PARSER_OID_H
5
#define ASN1_PARSER_OID_H
7
/********************************
8
* Single Object Identifier Arc *
9
********************************/
12
* Object identifier arc (one number in the hierarchy).
14
typedef struct asn1p_oid_arc_s {
15
asn1c_integer_t number; /* -1 if not yet defined */
16
char *name; /* 0 if not defined */
23
asn1p_oid_arc_t *asn1p_oid_arc_new(
24
const char *optName, asn1c_integer_t optNumber /* = -1 */);
28
void asn1p_oid_arc_free(asn1p_oid_arc_t *);
31
/**************************************************
32
* Object Identifier itself, a collection of arcs *
33
**************************************************/
36
* Object Identifier as a collection of arcs.
38
typedef struct asn1p_oid_s {
39
asn1p_oid_arc_t *arcs;
46
asn1p_oid_t *asn1p_oid_new(void);
49
* Add another arc using given one as a template
51
int asn1p_oid_add_arc(asn1p_oid_t *, asn1p_oid_arc_t *template);
56
void asn1p_oid_free(asn1p_oid_t *);
60
* 0: The specified OIDs are equal.
63
int asn1p_oid_compare(asn1p_oid_t *a, asn1p_oid_t *b);
66
#endif /* ASN1_PARSER_OID_H */