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
canghaiwuhen
OpenXG-RAN
Commits
021d7abf
Commit
021d7abf
authored
Sep 07, 2018
by
Bing-Kai Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create the F1 pingpong procedure with SCTP
parent
17cc510a
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
209 additions
and
28 deletions
+209
-28
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
common/utils/LOG/log.c
common/utils/LOG/log.c
+3
-1
common/utils/LOG/log.h
common/utils/LOG/log.h
+2
-0
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+30
-0
openair2/ENB_APP/enb_app.c
openair2/ENB_APP/enb_app.c
+1
-3
openair2/F1AP/CU_F1AP.c
openair2/F1AP/CU_F1AP.c
+41
-14
openair2/F1AP/DU_F1AP.c
openair2/F1AP/DU_F1AP.c
+15
-9
openair2/F1AP/f1ap_handlers.c
openair2/F1AP/f1ap_handlers.c
+1
-1
openair2/F1AP/f1ap_itti_messaging.c
openair2/F1AP/f1ap_itti_messaging.c
+73
-0
openair2/F1AP/f1ap_itti_messaging.h
openair2/F1AP/f1ap_itti_messaging.h
+35
-0
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+6
-0
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+1
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
021d7abf
...
@@ -543,6 +543,7 @@ add_library(F1AP
...
@@ -543,6 +543,7 @@ add_library(F1AP
#${F1AP_DIR}/test.c
#${F1AP_DIR}/test.c
${
F1AP_DIR
}
/DU_F1AP.c
${
F1AP_DIR
}
/DU_F1AP.c
${
F1AP_DIR
}
/CU_F1AP.c
${
F1AP_DIR
}
/CU_F1AP.c
${
F1AP_DIR
}
/f1ap_itti_messaging.c
${
F1AP_DIR
}
/f1ap_encoder.c
${
F1AP_DIR
}
/f1ap_encoder.c
${
F1AP_DIR
}
/f1ap_decoder.c
${
F1AP_DIR
}
/f1ap_decoder.c
${
F1AP_DIR
}
/f1ap_handlers.c
${
F1AP_DIR
}
/f1ap_handlers.c
...
...
common/utils/LOG/log.c
View file @
021d7abf
...
@@ -418,7 +418,9 @@ int logInit (void)
...
@@ -418,7 +418,9 @@ int logInit (void)
register_log_component
(
"S1AP"
,
""
,
S1AP
);
register_log_component
(
"S1AP"
,
""
,
S1AP
);
register_log_component
(
"F1AP"
,
""
,
F1AP
);
register_log_component
(
"CU_F1AP"
,
""
,
CU_F1AP
);
register_log_component
(
"DU_F1AP"
,
""
,
DU_F1AP
);
register_log_component
(
"SCTP"
,
""
,
SCTP
);
register_log_component
(
"SCTP"
,
""
,
SCTP
);
register_log_component
(
"RRH"
,
""
,
RRH
);
register_log_component
(
"RRH"
,
""
,
RRH
);
...
...
common/utils/LOG/log.h
View file @
021d7abf
...
@@ -174,6 +174,8 @@ typedef enum {
...
@@ -174,6 +174,8 @@ typedef enum {
SPGW
,
SPGW
,
S1AP
,
S1AP
,
F1AP
,
F1AP
,
DU_F1AP
,
CU_F1AP
,
SCTP
,
SCTP
,
HW
,
HW
,
OSA
,
OSA
,
...
...
common/utils/T/T_messages.txt
View file @
021d7abf
...
@@ -883,6 +883,36 @@ ID = LEGACY_F1AP_ERROR
...
@@ -883,6 +883,36 @@ ID = LEGACY_F1AP_ERROR
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_ERROR:LEGACY
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
FORMAT = string,log
ID = LEGACY_CU_F1AP_DEBUG
DESC = CU_F1AP DEBUG LEVEL
GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_CU_F1AP_INFO
DESC = CU_F1AP INFO LEVEL
GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_CU_F1AP_ERROR
DESC = CU_F1AP ERROR LEVEL
GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_DU_F1AP_DEBUG
DESC = DU_F1AP DEBUG LEVEL
GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_DU_F1AP_INFO
DESC = DU_F1AP INFO LEVEL
GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_DU_F1AP_ERROR
DESC = DU_F1AP ERROR LEVEL
GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
#################
#################
#### UE LOGS ####
#### UE LOGS ####
#################
#################
...
...
openair2/ENB_APP/enb_app.c
View file @
021d7abf
...
@@ -76,14 +76,12 @@ static void create_remaining_tasks(module_id_t enb_id)
...
@@ -76,14 +76,12 @@ static void create_remaining_tasks(module_id_t enb_id)
case
ngran_eNB_CU
:
case
ngran_eNB_CU
:
case
ngran_ng_eNB_CU
:
case
ngran_ng_eNB_CU
:
case
ngran_gNB_CU
:
case
ngran_gNB_CU
:
rc
=
itti_create_task
(
TASK_CU_F1
,
F1AP_CU_task
,
NULL
);
rc
=
itti_create_task
(
TASK_CU_F1
,
F1AP_CU_task
,
enb_id
);
AssertFatal
(
rc
>=
0
,
"Create task for CU F1AP failed
\n
"
);
AssertFatal
(
rc
>=
0
,
"Create task for CU F1AP failed
\n
"
);
/* fall through */
/* fall through */
case
ngran_eNB
:
case
ngran_eNB
:
case
ngran_ng_eNB
:
case
ngran_ng_eNB
:
case
ngran_gNB
:
case
ngran_gNB
:
rc
=
itti_create_task
(
TASK_SCTP
,
sctp_eNB_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for SCTP failed
\n
"
);
rc
=
itti_create_task
(
TASK_S1AP
,
s1ap_eNB_task
,
NULL
);
rc
=
itti_create_task
(
TASK_S1AP
,
s1ap_eNB_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for S1AP failed
\n
"
);
AssertFatal
(
rc
>=
0
,
"Create task for S1AP failed
\n
"
);
if
(
!
emulate_rf
){
if
(
!
emulate_rf
){
...
...
openair2/F1AP/CU_F1AP.c
View file @
021d7abf
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
#include "platform_types.h"
#include "platform_types.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "intertask_interface.h"
#include "intertask_interface.h"
#include "f1ap_itti_messaging.h"
#include <arpa/inet.h>
#include "T.h"
#include "T.h"
...
@@ -100,6 +102,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
...
@@ -100,6 +102,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
// 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port
// 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port
// 3. creat an itti message to init
// 3. creat an itti message to init
LOG_I
(
CU_F1AP
,
"F1AP_CU_SCTP_REQ
\n
"
);
MessageDef
*
message_p
=
NULL
;
MessageDef
*
message_p
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_CU_F1
,
SCTP_INIT_MSG
);
message_p
=
itti_alloc_new_message
(
TASK_CU_F1
,
SCTP_INIT_MSG
);
...
@@ -108,7 +111,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
...
@@ -108,7 +111,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
message_p
->
ittiMsg
.
sctp_init
.
ipv4
=
1
;
message_p
->
ittiMsg
.
sctp_init
.
ipv4
=
1
;
message_p
->
ittiMsg
.
sctp_init
.
ipv6
=
0
;
message_p
->
ittiMsg
.
sctp_init
.
ipv6
=
0
;
message_p
->
ittiMsg
.
sctp_init
.
nb_ipv4_addr
=
1
;
message_p
->
ittiMsg
.
sctp_init
.
nb_ipv4_addr
=
1
;
message_p
->
ittiMsg
.
sctp_init
.
ipv4_address
[
0
]
=
RC
.
rrc
[
enb_id
]
->
eth_params_s
.
my_addr
;
message_p
->
ittiMsg
.
sctp_init
.
ipv4_address
[
0
]
=
inet_addr
(
RC
.
rrc
[
enb_id
]
->
eth_params_s
.
my_addr
)
;
/*
/*
* SR WARNING: ipv6 multi-homing fails sometimes for localhost.
* SR WARNING: ipv6 multi-homing fails sometimes for localhost.
* * * * Disable it for now.
* * * * Disable it for now.
...
@@ -116,38 +119,54 @@ void CU_send_sctp_init_req(instance_t enb_id) {
...
@@ -116,38 +119,54 @@ void CU_send_sctp_init_req(instance_t enb_id) {
message_p
->
ittiMsg
.
sctp_init
.
nb_ipv6_addr
=
0
;
message_p
->
ittiMsg
.
sctp_init
.
nb_ipv6_addr
=
0
;
message_p
->
ittiMsg
.
sctp_init
.
ipv6_address
[
0
]
=
"0:0:0:0:0:0:0:1"
;
message_p
->
ittiMsg
.
sctp_init
.
ipv6_address
[
0
]
=
"0:0:0:0:0:0:0:1"
;
LOG_I
(
CU_F1AP
,
"CU.my_addr = %s
\n
"
,
RC
.
rrc
[
enb_id
]
->
eth_params_s
.
my_addr
);
LOG_I
(
CU_F1AP
,
"CU.enb_id = %d
\n
"
,
enb_id
);
itti_send_msg_to_task
(
TASK_SCTP
,
enb_id
,
message_p
);
itti_send_msg_to_task
(
TASK_SCTP
,
enb_id
,
message_p
);
}
}
void
*
F1AP_CU_task
(
void
*
arg
)
{
void
*
F1AP_CU_task
(
void
*
arg
)
{
printf
(
"Start F1AP CU task!
\n
"
);
//sctp_cu_init();
//sctp_cu_init();
MessageDef
*
received_msg
=
NULL
;
MessageDef
*
received_msg
=
NULL
;
int
result
;
int
result
;
//F1AP_DEBUG("Starting F1AP at D
U\n");
LOG_I
(
CU_F1AP
,
"Starting F1AP at C
U
\n
"
);
//f1ap_eNB_prepare_internal_data();
//f1ap_eNB_prepare_internal_data();
itti_mark_task_ready
(
TASK_CU_F1
);
itti_mark_task_ready
(
TASK_CU_F1
);
CU_send_sctp_init_req
(
arg
);
while
(
1
)
{
while
(
1
)
{
itti_receive_msg
(
TASK_CU_F1
,
&
received_msg
);
itti_receive_msg
(
TASK_CU_F1
,
&
received_msg
);
switch
(
ITTI_MSG_ID
(
received_msg
))
{
switch
(
ITTI_MSG_ID
(
received_msg
))
{
case
F1AP_CU_SCTP_REQ
:
// case F1AP_CU_SCTP_REQ:
CU_send_sctp_init_req
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
));
// LOG_I(CU_F1AP, "F1AP_CU_SCTP_REQ\n");
// break;
case
SCTP_NEW_ASSOCIATION_IND
:
LOG_I
(
CU_F1AP
,
"SCTP_NEW_ASSOCIATION_IND
\n
"
);
CU_handle_sctp_association_ind
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
received_msg
->
ittiMsg
.
sctp_new_association_ind
);
break
;
case
SCTP_NEW_ASSOCIATION_RESP
:
LOG_I
(
CU_F1AP
,
"SCTP_NEW_ASSOCIATION_RESP
\n
"
);
CU_handle_sctp_association_resp
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
received_msg
->
ittiMsg
.
sctp_new_association_resp
);
break
;
break
;
case
SCTP_DATA_IND
:
case
SCTP_DATA_IND
:
LOG_I
(
CU_F1AP
,
"SCTP_DATA_IND
\n
"
);
CU_handle_sctp_data_ind
(
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
CU_handle_sctp_data_ind
(
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
break
;
break
;
default:
default:
// F1AP_ERROR(
"CU Received unhandled message: %d:%s\n",
LOG_E
(
CU_F1AP
,
"CU Received unhandled message: %d:%s
\n
"
,
//
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
// switch
}
// switch
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -160,6 +179,14 @@ void *F1AP_CU_task(void *arg) {
...
@@ -160,6 +179,14 @@ void *F1AP_CU_task(void *arg) {
}
}
void
CU_handle_sctp_association_ind
(
instance_t
instance
,
sctp_new_association_ind_t
*
sctp_new_association_ind
)
{
CU_send_F1_SETUP_RESPONSE
(
instance
,
sctp_new_association_ind
);
}
void
CU_handle_sctp_association_resp
(
instance_t
instance
,
sctp_new_association_ind_t
*
sctp_new_association_resp
)
{
//CU_send_F1_SETUP_RESPONSE(instance, sctp_new_association_resp);
}
// ==============================================================================
// ==============================================================================
void
CU_handle_F1_SETUP_REQUEST
(
F1AP_F1SetupRequest_t
*
message_p
)
{
void
CU_handle_F1_SETUP_REQUEST
(
F1AP_F1SetupRequest_t
*
message_p
)
{
F1AP_F1AP_PDU_t
pdu
;
F1AP_F1AP_PDU_t
pdu
;
...
@@ -184,7 +211,7 @@ void CU_handle_F1_SETUP_REQUEST(F1AP_F1SetupRequest_t *message_p) {
...
@@ -184,7 +211,7 @@ void CU_handle_F1_SETUP_REQUEST(F1AP_F1SetupRequest_t *message_p) {
}
}
void
CU_send_F1_SETUP_RESPONSE
(
voi
d
)
{
void
CU_send_F1_SETUP_RESPONSE
(
instance_t
instance
,
sctp_new_association_ind_t
*
f1ap_setup_in
d
)
{
//void CU_send_F1_SETUP_RESPONSE(F1AP_F1SetupResponse_t *F1SetupResponse) {
//void CU_send_F1_SETUP_RESPONSE(F1AP_F1SetupResponse_t *F1SetupResponse) {
//AssertFatal(1==0,"Not implemented yet\n");
//AssertFatal(1==0,"Not implemented yet\n");
...
@@ -315,11 +342,11 @@ void CU_send_F1_SETUP_RESPONSE(void) {
...
@@ -315,11 +342,11 @@ void CU_send_F1_SETUP_RESPONSE(void) {
}
}
// printf("\n");
// printf("\n");
cu_f1ap_itti_send_sctp_data_req
(
instance
,
f1ap_setup_ind
->
assoc_id
,
buffer
,
len
,
0
);
/* decode */
/* decode */
if
(
f1ap_decode_pdu
(
&
pdu
,
buffer
,
len
)
>
0
)
{
//
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
printf
(
"Failed to decode F1 setup request
\n
"
);
//
printf("Failed to decode F1 setup request\n");
}
//
}
//printf("F1 setup response present = %d\n", out->value.present);
//printf("F1 setup response present = %d\n", out->value.present);
//f1ap_send_sctp_data_req(instance_p->instance, f1ap_mme_data_p->assoc_id, buffer, len, 0);
//f1ap_send_sctp_data_req(instance_p->instance, f1ap_mme_data_p->assoc_id, buffer, len, 0);
...
...
openair2/F1AP/DU_F1AP.c
View file @
021d7abf
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "sctp_du.h"
#include "sctp_du.h"
#include "intertask_interface.h"
#include "intertask_interface.h"
#include "f1ap_itti_messaging.h"
#include "T.h"
#include "T.h"
...
@@ -102,14 +103,13 @@ void DU_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind)
...
@@ -102,14 +103,13 @@ void DU_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind)
}
}
void
*
F1AP_DU_task
(
void
*
arg
)
{
void
*
F1AP_DU_task
(
void
*
arg
)
{
printf
(
"Start F1AP DU task!
\n
"
);
//sctp_cu_init();
//sctp_cu_init();
MessageDef
*
received_msg
=
NULL
;
MessageDef
*
received_msg
=
NULL
;
int
result
;
int
result
;
//F1AP_DEBUG(
"Starting F1AP at DU\n");
LOG_I
(
DU_F1AP
,
"Starting F1AP at DU
\n
"
);
//f1ap_eNB_prepare_internal_data();
//f1ap_eNB_prepare_internal_data();
...
@@ -130,6 +130,7 @@ void *F1AP_DU_task(void *arg) {
...
@@ -130,6 +130,7 @@ void *F1AP_DU_task(void *arg) {
// 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message,
// 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message,
// 2. store the message in f1ap context, that is also stored in RC
// 2. store the message in f1ap context, that is also stored in RC
// 2. send a sctp_association req
// 2. send a sctp_association req
LOG_I
(
DU_F1AP
,
"F1AP_SETUP_REQ
\n
"
);
DU_send_sctp_association_req
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
DU_send_sctp_association_req
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
F1AP_SETUP_REQ
(
received_msg
));
&
F1AP_SETUP_REQ
(
received_msg
));
break
;
break
;
...
@@ -137,18 +138,20 @@ void *F1AP_DU_task(void *arg) {
...
@@ -137,18 +138,20 @@ void *F1AP_DU_task(void *arg) {
case
SCTP_NEW_ASSOCIATION_RESP
:
case
SCTP_NEW_ASSOCIATION_RESP
:
// 1. store the respon
// 1. store the respon
// 2. send the f1setup_req
// 2. send the f1setup_req
LOG_I
(
DU_F1AP
,
"SCTP_NEW_ASSOCIATION_RESP
\n
"
);
DU_handle_sctp_association_resp
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
DU_handle_sctp_association_resp
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
received_msg
->
ittiMsg
.
sctp_new_association_resp
);
&
received_msg
->
ittiMsg
.
sctp_new_association_resp
);
break
;
break
;
case
SCTP_DATA_IND
:
case
SCTP_DATA_IND
:
// ex: any F1 incoming message for DU ends here
// ex: any F1 incoming message for DU ends here
LOG_I
(
DU_F1AP
,
"SCTP_DATA_IND
\n
"
);
DU_handle_sctp_data_ind
(
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
DU_handle_sctp_data_ind
(
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
break
;
break
;
default:
default:
// F1AP_ERROR(
"DU Received unhandled message: %d:%s\n",
LOG_E
(
DU_F1AP
,
"DU Received unhandled message: %d:%s
\n
"
,
//
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
// switch
}
// switch
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -172,7 +175,7 @@ static void du_f1ap_register(du_f1ap_instance_t *instance_p,
...
@@ -172,7 +175,7 @@ static void du_f1ap_register(du_f1ap_instance_t *instance_p,
MessageDef
*
message_p
=
NULL
;
MessageDef
*
message_p
=
NULL
;
sctp_new_association_req_t
*
sctp_new_association_req_p
=
NULL
;
sctp_new_association_req_t
*
sctp_new_association_req_p
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_
S1AP
,
SCTP_NEW_ASSOCIATION_REQ
);
message_p
=
itti_alloc_new_message
(
TASK_
DU_F1
,
SCTP_NEW_ASSOCIATION_REQ
);
sctp_new_association_req_p
=
&
message_p
->
ittiMsg
.
sctp_new_association_req
;
sctp_new_association_req_p
=
&
message_p
->
ittiMsg
.
sctp_new_association_req
;
sctp_new_association_req_p
->
ulp_cnx_id
=
instance_p
->
instance
;
sctp_new_association_req_p
->
ulp_cnx_id
=
instance_p
->
instance
;
...
@@ -244,8 +247,11 @@ void DU_handle_sctp_association_resp(instance_t instance, sctp_new_association_r
...
@@ -244,8 +247,11 @@ void DU_handle_sctp_association_resp(instance_t instance, sctp_new_association_r
// SETUP REQUEST
// SETUP REQUEST
void
DU_send_F1_SETUP_REQUEST
(
module_id_t
enb_mod_idP
,
module_id_t
du_mod_idP
,
f1ap_setup_req_t
*
msg_p
)
{
//void DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
//void DU_send_F1_SETUP_REQUEST(F1SetupRequest_t *F1SetupRequest) {
void
DU_send_F1_SETUP_REQUEST
(
instance_t
instance
,
sctp_new_association_resp_t
*
f1ap_setup_req
)
{
module_id_t
enb_mod_idP
;
module_id_t
du_mod_idP
;
F1AP_F1AP_PDU_t
pdu
;
F1AP_F1AP_PDU_t
pdu
;
F1AP_F1SetupRequest_t
*
out
;
F1AP_F1SetupRequest_t
*
out
;
F1AP_F1SetupRequestIEs_t
*
ie
;
F1AP_F1SetupRequestIEs_t
*
ie
;
...
@@ -478,7 +484,7 @@ void DU_send_F1_SETUP_REQUEST(module_id_t enb_mod_idP, module_id_t du_mod_idP, f
...
@@ -478,7 +484,7 @@ void DU_send_F1_SETUP_REQUEST(module_id_t enb_mod_idP, module_id_t du_mod_idP, f
printf
(
"Failed to encode F1 setup request
\n
"
);
printf
(
"Failed to encode F1 setup request
\n
"
);
}
}
f1ap_du_send_message
(
buffer
,
len
);
du_f1ap_itti_send_sctp_data_req
(
instance
,
f1ap_setup_req
->
assoc_id
,
buffer
,
len
,
0
);
// printf("\n");
// printf("\n");
/* decode */
/* decode */
...
...
openair2/F1AP/f1ap_handlers.c
View file @
021d7abf
...
@@ -147,7 +147,7 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id,
...
@@ -147,7 +147,7 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id,
uint32_t
stream
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
)
F1AP_F1AP_PDU_t
*
pdu
)
{
{
printf
(
"
OOOOOOOOOOOOOOOOOOOOOOOOOOO
\n
"
);
printf
(
"
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
\n
"
);
return
0
;
return
0
;
}
}
openair2/F1AP/f1ap_itti_messaging.c
0 → 100644
View file @
021d7abf
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "intertask_interface.h"
#include "f1ap_itti_messaging.h"
void
cu_f1ap_itti_send_sctp_data_req
(
instance_t
instance
,
int32_t
assoc_id
,
uint8_t
*
buffer
,
uint32_t
buffer_length
,
uint16_t
stream
)
{
MessageDef
*
message_p
;
sctp_data_req_t
*
sctp_data_req
;
message_p
=
itti_alloc_new_message
(
TASK_CU_F1
,
SCTP_DATA_REQ
);
sctp_data_req
=
&
message_p
->
ittiMsg
.
sctp_data_req
;
sctp_data_req
->
assoc_id
=
assoc_id
;
sctp_data_req
->
buffer
=
buffer
;
sctp_data_req
->
buffer_length
=
buffer_length
;
sctp_data_req
->
stream
=
stream
;
itti_send_msg_to_task
(
TASK_SCTP
,
instance
,
message_p
);
}
void
du_f1ap_itti_send_sctp_data_req
(
instance_t
instance
,
int32_t
assoc_id
,
uint8_t
*
buffer
,
uint32_t
buffer_length
,
uint16_t
stream
)
{
MessageDef
*
message_p
;
sctp_data_req_t
*
sctp_data_req
;
message_p
=
itti_alloc_new_message
(
TASK_DU_F1
,
SCTP_DATA_REQ
);
sctp_data_req
=
&
message_p
->
ittiMsg
.
sctp_data_req
;
sctp_data_req
->
assoc_id
=
assoc_id
;
sctp_data_req
->
buffer
=
buffer
;
sctp_data_req
->
buffer_length
=
buffer_length
;
sctp_data_req
->
stream
=
stream
;
itti_send_msg_to_task
(
TASK_SCTP
,
instance
,
message_p
);
}
void
f1ap_itti_send_sctp_close_association
(
instance_t
instance
,
int32_t
assoc_id
)
{
MessageDef
*
message_p
=
NULL
;
sctp_close_association_t
*
sctp_close_association_p
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
SCTP_CLOSE_ASSOCIATION
);
sctp_close_association_p
=
&
message_p
->
ittiMsg
.
sctp_close_association
;
sctp_close_association_p
->
assoc_id
=
assoc_id
;
itti_send_msg_to_task
(
TASK_SCTP
,
instance
,
message_p
);
}
openair2/F1AP/f1ap_itti_messaging.h
0 → 100644
View file @
021d7abf
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef F1AP_ITTI_MESSAGING_H_
#define F1AP_ITTI_MESSAGING_H_
void
cu_f1ap_itti_send_sctp_data_req
(
instance_t
instance
,
int32_t
assoc_id
,
uint8_t
*
buffer
,
uint32_t
buffer_length
,
uint16_t
stream
);
void
du_f1ap_itti_send_sctp_data_req
(
instance_t
instance
,
int32_t
assoc_id
,
uint8_t
*
buffer
,
uint32_t
buffer_length
,
uint16_t
stream
);
void
f1ap_eNB_itti_send_sctp_close_association
(
instance_t
instance
,
int32_t
assoc_id
);
#endif
/* F1AP_ITTI_MESSAGING_H_ */
targets/RT/USER/lte-softmodem.c
View file @
021d7abf
...
@@ -1063,6 +1063,7 @@ int main( int argc, char **argv )
...
@@ -1063,6 +1063,7 @@ int main( int argc, char **argv )
int
have_rrc
=
0
;
int
have_rrc
=
0
;
if
(
RC
.
nb_inst
>
0
)
{
if
(
RC
.
nb_inst
>
0
)
{
itti_wait_ready
(
1
);
LOG_I
(
ENB_APP
,
"Creating ENB_APP eNB Task
\n
"
);
LOG_I
(
ENB_APP
,
"Creating ENB_APP eNB Task
\n
"
);
if
(
itti_create_task
(
TASK_ENB_APP
,
eNB_app_task
,
NULL
)
<
0
)
{
if
(
itti_create_task
(
TASK_ENB_APP
,
eNB_app_task
,
NULL
)
<
0
)
{
LOG_E
(
ENB_APP
,
"Create task for eNB APP failed
\n
"
);
LOG_E
(
ENB_APP
,
"Create task for eNB APP failed
\n
"
);
...
@@ -1074,6 +1075,11 @@ int main( int argc, char **argv )
...
@@ -1074,6 +1075,11 @@ int main( int argc, char **argv )
return
-
1
;
return
-
1
;
}
}
have_rrc
=
1
;
have_rrc
=
1
;
if
(
itti_create_task
(
TASK_SCTP
,
sctp_eNB_task
,
NULL
)
<
0
)
{
LOG_E
(
SCTP
,
"Create task for SCTP failed
\n
"
);
return
-
1
;
}
itti_wait_ready
(
0
);
}
}
else
{
else
{
printf
(
"No ITTI, Initializing L1
\n
"
);
printf
(
"No ITTI, Initializing L1
\n
"
);
...
...
targets/RT/USER/lte-softmodem.h
View file @
021d7abf
...
@@ -290,5 +290,6 @@ extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -290,5 +290,6 @@ extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
abstraction_flag
);
uint8_t
abstraction_flag
);
extern
void
*
eNB_app_task
(
void
*
args
);
extern
void
*
eNB_app_task
(
void
*
args
);
extern
void
*
sctp_eNB_task
(
void
*
args
);
#endif
#endif
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