X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fe2-interface.git;a=blobdiff_plain;f=e2sim%2Fprevious%2FASN1c%2Fber_decoder.h;fp=e2sim%2Fprevious%2FASN1c%2Fber_decoder.h;h=0000000000000000000000000000000000000000;hp=6c41bf8c6ec0634f8fdde3b5c0eb8ee76e7efd2b;hb=f86662b5b6481f27e18313a36355871f3a947193;hpb=a9f02a2b5886990fd81e64f7c218c5d4844f18a3 diff --git a/e2sim/previous/ASN1c/ber_decoder.h b/e2sim/previous/ASN1c/ber_decoder.h deleted file mode 100644 index 6c41bf8..0000000 --- a/e2sim/previous/ASN1c/ber_decoder.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************** -# * -# Copyright 2019 AT&T Intellectual Property * -# * -# Licensed under the Apache License, Version 2.0 (the "License"); * -# you may not use this file except in compliance with the License. * -# You may obtain a copy of the License at * -# * -# http://www.apache.org/licenses/LICENSE-2.0 * -# * -# Unless required by applicable law or agreed to in writing, software * -# distributed under the License is distributed on an "AS IS" BASIS, * -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -# See the License for the specific language governing permissions and * -# limitations under the License. * -# * -******************************************************************************/ - -/*- - * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -#ifndef _BER_DECODER_H_ -#define _BER_DECODER_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct asn_TYPE_descriptor_s; /* Forward declaration */ -struct asn_codec_ctx_s; /* Forward declaration */ - -/* - * The BER decoder of any type. - * This function may be invoked directly from the application. - * Decodes BER, DER and CER data (DER and CER are different subsets of BER). - * - * NOTE: Use the der_encode() function (der_encoder.h) to produce encoding - * which is compliant with ber_decode(). - */ -asn_dec_rval_t ber_decode( - const struct asn_codec_ctx_s *opt_codec_ctx, - const struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of that buffer */ -); - -/* - * Type of generic function which decodes the byte stream into the structure. - */ -typedef asn_dec_rval_t(ber_type_decoder_f)( - const struct asn_codec_ctx_s *opt_codec_ctx, - const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, - const void *buf_ptr, size_t size, int tag_mode); - -/******************************* - * INTERNALLY USEFUL FUNCTIONS * - *******************************/ - -/* - * Check that all tags correspond to the type definition (as given in head). - * On return, last_length would contain either a non-negative length of the - * value part of the last TLV, or the negative number of expected - * "end of content" sequences. The number may only be negative if the - * head->last_tag_form is non-zero. - */ -asn_dec_rval_t ber_check_tags( - const struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ - const struct asn_TYPE_descriptor_s *type_descriptor, - asn_struct_ctx_t *opt_ctx, /* saved decoding context */ - const void *ptr, size_t size, - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - int last_tag_form, /* {-1,0:1}: any, primitive, constr */ - ber_tlv_len_t *last_length, int *opt_tlv_form /* optional tag form */ -); - -#ifdef __cplusplus -} -#endif - -#endif /* _BER_DECODER_H_ */