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
b6295efd
Commit
b6295efd
authored
Sep 07, 2018
by
Bing-Kai Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify the ip address struct in f1 setup req for DU
parent
185c2fd4
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
143 additions
and
204 deletions
+143
-204
openair2/COMMON/f1ap_messages_types.h
openair2/COMMON/f1ap_messages_types.h
+9
-2
openair2/ENB_APP/enb_app.c
openair2/ENB_APP/enb_app.c
+19
-23
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+93
-82
openair2/F1AP/CU_F1AP.c
openair2/F1AP/CU_F1AP.c
+1
-1
openair2/F1AP/DU_F1AP.c
openair2/F1AP/DU_F1AP.c
+20
-9
openair2/F1AP/f1ap_common.h
openair2/F1AP/f1ap_common.h
+0
-86
openair2/F1AP/f1ap_default_values.h
openair2/F1AP/f1ap_default_values.h
+1
-1
No files found.
openair2/COMMON/f1ap_messages_types.h
View file @
b6295efd
...
@@ -51,6 +51,13 @@
...
@@ -51,6 +51,13 @@
// Note this should be 512 from maxval in 38.473
// Note this should be 512 from maxval in 38.473
#define F1AP_MAX_NB_CELLS 2
#define F1AP_MAX_NB_CELLS 2
typedef
struct
f1ap_net_ip_address_s
{
unsigned
ipv4
:
1
;
unsigned
ipv6
:
1
;
char
ipv4_address
[
16
];
char
ipv6_address
[
46
];
}
f1ap_net_ip_address_t
;
typedef
struct
f1ap_cu_setup_req_s
{
typedef
struct
f1ap_cu_setup_req_s
{
//
//
}
f1ap_cu_setup_req_t
;
}
f1ap_cu_setup_req_t
;
...
@@ -60,8 +67,8 @@ typedef struct f1ap_setup_req_s {
...
@@ -60,8 +67,8 @@ typedef struct f1ap_setup_req_s {
// Midhaul networking parameters
// Midhaul networking parameters
/* The eNB IP address to bind */
/* The eNB IP address to bind */
char
CU_ipv4_address
[
16
]
;
f1ap_net_ip_address_t
CU_f1_ip_address
;
int
CU_port
;
f1ap_net_ip_address_t
DU_f1_ip_address
;
/* Number of SCTP streams used for a mme association */
/* Number of SCTP streams used for a mme association */
uint16_t
sctp_in_streams
;
uint16_t
sctp_in_streams
;
...
...
openair2/ENB_APP/enb_app.c
View file @
b6295efd
...
@@ -130,7 +130,6 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
...
@@ -130,7 +130,6 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
for
(
enb_id
=
enb_id_start
;
(
enb_id
<
enb_id_end
)
;
enb_id
++
)
{
for
(
enb_id
=
enb_id_start
;
(
enb_id
<
enb_id_end
)
;
enb_id
++
)
{
{
{
if
(
node_type
==
ngran_eNB_DU
)
{
// F1AP registration
if
(
node_type
==
ngran_eNB_DU
)
{
// F1AP registration
// configure F1AP here for F1C
// configure F1AP here for F1C
LOG_I
(
ENB_APP
,
"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ
\n
"
);
LOG_I
(
ENB_APP
,
"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ
\n
"
);
msg_p
=
itti_alloc_new_message
(
TASK_ENB_APP
,
F1AP_SETUP_REQ
);
msg_p
=
itti_alloc_new_message
(
TASK_ENB_APP
,
F1AP_SETUP_REQ
);
...
@@ -154,10 +153,7 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
...
@@ -154,10 +153,7 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
itti_send_msg_to_task
(
TASK_S1AP
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
msg_p
);
itti_send_msg_to_task
(
TASK_S1AP
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
msg_p
);
}
}
register_enb_pending
++
;
register_enb_pending
++
;
}
}
}
}
...
...
openair2/ENB_APP/enb_config.c
View file @
b6295efd
...
@@ -2407,12 +2407,23 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
...
@@ -2407,12 +2407,23 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
F1AP_SETUP_REQ
(
msg_p
).
mnc_digit_length
[
k
]);
F1AP_SETUP_REQ
(
msg_p
).
mnc_digit_length
[
k
]);
LOG_I
(
ENB_APP
,
"F1AP: CU_ip4_address %s
\n
"
,
RC
.
mac
[
k
]
->
eth_params_n
.
remote_addr
);
LOG_I
(
ENB_APP
,
"F1AP: CU_ip4_address %s
\n
"
,
RC
.
mac
[
k
]
->
eth_params_n
.
remote_addr
);
LOG_I
(
ENB_APP
,
"FIAP: CU_ip4_address %p, strlen %d
\n
"
,
F1AP_SETUP_REQ
(
msg_p
).
CU_ipv4_address
,(
int
)
strlen
(
RC
.
mac
[
k
]
->
eth_params_n
.
remote_addr
));
LOG_I
(
ENB_APP
,
"FIAP: CU_ip4_address %p, strlen %d
\n
"
,
F1AP_SETUP_REQ
(
msg_p
).
CU_f1_ip_address
.
ipv4_address
,(
int
)
strlen
(
RC
.
mac
[
k
]
->
eth_params_n
.
remote_addr
));
F1AP_SETUP_REQ
(
msg_p
).
CU_f1_ip_address
.
ipv6
=
0
;
F1AP_SETUP_REQ
(
msg_p
).
CU_f1_ip_address
.
ipv4
=
1
;
//strcpy(F1AP_SETUP_REQ (msg_p).CU_f1_ip_address.ipv6_address, "");
strcpy
(
F1AP_SETUP_REQ
(
msg_p
).
CU_f1_ip_address
.
ipv4_address
,
RC
.
mac
[
k
]
->
eth_params_n
.
my_addr
);
LOG_I
(
ENB_APP
,
"F1AP: DU_ip4_address %s
\n
"
,
RC
.
mac
[
k
]
->
eth_params_n
.
my_addr
);
LOG_I
(
ENB_APP
,
"FIAP: DU_ip4_address %p, strlen %d
\n
"
,
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv4_address
,(
int
)
strlen
(
RC
.
mac
[
k
]
->
eth_params_n
.
my_addr
));
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv6
=
0
;
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv4
=
1
;
//strcpy(F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv6_address, "");
strcpy
(
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv4_address
,
RC
.
mac
[
k
]
->
eth_params_n
.
remote_addr
);
strcpy
(
F1AP_SETUP_REQ
(
msg_p
).
CU_ipv4_address
,
RC
.
mac
[
k
]
->
eth_params_n
.
remote_addr
);
//strcpy(F1AP_SETUP_REQ (msg_p).CU_ip_address[l].ipv6_address,*(F1ParamList.paramarray[l][ENB_CU_IPV6_ADDRESS_IDX].strptr));
//strcpy(F1AP_SETUP_REQ (msg_p).CU_ip_address[l].ipv6_address,*(F1ParamList.paramarray[l][ENB_CU_IPV6_ADDRESS_IDX].strptr));
F1AP_SETUP_REQ
(
msg_p
).
CU_port
=
RC
.
mac
[
k
]
->
eth_params_n
.
remote_portc
;
//F1AP_SETUP_REQ (msg_p).CU_port = RC.mac[k]->eth_params_n.remote_portc; // maybe we dont need it
sprintf
(
aprefix
,
"%s.[%i].%s"
,
ENB_CONFIG_STRING_ENB_LIST
,
k
,
ENB_CONFIG_STRING_SCTP_CONFIG
);
sprintf
(
aprefix
,
"%s.[%i].%s"
,
ENB_CONFIG_STRING_ENB_LIST
,
k
,
ENB_CONFIG_STRING_SCTP_CONFIG
);
config_get
(
SCTPParams
,
sizeof
(
SCTPParams
)
/
sizeof
(
paramdef_t
),
aprefix
);
config_get
(
SCTPParams
,
sizeof
(
SCTPParams
)
/
sizeof
(
paramdef_t
),
aprefix
);
...
@@ -2470,9 +2481,9 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
...
@@ -2470,9 +2481,9 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
F1AP_SETUP_REQ
(
msg_p
).
sib1
[
k
]
=
rrc
->
carrier
[
0
].
SIB1
;
F1AP_SETUP_REQ
(
msg_p
).
sib1
[
k
]
=
rrc
->
carrier
[
0
].
SIB1
;
break
;
break
;
}
}
// if
}
}
// for
}
}
// if
return
0
;
return
0
;
...
...
openair2/F1AP/CU_F1AP.c
View file @
b6295efd
...
@@ -113,7 +113,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
...
@@ -113,7 +113,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
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
);
message_p
->
ittiMsg
.
sctp_init
.
port
=
RC
.
rrc
[
enb_id
]
->
eth_params_s
.
my_portc
;
message_p
->
ittiMsg
.
sctp_init
.
port
=
F1AP_PORT_NUMBER
;
message_p
->
ittiMsg
.
sctp_init
.
ppid
=
F1AP_SCTP_PPID
;
message_p
->
ittiMsg
.
sctp_init
.
ppid
=
F1AP_SCTP_PPID
;
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
;
...
...
openair2/F1AP/DU_F1AP.c
View file @
b6295efd
...
@@ -45,6 +45,9 @@
...
@@ -45,6 +45,9 @@
#define F1AP_UE_IDENTIFIER_NUMBER 3
#define F1AP_UE_IDENTIFIER_NUMBER 3
#define NUMBER_OF_eNB_MAX 3
#define NUMBER_OF_eNB_MAX 3
// #include "common/ran_context.h"
// extern RAN_CONTEXT_t RC;
/* This structure describes association of a DU to a CU */
/* This structure describes association of a DU to a CU */
typedef
struct
f1ap_info
{
typedef
struct
f1ap_info
{
...
@@ -170,8 +173,8 @@ void *F1AP_DU_task(void *arg) {
...
@@ -170,8 +173,8 @@ void *F1AP_DU_task(void *arg) {
// ==============================================================================
// ==============================================================================
static
void
du_f1ap_register
(
du_f1ap_instance_t
*
instance_p
,
static
void
du_f1ap_register
(
du_f1ap_instance_t
*
instance_p
,
char
*
cu_ip_address
,
f1ap_net_ip_address_t
*
remote_address
,
// CU
int
cu_port
,
f1ap_net_ip_address_t
*
local_address
,
// DU
uint16_t
in_streams
,
uint16_t
in_streams
,
uint16_t
out_streams
)
uint16_t
out_streams
)
{
{
...
@@ -182,13 +185,21 @@ static void du_f1ap_register(du_f1ap_instance_t *instance_p,
...
@@ -182,13 +185,21 @@ static void du_f1ap_register(du_f1ap_instance_t *instance_p,
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
SCTP_NEW_ASSOCIATION_REQ
);
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
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
->
port
=
cu_port
;
sctp_new_association_req_p
->
port
=
F1AP_PORT_NUMBER
;
sctp_new_association_req_p
->
ppid
=
F1AP_SCTP_PPID
;
sctp_new_association_req_p
->
ppid
=
F1AP_SCTP_PPID
;
sctp_new_association_req_p
->
in_streams
=
in_streams
;
sctp_new_association_req_p
->
in_streams
=
in_streams
;
sctp_new_association_req_p
->
out_streams
=
out_streams
;
sctp_new_association_req_p
->
out_streams
=
out_streams
;
memcpy
(
&
sctp_new_association_req_p
->
remote_address
,
remote_address
,
sizeof
(
*
remote_address
));
memcpy
(
&
sctp_new_association_req_p
->
local_address
,
local_address
,
sizeof
(
*
local_address
));
itti_send_msg_to_task
(
TASK_SCTP
,
instance_p
->
instance
,
message_p
);
itti_send_msg_to_task
(
TASK_SCTP
,
instance_p
->
instance
,
message_p
);
}
}
...
@@ -227,8 +238,8 @@ void DU_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_se
...
@@ -227,8 +238,8 @@ void DU_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_se
//}
//}
du_f1ap_register
(
new_instance
,
du_f1ap_register
(
new_instance
,
&
f1ap_setup_req
->
CU_
ipv4_address
,
&
f1ap_setup_req
->
CU_
f1_ip_address
,
// remote
&
f1ap_setup_req
->
CU_port
,
&
f1ap_setup_req
->
DU_f1_ip_address
,
// local
f1ap_setup_req
->
sctp_in_streams
,
f1ap_setup_req
->
sctp_in_streams
,
f1ap_setup_req
->
sctp_out_streams
);
f1ap_setup_req
->
sctp_out_streams
);
...
...
openair2/F1AP/f1ap_common.h
View file @
b6295efd
...
@@ -394,23 +394,6 @@ extern int asn1_xer_print;
...
@@ -394,23 +394,6 @@ extern int asn1_xer_print;
//Forward declaration
//Forward declaration
//struct f1ap_message_s;
//struct f1ap_message_s;
typedef
struct
f1ap_net_ip_address_s
{
unsigned
ipv4
:
1
;
unsigned
ipv6
:
1
;
char
ipv4_address
[
16
];
char
ipv6_address
[
46
];
}
f1ap_net_ip_address_t
;
/*typedef struct f1ap_message_s {
F1AP_ProtocolIE_ID_t id;
F1AP_Criticality_t criticality;
uint8_t direction;
union {
F1AP_F1SetupRequestIEs_t f1ap_F1SetupRequestIEs;
} msg;
} f1ap_message;*/
/** \brief Function callback prototype.
/** \brief Function callback prototype.
**/
**/
typedef
int
(
*
f1ap_message_decoded_callback
)(
typedef
int
(
*
f1ap_message_decoded_callback
)(
...
@@ -419,73 +402,4 @@ typedef int (*f1ap_message_decoded_callback)(
...
@@ -419,73 +402,4 @@ typedef int (*f1ap_message_decoded_callback)(
F1AP_F1AP_PDU_t
*
message_p
F1AP_F1AP_PDU_t
*
message_p
);
);
/** \brief Encode a successfull outcome message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
/*ssize_t f1ap_generate_successfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_F1ap_ProcedureCode procedureCode,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
*/
/** \brief Encode an initiating message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
/*ssize_t f1ap_generate_initiating_message(
uint8_t **buffer,
uint32_t *length,
e_F1ap_ProcedureCode procedureCode,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
*/
/** \brief Encode an unsuccessfull outcome message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
/*ssize_t f1ap_generate_unsuccessfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_F1ap_ProcedureCode procedureCode,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
*/
/** \brief Generate a new IE
\param id Protocol ie id of the IE
\param criticality Criticality of the IE
\param type ASN1 type descriptor of the IE value
\param sptr Structure to be encoded in the value field
@returns a pointer to the newly created IE structure or NULL in case of failure
**/
/*F1ap_IE_t *f1ap_new_ie(F1ap_ProtocolIE_ID_t id,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *type,
void *sptr);
*/
/** \brief Handle criticality
\param criticality Criticality of the IE
@returns void
**/
//void f1ap_handle_criticality(F1ap_Criticality_t criticality);
#endif
/* F1AP_COMMON_H_ */
#endif
/* F1AP_COMMON_H_ */
openair2/F1AP/f1ap_default_values.h
View file @
b6295efd
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#define ENB_NAME "Eurecom ENB"
#define ENB_NAME "Eurecom ENB"
#define ENB_NAME_FORMAT (ENB_NAME" %u")
#define ENB_NAME_FORMAT (ENB_NAME" %u")
#define F1AP_PORT_NUMBER (3
642
)
#define F1AP_PORT_NUMBER (3
0923
)
#define F1AP_SCTP_PPID (62)
#define F1AP_SCTP_PPID (62)
#endif
/* F1AP_DEFAULT_VALUES_H_ */
#endif
/* F1AP_DEFAULT_VALUES_H_ */
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