X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fe2-interface.git;a=blobdiff_plain;f=e2sim%2Fprevious%2FASN1c%2Fber_tlv_length.h;fp=e2sim%2Fprevious%2FASN1c%2Fber_tlv_length.h;h=0000000000000000000000000000000000000000;hp=96d83228122e53f83d8975835889c367ddeacab0;hb=f86662b5b6481f27e18313a36355871f3a947193;hpb=a9f02a2b5886990fd81e64f7c218c5d4844f18a3 diff --git a/e2sim/previous/ASN1c/ber_tlv_length.h b/e2sim/previous/ASN1c/ber_tlv_length.h deleted file mode 100644 index 96d8322..0000000 --- a/e2sim/previous/ASN1c/ber_tlv_length.h +++ /dev/null @@ -1,68 +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_TLV_LENGTH_H_ -#define _BER_TLV_LENGTH_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef ssize_t ber_tlv_len_t; - -/* - * This function tries to fetch the length of the BER TLV value and place it - * in *len_r. - * RETURN VALUES: - * 0: More data expected than bufptr contains. - * -1: Fatal error deciphering length. - * >0: Number of bytes used from bufptr. - * On return with >0, len_r is constrained as -1..MAX, where -1 mean - * that the value is of indefinite length. - */ -ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, - ber_tlv_len_t *len_r); - -/* - * This function expects bufptr to be positioned over L in TLV. - * It returns number of bytes occupied by L and V together, suitable - * for skipping. The function properly handles indefinite length. - * RETURN VALUES: - * Standard {-1,0,>0} convention. - */ -ssize_t ber_skip_length( - const struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ - int _is_constructed, const void *bufptr, size_t size); - -/* - * This function serializes the length (L from TLV) in DER format. - * It always returns number of bytes necessary to represent the length, - * it is a caller's responsibility to check the return value - * against the supplied buffer's size. - */ -size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); - -#ifdef __cplusplus -} -#endif - -#endif /* _BER_TLV_LENGTH_H_ */