2 * Copyright 2019 AT&T Intellectual Property
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * This source code is part of the near-RT RIC (RAN Intelligent Controller)
20 * platform project (RICP).
24 #ifndef INC_ASN1CODEC_UTILS_H_
25 #define INC_ASN1CODEC_UTILS_H_
27 #ifndef ASN_DISABLE_OER_SUPPORT
28 #define ASN_DISABLE_OER_SUPPORT
31 #ifndef ASN_PDU_COLLECTION
32 #define ASN_PDU_COLLECTION
37 #include <ProtocolIE-Field.h>
38 #include <ProtocolExtensionContainer.h>
39 #include <ProtocolExtensionField.h>
40 #include <CriticalityDiagnostics-IE-List.h>
42 #define pLMN_Identity_size 3
43 #define shortMacro_eNB_ID_size 18
44 #define macro_eNB_ID_size 20
45 #define longMacro_eNB_ID_size 21
46 #define home_eNB_ID_size 28
47 #define eUTRANcellIdentifier_size 28
54 bool asn1_pdu_printer(const E2AP_PDU_t *pdu, size_t obufsz, char *buf);
55 bool asn1_pdu_xer_printer(const E2AP_PDU_t *pdu, size_t obufsz, char *buf);
56 bool per_unpack_pdu(E2AP_PDU_t *pdu, size_t packed_buf_size, unsigned char* packed_buf,size_t err_buf_size, char* err_buf);
57 bool per_pack_pdu(E2AP_PDU_t *pdu, size_t *packed_buf_size, unsigned char* packed_buf,size_t err_buf_size, char* err_buf);
58 bool unpack_pdu_aux(E2AP_PDU_t *pdu, size_t packed_buf_size, unsigned char* packed_buf,size_t err_buf_size, char* err_buf,enum asn_transfer_syntax syntax);
59 bool pack_pdu_aux(E2AP_PDU_t *pdu, size_t *packed_buf_size, unsigned char* packed_buf,size_t err_buf_size, char* err_buf,enum asn_transfer_syntax syntax);
61 E2AP_PDU_t *new_pdu(size_t sz);
62 void delete_pdu(E2AP_PDU_t *pdu);
68 #endif /* INC_ASN1CODEC_UTILS_H_ */