Lev Walkin | a737f3b | 2004-09-02 12:11:47 +0000 | [diff] [blame] | 1 | /*- |
| 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 | |
| 11 | typedef 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 | |
| 18 | extern asn1_TYPE_descriptor_t asn1_DEF_ANY; |
| 19 | |
| 20 | ber_type_decoder_f ANY_decode_ber; |
| 21 | der_type_encoder_f ANY_encode_der; |
| 22 | asn_struct_print_f ANY_print; |
| 23 | asn_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 */ |