| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef _OCTET_STRING_H_ |
| 6 |
#define _OCTET_STRING_H_ |
| 7 |
|
| 8 |
#include <asn_application.h> |
| 9 |
|
| 10 |
#ifdef __cplusplus |
| 11 |
extern "C" { |
| 12 |
#endif |
| 13 |
|
| 14 |
typedef struct OCTET_STRING { |
| 15 |
uint8_t *buf; |
| 16 |
int size; |
| 17 |
|
| 18 |
asn_struct_ctx_t _asn_ctx; |
| 19 |
} OCTET_STRING_t; |
| 20 |
|
| 21 |
extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; |
| 22 |
|
| 23 |
asn_struct_free_f OCTET_STRING_free; |
| 24 |
asn_struct_print_f OCTET_STRING_print; |
| 25 |
asn_struct_print_f OCTET_STRING_print_utf8; |
| 26 |
ber_type_decoder_f OCTET_STRING_decode_ber; |
| 27 |
der_type_encoder_f OCTET_STRING_encode_der; |
| 28 |
xer_type_decoder_f OCTET_STRING_decode_xer_hex; |
| 29 |
xer_type_decoder_f OCTET_STRING_decode_xer_binary; |
| 30 |
xer_type_decoder_f OCTET_STRING_decode_xer_utf8; |
| 31 |
xer_type_encoder_f OCTET_STRING_encode_xer; |
| 32 |
xer_type_encoder_f OCTET_STRING_encode_xer_utf8; |
| 33 |
per_type_decoder_f OCTET_STRING_decode_uper; |
| 34 |
per_type_encoder_f OCTET_STRING_encode_uper; |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); |
| 50 |
|
| 51 |
|
| 52 |
#define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1) |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
OCTET_STRING_t *OCTET_STRING_new_fromBuf(asn_TYPE_descriptor_t *td, |
| 60 |
const char *str, int size); |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
typedef struct asn_OCTET_STRING_specifics_s { |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
int struct_size; |
| 71 |
int ctx_offset; |
| 72 |
|
| 73 |
enum asn_OS_Subvariant { |
| 74 |
ASN_OSUBV_ANY, |
| 75 |
ASN_OSUBV_BIT, |
| 76 |
ASN_OSUBV_STR, |
| 77 |
ASN_OSUBV_U16, |
| 78 |
ASN_OSUBV_U32 |
| 79 |
} subvariant; |
| 80 |
} asn_OCTET_STRING_specifics_t; |
| 81 |
|
| 82 |
#ifdef __cplusplus |
| 83 |
} |
| 84 |
#endif |
| 85 |
|
| 86 |
#endif |