56 "%s: invalid padding byte (%s:%d)",
57 td->
name, __FILE__, __LINE__);
62 "%s: value not given (%s:%d)",
63 td->
name, __FILE__, __LINE__);
71 "0000",
"0001",
"0010",
"0011",
"0100",
"0101",
"0110",
"0111",
72 "1000",
"1001",
"1010",
"1011",
"1100",
"1101",
"1110",
"1111" 82 char *scend = scratch + (
sizeof(scratch) - 10);
94 end = buf + st->
size - 1;
99 for(; buf < end; buf++) {
101 int nline = xcan?0:(((buf - st->
buf) % 8) == 0);
102 if(p >= scend || nline) {
113 if(!xcan && ((buf - st->
buf) % 8) == 0)
123 for(i = 7; i >= ubits; i--)
124 *p++ = (v & (1 << i)) ? 0x31 : 0x30;
143 static const char *h2c =
"0123456789ABCDEF";
153 return (cb(
"<absent>", 8, app_key) < 0) ? -1 : 0;
157 end = buf + st->
size;
162 for(; buf < end; buf++) {
163 if((buf - st->
buf) % 16 == 0 && (st->
size > 16)
167 if(cb(scratch, p - scratch, app_key) < 0)
return -1;
170 *p++ = h2c[*buf >> 4];
171 *p++ = h2c[*buf & 0x0F];
178 if((st->
size > 16)) {
183 if(cb(scratch, p - scratch, app_key) < 0)
#define _i_ASN_TEXT_INDENT(nl, level)
asn_enc_rval_t BIT_STRING_encode_xer(asn_TYPE_descriptor_t *td, void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key)
asn_TYPE_descriptor_t asn_DEF_BIT_STRING
int BIT_STRING_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key)
per_type_decoder_f OCTET_STRING_decode_uper
per_type_encoder_f OCTET_STRING_encode_uper
#define _ASN_CALLBACK(buf, size)
#define _ASN_ENCODED_OK(rval)
xer_type_decoder_f OCTET_STRING_decode_xer_binary
#define _ASN_ENCODE_FAILED
static char * _bit_pattern[16]
asn_struct_free_f OCTET_STRING_free
int() asn_app_consume_bytes_f(const void *buffer, size_t size, void *application_specific_key)
static asn_OCTET_STRING_specifics_t asn_DEF_BIT_STRING_specs
void() asn_app_constraint_failed_f(void *application_specific_key, struct asn_TYPE_descriptor_s *type_descriptor_which_failed, const void *structure_which_failed_ptr, const char *error_message_format,...) GCC_PRINTFLIKE(4
ber_type_decoder_f OCTET_STRING_decode_ber
static ber_tlv_tag_t asn_DEF_BIT_STRING_tags[]
int BIT_STRING_constraint(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
struct BIT_STRING_s BIT_STRING_t
der_type_encoder_f OCTET_STRING_encode_der