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
zzha zzha
OpenXG-RAN
Commits
b93368f4
Commit
b93368f4
authored
Jul 19, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement Setup Request/Response for F1AP
parent
a23a702a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
3 deletions
+76
-3
openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c
openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c
+66
-1
openair2/RRC/NR/mac_rrc_dl_f1ap.c
openair2/RRC/NR/mac_rrc_dl_f1ap.c
+10
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c
View file @
b93368f4
...
...
@@ -29,9 +29,74 @@
#include "mac_rrc_ul.h"
static
f1ap_net_config_t
read_DU_IP_config
(
const
eth_params_t
*
f1_params
)
{
f1ap_net_config_t
nc
=
{
0
};
nc
.
CU_f1_ip_address
.
ipv6
=
0
;
nc
.
CU_f1_ip_address
.
ipv4
=
1
;
strcpy
(
nc
.
CU_f1_ip_address
.
ipv4_address
,
f1_params
->
remote_addr
);
nc
.
CUport
=
f1_params
->
remote_portd
;
LOG_I
(
GNB_APP
,
"FIAP: CU_ip4_address in DU %p, strlen %d
\n
"
,
nc
.
CU_f1_ip_address
.
ipv4_address
,
(
int
)
strlen
(
f1_params
->
remote_addr
));
nc
.
DU_f1_ip_address
.
ipv6
=
0
;
nc
.
DU_f1_ip_address
.
ipv4
=
1
;
strcpy
(
nc
.
DU_f1_ip_address
.
ipv4_address
,
f1_params
->
my_addr
);
nc
.
DUport
=
f1_params
->
my_portd
;
LOG_I
(
GNB_APP
,
"FIAP: DU_ip4_address in DU %p, strlen %ld
\n
"
,
nc
.
DU_f1_ip_address
.
ipv4_address
,
strlen
(
f1_params
->
my_addr
));
// sctp_in_streams/sctp_out_streams are given by SCTP layer
return
nc
;
}
static
void
f1_setup_request_f1ap
(
const
f1ap_setup_req_t
*
req
)
{
AssertFatal
(
false
,
"not implemented
\n
"
);
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_MAC_GNB
,
0
,
F1AP_DU_REGISTER_REQ
);
f1ap_setup_req_t
*
f1ap_setup
=
&
F1AP_DU_REGISTER_REQ
(
msg
).
setup_req
;
f1ap_setup
->
gNB_DU_id
=
req
->
gNB_DU_id
;
f1ap_setup
->
gNB_DU_name
=
strdup
(
req
->
gNB_DU_name
);
f1ap_setup
->
num_cells_available
=
req
->
num_cells_available
;
for
(
int
n
=
0
;
n
<
req
->
num_cells_available
;
++
n
)
{
f1ap_setup
->
cell
[
n
].
info
=
req
->
cell
[
n
].
info
;
// copy most fields
if
(
req
->
cell
[
n
].
info
.
tac
)
{
f1ap_setup
->
cell
[
n
].
info
.
tac
=
malloc
(
sizeof
(
*
f1ap_setup
->
cell
[
n
].
info
.
tac
));
AssertFatal
(
f1ap_setup
->
cell
[
n
].
info
.
tac
!=
NULL
,
"out of memory
\n
"
);
*
f1ap_setup
->
cell
[
n
].
info
.
tac
=
*
req
->
cell
[
n
].
info
.
tac
;
}
if
(
req
->
cell
[
n
].
info
.
measurement_timing_information
)
f1ap_setup
->
cell
[
n
].
info
.
measurement_timing_information
=
strdup
(
req
->
cell
[
n
].
info
.
measurement_timing_information
);
if
(
req
->
cell
[
n
].
sys_info
)
{
f1ap_gnb_du_system_info_t
*
orig_sys_info
=
req
->
cell
[
n
].
sys_info
;
f1ap_gnb_du_system_info_t
*
copy_sys_info
=
calloc
(
1
,
sizeof
(
*
copy_sys_info
));
AssertFatal
(
copy_sys_info
!=
NULL
,
"out of memory
\n
"
);
f1ap_setup
->
cell
[
n
].
sys_info
=
copy_sys_info
;
copy_sys_info
->
mib
=
calloc
(
orig_sys_info
->
mib_length
,
sizeof
(
uint8_t
));
AssertFatal
(
copy_sys_info
->
mib
!=
NULL
,
"out of memory
\n
"
);
memcpy
(
copy_sys_info
->
mib
,
orig_sys_info
->
mib
,
orig_sys_info
->
mib_length
);
copy_sys_info
->
mib_length
=
orig_sys_info
->
mib_length
;
if
(
orig_sys_info
->
sib1_length
>
0
)
{
copy_sys_info
->
sib1
=
calloc
(
orig_sys_info
->
sib1_length
,
sizeof
(
uint8_t
));
AssertFatal
(
copy_sys_info
->
sib1
!=
NULL
,
"out of memory
\n
"
);
memcpy
(
copy_sys_info
->
sib1
,
orig_sys_info
->
sib1
,
orig_sys_info
->
sib1_length
);
copy_sys_info
->
sib1_length
=
orig_sys_info
->
sib1_length
;
}
}
}
F1AP_DU_REGISTER_REQ
(
msg
).
net_config
=
read_DU_IP_config
(
&
RC
.
nrmac
[
0
]
->
eth_params_n
);
itti_send_msg_to_task
(
TASK_DU_F1
,
0
,
msg
);
}
static
void
ue_context_setup_response_f1ap
(
const
f1ap_ue_context_setup_t
*
req
,
const
f1ap_ue_context_setup_t
*
resp
)
...
...
openair2/RRC/NR/mac_rrc_dl_f1ap.c
View file @
b93368f4
...
...
@@ -26,12 +26,20 @@
static
void
f1_setup_response_f1ap
(
const
f1ap_setup_resp_t
*
resp
)
{
AssertFatal
(
false
,
"not implemented
\n
"
);
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
F1AP_SETUP_RESP
);
f1ap_setup_resp_t
*
f1ap_msg
=
&
F1AP_SETUP_RESP
(
msg
);
*
f1ap_msg
=
*
resp
;
if
(
resp
->
gNB_CU_name
!=
NULL
)
f1ap_msg
->
gNB_CU_name
=
strdup
(
resp
->
gNB_CU_name
);
itti_send_msg_to_task
(
TASK_CU_F1
,
0
,
msg
);
}
static
void
f1_setup_failure_f1ap
(
const
f1ap_setup_failure_t
*
fail
)
{
AssertFatal
(
false
,
"not implemented
\n
"
);
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
F1AP_SETUP_FAILURE
);
f1ap_setup_failure_t
*
f1ap_msg
=
&
F1AP_SETUP_FAILURE
(
msg
);
*
f1ap_msg
=
*
fail
;
itti_send_msg_to_task
(
TASK_CU_F1
,
0
,
msg
);
}
static
void
ue_context_setup_request_f1ap
(
const
f1ap_ue_context_setup_t
*
req
)
...
...
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