X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fe2-interface.git;a=blobdiff_plain;f=e2sim%2Fsrc%2FASN1c%2Fasn_random_fill.h;fp=e2sim%2Fsrc%2FASN1c%2Fasn_random_fill.h;h=0000000000000000000000000000000000000000;hp=47f9b8af01560d91d29a774571355c424bcb20dc;hb=f5900596513e4359fc839ba361da085674e90b68;hpb=215d350dbe06a4c7ee370815f26128a7f7e160cb diff --git a/e2sim/src/ASN1c/asn_random_fill.h b/e2sim/src/ASN1c/asn_random_fill.h deleted file mode 100644 index 47f9b8a..0000000 --- a/e2sim/src/ASN1c/asn_random_fill.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2017 Lev Walkin . All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -#ifndef ASN_RANDOM_FILL -#define ASN_RANDOM_FILL - -/* Forward declarations */ -struct asn_TYPE_descriptor_s; -struct asn_encoding_constraints_s; - -/* - * Initialize a structure with random data according to the type specification - * and optional member constraints. - * ARGUMENTS: - * (max_length) - See (approx_max_length_limit). - * (memb_constraints) - Member constraints, if exist. - * The type can be constrained differently according - * to PER and OER specifications, so we find a value - * at the intersection of these constraints. - * In case the return differs from ARFILL_OK, the (struct_ptr) contents - * and (current_length) value remain in their original state. - */ -typedef struct asn_random_fill_result_s { - enum { - ARFILL_FAILED = -1, /* System error (memory?) */ - ARFILL_OK = 0, /* Initialization succeeded */ - ARFILL_SKIPPED = 1 /* Not done due to (length?) constraint */ - } code; - size_t length; /* Approximate number of bytes created. */ -} asn_random_fill_result_t; -typedef asn_random_fill_result_t(asn_random_fill_f)( - const struct asn_TYPE_descriptor_s *td, void **struct_ptr, - const struct asn_encoding_constraints_s *memb_constraints, - size_t max_length); - -/* - * Returns 0 if the structure was properly initialized, -1 otherwise. - * The (approx_max_length_limit) specifies the approximate limit of the - * resulting structure in units closely resembling bytes. The actual result - * might be several times larger or smaller than the length limit. - */ -int asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, - size_t approx_max_length_limit); - -/* - * Returns a random number between min and max. - */ -intmax_t asn_random_between(intmax_t min, intmax_t max); - -#endif /* ASN_RANDOM_FILL */