3 * Copyright 2019 AT&T Intellectual Property
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef INC_ASN1CODEC_UTILS_H_
21 #define INC_ASN1CODEC_UTILS_H_
23 #ifndef ASN_DISABLE_OER_SUPPORT
24 #define ASN_DISABLE_OER_SUPPORT
27 #ifndef ASN_PDU_COLLECTION
28 #define ASN_PDU_COLLECTION
33 #include <ProtocolIE-Field.h>
34 #include <ProtocolExtensionContainer.h>
35 #include <ProtocolExtensionField.h>
36 #include <CriticalityDiagnostics-IE-List.h>
38 #define pLMN_Identity_size 3
39 #define shortMacro_eNB_ID_size 18
40 #define macro_eNB_ID_size 20
41 #define longMacro_eNB_ID_size 21
42 #define home_eNB_ID_size 28
43 #define eUTRANcellIdentifier_size 28
50 bool asn1_pdu_printer(const E2AP_PDU_t *pdu, size_t obufsz, char *buf);
51 bool asn1_pdu_xer_printer(const E2AP_PDU_t *pdu, size_t obufsz, char *buf);
52 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);
53 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);
54 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);
55 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);
57 E2AP_PDU_t *new_pdu(size_t sz);
58 void delete_pdu(E2AP_PDU_t *pdu);
64 #endif /* INC_ASN1CODEC_UTILS_H_ */