blob: 0f10e1013b364841be3f81a56270d974e0db1eb7 [file] [log] [blame]
vlm7e66aa82004-09-02 12:11:47 +00001/*-
2 * Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
4 */
5#ifndef ASN_TYPE_ANY_H
6#define ASN_TYPE_ANY_H
7
8#include <constr_TYPE.h>
9#include <OCTET_STRING.h> /* Implemented via OCTET SRING type */
10
11typedef struct ANY {
12 uint8_t *buf; /* BER-encoded ANY contents */
13 int size; /* Size of the above buffer */
14
15 ber_dec_ctx_t _ber_dec_ctx; /* Parsing across buffer boundaries */
16} ANY_t;
17
18extern asn1_TYPE_descriptor_t asn1_DEF_ANY;
19
20ber_type_decoder_f ANY_decode_ber;
21der_type_encoder_f ANY_encode_der;
22asn_struct_print_f ANY_print;
23asn_struct_free_f ANY_free;
24
25/******************************
26 * Handy conversion routines. *
27 ******************************/
28
29#define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size))
30#define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf((buf), (size))
31
32#endif /* ASN_TYPE_ANY_H */