Go to the documentation of this file.
11 #if !defined(ASN_DISABLE_PRINT_SUPPORT)
18 #if !defined(ASN_DISABLE_BER_SUPPORT)
25 #if !defined(ASN_DISABLE_XER_SUPPORT)
32 #if !defined(ASN_DISABLE_JER_SUPPORT)
39 #if !defined(ASN_DISABLE_OER_SUPPORT)
46 #if !defined(ASN_DISABLE_UPER_SUPPORT)
53 #if !defined(ASN_DISABLE_APER_SUPPORT)
60 #if !defined(ASN_DISABLE_RFILL_SUPPORT)
69 static int _el_addbytes(
const void *buffer,
size_t size,
void *el_buf_ptr) {
78 }
while(el_buf->
length + size > new_size);
89 memcpy(el_buf->
buf + el_buf->
length, buffer, size);
115 ret = memcmp(a->
buf, b->
buf, common_len);
134 for(i = 0; i < count; i++) {
143 const asn_anonymous_set_ *list,
150 if(encoded_els == NULL) {
157 for(edx = 0; edx < list->count; edx++) {
158 const void *memb_ptr = list->array[edx];
159 struct _el_buffer *encoding_el = &encoded_els[edx];
168 #if !defined(ASN_DISABLE_BER_SUPPORT)
174 #if !defined(ASN_DISABLE_UPER_SUPPORT)
180 size_t extra_bits = erval.
encoded % 8;
181 assert(encoding_el->
length == (
size_t)(erval.
encoded + 7) / 8);
186 #if !defined(ASN_DISABLE_APER_SUPPORT)
192 size_t extra_bits = erval.
encoded % 8;
193 assert(encoding_el->
length == (
size_t)(erval.
encoded + 7) / 8);
200 assert(!
"Unreachable");
206 if(edx == list->count) {
210 qsort(encoded_els, list->count,
sizeof(encoded_els[0]),
_el_buf_cmp);
233 for(i = 0; i < list->count; i++) {
234 void *memb_ptr = list->array[i];
272 "%s: value not given (%s:%d)",
273 td->
name, __FILE__, __LINE__);
284 for(i = 0; i < list->count; i++) {
285 const void *memb_ptr = list->array[i];
288 if(!memb_ptr)
continue;
290 ret = constr(elm->
type, memb_ptr, ctfailcb, app_key);
306 assert(a->
td == b->
td);
319 ssize_t common_length;
323 if(b->count)
return -1;
325 }
else if(b->count == 0) {
329 asorted =
MALLOC(a->count *
sizeof(asorted[0]));
330 bsorted =
MALLOC(b->count *
sizeof(bsorted[0]));
331 if(!asorted || !bsorted) {
337 for(idx = 0; idx < a->count; idx++) {
339 asorted[idx].
sptr = a->array[idx];
342 for(idx = 0; idx < b->count; idx++) {
344 bsorted[idx].
sptr = b->array[idx];
350 common_length = (a->count < b->count ? a->count : b->count);
351 for(idx = 0; idx < common_length; idx++) {
366 if(idx < a->count)
return 1;
395 if(st == 0)
return -1;
403 _new_arr =
REALLOC(a->array, b->size *
sizeof(b->array[0]));
405 a->array = (
void **)_new_arr;
412 for(
int i = 0; i < b->count; i++) {
413 void *bmemb = b->array[i];
420 if(ret != 0)
return ret;
#define ASN_STRUCT_FREE(asn_DEF, ptr)
static int _el_buf_cmp(const void *ap, const void *bp)
asn_TYPE_operation_t asn_OP_SET_OF
asn_enc_rval_t aper_encode(const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, asn_app_consume_bytes_f *consume_bytes_cb, void *app_key)
void() asn_app_constraint_failed_f(void *application_specific_key, const struct asn_TYPE_descriptor_s *type_descriptor_which_failed, const void *structure_which_failed_ptr, const char *error_message_format,...) CC_PRINTFLIKE(4
per_type_encoder_f SET_OF_encode_aper
asn_random_fill_f SET_OF_random_fill
#define CALLOC(nmemb, size)
@ ASFM_FREE_UNDERLYING_AND_RESET
int SET_OF_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
der_type_encoder_f * der_encoder
const asn_TYPE_descriptor_t * td
static void assert_unused_bits(const struct _el_buffer *p)
per_type_decoder_f SET_OF_decode_uper
xer_type_decoder_f SET_OF_decode_xer
asn_struct_copy_f * copy_struct
static int SET_OF__compare_cb(const void *aptr, const void *bptr)
#define REALLOC(oldptr, size)
int SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr)
asn_struct_print_f SET_OF_print
asn_TYPE_descriptor_t * type
void SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count)
asn_enc_rval_t uper_encode(const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, asn_app_consume_bytes_f *consume_bytes_cb, void *app_key)
int SET_OF_copy(const asn_TYPE_descriptor_t *td, void **aptr, const void *bptr)
oer_type_decoder_f SET_OF_decode_oer
#define _A_SET_FROM_VOID(ptr)
asn_TYPE_operation_t * op
ber_type_decoder_f SET_OF_decode_ber
asn_struct_compare_f * compare_struct
per_type_encoder_f SET_OF_encode_uper
#define _A_CSET_FROM_VOID(ptr)
int() asn_constr_check_f(const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, asn_app_constraint_failed_f *optional_callback, void *optional_app_key)
xer_type_encoder_f SET_OF_encode_xer
static int _el_addbytes(const void *buffer, size_t size, void *el_buf_ptr)
const struct asn_per_constraints_s * per_constraints
jer_type_decoder_f SET_OF_decode_jer
void asn_set_empty(void *asn_set_of_x)
per_type_decoder_f SET_OF_decode_aper
struct asn_TYPE_member_s * elements
asn_constr_check_f * general_constraints
der_type_encoder_f SET_OF_encode_der
oer_type_encoder_f SET_OF_encode_oer
jer_type_encoder_f SET_OF_encode_jer
struct _el_buffer * SET_OF__encode_sorted(const asn_TYPE_member_t *elm, const asn_anonymous_set_ *list, enum SET_OF__encode_method method)
asn_encoding_constraints_t encoding_constraints
void SET_OF_free(const asn_TYPE_descriptor_t *td, void *ptr, enum asn_struct_free_method method)
asn_encoding_constraints_t encoding_constraints
etsi_its_cam_ts_coding
Author(s): Jean-Pierre Busch
, Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:21:23