Add initial codes
[it/test.git] / simulators / e2sim / README.md
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 # INSTALLATION
21   * Tested environment: Ubuntu 16.04
22   * Install dependencies
23     $ sudo apt-get update
24     $ sudo apt-get install -y
25         build-essential
26         git
27         cmake
28         libsctp-dev
29         lksctp-tools
30         autoconf
31         automake
32         libtool
33         bison
34         flex
35         libboost-all-dev
36     $ sudo apt-get clean
37
38   ## Build
39     $ ./build_e2sim
40
41 # SET ENVIRONMENT VARIABLE
42   Add this line to `~/.bashrc`
43   $  export E2SIM_DIR=<your e2sim directory>
44
45 # RUN E2SIM
46   $  cd $E2SIM_DIR/build/
47   $ ./e2agent [SERVER IP] [PORT]
48
49   By default, SERVER IP = 127.0.0.1, PORT = 36422 (X2AP Port)
50
51 # DOCKER
52   Note: The commands in this section must be run from $E2SIM_DIR
53
54   * Build docker image
55   $ ./build_docker
56
57   ## Run docker container
58   $ sudo docker run --rm --net host -it e2agent sh -c "./build/e2agent [SERVER IP] [PORT]"
59
60 # SUPPORTED MESSAGE FLOWS (Last updated May 24, 2019)
61
62 - X2 SETUP REQUEST          (RIC -> RAN)
63 - X2 SETUP RESPONSE         (RAN -> RIC)
64
65 - ENDC X2 SETUP REQUEST     (RIC -> RAN)
66 - ENDC X2 SETUP RESPONSE    (RAN -> RIC)
67
68 - RIC SUBSCRIPTION REQUEST  (RIC -> RAN)
69 - RIC SUBSCRIPTION RESPONSE (RAN -> RIC)
70 - RIC SUBSCRIPTION FAILURE  (RAN -> RIC)
71
72
73 # Change logs:
74   03/12/2019: currently supports sending and receiving X2 SETUP messages
75   05/21/2019: add support for ENDC X2 SETUP   
76               no longer use asn1c
77               all X2AP and E2AP messages are encapsulated into E2AP-PDU
78   05/24/2019: add support for RIC SUBSCRIPTION REQUEST, RESPONSE, and FAILURE