RELATIVE-OID.h 1.67 KB
Newer Older
Lev Walkin's avatar
Lev Walkin committed
1 2 3 4 5 6 7 8 9
/*-
 * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
 * Redistribution and modifications are permitted subject to BSD license.
 */
#ifndef	_RELATIVE_OID_H_
#define	_RELATIVE_OID_H_

#include <OBJECT_IDENTIFIER.h>

Lev Walkin's avatar
Lev Walkin committed
10 11 12 13
#ifdef __cplusplus
extern "C" {
#endif

Lev Walkin's avatar
Lev Walkin committed
14
/* Implemented via OBJECT IDENTIFIER */
Lev Walkin's avatar
Lev Walkin committed
15 16
typedef OBJECT_IDENTIFIER_t RELATIVE_OID_t;

Lev Walkin's avatar
Lev Walkin committed
17
extern asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID;
18
extern asn_TYPE_operation_t asn_OP_RELATIVE_OID;
Lev Walkin's avatar
Lev Walkin committed
19 20

asn_struct_print_f RELATIVE_OID_print;
21
xer_type_decoder_f RELATIVE_OID_decode_xer;
Lev Walkin's avatar
Lev Walkin committed
22
xer_type_encoder_f RELATIVE_OID_encode_xer;
23
asn_random_fill_f  RELATIVE_OID_random_fill;
Lev Walkin's avatar
Lev Walkin committed
24

25
#define RELATIVE_OID_free         ASN__PRIMITIVE_TYPE_free
Bi-Ruei, Chiu's avatar
Bi-Ruei, Chiu committed
26
#define RELATIVE_OID_compare      OCTET_STRING_compare
27 28 29
#define RELATIVE_OID_constraint   asn_generic_no_constraint
#define RELATIVE_OID_decode_ber   ber_decode_primitive
#define RELATIVE_OID_encode_der   der_encode_primitive
30 31
#define RELATIVE_OID_decode_oer   oer_decode_primitive
#define RELATIVE_OID_encode_oer   oer_encode_primitive
32 33 34
#define RELATIVE_OID_decode_uper  OCTET_STRING_decode_uper
#define RELATIVE_OID_encode_uper  OCTET_STRING_encode_uper

Lev Walkin's avatar
Lev Walkin committed
35 36 37 38
/**********************************
 * Some handy conversion routines *
 **********************************/

39
/* See OBJECT_IDENTIFIER_get_arcs() function in OBJECT_IDENTIFIER.h */
40
int RELATIVE_OID_get_arcs(const RELATIVE_OID_t *_roid,
41
	void *arcs, unsigned int arc_type_size, unsigned int arc_slots);
Lev Walkin's avatar
Lev Walkin committed
42

43 44 45 46
/* See OBJECT_IDENTIFIER_set_arcs() function in OBJECT_IDENTIFIER.h */
int RELATIVE_OID_set_arcs(RELATIVE_OID_t *_roid,
	void *arcs, unsigned int arc_type_size, unsigned int arcs_slots);

Lev Walkin's avatar
Lev Walkin committed
47 48 49 50
#ifdef __cplusplus
}
#endif

Lev Walkin's avatar
Lev Walkin committed
51
#endif	/* _RELATIVE_OID_H_ */