Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
af91004e
Commit
af91004e
authored
May 31, 2023
by
Vaibhav Shrivastava
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3GPP_TTCN_System_Simulator' into 3GPP_5G_Rebased_with_W11
parents
99ae5a61
69ac5265
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
429 additions
and
327 deletions
+429
-327
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_gnb.band78_1CC.sa.fr1.106PRB.usrpn310.conf
...lator/SS_proxy_gnb.band78_1CC.sa.fr1.106PRB.usrpn310.conf
+5
-0
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_rcc.band1_1CC.tm1.nfapi.conf
...PP_System_Simulator/SS_proxy_rcc.band1_1CC.tm1.nfapi.conf
+6
-0
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_rcc.band1_2CC.tm1.nfapi.conf
...PP_System_Simulator/SS_proxy_rcc.band1_2CC.tm1.nfapi.conf
+3
-2
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_rcc.band1_3CC.tm1.nfapi.conf
...PP_System_Simulator/SS_proxy_rcc.band1_3CC.tm1.nfapi.conf
+8
-2
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+11
-5
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+27
-9
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+99
-94
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+25
-10
openair3/SS/Sidl/lib/acp/api/acp.h
openair3/SS/Sidl/lib/acp/api/acp.h
+7
-7
openair3/SS/Sidl/lib/acp/api/acpCtx.h
openair3/SS/Sidl/lib/acp/api/acpCtx.h
+2
-0
openair3/SS/Sidl/lib/acp/api/acpSocket.h
openair3/SS/Sidl/lib/acp/api/acpSocket.h
+4
-4
openair3/SS/Sidl/lib/acp/src/acp.c
openair3/SS/Sidl/lib/acp/src/acp.c
+11
-10
openair3/SS/Sidl/lib/acp/src/acpSocket.c
openair3/SS/Sidl/lib/acp/src/acpSocket.c
+122
-56
openair3/SS/ss_eNB_drb_task.c
openair3/SS/ss_eNB_drb_task.c
+12
-17
openair3/SS/ss_eNB_port_man_task.c
openair3/SS/ss_eNB_port_man_task.c
+6
-9
openair3/SS/ss_eNB_srb_task.c
openair3/SS/ss_eNB_srb_task.c
+4
-9
openair3/SS/ss_eNB_sysind_task.c
openair3/SS/ss_eNB_sysind_task.c
+5
-8
openair3/SS/ss_eNB_vng_task.c
openair3/SS/ss_eNB_vng_task.c
+4
-11
openair3/SS/ss_eNB_vtp_task.c
openair3/SS/ss_eNB_vtp_task.c
+9
-12
openair3/SS/ss_gNB_drb_task.c
openair3/SS/ss_gNB_drb_task.c
+5
-5
openair3/SS/ss_gNB_port_man_task.c
openair3/SS/ss_gNB_port_man_task.c
+5
-10
openair3/SS/ss_gNB_srb_task.c
openair3/SS/ss_gNB_srb_task.c
+23
-28
openair3/SS/ss_gNB_vtp_task.c
openair3/SS/ss_gNB_vtp_task.c
+14
-19
radio/SS/ss_config.h
radio/SS/ss_config.h
+12
-0
No files found.
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_gnb.band78_1CC.sa.fr1.106PRB.usrpn310.conf
View file @
af91004e
...
@@ -183,10 +183,15 @@ SSConfig = (
...
@@ -183,10 +183,15 @@ SSConfig = (
{
{
hostIp
=
"127.0.0.1"
;
#Host IP for System Simulator
hostIp
=
"127.0.0.1"
;
#Host IP for System Simulator
Sys_port
=
7777
;
#Port Number for System Simulator Sys Port
Sys_port
=
7777
;
#Port Number for System Simulator Sys Port
Sys_host
=
"127.0.0.1"
;
#Host for System Simulator SYS Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_host
=
"127.0.0.1"
;
#Host for System Simulator SRB Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_host
=
"127.0.0.1"
;
#Host for System Simulator VNG Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_host
=
"/tmp/eNBVT.pipe"
;
#Host for System Simulator VTP Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_host
=
"127.0.0.1"
;
#Host for System Simulator DRB Port
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
}
);
);
...
...
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_rcc.band1_1CC.tm1.nfapi.conf
View file @
af91004e
...
@@ -173,11 +173,17 @@ SSConfig = (
...
@@ -173,11 +173,17 @@ SSConfig = (
{
{
hostIp
=
"127.0.0.1"
;
#Host IP for System Simulator
hostIp
=
"127.0.0.1"
;
#Host IP for System Simulator
Sys_port
=
7777
;
#Port Number for System Simulator Sys Port
Sys_port
=
7777
;
#Port Number for System Simulator Sys Port
Sys_host
=
"/tmp/eNBSys.pipe"
;
#Host for System Simulator SYS Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_host
=
"/tmp/eNBSrb.pipe"
;
#Host for System Simulator SRB Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_host
=
"/tmp/eNBVng.pipe"
;
#Host for System Simulator VNG Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_host
=
"/tmp/eNBVT.pipe"
;
#Host for System Simulator VTP Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_host
=
"/tmp/eNBDrb.pipe"
;
#Host for System Simulator DRB Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SysInd_host
=
"/tmp/eNBSysInd.pipe"
;
#Host for System Simulator DRB Port
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
}
);
);
...
...
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_rcc.band1_2CC.tm1.nfapi.conf
View file @
af91004e
...
@@ -17,7 +17,7 @@ eNBs =
...
@@ -17,7 +17,7 @@ eNBs =
//
Tracking
area
code
,
0
x0000
and
0
xfffe
are
reserved
values
//
Tracking
area
code
,
0
x0000
and
0
xfffe
are
reserved
values
tracking_area_code
=
1
;
tracking_area_code
=
1
;
plmn_list
= ( {
mcc
=
208
;
mnc
=
93
;
mnc_length
=
2
; } );
plmn_list
= ( {
mcc
=
208
;
mnc
=
93
;
mnc_length
=
2
; } );
tr_s_preference
=
"local_mac"
tr_s_preference
=
"local_mac"
...
@@ -258,6 +258,7 @@ SSConfig = (
...
@@ -258,6 +258,7 @@ SSConfig = (
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_host
=
"127.0.0.1"
;
#Host for System Simulator VTP Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
...
@@ -277,7 +278,7 @@ MACRLCs = (
...
@@ -277,7 +278,7 @@ MACRLCs = (
tr_s_preference
=
"nfapi"
;
tr_s_preference
=
"nfapi"
;
tr_n_preference
=
"local_RRC"
;
tr_n_preference
=
"local_RRC"
;
#scheduler_mode = "fairRR";
#scheduler_mode = "fairRR";
}
}
);
);
THREAD_STRUCT
= (
THREAD_STRUCT
= (
...
...
ci-scripts/conf_files/3GPP_System_Simulator/SS_proxy_rcc.band1_3CC.tm1.nfapi.conf
View file @
af91004e
...
@@ -17,7 +17,7 @@ eNBs =
...
@@ -17,7 +17,7 @@ eNBs =
//
Tracking
area
code
,
0
x0000
and
0
xfffe
are
reserved
values
//
Tracking
area
code
,
0
x0000
and
0
xfffe
are
reserved
values
tracking_area_code
=
1
;
tracking_area_code
=
1
;
plmn_list
= ( {
mcc
=
208
;
mnc
=
93
;
mnc_length
=
2
; } );
plmn_list
= ( {
mcc
=
208
;
mnc
=
93
;
mnc_length
=
2
; } );
tr_s_preference
=
"local_mac"
tr_s_preference
=
"local_mac"
...
@@ -337,11 +337,17 @@ SSConfig = (
...
@@ -337,11 +337,17 @@ SSConfig = (
{
{
hostIp
=
"127.0.0.1"
;
#Host IP for System Simulator
hostIp
=
"127.0.0.1"
;
#Host IP for System Simulator
Sys_port
=
7777
;
#Port Number for System Simulator Sys Port
Sys_port
=
7777
;
#Port Number for System Simulator Sys Port
Sys_host
=
"/tmp/eNBSys.pipe"
;
#Host for System Simulator SYS Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_port
=
7778
;
#Port Number for System Simulator Srb Port
Srb_host
=
"/tmp/eNBSrb.pipe"
;
#Host for System Simulator SRB Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_port
=
7779
;
#Port Number for System Simulator VNG Port
Vng_host
=
"/tmp/eNBVng.pipe"
;
#Host for System Simulator VNG Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_port
=
7780
;
#Port Number for System Simulator VTP Port
Vtp_host
=
"/tmp/eNBVT.pipe"
;
#Host for System Simulator VTP Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_port
=
7781
;
#Port Number for System Simulator DRB Port
Drb_host
=
"/tmp/eNBDrb.pipe"
;
#Host for System Simulator DRB Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SysInd_port
=
7782
;
#Port Number for System Simulator SysIND Port
SysInd_host
=
"/tmp/eNBSysInd.pipe"
;
#Host for System Simulator DRB Port
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
SSMode
=
1
;
#SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
}
);
);
...
@@ -359,7 +365,7 @@ MACRLCs = (
...
@@ -359,7 +365,7 @@ MACRLCs = (
tr_s_preference
=
"nfapi"
;
tr_s_preference
=
"nfapi"
;
tr_n_preference
=
"local_RRC"
;
tr_n_preference
=
"local_RRC"
;
#scheduler_mode = "fairRR";
#scheduler_mode = "fairRR";
}
}
);
);
THREAD_STRUCT
= (
THREAD_STRUCT
= (
...
...
openair2/ENB_APP/enb_config.c
View file @
af91004e
...
@@ -173,11 +173,17 @@ void RCconfig_ssparam(void) {
...
@@ -173,11 +173,17 @@ void RCconfig_ssparam(void) {
if
(
SSConfig_ParamList
.
numelt
>
0
)
{
if
(
SSConfig_ParamList
.
numelt
>
0
)
{
RC
.
ss
.
hostIp
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_HOSTIP_IDX
].
strptr
));
RC
.
ss
.
hostIp
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_HOSTIP_IDX
].
strptr
));
RC
.
ss
.
Sysport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSPORT_IDX
].
iptr
);
RC
.
ss
.
Sysport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSPORT_IDX
].
iptr
);
RC
.
ss
.
SysHost
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSHOST_IDX
].
strptr
));
RC
.
ss
.
Srbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SRBPORT_IDX
].
iptr
);
RC
.
ss
.
Srbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SRBPORT_IDX
].
iptr
);
RC
.
ss
.
SrbHost
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SRBHOST_IDX
].
strptr
));
RC
.
ss
.
Vngport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VNGPORT_IDX
].
iptr
);
RC
.
ss
.
Vngport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VNGPORT_IDX
].
iptr
);
RC
.
ss
.
VngHost
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VNGHOST_IDX
].
strptr
));
RC
.
ss
.
Vtpport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VTPPORT_IDX
].
iptr
);
RC
.
ss
.
Vtpport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VTPPORT_IDX
].
iptr
);
RC
.
ss
.
VtpHost
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_VTPHOST_IDX
].
strptr
));
RC
.
ss
.
SysIndport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSINDPORT_IDX
].
iptr
);
RC
.
ss
.
SysIndport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSINDPORT_IDX
].
iptr
);
RC
.
ss
.
SysIndHost
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_SYSINDHOST_IDX
].
strptr
));
RC
.
ss
.
Drbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_DRBPORT_IDX
].
iptr
);
RC
.
ss
.
Drbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_DRBPORT_IDX
].
iptr
);
RC
.
ss
.
DrbHost
=
strdup
(
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_DRBHOST_IDX
].
strptr
));
RC
.
ss
.
mode
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_MODE_IDX
].
iptr
);
RC
.
ss
.
mode
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
CONFIG_SS_MODE_IDX
].
iptr
);
}
}
LOG_A
(
ENB_APP
,
"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d SysIndport=%d Drbport=%d
\n
"
,
LOG_A
(
ENB_APP
,
"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d SysIndport=%d Drbport=%d
\n
"
,
...
@@ -2260,7 +2266,7 @@ int RCconfig_S1(
...
@@ -2260,7 +2266,7 @@ int RCconfig_S1(
}
}
else
else
{
{
LOG_E
(
S1AP
,
LOG_E
(
S1AP
,
"s1setup_rsp_timer value in conf file is invalid (%d). Default value is set.
\n
"
,
"s1setup_rsp_timer value in conf file is invalid (%d). Default value is set.
\n
"
,
*
ENBParamList
.
paramarray
[
k
][
ENB_S1SETUP_RSP_TIMER_IDX
].
uptr
);
*
ENBParamList
.
paramarray
[
k
][
ENB_S1SETUP_RSP_TIMER_IDX
].
uptr
);
S1AP_REGISTER_ENB_REQ
(
msg_p
).
s1_setuprsp_wait_timer
=
5
;
S1AP_REGISTER_ENB_REQ
(
msg_p
).
s1_setuprsp_wait_timer
=
5
;
...
@@ -2272,7 +2278,7 @@ int RCconfig_S1(
...
@@ -2272,7 +2278,7 @@ int RCconfig_S1(
}
}
else
else
{
{
LOG_E
(
S1AP
,
LOG_E
(
S1AP
,
"s1setup_req_timer value in conf file is invalid (%d). Default value is set.
\n
"
,
"s1setup_req_timer value in conf file is invalid (%d). Default value is set.
\n
"
,
*
ENBParamList
.
paramarray
[
k
][
ENB_S1SETUP_REQ_TIMER_IDX
].
uptr
);
*
ENBParamList
.
paramarray
[
k
][
ENB_S1SETUP_REQ_TIMER_IDX
].
uptr
);
S1AP_REGISTER_ENB_REQ
(
msg_p
).
s1_setupreq_wait_timer
=
5
;
S1AP_REGISTER_ENB_REQ
(
msg_p
).
s1_setupreq_wait_timer
=
5
;
...
@@ -2284,7 +2290,7 @@ int RCconfig_S1(
...
@@ -2284,7 +2290,7 @@ int RCconfig_S1(
}
}
else
else
{
{
LOG_E
(
S1AP
,
LOG_E
(
S1AP
,
"s1setup_req_count value in conf file is invalid (%d). Default value is set.
\n
"
,
"s1setup_req_count value in conf file is invalid (%d). Default value is set.
\n
"
,
*
ENBParamList
.
paramarray
[
k
][
ENB_S1SETUP_REQ_COUNT_IDX
].
uptr
);
*
ENBParamList
.
paramarray
[
k
][
ENB_S1SETUP_REQ_COUNT_IDX
].
uptr
);
S1AP_REGISTER_ENB_REQ
(
msg_p
).
s1_setupreq_count
=
0xffff
;
S1AP_REGISTER_ENB_REQ
(
msg_p
).
s1_setupreq_count
=
0xffff
;
...
@@ -2296,7 +2302,7 @@ int RCconfig_S1(
...
@@ -2296,7 +2302,7 @@ int RCconfig_S1(
}
}
else
else
{
{
LOG_E
(
S1AP
,
LOG_E
(
S1AP
,
"sctp_req_timer value in conf file is invalid (%d). Default value is set.
\n
"
,
"sctp_req_timer value in conf file is invalid (%d). Default value is set.
\n
"
,
*
ENBParamList
.
paramarray
[
k
][
ENB_SCTP_REQ_TIMER_IDX
].
uptr
);
*
ENBParamList
.
paramarray
[
k
][
ENB_SCTP_REQ_TIMER_IDX
].
uptr
);
S1AP_REGISTER_ENB_REQ
(
msg_p
).
sctp_req_timer
=
180
;
S1AP_REGISTER_ENB_REQ
(
msg_p
).
sctp_req_timer
=
180
;
...
@@ -2308,7 +2314,7 @@ int RCconfig_S1(
...
@@ -2308,7 +2314,7 @@ int RCconfig_S1(
}
}
else
else
{
{
LOG_E
(
S1AP
,
LOG_E
(
S1AP
,
"sctp_req_count value in conf file is invalid (%d). Default value is set.
\n
"
,
"sctp_req_count value in conf file is invalid (%d). Default value is set.
\n
"
,
*
ENBParamList
.
paramarray
[
k
][
ENB_SCTP_REQ_COUNT_IDX
].
uptr
);
*
ENBParamList
.
paramarray
[
k
][
ENB_SCTP_REQ_COUNT_IDX
].
uptr
);
S1AP_REGISTER_ENB_REQ
(
msg_p
).
sctp_req_count
=
0xffff
;
S1AP_REGISTER_ENB_REQ
(
msg_p
).
sctp_req_count
=
0xffff
;
...
...
openair2/ENB_APP/enb_paramdef.h
View file @
af91004e
...
@@ -153,8 +153,8 @@ typedef enum {
...
@@ -153,8 +153,8 @@ typedef enum {
#define RU_IF_FREQ_OFFSET 27
#define RU_IF_FREQ_OFFSET 27
#define RU_DO_PRECODING 28
#define RU_DO_PRECODING 28
#define RU_SF_AHEAD 29
#define RU_SF_AHEAD 29
#define RU_SL_AHEAD 30
#define RU_SL_AHEAD 30
#define RU_NR_FLAG 31
#define RU_NR_FLAG 31
#define RU_NR_SCS_FOR_RASTER 32
#define RU_NR_SCS_FOR_RASTER 32
#define RU_TX_SUBDEV 33
#define RU_TX_SUBDEV 33
#define RU_RX_SUBDEV 34
#define RU_RX_SUBDEV 34
...
@@ -399,30 +399,48 @@ typedef enum {
...
@@ -399,30 +399,48 @@ typedef enum {
#define CONFIG_SS "SSConfig"
#define CONFIG_SS "SSConfig"
#define CONFIG_SS_HOSTIP "hostIp"
#define CONFIG_SS_HOSTIP "hostIp"
#define CONFIG_SS_SYSPORT "Sys_port"
#define CONFIG_SS_SYSPORT "Sys_port"
#define CONFIG_SS_SYSHOST "Sys_host"
#define CONFIG_SS_SRBPORT "Srb_port"
#define CONFIG_SS_SRBPORT "Srb_port"
#define CONFIG_SS_SRBHOST "Srb_host"
#define CONFIG_SS_VNGPORT "Vng_port"
#define CONFIG_SS_VNGPORT "Vng_port"
#define CONFIG_SS_VNGHOST "Vng_host"
#define CONFIG_SS_VTPPORT "Vtp_port"
#define CONFIG_SS_VTPPORT "Vtp_port"
#define CONFIG_SS_VTPHOST "Vtp_host"
#define CONFIG_SS_SYSINDPORT "SysInd_port"
#define CONFIG_SS_SYSINDPORT "SysInd_port"
#define CONFIG_SS_SYSINDHOST "SysInd_host"
#define CONFIG_SS_DRBPORT "Drb_port"
#define CONFIG_SS_DRBPORT "Drb_port"
#define CONFIG_SS_DRBHOST "Drb_host"
#define CONFIG_SS_MODE "SSMode"
#define CONFIG_SS_MODE "SSMode"
#define CONFIG_SS_HOSTIP_IDX 0
#define CONFIG_SS_HOSTIP_IDX 0
#define CONFIG_SS_SYSPORT_IDX 1
#define CONFIG_SS_SYSPORT_IDX 1
#define CONFIG_SS_SRBPORT_IDX 2
#define CONFIG_SS_SYSHOST_IDX 2
#define CONFIG_SS_VNGPORT_IDX 3
#define CONFIG_SS_SRBPORT_IDX 3
#define CONFIG_SS_VTPPORT_IDX 4
#define CONFIG_SS_SRBHOST_IDX 4
#define CONFIG_SS_SYSINDPORT_IDX 5
#define CONFIG_SS_VNGPORT_IDX 5
#define CONFIG_SS_DRBPORT_IDX 6
#define CONFIG_SS_VNGHOST_IDX 6
#define CONFIG_SS_MODE_IDX 7
#define CONFIG_SS_VTPPORT_IDX 7
#define CONFIG_SS_VTPHOST_IDX 8
#define CONFIG_SS_SYSINDPORT_IDX 9
#define CONFIG_SS_SYSINDHOST_IDX 10
#define CONFIG_SS_DRBPORT_IDX 11
#define CONFIG_SS_DRBHOST_IDX 12
#define CONFIG_SS_MODE_IDX 13
#define SSPARAMS_DESC { \
#define SSPARAMS_DESC { \
{CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"
0.0.0.0",
TYPE_STRING, 0}, \
{CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"
127.0.0.1",
TYPE_STRING, 0}, \
{CONFIG_SS_SYSPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SYSPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SYSHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SRBHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VNGHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_VTPHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_SS_SYSINDPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SYSINDPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_SYSINDHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_SS_DRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_DRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_DRBHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
}
}
...
...
openair2/GNB_APP/gnb_config.c
View file @
af91004e
This diff is collapsed.
Click to expand it.
openair2/GNB_APP/gnb_paramdef.h
View file @
af91004e
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
*/
*/
/*! \file openair2/GNB_APP/gnb_paramdef.f
/*! \file openair2/GNB_APP/gnb_paramdef.f
* \brief definition of configuration parameters for all gNodeB modules
* \brief definition of configuration parameters for all gNodeB modules
* \author Francois TABURET, WEI-TAI CHEN
* \author Francois TABURET, WEI-TAI CHEN
* \date 2018
* \date 2018
* \version 0.1
* \version 0.1
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
#define GNB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
#define GNB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
#define GNB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
#define GNB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
#define GNB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
#define GNB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
// OTG config per GNB-UE DL
// OTG config per GNB-UE DL
...
@@ -215,7 +215,7 @@ typedef enum {
...
@@ -215,7 +215,7 @@ typedef enum {
}
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* PLMN ID configuration */
/* PLMN ID configuration */
...
@@ -253,27 +253,42 @@ typedef enum {
...
@@ -253,27 +253,42 @@ typedef enum {
#define GNB_CONFIG_SS "SSConfig"
#define GNB_CONFIG_SS "SSConfig"
#define GNB_CONFIG_SS_HOSTIP "hostIp"
#define GNB_CONFIG_SS_HOSTIP "hostIp"
#define GNB_CONFIG_SS_SYSPORT "Sys_port"
#define GNB_CONFIG_SS_SYSPORT "Sys_port"
#define GNB_CONFIG_SS_SYSHOST "Sys_host"
#define GNB_CONFIG_SS_SRBPORT "Srb_port"
#define GNB_CONFIG_SS_SRBPORT "Srb_port"
#define GNB_CONFIG_SS_SRBHOST "Srb_host"
#define GNB_CONFIG_SS_VNGPORT "Vng_port"
#define GNB_CONFIG_SS_VNGPORT "Vng_port"
#define GNB_CONFIG_SS_VNGHOST "Vng_host"
#define GNB_CONFIG_SS_VTPPORT "Vtp_port"
#define GNB_CONFIG_SS_VTPPORT "Vtp_port"
#define GNB_CONFIG_SS_VTPHOST "Vtp_host"
#define GNB_CONFIG_SS_DRBPORT "Drb_port"
#define GNB_CONFIG_SS_DRBPORT "Drb_port"
#define GNB_CONFIG_SS_DRBHOST "Drb_host"
#define GNB_CONFIG_SS_MODE "SSMode"
#define GNB_CONFIG_SS_MODE "SSMode"
#define GNB_CONFIG_SS_HOSTIP_IDX 0
#define GNB_CONFIG_SS_HOSTIP_IDX 0
#define GNB_CONFIG_SS_SYSPORT_IDX 1
#define GNB_CONFIG_SS_SYSPORT_IDX 1
#define GNB_CONFIG_SS_SRBPORT_IDX 2
#define GNB_CONFIG_SS_SYSHOST_IDX 2
#define GNB_CONFIG_SS_VNGPORT_IDX 3
#define GNB_CONFIG_SS_SRBPORT_IDX 3
#define GNB_CONFIG_SS_VTPPORT_IDX 4
#define GNB_CONFIG_SS_SRBHOST_IDX 4
#define GNB_CONFIG_SS_DRBPORT_IDX 5
#define GNB_CONFIG_SS_VNGPORT_IDX 5
#define GNB_CONFIG_SS_MODE_IDX 6
#define GNB_CONFIG_SS_VNGHOST_IDX 6
#define GNB_CONFIG_SS_VTPPORT_IDX 7
#define GNB_CONFIG_SS_VTPHOST_IDX 8
#define GNB_CONFIG_SS_DRBPORT_IDX 9
#define GNB_CONFIG_SS_DRBHOST_IDX 10
#define GNB_CONFIG_SS_MODE_IDX 11
#define GNB_SSPARAMS_DESC { \
#define GNB_SSPARAMS_DESC { \
{GNB_CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"
0.0.0.0
", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"
127.0.0.1
", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_SYSPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_SYSPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_SYSHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_SRBHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VNGHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VTPHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_DRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_DRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_DRBHOST , NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
}
}
...
...
openair3/SS/Sidl/lib/acp/api/acp.h
View file @
af91004e
...
@@ -179,42 +179,42 @@ int acpInitCtx(const struct acpMsgTable* msgTable, acpCtx_t* ctx);
...
@@ -179,42 +179,42 @@ int acpInitCtx(const struct acpMsgTable* msgTable, acpCtx_t* ctx);
* @param[in] aSize Arena size
* @param[in] aSize Arena size
* @return 0 on success, or an error code on failure.
* @return 0 on success, or an error code on failure.
*/
*/
int
acpClientInit
(
acpCtx_t
ctx
,
IpAddress_t
ipaddr
,
int
port
,
size_t
aSize
);
int
acpClientInit
(
acpCtx_t
ctx
,
const
char
*
host
,
int
port
,
size_t
aSize
);
/** Connects to server.
/** Connects to server.
* Allocates the context with registering to requested notifications.
* Allocates the context with registering to requested notifications.
*
*
* @param[in]
ipaddr
Server ip address
* @param[in]
host
Server ip address
* @param[in] port Server TCP port
* @param[in] port Server TCP port
* @param[in] msgTable Requested service responses/notifications to register, last element should be with name==NULL
* @param[in] msgTable Requested service responses/notifications to register, last element should be with name==NULL
* @param[in] aSize Arena size
* @param[in] aSize Arena size
* @param[out] ctx ACP Context
* @param[out] ctx ACP Context
* @return 0 on success, or an error code on failure.
* @return 0 on success, or an error code on failure.
*/
*/
int
acpClientInitWithCtx
(
IpAddress_t
ipaddr
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
);
int
acpClientInitWithCtx
(
const
char
*
host
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
);
/** Runs server.
/** Runs server.
* Context should be allocated with acpCreateCtx.
* Context should be allocated with acpCreateCtx.
*
*
* @param[in] ctx ACP Context
* @param[in] ctx ACP Context
* @param[in]
ipaddr Server ip address
* @param[in]
host Server ip address / unixsocket pipe file
* @param[in] port Server TCP port
* @param[in] port Server TCP port
* @param[in] aSize Arena size
* @param[in] aSize Arena size
* @return 0 on success, or an error code on failure.
* @return 0 on success, or an error code on failure.
*/
*/
int
acpServerInit
(
acpCtx_t
ctx
,
IpAddress_t
ipaddr
,
int
port
,
size_t
aSize
);
int
acpServerInit
(
acpCtx_t
ctx
,
const
char
*
host
,
int
port
,
size_t
aSize
);
/** Runs server.
/** Runs server.
* Allocates the context with registering to requested notifications.
* Allocates the context with registering to requested notifications.
*
*
* @param[in]
ipaddr Server ip address
* @param[in]
host Server ip address / unixsocket pipe path
* @param[in] port Server TCP port
* @param[in] port Server TCP port
* @param[in] msgTable Requested service responses/notifications to register, last element should be with name==NULL
* @param[in] msgTable Requested service responses/notifications to register, last element should be with name==NULL
* @param[in] aSize Arena size
* @param[in] aSize Arena size
* @param[out] ctx ACP Context
* @param[out] ctx ACP Context
* @return 0 on success, or an error code on failure.
* @return 0 on success, or an error code on failure.
*/
*/
int
acpServerInitWithCtx
(
IpAddress_t
ipaddr
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
);
int
acpServerInitWithCtx
(
const
char
*
host
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
);
/** Closes the socket from the context,
/** Closes the socket from the context,
* an ACP context is still valid after call.
* an ACP context is still valid after call.
...
...
openair3/SS/Sidl/lib/acp/api/acpCtx.h
View file @
af91004e
...
@@ -57,6 +57,8 @@ struct acpCtx {
...
@@ -57,6 +57,8 @@ struct acpCtx {
void
*
handle
;
void
*
handle
;
/** ACP server handle. */
/** ACP server handle. */
void
*
sHandle
;
void
*
sHandle
;
/** Socket type (AF_INET/AF_UNIX) */
int
sockType
;
/** Socket descriptor (on client side, or master socket on server side). */
/** Socket descriptor (on client side, or master socket on server side). */
int
sock
;
int
sock
;
/** Peers socket descriptors on server side. */
/** Peers socket descriptors on server side. */
...
...
openair3/SS/Sidl/lib/acp/api/acpSocket.h
View file @
af91004e
...
@@ -32,19 +32,19 @@ SIDL_BEGIN_C_INTERFACE
...
@@ -32,19 +32,19 @@ SIDL_BEGIN_C_INTERFACE
/** Connects to server.
/** Connects to server.
*
*
* @param[in]
ipaddr
Server ip address
* @param[in]
host
Server ip address
* @param[in] port Server ip port
* @param[in] port Server ip port
* @return socket fd, or negative number on failure
* @return socket fd, or negative number on failure
*/
*/
int
acpSocketConnect
(
IpAddress_t
ipaddr
,
int
port
);
int
acpSocketConnect
(
const
char
*
host
,
int
port
);
/** Opens listening socket.
/** Opens listening socket.
*
*
* @param[in]
ipaddr Server ip address
* @param[in]
host Server ip address / unixsocket file
* @param[in] port Server ip port
* @param[in] port Server ip port
* @return socket fd, or negative number on failure
* @return socket fd, or negative number on failure
*/
*/
int
acpSocketListen
(
IpAddress_t
ipaddr
,
int
port
);
int
acpSocketListen
(
const
char
*
host
,
int
port
);
int
acpSocketSelect
(
int
sock
,
MSec_t
socketTimeout
);
int
acpSocketSelect
(
int
sock
,
MSec_t
socketTimeout
);
...
...
openair3/SS/Sidl/lib/acp/src/acp.c
View file @
af91004e
...
@@ -419,7 +419,6 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
...
@@ -419,7 +419,6 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
ACP_DEBUG_CLOG
(
ctx
,
"Sending message '%s'"
,
acpGetMsgName
(
ACP_HEADER_SIZE
,
buffer
));
ACP_DEBUG_CLOG
(
ctx
,
"Sending message '%s'"
,
acpGetMsgName
(
ACP_HEADER_SIZE
,
buffer
));
#endif
#endif
int
ret
;
int
sock
=
ACP_CTX_CAST
(
ctx
)
->
sock
;
int
sock
=
ACP_CTX_CAST
(
ctx
)
->
sock
;
if
(
ACP_CTX_CAST
(
ctx
)
->
isServer
)
{
if
(
ACP_CTX_CAST
(
ctx
)
->
isServer
)
{
...
@@ -431,6 +430,8 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
...
@@ -431,6 +430,8 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
}
}
}
}
int
ret
=
0
;
/* Write SIDL message */
/* Write SIDL message */
if
(
kind
!=
ACP_NTF
)
{
if
(
kind
!=
ACP_NTF
)
{
if
(
ACP_CTX_CAST
(
ctx
)
->
isServer
&&
!
acpCtxPeerRespondsToService
(
ACP_CTX_CAST
(
ctx
),
sock
,
type
))
{
if
(
ACP_CTX_CAST
(
ctx
)
->
isServer
&&
!
acpCtxPeerRespondsToService
(
ACP_CTX_CAST
(
ctx
),
sock
,
type
))
{
...
@@ -507,7 +508,7 @@ int acpInitCtx(const struct acpMsgTable* msgTable, acpCtx_t* ctx)
...
@@ -507,7 +508,7 @@ int acpInitCtx(const struct acpMsgTable* msgTable, acpCtx_t* ctx)
return
0
;
return
0
;
}
}
int
acpClientInit
(
acpCtx_t
ctx
,
IpAddress_t
ipaddr
,
int
port
,
size_t
aSize
)
int
acpClientInit
(
acpCtx_t
ctx
,
const
char
*
host
,
int
port
,
size_t
aSize
)
{
{
ACP_DEBUG_ENTER_CLOG
(
ctx
);
ACP_DEBUG_ENTER_CLOG
(
ctx
);
...
@@ -516,7 +517,7 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
...
@@ -516,7 +517,7 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
return
-
ACP_ERR_INVALID_CTX
;
return
-
ACP_ERR_INVALID_CTX
;
}
}
int
sock
=
acpSocketConnect
(
ipaddr
,
port
);
int
sock
=
acpSocketConnect
(
host
,
port
);
if
(
sock
<
0
)
{
if
(
sock
<
0
)
{
ACP_DEBUG_EXIT_CLOG
(
ctx
,
"ACP_ERR_SOCKCONN_ABORTED"
);
ACP_DEBUG_EXIT_CLOG
(
ctx
,
"ACP_ERR_SOCKCONN_ABORTED"
);
return
-
ACP_ERR_SOCKCONN_ABORTED
;
return
-
ACP_ERR_SOCKCONN_ABORTED
;
...
@@ -547,7 +548,7 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
...
@@ -547,7 +548,7 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
return
0
;
return
0
;
}
}
int
acpClientInitWithCtx
(
IpAddress_t
ipaddr
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
)
int
acpClientInitWithCtx
(
const
char
*
host
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
)
{
{
SIDL_ASSERT
(
ctx
);
SIDL_ASSERT
(
ctx
);
ACP_DEBUG_ENTER_LOG
();
ACP_DEBUG_ENTER_LOG
();
...
@@ -559,7 +560,7 @@ int acpClientInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
...
@@ -559,7 +560,7 @@ int acpClientInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
return
ret
;
return
ret
;
}
}
ret
=
acpClientInit
(
_ctx
,
ipaddr
,
port
,
aSize
);
ret
=
acpClientInit
(
_ctx
,
host
,
port
,
aSize
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
acpDeleteCtx
(
_ctx
);
acpDeleteCtx
(
_ctx
);
...
@@ -573,7 +574,7 @@ int acpClientInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
...
@@ -573,7 +574,7 @@ int acpClientInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
return
0
;
return
0
;
}
}
int
acpServerInit
(
acpCtx_t
ctx
,
IpAddress_t
ipaddr
,
int
port
,
size_t
aSize
)
int
acpServerInit
(
acpCtx_t
ctx
,
const
char
*
host
,
int
port
,
size_t
aSize
)
{
{
ACP_DEBUG_ENTER_CLOG
(
ctx
);
ACP_DEBUG_ENTER_CLOG
(
ctx
);
...
@@ -582,7 +583,7 @@ int acpServerInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
...
@@ -582,7 +583,7 @@ int acpServerInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
return
-
ACP_ERR_INVALID_CTX
;
return
-
ACP_ERR_INVALID_CTX
;
}
}
int
sock
=
acpSocketListen
(
ipaddr
,
port
);
int
sock
=
acpSocketListen
(
host
,
port
);
if
(
sock
<
0
)
{
if
(
sock
<
0
)
{
ACP_DEBUG_EXIT_CLOG
(
ctx
,
"ACP_ERR_SOCKCONN_ABORTED"
);
ACP_DEBUG_EXIT_CLOG
(
ctx
,
"ACP_ERR_SOCKCONN_ABORTED"
);
return
-
ACP_ERR_SOCKCONN_ABORTED
;
return
-
ACP_ERR_SOCKCONN_ABORTED
;
...
@@ -598,10 +599,10 @@ int acpServerInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
...
@@ -598,10 +599,10 @@ int acpServerInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
return
0
;
return
0
;
}
}
int
acpServerInitWithCtx
(
IpAddress_t
ipaddr
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
)
int
acpServerInitWithCtx
(
const
char
*
host
,
int
port
,
const
struct
acpMsgTable
*
msgTable
,
size_t
aSize
,
acpCtx_t
*
ctx
)
{
{
SIDL_ASSERT
(
host
);
SIDL_ASSERT
(
ctx
);
SIDL_ASSERT
(
ctx
);
ACP_DEBUG_ENTER_LOG
();
ACP_DEBUG_ENTER_LOG
();
acpCtx_t
_ctx
=
NULL
;
acpCtx_t
_ctx
=
NULL
;
...
@@ -611,7 +612,7 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
...
@@ -611,7 +612,7 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
return
ret
;
return
ret
;
}
}
ret
=
acpServerInit
(
_ctx
,
ipaddr
,
port
,
aSize
);
ret
=
acpServerInit
(
_ctx
,
host
,
port
,
aSize
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
acpDeleteCtx
(
_ctx
);
acpDeleteCtx
(
_ctx
);
...
...
openair3/SS/Sidl/lib/acp/src/acpSocket.c
View file @
af91004e
...
@@ -24,12 +24,17 @@
...
@@ -24,12 +24,17 @@
#include <netinet/tcp.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
#include <errno.h>
#include <errno.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <regex.h>
// Internal includes
// Internal includes
#include "acpSocket.h"
#include "acpSocket.h"
...
@@ -91,28 +96,98 @@ static int acpSocketSetOpts(int sock, bool isServer)
...
@@ -91,28 +96,98 @@ static int acpSocketSetOpts(int sock, bool isServer)
return
0
;
return
0
;
}
}
int
acpSocketConnect
(
IpAddress_t
ipaddr
,
int
port
)
static
int
acpIsIp
(
const
char
*
ip
)
{
{
ACP_DEBUG_ENTER_LOG
();
regex_t
regex
;
int
reti
=
regcomp
(
&
regex
,
"^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$"
,
REG_NEWLINE
|
REG_ICASE
|
REG_EXTENDED
);
SIDL_ASSERT
(
reti
==
REG_NOERROR
);
struct
sockaddr_in
sin
;
reti
=
regexec
(
&
regex
,
ip
,
0
,
NULL
,
0
)
;
sin
.
sin_family
=
AF_INET
;
SIDL_ASSERT
((
reti
==
REG_NOERROR
)
||
(
reti
==
REG_NOMATCH
))
;
sin
.
sin_port
=
htons
(
port
)
;
return
reti
;
sin
.
sin_addr
.
s_addr
=
ntohl
(
ipaddr
.
v
.
ipv4
);
}
int
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
static
int
acpPrepareSocket
(
const
char
*
host
,
int
port
,
struct
sockaddr
**
sin
,
size_t
*
sinsz
)
if
(
sock
<
0
)
{
{
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
int
sock
=
-
1
;
return
-
1
;
uint8_t
isUnixSocket
=
acpIsIp
(
host
);
}
if
(
!
isUnixSocket
)
{
IpAddress_t
ipaddr
;
acpConvertIp
(
host
,
&
ipaddr
);
*
sin
=
(
struct
sockaddr
*
)
acpMalloc
(
sizeof
(
struct
sockaddr_in
));
SIDL_ASSERT
(
*
sin
);
((
struct
sockaddr_in
*
)
*
sin
)
->
sin_family
=
AF_INET
;
((
struct
sockaddr_in
*
)
*
sin
)
->
sin_port
=
htons
(
port
);
((
struct
sockaddr_in
*
)
*
sin
)
->
sin_addr
.
s_addr
=
ntohl
(
ipaddr
.
v
.
ipv4
);
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
sock
<
0
)
{
acpFree
(
*
sin
);
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
if
(
acpSocketSetOpts
(
sock
,
false
)
==
-
1
)
{
*
sinsz
=
sizeof
(
struct
sockaddr_in
);
close
(
sock
);
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
if
(
acpSocketSetOpts
(
sock
,
false
)
==
-
1
)
{
return
-
1
;
acpFree
(
*
sin
);
return
-
1
;
}
}
else
{
mode_t
pre_umask
=
umask
(
0
);
*
sin
=
(
struct
sockaddr
*
)
acpMalloc
(
sizeof
(
struct
sockaddr_un
));
SIDL_ASSERT
(
*
sin
);
memset
(
*
sin
,
0
,
sizeof
(
struct
sockaddr_un
));
((
struct
sockaddr_un
*
)
*
sin
)
->
sun_family
=
AF_UNIX
;
strcpy
(((
struct
sockaddr_un
*
)
*
sin
)
->
sun_path
,
host
);
sock
=
socket
(
AF_UNIX
,
SOCK_STREAM
,
0
);
if
(
sock
<
0
)
{
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
acpFree
(
*
sin
);
umask
(
pre_umask
);
return
-
1
;
}
int
arg
=
fcntl
(
sock
,
F_GETFL
,
NULL
);
if
(
arg
==
-
1
)
{
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
acpFree
(
*
sin
);
umask
(
pre_umask
);
return
-
1
;
}
arg
|=
O_NONBLOCK
;
if
(
fcntl
(
sock
,
F_SETFL
,
arg
)
==
-
1
)
{
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
acpFree
(
*
sin
);
umask
(
pre_umask
);
return
-
1
;
}
*
sinsz
=
sizeof
(
struct
sockaddr_un
);
}
}
if
(
connect
(
sock
,
(
struct
sockaddr
*
)
&
sin
,
sizeof
(
sin
))
==
-
1
)
{
return
sock
;
}
int
acpSocketConnect
(
const
char
*
host
,
int
port
)
{
ACP_DEBUG_ENTER_LOG
();
int
sock
=
-
1
;
struct
sockaddr
*
sin
=
NULL
;
size_t
sinsz
=
0
;
sock
=
acpPrepareSocket
(
host
,
port
,
&
sin
,
&
sinsz
);
SIDL_ASSERT
(
sock
>=
0
);
SIDL_ASSERT
(
sin
);
if
(
connect
(
sock
,
sin
,
sinsz
)
==
-
1
)
{
if
((
errno
==
EINPROGRESS
)
||
(
errno
==
EAGAIN
))
{
if
((
errno
==
EINPROGRESS
)
||
(
errno
==
EAGAIN
))
{
fd_set
fdset
;
fd_set
fdset
;
FD_ZERO
(
&
fdset
);
FD_ZERO
(
&
fdset
);
...
@@ -126,50 +201,44 @@ int acpSocketConnect(IpAddress_t ipaddr, int port)
...
@@ -126,50 +201,44 @@ int acpSocketConnect(IpAddress_t ipaddr, int port)
int
valopt
;
int
valopt
;
socklen_t
optlen
=
sizeof
(
valopt
);
socklen_t
optlen
=
sizeof
(
valopt
);
if
((
getsockopt
(
sock
,
SOL_SOCKET
,
SO_ERROR
,
(
void
*
)
&
valopt
,
&
optlen
)
==
-
1
)
||
valopt
)
{
if
((
getsockopt
(
sock
,
SOL_SOCKET
,
SO_ERROR
,
(
void
*
)
&
valopt
,
&
optlen
)
==
-
1
)
||
valopt
)
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
}
else
{
}
else
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
}
else
{
}
else
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
}
}
ACP_DEBUG_LOG
(
"Connected to server %s:%d"
,
inet_ntoa
(
sin
.
sin_addr
),
port
);
acpFree
(
sin
);
ACP_DEBUG_LOG
(
"Connected to server %s:%d"
,
host
,
port
);
ACP_DEBUG_EXIT_LOG
(
NULL
);
ACP_DEBUG_EXIT_LOG
(
NULL
);
return
sock
;
return
sock
;
err:
acpFree
(
sin
);
close
(
sock
);
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
int
acpSocketListen
(
IpAddress_t
ipaddr
,
int
port
)
int
acpSocketListen
(
const
char
*
host
,
int
port
)
{
{
ACP_DEBUG_ENTER_LOG
();
ACP_DEBUG_ENTER_LOG
();
struct
sockaddr_in
sin
;
int
sock
=
-
1
;
sin
.
sin_family
=
AF_INET
;
struct
sockaddr
*
sin
=
NULL
;
sin
.
sin_port
=
htons
(
port
);
size_t
sinsz
=
0
;
sin
.
sin_addr
.
s_addr
=
ntohl
(
ipaddr
.
v
.
ipv4
);
int
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
acpIsIp
(
host
))
{
if
(
sock
<
0
)
{
unlink
(
host
);
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
if
(
acpSocketSetOpts
(
sock
,
true
)
==
-
1
)
{
sock
=
acpPrepareSocket
(
host
,
port
,
&
sin
,
&
sinsz
);
close
(
sock
);
SIDL_ASSERT
(
sock
>=
0
);
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
SIDL_ASSERT
(
sin
);
return
-
1
;
}
if
(
bind
(
sock
,
(
struct
sockaddr
*
)
&
sin
,
sizeof
(
sin
)
)
==
-
1
)
{
if
(
bind
(
sock
,
sin
,
sinsz
)
==
-
1
)
{
if
((
errno
==
EINPROGRESS
)
||
(
errno
==
EAGAIN
))
{
if
((
errno
==
EINPROGRESS
)
||
(
errno
==
EAGAIN
))
{
fd_set
fdset
;
fd_set
fdset
;
FD_ZERO
(
&
fdset
);
FD_ZERO
(
&
fdset
);
...
@@ -183,33 +252,30 @@ int acpSocketListen(IpAddress_t ipaddr, int port)
...
@@ -183,33 +252,30 @@ int acpSocketListen(IpAddress_t ipaddr, int port)
int
valopt
;
int
valopt
;
socklen_t
optlen
=
sizeof
(
valopt
);
socklen_t
optlen
=
sizeof
(
valopt
);
if
((
getsockopt
(
sock
,
SOL_SOCKET
,
SO_ERROR
,
(
void
*
)
&
valopt
,
&
optlen
)
==
-
1
)
||
valopt
)
{
if
((
getsockopt
(
sock
,
SOL_SOCKET
,
SO_ERROR
,
(
void
*
)
&
valopt
,
&
optlen
)
==
-
1
)
||
valopt
)
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
}
else
{
}
else
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
}
else
{
}
else
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
}
}
const
int
backlog
=
3
;
const
int
backlog
=
3
;
if
(
listen
(
sock
,
backlog
)
==
-
1
)
{
if
(
listen
(
sock
,
backlog
)
==
-
1
)
{
close
(
sock
);
goto
err
;
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
ACP_DEBUG_LOG
(
"Created listening server %s:%d"
,
inet_ntoa
(
sin
.
sin_addr
),
port
);
acpFree
(
sin
);
ACP_DEBUG_LOG
(
"Created listening server %s:%d"
,
host
,
port
);
ACP_DEBUG_EXIT_LOG
(
NULL
);
ACP_DEBUG_EXIT_LOG
(
NULL
);
return
sock
;
return
sock
;
err:
acpFree
(
sin
);
close
(
sock
);
ACP_DEBUG_EXIT_LOG
(
strerror
(
errno
));
return
-
1
;
}
}
int
acpSocketSelect
(
int
sock
,
MSec_t
socketTimeout
)
int
acpSocketSelect
(
int
sock
,
MSec_t
socketTimeout
)
...
...
openair3/SS/ss_eNB_drb_task.c
View file @
af91004e
...
@@ -93,7 +93,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
...
@@ -93,7 +93,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
ind
.
Common
.
TimingInfo
.
d
=
TimingInfo_Type_SubFrame
;
ind
.
Common
.
TimingInfo
.
d
=
TimingInfo_Type_SubFrame
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
d
=
SystemFrameNumberInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
d
=
SystemFrameNumberInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
=
pdu_ind
->
frame
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
=
pdu_ind
->
frame
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
d
=
SubFrameInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
d
=
SubFrameInfo_Type_Number
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
=
pdu_ind
->
subframe
;
ind
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
=
pdu_ind
->
subframe
;
...
@@ -120,7 +120,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
...
@@ -120,7 +120,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
DevAssert
(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
!=
NULL
);
DevAssert
(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
!=
NULL
);
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
d
=
pdu_ind
->
sdu_size
;
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
d
=
pdu_ind
->
sdu_size
;
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
v
=
CALLOC
(
1
,
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
d
);
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
v
=
CALLOC
(
1
,
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
d
);
memcpy
(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
v
,
pdu_ind
->
sdu
,
pdu_ind
->
sdu_size
);
memcpy
(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
[
i
].
v
,
pdu_ind
->
sdu
,
pdu_ind
->
sdu_size
);
}
}
//Encode Message
//Encode Message
...
@@ -226,10 +226,10 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
...
@@ -226,10 +226,10 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
}
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_DRB] Peer ordered shutdown
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_DRB] Peer ordered shutdown
\n
"
);
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_DRB] Peer connection established
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_DRB] Peer connection established
\n
"
);
}
}
else
else
{
{
LOG_A
(
ENB_SS_DRB_ACP
,
"[SS_DRB] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_SS_DRB_ACP
,
"[SS_DRB] Invalid userId: %d
\n
"
,
userId
);
...
@@ -286,7 +286,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -286,7 +286,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
MessageDef
*
received_msg
=
NULL
;
MessageDef
*
received_msg
=
NULL
;
int
result
=
0
;
int
result
=
0
;
itti_receive_msg
(
TASK_SS_DRB
,
&
received_msg
);
itti_receive_msg
(
TASK_SS_DRB
,
&
received_msg
);
/* Check if there is a packet to handle */
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
if
(
received_msg
!=
NULL
)
...
@@ -303,15 +303,15 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -303,15 +303,15 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
}
}
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
if
(
origin_task
==
TASK_SS_PORTMAN
)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
{
LOG_D
(
ENB_SS_DRB
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_D
(
ENB_SS_DRB
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
else
else
{
{
LOG_A
(
ENB_SS_DRB
,
"[SS_DRB] Received SS_DRB_PDU_IND from RRC PDCP
\n
"
);
LOG_A
(
ENB_SS_DRB
,
"[SS_DRB] Received SS_DRB_PDU_IND from RRC PDCP
\n
"
);
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
{
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_drb_data
(
&
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
,
cell_index
);
ss_send_drb_data
(
&
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
,
cell_index
);
}
}
...
@@ -335,7 +335,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -335,7 +335,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
}
}
}
}
}
else
else
{
{
...
@@ -347,13 +347,8 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -347,13 +347,8 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
void
ss_eNB_drb_init
(
void
)
void
ss_eNB_drb_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS_DRB_ACP
,
"[SS_DRB] Starting System Simulator DRB Thread
\n
"
);
LOG_A
(
ENB_SS_DRB_ACP
,
"[SS_DRB] Starting System Simulator DRB Thread
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Drbport
;
int
port
=
RC
.
ss
.
Drbport
;
const
struct
acpMsgTable
msgTable
[]
=
{
const
struct
acpMsgTable
msgTable
[]
=
{
...
@@ -367,7 +362,7 @@ void ss_eNB_drb_init(void)
...
@@ -367,7 +362,7 @@ void ss_eNB_drb_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_drb_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
DrbHost
?
RC
.
ss
.
DrbHost
:
"127.0.0.1"
,
port
,
msgTable
,
aSize
,
&
ctx_drb_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS_DRB_ACP
,
"[SS_DRB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS_DRB_ACP
,
"[SS_DRB] Connection failure err=%d
\n
"
,
ret
);
...
...
openair3/SS/ss_eNB_port_man_task.c
View file @
af91004e
...
@@ -302,13 +302,8 @@ void ss_port_man_send_data(
...
@@ -302,13 +302,8 @@ void ss_port_man_send_data(
*/
*/
void
ss_eNB_port_man_init
(
void
)
void
ss_eNB_port_man_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS_PORTMAN_ACP
,
"Starting System Simulator Manager
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
LOG_A
(
ENB_SS_PORTMAN_ACP
,
"[SS-PORTMAN] Starting System Simulator Manager
\n
"
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Sysport
;
int
port
=
RC
.
ss
.
Sysport
;
...
@@ -325,7 +320,7 @@ void ss_eNB_port_man_init(void)
...
@@ -325,7 +320,7 @@ void ss_eNB_port_man_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
SysHost
?
RC
.
ss
.
SysHost
:
"127.0.0.1"
,
port
,
msgTable
,
aSize
,
&
ctx_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS_PORTMAN_ACP
,
"Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS_PORTMAN_ACP
,
"Connection failure err=%d
\n
"
,
ret
);
...
@@ -378,10 +373,12 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -378,10 +373,12 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
acpGetMsgSidlStatus
(
msgSize
,
buffer
,
&
sidlStatus
);
acpGetMsgSidlStatus
(
msgSize
,
buffer
,
&
sidlStatus
);
acpFree
(
buffer
);
acpFree
(
buffer
);
}
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
)
{
LOG_E
(
ENB_SS_PORTMAN_ACP
,
"Error: Peer ordered shutdown
\n
"
);
LOG_E
(
ENB_SS_PORTMAN_ACP
,
"Error: Peer ordered shutdown
\n
"
);
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
)
{
LOG_A
(
ENB_SS_PORTMAN_ACP
,
" Peer connection established
\n
"
);
LOG_A
(
ENB_SS_PORTMAN_ACP
,
" Peer connection established
\n
"
);
}
}
else
else
...
...
openair3/SS/ss_eNB_srb_task.c
View file @
af91004e
...
@@ -279,7 +279,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
...
@@ -279,7 +279,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
}
}
else
else
timer_tinfo
.
sf
--
;
timer_tinfo
.
sf
--
;
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
LOG_A
(
ENB_SS_SRB_ACP
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
LOG_A
(
ENB_SS_SRB_ACP
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
...
@@ -339,11 +339,11 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -339,11 +339,11 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
isConnected
=
false
;
isConnected
=
false
;
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
isConnected
=
true
;
isConnected
=
true
;
}
}
else
else
{
{
LOG_A
(
ENB_SS_SRB_ACP
,
"[SS_SRB] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_SS_SRB_ACP
,
"[SS_SRB] Invalid userId: %d
\n
"
,
userId
);
...
@@ -404,13 +404,8 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -404,13 +404,8 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
*/
*/
void
ss_eNB_srb_init
(
void
)
void
ss_eNB_srb_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS_SRB_ACP
,
"[SS_SRB] Starting System Simulator SRB Thread
\n
"
);
LOG_A
(
ENB_SS_SRB_ACP
,
"[SS_SRB] Starting System Simulator SRB Thread
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Srbport
;
int
port
=
RC
.
ss
.
Srbport
;
...
@@ -426,7 +421,7 @@ void ss_eNB_srb_init(void)
...
@@ -426,7 +421,7 @@ void ss_eNB_srb_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_srb_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
SrbHost
?
RC
.
ss
.
SrbHost
:
"127.0.0.1"
,
port
,
msgTable
,
aSize
,
&
ctx_srb_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS_SRB_ACP
,
"[SS_SRB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS_SRB_ACP
,
"[SS_SRB] Connection failure err=%d
\n
"
,
ret
);
...
...
openair3/SS/ss_eNB_sysind_task.c
View file @
af91004e
...
@@ -77,9 +77,9 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
...
@@ -77,9 +77,9 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
{
{
struct
SYSTEM_IND
ind
=
{};
struct
SYSTEM_IND
ind
=
{};
uint32_t
status
=
0
;
uint32_t
status
=
0
;
DevAssert
(
p_ind
!=
NULL
);
DevAssert
(
p_ind
!=
NULL
);
size_t
msgSize
=
size
;
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
;
...
@@ -244,11 +244,8 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
...
@@ -244,11 +244,8 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
*/
*/
void
ss_eNB_sysind_init
(
void
)
void
ss_eNB_sysind_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS_SYSIND_ACP
,
"[SS_SYSIND] Starting System Simulator SYSIND Thread
\n
"
);
LOG_A
(
ENB_SS_SYSIND_ACP
,
"[SS_SYSIND] Starting System Simulator SYSIND Thread
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
SysIndport
;
int
port
=
RC
.
ss
.
SysIndport
;
...
@@ -257,13 +254,13 @@ void ss_eNB_sysind_init(void)
...
@@ -257,13 +254,13 @@ void ss_eNB_sysind_init(void)
{
"SysIndProcessToSS"
,
MSG_SysIndProcessToSS_userId
},
{
"SysIndProcessToSS"
,
MSG_SysIndProcessToSS_userId
},
// The last element should be NULL
// The last element should be NULL
{
NULL
,
0
}};
{
NULL
,
0
}};
// Arena size to decode received message
// Arena size to decode received message
const
size_t
aSize
=
32
*
1024
;
const
size_t
aSize
=
32
*
1024
;
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_sysind_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
SysIndHost
?
RC
.
ss
.
SysIndHost
:
"127.0.0.1"
,
port
,
msgTable
,
aSize
,
&
ctx_sysind_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS_SYSIND_ACP
,
"[SS_SYSIND] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS_SYSIND_ACP
,
"[SS_SYSIND] Connection failure err=%d
\n
"
,
ret
);
...
...
openair3/SS/ss_eNB_vng_task.c
View file @
af91004e
...
@@ -175,10 +175,10 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
...
@@ -175,10 +175,10 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
}
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
}
}
else
else
{
{
LOG_A
(
ENB_SS_VNG
,
"[SS-VNG] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_SS_VNG
,
"[SS-VNG] Invalid userId: %d
\n
"
,
userId
);
...
@@ -304,17 +304,10 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
...
@@ -304,17 +304,10 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
*/
*/
void
ss_eNB_vng_init
(
void
)
void
ss_eNB_vng_init
(
void
)
{
{
IpAddress_t
ipaddr
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Vngport
;
int
port
=
RC
.
ss
.
Vngport
;
LOG_A
(
ENB_SS_VNG
,
"[SS-VNG] Initializing VNG Port %s:%d
\n
"
,
hostIp
,
port
);
LOG_A
(
ENB_SS_VNG
,
"[SS-VNG] Initializing VNG Port %s:%d
\n
"
,
RC
.
ss
.
VngHost
,
port
);
//acpInit(malloc, free, 1000);
//acpInit(malloc, free, 1000);
const
struct
acpMsgTable
msgTable
[]
=
{
const
struct
acpMsgTable
msgTable
[]
=
{
...
@@ -329,7 +322,7 @@ void ss_eNB_vng_init(void)
...
@@ -329,7 +322,7 @@ void ss_eNB_vng_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vng_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
VngHost
?
RC
.
ss
.
VngHost
:
"127.0.0.1"
,
port
,
msgTable
,
aSize
,
&
ctx_vng_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS_VNG
,
"[SS-VNG] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS_VNG
,
"[SS-VNG] Connection failure err=%d
\n
"
,
ret
);
...
...
openair3/SS/ss_eNB_vtp_task.c
View file @
af91004e
...
@@ -48,6 +48,9 @@ enum MsgUserId
...
@@ -48,6 +48,9 @@ enum MsgUserId
char
*
vtp_local_address
=
"127.0.0.1"
;
char
*
vtp_local_address
=
"127.0.0.1"
;
int
vtp_proxy_send_port
=
7776
;
int
vtp_proxy_send_port
=
7776
;
int
vtp_proxy_recv_port
=
7777
;
int
vtp_proxy_recv_port
=
7777
;
int
ss_eNB_vtp_init
(
void
);
/*
/*
* Function : sys_send_init_udp
* Function : sys_send_init_udp
* Description: Sends the UDP_INIT message to UDP_TASK to create the receiving socket
* Description: Sends the UDP_INIT message to UDP_TASK to create the receiving socket
...
@@ -347,33 +350,28 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
...
@@ -347,33 +350,28 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
ss_eNB_vtp_init
(
void
)
int
ss_eNB_vtp_init
(
void
)
{
{
IpAddress_t
ipaddr
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
?
RC
.
ss
.
hostIp
:
"127.0.0.1"
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Vtpport
;
int
port
=
RC
.
ss
.
Vtpport
;
if
(
port
==
0
)
if
(
port
==
0
)
{
{
port
=
7780
;
port
=
7780
;
}
}
LOG_A
(
ENB_SS_VTP
,
"[SS-VTP] Initializing VTP Port %s:%d
\n
"
,
hostIp
,
port
);
LOG_A
(
ENB_SS_VTP
,
"[SS-VTP] Initializing VTP Port %s:%d
\n
"
,
RC
.
ss
.
VtpHost
,
port
);
// acpInit(malloc, free, 1000);
// acpInit(malloc, free, 1000);
const
struct
acpMsgTable
msgTable
[]
=
{
const
struct
acpMsgTable
msgTable
[]
=
{
{
"SysVTEnquireTimingAck"
,
MSG_SysVTEnquireTimingAck_userId
},
{
"SysVTEnquireTimingAck"
,
MSG_SysVTEnquireTimingAck_userId
},
{
"SysVTEnquireTimingUpd"
,
MSG_SysVTEnquireTimingUpd_userId
},
{
"SysVTEnquireTimingUpd"
,
MSG_SysVTEnquireTimingUpd_userId
},
// The last element should be NULL
// The last element should be NULL
{
{
NULL
,
0
},
NULL
,
0
}
};
};
// Arena size to decode received message
// Arena size to decode received message
const
size_t
aSize
=
32
*
1024
;
const
size_t
aSize
=
32
*
1024
;
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vtp_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
VtpHost
,
port
,
msgTable
,
aSize
,
&
ctx_vtp_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_E
(
ENB_SS_VTP
,
"[SS-VTP] Connection failure err=%d
\n
"
,
ret
);
LOG_E
(
ENB_SS_VTP
,
"[SS-VTP] Connection failure err=%d
\n
"
,
ret
);
...
@@ -390,8 +388,7 @@ int ss_eNB_vtp_init(void)
...
@@ -390,8 +388,7 @@ int ss_eNB_vtp_init(void)
}
}
static
void
ss_eNB_wait_first_msg
(
void
)
static
void
ss_eNB_wait_first_msg
(
void
)
{
{
const
size_t
size
=
16
*
1024
;
unsigned
char
*
buffer
=
(
unsigned
char
*
)
acpMalloc
(
16
*
1024
);
unsigned
char
*
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
assert
(
buffer
);
while
(
1
)
while
(
1
)
{
{
...
...
openair3/SS/ss_gNB_drb_task.c
View file @
af91004e
...
@@ -404,12 +404,12 @@ void *ss_gNB_drb_process_itti_msg(void *notUsed)
...
@@ -404,12 +404,12 @@ void *ss_gNB_drb_process_itti_msg(void *notUsed)
void
ss_gNB_drb_init
(
void
)
void
ss_gNB_drb_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
GNB_APP
,
"[SS_DRB] Starting System Simulator DRB Thread
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_DRB] Starting System Simulator DRB Thread
\n
"
);
char
*
host
=
RC
.
ss
.
DrbHost
;
const
char
*
hostIp
;
if
(
host
==
NULL
)
{
hostIp
=
RC
.
ss
.
hostIp
;
host
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
}
// Port number
// Port number
int
port
=
RC
.
ss
.
Drbport
;
int
port
=
RC
.
ss
.
Drbport
;
...
@@ -424,7 +424,7 @@ void ss_gNB_drb_init(void)
...
@@ -424,7 +424,7 @@ void ss_gNB_drb_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_drb_g
);
int
ret
=
acpServerInitWithCtx
(
host
,
port
,
msgTable
,
aSize
,
&
ctx_drb_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
GNB_APP
,
"[SS_DRB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
GNB_APP
,
"[SS_DRB] Connection failure err=%d
\n
"
,
ret
);
...
...
openair3/SS/ss_gNB_port_man_task.c
View file @
af91004e
...
@@ -57,9 +57,9 @@ void ss_nr_port_man_send_cnf(struct NR_SYSTEM_CTRL_CNF recvCnf)
...
@@ -57,9 +57,9 @@ void ss_nr_port_man_send_cnf(struct NR_SYSTEM_CTRL_CNF recvCnf)
struct
NR_SYSTEM_CTRL_CNF
cnf
;
struct
NR_SYSTEM_CTRL_CNF
cnf
;
const
size_t
size
=
16
*
1024
;
const
size_t
size
=
16
*
1024
;
uint32_t
status
;
uint32_t
status
;
unsigned
char
*
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
unsigned
char
*
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
size_t
msgSize
=
size
;
size_t
msgSize
=
size
;
memset
(
&
cnf
,
0
,
sizeof
(
cnf
));
memset
(
&
cnf
,
0
,
sizeof
(
cnf
));
cnf
.
Common
.
CellId
=
recvCnf
.
Common
.
CellId
;
cnf
.
Common
.
CellId
=
recvCnf
.
Common
.
CellId
;
...
@@ -198,13 +198,8 @@ void ss_nr_port_man_send_data(
...
@@ -198,13 +198,8 @@ void ss_nr_port_man_send_data(
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
ss_gNB_port_man_init
(
void
)
void
ss_gNB_port_man_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Starting GNB System Simulator Manager
\n
"
);
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Starting GNB System Simulator Manager
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
SysportNR
;
int
port
=
RC
.
ss
.
SysportNR
;
...
@@ -219,7 +214,7 @@ void ss_gNB_port_man_init(void)
...
@@ -219,7 +214,7 @@ void ss_gNB_port_man_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
nrctx_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
SysHost
,
port
,
msgTable
,
aSize
,
&
nrctx_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Connection failure err=%d
\n
"
,
ret
);
...
@@ -266,10 +261,10 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
...
@@ -266,10 +261,10 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
}
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Peer ordered shutdown
\n
"
);
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Peer ordered shutdown
\n
"
);
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Peer connection established
\n
"
);
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Peer connection established
\n
"
);
}
}
else
else
{
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
...
...
openair3/SS/ss_gNB_srb_task.c
View file @
af91004e
...
@@ -158,26 +158,26 @@ static void ss_send_srb_data(ss_nrrrc_pdu_ind_t *pdu_ind)
...
@@ -158,26 +158,26 @@ static void ss_send_srb_data(ss_nrrrc_pdu_ind_t *pdu_ind)
#define RESCMPLT_NASINFO c1->choice.rrcResumeComplete->criticalExtensions.choice.rrcResumeComplete->dedicatedNAS_Message
#define RESCMPLT_NASINFO c1->choice.rrcResumeComplete->criticalExtensions.choice.rrcResumeComplete->dedicatedNAS_Message
#define UL_NASINFO c1->choice.ulInformationTransfer->criticalExtensions.choice.ulInformationTransfer->dedicatedNAS_Message
#define UL_NASINFO c1->choice.ulInformationTransfer->criticalExtensions.choice.ulInformationTransfer->dedicatedNAS_Message
if
(
UL_DCCH
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
)
if
(
UL_DCCH
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
)
{
{
if
(
UL_DCCH
.
c1
->
choice
.
rrcSetupComplete
->
criticalExtensions
.
present
==
if
(
UL_DCCH
.
c1
->
choice
.
rrcSetupComplete
->
criticalExtensions
.
present
==
NR_RRCSetupComplete__criticalExtensions_PR_rrcSetupComplete
)
NR_RRCSetupComplete__criticalExtensions_PR_rrcSetupComplete
)
{
{
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
UL_DCCH
.
SETCMPLT_NASINFO
.
buf
,
UL_DCCH
.
SETCMPLT_NASINFO
.
size
);
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
UL_DCCH
.
SETCMPLT_NASINFO
.
buf
,
UL_DCCH
.
SETCMPLT_NASINFO
.
size
);
}
}
}
}
if
(
UL_DCCH
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_rrcResumeComplete
)
if
(
UL_DCCH
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_rrcResumeComplete
)
{
{
if
(
UL_DCCH
.
c1
->
choice
.
rrcResumeComplete
->
criticalExtensions
.
present
==
if
(
UL_DCCH
.
c1
->
choice
.
rrcResumeComplete
->
criticalExtensions
.
present
==
NR_RRCResumeComplete__criticalExtensions_PR_rrcResumeComplete
)
NR_RRCResumeComplete__criticalExtensions_PR_rrcResumeComplete
)
{
{
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
UL_DCCH
.
RESCMPLT_NASINFO
->
buf
,
UL_DCCH
.
RESCMPLT_NASINFO
->
size
);
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
UL_DCCH
.
RESCMPLT_NASINFO
->
buf
,
UL_DCCH
.
RESCMPLT_NASINFO
->
size
);
}
}
}
}
if
(
UL_DCCH
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_ulInformationTransfer
)
if
(
UL_DCCH
.
c1
->
present
==
NR_UL_DCCH_MessageType__c1_PR_ulInformationTransfer
)
{
{
if
(
UL_DCCH
.
c1
->
choice
.
ulInformationTransfer
->
criticalExtensions
.
present
==
if
(
UL_DCCH
.
c1
->
choice
.
ulInformationTransfer
->
criticalExtensions
.
present
==
NR_ULInformationTransfer__criticalExtensions_PR_ulInformationTransfer
)
NR_ULInformationTransfer__criticalExtensions_PR_ulInformationTransfer
)
{
{
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
UL_DCCH
.
UL_NASINFO
->
buf
,
UL_DCCH
.
UL_NASINFO
->
size
);
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
UL_DCCH
.
UL_NASINFO
->
buf
,
UL_DCCH
.
UL_NASINFO
->
size
);
}
}
...
@@ -256,22 +256,22 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req)
...
@@ -256,22 +256,22 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req)
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_DCCH_Message
,(
void
*
)
dl_dcch_msg
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_DCCH_Message
,(
void
*
)
dl_dcch_msg
);
if
(
DL_DCCH
.
c1
->
present
==
NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer
)
if
(
DL_DCCH
.
c1
->
present
==
NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer
)
{
{
if
(
DL_DCCH
.
c1
->
choice
.
dlInformationTransfer
->
criticalExtensions
.
present
if
(
DL_DCCH
.
c1
->
choice
.
dlInformationTransfer
->
criticalExtensions
.
present
==
NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer
)
==
NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer
)
{
{
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
DL_DCCH
.
DL_NASINFO
->
buf
,
DL_DCCH
.
DL_NASINFO
->
size
);
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
DL_DCCH
.
DL_NASINFO
->
buf
,
DL_DCCH
.
DL_NASINFO
->
size
);
}
}
}
}
if
(
DL_DCCH
.
c1
->
present
==
NR_DL_DCCH_MessageType__c1_PR_rrcReconfiguration
)
if
(
DL_DCCH
.
c1
->
present
==
NR_DL_DCCH_MessageType__c1_PR_rrcReconfiguration
)
{
{
if
(
DL_DCCH
.
c1
->
choice
.
rrcReconfiguration
->
criticalExtensions
.
present
if
(
DL_DCCH
.
c1
->
choice
.
rrcReconfiguration
->
criticalExtensions
.
present
==
NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration
)
==
NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration
)
{
{
int
nas_list_cnt
;
int
nas_list_cnt
;
for
(
nas_list_cnt
=
0
;
nas_list_cnt
<
DL_DCCH
.
RECNFG_NASINFO
->
list
.
count
;
nas_list_cnt
++
)
for
(
nas_list_cnt
=
0
;
nas_list_cnt
<
DL_DCCH
.
RECNFG_NASINFO
->
list
.
count
;
nas_list_cnt
++
)
{
{
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
DL_DCCH
.
RECNFG_NASINFO
->
list
.
array
[
nas_list_cnt
]
->
buf
,
DL_DCCH
.
RECNFG_NASINFO
->
list
.
array
[
nas_list_cnt
]
->
size
);
LOG_NAS_P
(
OAILOG_INFO
,
"NR_NAS_PDU"
,
DL_DCCH
.
RECNFG_NASINFO
->
list
.
array
[
nas_list_cnt
]
->
buf
,
DL_DCCH
.
RECNFG_NASINFO
->
list
.
array
[
nas_list_cnt
]
->
size
);
}
}
...
@@ -300,7 +300,7 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req)
...
@@ -300,7 +300,7 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
static
bool
isConnected
=
false
;
static
bool
isConnected
=
false
;
static
inline
void
static
inline
void
ss_gNB_read_from_srb_socket
(
acpCtx_t
ctx
)
ss_gNB_read_from_srb_socket
(
acpCtx_t
ctx
)
...
@@ -329,11 +329,11 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -329,11 +329,11 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
isConnected
=
false
;
isConnected
=
false
;
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
isConnected
=
true
;
isConnected
=
true
;
}
}
else
else
{
{
LOG_A
(
GNB_APP
,
"[SS_SRB] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Invalid userId: %d
\n
"
,
userId
);
...
@@ -349,7 +349,7 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -349,7 +349,7 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
}
}
else
else
LOG_A
(
GNB_APP
,
"[SS_SRB] Connection stopped isConnected:false
\n
)"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Connection stopped isConnected:false
\n
)"
);
}
}
else
if
(
MSG_NrSysSrbProcessFromSS_userId
==
userId
)
else
if
(
MSG_NrSysSrbProcessFromSS_userId
==
userId
)
{
{
...
@@ -385,13 +385,8 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -385,13 +385,8 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
ss_gNB_srb_init
(
void
)
void
ss_gNB_srb_init
(
void
)
{
{
IpAddress_t
ipaddr
;
LOG_A
(
GNB_APP
,
"[SS_SRB] Starting System Simulator SRB Thread
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Starting System Simulator SRB Thread
\n
"
);
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Srbport
;
int
port
=
RC
.
ss
.
Srbport
;
if
(
RC
.
ss
.
mode
==
SS_SOFTMODEM_SRB
)
if
(
RC
.
ss
.
mode
==
SS_SOFTMODEM_SRB
)
...
@@ -413,7 +408,7 @@ void ss_gNB_srb_init(void)
...
@@ -413,7 +408,7 @@ void ss_gNB_srb_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_srb_g
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
SrbHost
,
port
,
msgTable
,
aSize
,
&
ctx_srb_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
GNB_APP
,
"[SS_SRB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Connection failure err=%d
\n
"
,
ret
);
...
...
openair3/SS/ss_gNB_vtp_task.c
View file @
af91004e
...
@@ -76,7 +76,7 @@ static void _ss_log_vt(struct VirtualTimeInfo_Type* virtualTime, const char* pre
...
@@ -76,7 +76,7 @@ static void _ss_log_vt(struct VirtualTimeInfo_Type* virtualTime, const char* pre
case
SlotOffset_Type_Numerology1
:
case
SlotOffset_Type_Numerology1
:
_msg_end
+=
snprintf
(
_msg_end
,
sizeof
(
_msg
)
-
(
_msg_end
-
_msg
),
"slot(1): %d"
,
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology1
);
_msg_end
+=
snprintf
(
_msg_end
,
sizeof
(
_msg
)
-
(
_msg_end
-
_msg
),
"slot(1): %d"
,
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology1
);
break
;
break
;
case
SlotOffset_Type_Numerology2
:
case
SlotOffset_Type_Numerology2
:
_msg_end
+=
snprintf
(
_msg_end
,
sizeof
(
_msg
)
-
(
_msg_end
-
_msg
),
"slot(2): %d"
,
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology2
);
_msg_end
+=
snprintf
(
_msg_end
,
sizeof
(
_msg
)
-
(
_msg_end
-
_msg
),
"slot(2): %d"
,
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology2
);
break
;
break
;
case
SlotOffset_Type_Numerology3
:
case
SlotOffset_Type_Numerology3
:
...
@@ -85,7 +85,7 @@ static void _ss_log_vt(struct VirtualTimeInfo_Type* virtualTime, const char* pre
...
@@ -85,7 +85,7 @@ static void _ss_log_vt(struct VirtualTimeInfo_Type* virtualTime, const char* pre
case
SlotOffset_Type_Numerology4
:
case
SlotOffset_Type_Numerology4
:
_msg_end
+=
snprintf
(
_msg_end
,
sizeof
(
_msg
)
-
(
_msg_end
-
_msg
),
"slot(4): %d"
,
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology4
);
_msg_end
+=
snprintf
(
_msg_end
,
sizeof
(
_msg
)
-
(
_msg_end
-
_msg
),
"slot(4): %d"
,
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology4
);
break
;
break
;
default:
default:
LOG_E
(
GNB_APP
,
"Wrong MU
\r\n
"
);
LOG_E
(
GNB_APP
,
"Wrong MU
\r\n
"
);
break
;
break
;
}
}
...
@@ -144,7 +144,7 @@ void ss_vtp_send_tinfo(
...
@@ -144,7 +144,7 @@ void ss_vtp_send_tinfo(
case
SlotOffset_Type_Numerology1
:
case
SlotOffset_Type_Numerology1
:
virtualTime
.
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology1
=
tinfo
->
slot
;
virtualTime
.
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology1
=
tinfo
->
slot
;
break
;
break
;
case
SlotOffset_Type_Numerology2
:
case
SlotOffset_Type_Numerology2
:
virtualTime
.
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology2
=
tinfo
->
slot
;
virtualTime
.
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology2
=
tinfo
->
slot
;
break
;
break
;
case
SlotOffset_Type_Numerology3
:
case
SlotOffset_Type_Numerology3
:
...
@@ -153,7 +153,7 @@ void ss_vtp_send_tinfo(
...
@@ -153,7 +153,7 @@ void ss_vtp_send_tinfo(
case
SlotOffset_Type_Numerology4
:
case
SlotOffset_Type_Numerology4
:
virtualTime
.
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology4
=
tinfo
->
slot
;
virtualTime
.
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology4
=
tinfo
->
slot
;
break
;;
break
;;
default:
default:
virtualTime
.
TimingInfo
.
Slot
.
d
=
SlotTimingInfo_Type_UNBOUND_VALUE
;
virtualTime
.
TimingInfo
.
Slot
.
d
=
SlotTimingInfo_Type_UNBOUND_VALUE
;
break
;;
break
;;
}
}
...
@@ -267,7 +267,7 @@ static void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
...
@@ -267,7 +267,7 @@ static void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
case
SlotOffset_Type_Numerology1
:
case
SlotOffset_Type_Numerology1
:
req
->
tinfo
.
slot
=
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology1
;
req
->
tinfo
.
slot
=
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology1
;
break
;
break
;
case
SlotOffset_Type_Numerology2
:
case
SlotOffset_Type_Numerology2
:
req
->
tinfo
.
slot
=
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology2
;
req
->
tinfo
.
slot
=
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology2
;
break
;
break
;
case
SlotOffset_Type_Numerology3
:
case
SlotOffset_Type_Numerology3
:
...
@@ -276,7 +276,7 @@ static void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
...
@@ -276,7 +276,7 @@ static void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
case
SlotOffset_Type_Numerology4
:
case
SlotOffset_Type_Numerology4
:
req
->
tinfo
.
slot
=
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology4
;
req
->
tinfo
.
slot
=
virtualTime
->
TimingInfo
.
Slot
.
v
.
SlotOffset
.
v
.
Numerology4
;
break
;
break
;
default:
default:
req
->
tinfo
.
mu
=
-
1
;
req
->
tinfo
.
mu
=
-
1
;
break
;
break
;
}
}
...
@@ -285,7 +285,7 @@ static void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
...
@@ -285,7 +285,7 @@ static void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
req
->
tinfo
.
sfn
=
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
;
req
->
tinfo
.
sfn
=
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
;
req
->
tinfo
.
sf
=
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
;
req
->
tinfo
.
sf
=
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
;
LOG_A
(
GNB_APP
,
"VTP_ACK Command to proxy sent for cell_id: %d SFN: %d SF: %d mu: %d slot: %d
\n
"
,
LOG_A
(
GNB_APP
,
"VTP_ACK Command to proxy sent for cell_id: %d SFN: %d SF: %d mu: %d slot: %d
\n
"
,
req
->
header
.
cell_id
,
req
->
tinfo
.
sfn
,
req
->
tinfo
.
sf
,
req
->
tinfo
.
mu
,
req
->
tinfo
.
slot
);
req
->
header
.
cell_id
,
req
->
tinfo
.
sfn
,
req
->
tinfo
.
sf
,
req
->
tinfo
.
mu
,
req
->
tinfo
.
slot
);
...
@@ -327,10 +327,10 @@ static inline uint8_t ss_gNB_read_from_vtp_socket(acpCtx_t ctx)
...
@@ -327,10 +327,10 @@ static inline uint8_t ss_gNB_read_from_vtp_socket(acpCtx_t ctx)
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer ordered shutdown
\n
"
);
return
1
;
return
1
;
}
}
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
else
if
(
userId
==
-
ACP_PEER_CONNECTED
){
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
LOG_A
(
GNB_APP
,
"[SS_SRB] Peer connection established
\n
"
);
}
}
}
}
if
(
userId
==
0
)
if
(
userId
==
0
)
...
@@ -386,7 +386,7 @@ uint8_t ss_gNB_vtp_process_itti_msg(void)
...
@@ -386,7 +386,7 @@ uint8_t ss_gNB_vtp_process_itti_msg(void)
tinfo
.
mu
=
1
;
tinfo
.
mu
=
1
;
tinfo
.
sf
=
SS_NRUPD_TIM_INFO
(
received_msg
).
slot
/
2
;
tinfo
.
sf
=
SS_NRUPD_TIM_INFO
(
received_msg
).
slot
/
2
;
tinfo
.
sfn
=
SS_NRUPD_TIM_INFO
(
received_msg
).
sfn
;
tinfo
.
sfn
=
SS_NRUPD_TIM_INFO
(
received_msg
).
sfn
;
if
(
SS_context
.
vtp_enabled
==
1
)
{
if
(
SS_context
.
vtp_enabled
==
1
)
{
ss_vtp_send_tinfo
(
TASK_VTP
,
&
tinfo
);
ss_vtp_send_tinfo
(
TASK_VTP
,
&
tinfo
);
}
}
...
@@ -407,23 +407,17 @@ uint8_t ss_gNB_vtp_process_itti_msg(void)
...
@@ -407,23 +407,17 @@ uint8_t ss_gNB_vtp_process_itti_msg(void)
received_msg
=
NULL
;
received_msg
=
NULL
;
}
}
return
ss_gNB_read_from_vtp_socket
(
ctx_vtp_g
);
return
ss_gNB_read_from_vtp_socket
(
ctx_vtp_g
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
ss_gNB_vtp_init
(
void
)
int
ss_gNB_vtp_init
(
void
)
{
{
IpAddress_t
ipaddr
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
// Port number
// Port number
int
port
=
RC
.
ss
.
Vtpport
?
RC
.
ss
.
Vtpport
:
7780
;
int
port
=
RC
.
ss
.
Vtpport
?
RC
.
ss
.
Vtpport
:
7780
;
LOG_A
(
GNB_APP
,
"[SS-VTP] Initializing VTP Port %s:%d
\n
"
,
hostIp
,
port
);
LOG_A
(
GNB_APP
,
"[SS-VTP] Initializing VTP Port %s:%d
\n
"
,
RC
.
ss
.
hostIp
,
port
);
// acpInit(malloc, free, 1000);
// acpInit(malloc, free, 1000);
const
struct
acpMsgTable
msgTable
[]
=
{
const
struct
acpMsgTable
msgTable
[]
=
{
{
"SysVTEnquireTimingAck"
,
MSG_SysVTEnquireTimingAck_userId
},
{
"SysVTEnquireTimingAck"
,
MSG_SysVTEnquireTimingAck_userId
},
...
@@ -437,7 +431,8 @@ int ss_gNB_vtp_init(void)
...
@@ -437,7 +431,8 @@ int ss_gNB_vtp_init(void)
// Start listening server and get ACP context,
// Start listening server and get ACP context,
// after the connection is performed, we can use all services
// after the connection is performed, we can use all services
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vtp_g
);
LOG_W
(
GNB_APP
,
"[SS-VTP] Connecting to %s
\n
"
,
RC
.
ss
.
VtpHost
);
int
ret
=
acpServerInitWithCtx
(
RC
.
ss
.
VtpHost
,
port
,
msgTable
,
aSize
,
&
ctx_vtp_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_E
(
GNB_APP
,
"[SS-VTP] Connection failure err=%d
\n
"
,
ret
);
LOG_E
(
GNB_APP
,
"[SS-VTP] Connection failure err=%d
\n
"
,
ret
);
...
...
radio/SS/ss_config.h
View file @
af91004e
...
@@ -67,16 +67,28 @@ typedef struct ss_config_s {
...
@@ -67,16 +67,28 @@ typedef struct ss_config_s {
const
char
*
hostIp
;
const
char
*
hostIp
;
/** SYS port number */
/** SYS port number */
int
Sysport
;
int
Sysport
;
/**< Sys port host (could be unixsocket pipe)*/
const
char
*
SysHost
;
/** SRB port number */
/** SRB port number */
int
Srbport
;
int
Srbport
;
/**< SRB port host (could be unixsocket pipe)*/
const
char
*
SrbHost
;
/** VNG port number */
/** VNG port number */
int
Vngport
;
int
Vngport
;
/**< VNG port host (could be unixsocket pipe)*/
const
char
*
VngHost
;
/** VTP port number */
/** VTP port number */
int
Vtpport
;
int
Vtpport
;
/**< VTP host (could be unixsocket pipe)*/
const
char
*
VtpHost
;
/** SYSIND port number */
/** SYSIND port number */
int
SysIndport
;
int
SysIndport
;
/**< SYS-IND port host (could be unixsocket pipe)*/
const
char
*
SysIndHost
;
/** DRB port number */
/** DRB port number */
int
Drbport
;
int
Drbport
;
/**< DRB port host (could be unixsocket pipe)*/
const
char
*
DrbHost
;
/** SYS Port NR number */
/** SYS Port NR number */
int
SysportNR
;
int
SysportNR
;
uint8_t
configured
;
uint8_t
configured
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment