Adding new comments for Oran in all files with licenses
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / inc / asn1codec_utils.h
1 /*
2  * Copyright 2019 AT&T Intellectual Property
3  * Copyright 2019 Nokia
4  *
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
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18 /*
19  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
20  * platform project (RICP).
21  */
22
23
24 #ifndef INC_ASN1CODEC_UTILS_H_
25 #define INC_ASN1CODEC_UTILS_H_
26
27 #ifndef ASN_DISABLE_OER_SUPPORT
28 #define ASN_DISABLE_OER_SUPPORT
29 #endif
30
31 #ifndef ASN_PDU_COLLECTION
32 #define ASN_PDU_COLLECTION
33 #endif
34
35 #include <stdbool.h>
36 #include <E2AP-PDU.h>
37 #include <ProtocolIE-Field.h>
38 #include <ProtocolExtensionContainer.h>
39 #include <ProtocolExtensionField.h>
40 #include <CriticalityDiagnostics-IE-List.h>
41
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
48
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53
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);
60
61 E2AP_PDU_t *new_pdu();
62 void delete_pdu(E2AP_PDU_t *pdu);
63
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif /* INC_ASN1CODEC_UTILS_H_ */