Reorganize directories and switch libaries to using asn1c
[it/test.git] / simulators / e2sim / src / ASN1 / lib / asn_x2ap.hpp
1 /*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 # Copyright 2019 Nokia                                                       *
5 #                                                                            *
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                                    *
9 #                                                                            *
10 #      http://www.apache.org/licenses/LICENSE-2.0                            *
11 #                                                                            *
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.                                             *
17 #                                                                            *
18 ******************************************************************************/
19
20 #ifndef ASN_X2AP_HPP
21 #define ASN_X2AP_HPP
22
23 #include <stdbool.h>
24 #include <stddef.h>
25 #include <stdint.h>
26
27 #include "e2ap_config.hpp"
28
29 typedef struct c__dummy00 x2ap_pdu_t;
30
31 /*-----------------------------------------------------------------------
32                               COMMON ROUTINES
33 -------------------------------------------------------------------------
34 */
35
36 x2ap_pdu_t* new_x2ap_pdu(void);
37
38 void x2ap_asn_print(x2ap_pdu_t* pdu, char* buf, size_t buf_size);
39
40 int x2ap_asn_per_encode(x2ap_pdu_t* pdu, unsigned char* buf, size_t buf_size,
41                       char* err_buf, size_t err_buf_size);
42
43 int x2ap_asn_per_decode(x2ap_pdu_t* pdu, unsigned char const* buf, size_t buf_size,
44                                           char* err_buf, size_t err_buf_size);
45
46 int x2ap_get_index(x2ap_pdu_t* pdu);
47
48 int x2ap_get_procedureCode(x2ap_pdu_t* pdu);
49
50 /*-----------------------------------------------------------------------
51                               MESSAGE GENERATORS
52 -------------------------------------------------------------------------
53 */
54 //X2Setup
55 bool x2ap_init_X2SetupRequest(x2ap_pdu_t* pdu);
56
57 bool x2ap_create_X2SetupRequest(x2ap_pdu_t* pdu, eNB_config &cfg);
58
59 bool x2ap_create_X2SetupResponse(x2ap_pdu_t* pdu, eNB_config &cfg);
60
61 bool x2ap_create_X2SetupFailure(x2ap_pdu_t* pdu);
62
63 //ENDCX2Setup
64 bool x2ap_create_ENDCX2SetupRequest(x2ap_pdu_t* pdu, eNB_config &cfg);
65
66 /*-----------------------------------------------------------------------
67                               TESTS
68 -------------------------------------------------------------------------
69 */
70 void test_X2Setup_codec(void);
71
72 #endif