X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fe2-interface.git;a=blobdiff_plain;f=e2sim%2Fprevious%2Fe2apv1sim%2FASN1c%2Fconstraints.h;fp=e2sim%2Fprevious%2Fe2apv1sim%2FASN1c%2Fconstraints.h;h=0000000000000000000000000000000000000000;hp=0bd86a96bf17ee0e532dd04ed16268eb2001aaf2;hb=f86662b5b6481f27e18313a36355871f3a947193;hpb=a9f02a2b5886990fd81e64f7c218c5d4844f18a3 diff --git a/e2sim/previous/e2apv1sim/ASN1c/constraints.h b/e2sim/previous/e2apv1sim/ASN1c/constraints.h deleted file mode 100644 index 0bd86a9..0000000 --- a/e2sim/previous/e2apv1sim/ASN1c/constraints.h +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -#ifndef ASN1_CONSTRAINTS_VALIDATOR_H -#define ASN1_CONSTRAINTS_VALIDATOR_H - -#include /* Platform-dependent types */ - -#ifdef __cplusplus -extern "C" { -#endif - -struct asn_TYPE_descriptor_s; /* Forward declaration */ - -/* - * Validate the structure according to the ASN.1 constraints. - * If errbuf and errlen are given, they shall be pointing to the appropriate - * buffer space and its length before calling this function. Alternatively, - * they could be passed as NULL's. If constraints validation fails, - * errlen will contain the actual number of bytes taken from the errbuf - * to encode an error message (properly 0-terminated). - * - * RETURN VALUES: - * This function returns 0 in case all ASN.1 constraints are met - * and -1 if one or more constraints were failed. - */ -int asn_check_constraints( - const struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, /* Target language's structure */ - char *errbuf, /* Returned error description */ - size_t *errlen /* Length of the error description */ -); - - -/* - * Generic type for constraint checking callback, - * associated with every type descriptor. - */ -typedef int(asn_constr_check_f)( - const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, - asn_app_constraint_failed_f *optional_callback, /* Log the error */ - void *optional_app_key /* Opaque key passed to a callback */ -); - -/******************************* - * INTERNALLY USEFUL FUNCTIONS * - *******************************/ - -asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ -asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ - -/* - * Invoke the callback with a complete error message. - */ -#define ASN__CTFAIL if(ctfailcb) ctfailcb - -#ifdef __cplusplus -} -#endif - -#endif /* ASN1_CONSTRAINTS_VALIDATOR_H */