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
常顺宇
OpenXG-RAN
Commits
09e2b149
Commit
09e2b149
authored
9 years ago
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create x2ap task, and fix the x2 compilation issues
parent
4259e606
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
26 deletions
+58
-26
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair2/X2AP/x2ap_common.h
openair2/X2AP/x2ap_common.h
+2
-0
openair2/X2AP/x2ap_eNB_decoder.c
openair2/X2AP/x2ap_eNB_decoder.c
+4
-4
openair2/X2AP/x2ap_eNB_generate_messages.c
openair2/X2AP/x2ap_eNB_generate_messages.c
+13
-11
openair2/X2AP/x2ap_eNB_itti_messaging.h
openair2/X2AP/x2ap_eNB_itti_messaging.h
+1
-2
openair2/X2AP/x2ap_eNB_management_procedures.c
openair2/X2AP/x2ap_eNB_management_procedures.c
+8
-8
openair3/UTILS/conversions.h
openair3/UTILS/conversions.h
+20
-0
targets/COMMON/create_tasks.c
targets/COMMON/create_tasks.c
+9
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
09e2b149
...
@@ -353,7 +353,7 @@ add_library(S1AP_ENB
...
@@ -353,7 +353,7 @@ add_library(S1AP_ENB
##############
##############
if
(
${
ENABLE_USE_X2
}
)
if
(
${
ENABLE_USE_X2
}
)
message
(
"-- X2AP =
enabled
"
)
message
(
"-- X2AP =
${
ENABLE_USE_X2
}
"
)
add_list1_option
(
X2AP_VERSION R11
"X2AP Asn.1 grammar version"
R10 R11
)
add_list1_option
(
X2AP_VERSION R11
"X2AP Asn.1 grammar version"
R10 R11
)
set
(
X2AP_DIR
${
OPENAIR2_DIR
}
/X2AP
)
set
(
X2AP_DIR
${
OPENAIR2_DIR
}
/X2AP
)
...
...
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_common.h
View file @
09e2b149
...
@@ -298,10 +298,12 @@ extern int asn1_xer_print;
...
@@ -298,10 +298,12 @@ extern int asn1_xer_print;
#if defined(ENB_MODE)
#if defined(ENB_MODE)
# include "log.h"
# include "log.h"
# define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args)
# define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
# define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
# define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args)
# define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args)
# define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args)
# define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args)
#else
#else
# define X2AP_INFO(x, args...) do { fprintf(stdout, "[X2AP][I]"x, ##args); } while(0)
# define X2AP_ERROR(x, args...) do { fprintf(stdout, "[X2AP][E]"x, ##args); } while(0)
# define X2AP_ERROR(x, args...) do { fprintf(stdout, "[X2AP][E]"x, ##args); } while(0)
# define X2AP_WARN(x, args...) do { fprintf(stdout, "[X2AP][W]"x, ##args); } while(0)
# define X2AP_WARN(x, args...) do { fprintf(stdout, "[X2AP][W]"x, ##args); } while(0)
# define X2AP_DEBUG(x, args...) do { fprintf(stdout, "[X2AP][D]"x, ##args); } while(0)
# define X2AP_DEBUG(x, args...) do { fprintf(stdout, "[X2AP][D]"x, ##args); } while(0)
...
...
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_decoder.c
View file @
09e2b149
...
@@ -49,9 +49,9 @@
...
@@ -49,9 +49,9 @@
#include "assertions.h"
#include "assertions.h"
int
x2ap_decode_initiating
(
x2ap_message
*
x2ap_message_p
,
X2ap_InitiatingMessage_t
*
initiating_p
);
int
x2ap_
eNB_
decode_initiating
(
x2ap_message
*
x2ap_message_p
,
X2ap_InitiatingMessage_t
*
initiating_p
);
int
x2ap_decode_successful
(
x2ap_message
*
x2ap_message_p
,
X2ap_SuccessfulOutcome_t
*
successful_p
);
int
x2ap_
eNB_
decode_successful
(
x2ap_message
*
x2ap_message_p
,
X2ap_SuccessfulOutcome_t
*
successful_p
);
int
x2ap_decode_unsuccessful
(
x2ap_message
*
x2ap_message_p
,
X2ap_UnsuccessfulOutcome_t
*
unsuccessful_p
);
int
x2ap_
eNB_
decode_unsuccessful
(
x2ap_message
*
x2ap_message_p
,
X2ap_UnsuccessfulOutcome_t
*
unsuccessful_p
);
int
x2ap_eNB_decode_pdu
(
x2ap_message
*
x2ap_message_p
,
uint8_t
*
buffer
,
uint32_t
len
)
{
int
x2ap_eNB_decode_pdu
(
x2ap_message
*
x2ap_message_p
,
uint8_t
*
buffer
,
uint32_t
len
)
{
X2AP_PDU_t
pdu
;
X2AP_PDU_t
pdu
;
...
@@ -227,7 +227,7 @@ x2ap_eNB_decode_successful(x2ap_message *x2ap_message_p, X2ap_SuccessfulOutcome_
...
@@ -227,7 +227,7 @@ x2ap_eNB_decode_successful(x2ap_message *x2ap_message_p, X2ap_SuccessfulOutcome_
}
}
int
int
x2ap_decode_unsuccessful
(
x2ap_message
*
x2ap_message_p
,
X2ap_UnsuccessfulOutcome_t
*
unsuccessful_p
)
{
x2ap_
eNB_
decode_unsuccessful
(
x2ap_message
*
x2ap_message_p
,
X2ap_UnsuccessfulOutcome_t
*
unsuccessful_p
)
{
int
ret
=
-
1
;
int
ret
=
-
1
;
MessageDef
*
message
;
MessageDef
*
message
;
...
...
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_generate_messages.c
View file @
09e2b149
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
#include "msc.h"
#include "msc.h"
#include "assertions.h"
#include "assertions.h"
#include "conversions.h"
int
x2ap_eNB_generate_x2_setup_request
(
x2ap_eNB_instance_t
*
instance_p
,
int
x2ap_eNB_generate_x2_setup_request
(
x2ap_eNB_instance_t
*
instance_p
,
...
@@ -104,10 +105,11 @@ int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p,
...
@@ -104,10 +105,11 @@ int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p,
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
uL_Transmission_Bandwidth
=
0
;
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
uL_Transmission_Bandwidth
=
0
;
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
dL_Transmission_Bandwidth
=
0
;
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
dL_Transmission_Bandwidth
=
0
;
MCC_MNC_TO_PLMNID
(
instance_p
->
mcc
,
instance_p
->
mnc
,
&
served_cell
->
servedCellInfo
.
cellId
.
pLMN_Identity
);
MCC_MNC_TO_PLMNID
(
instance_p
->
mcc
,
instance_p
->
mnc
,
instance_p
->
mnc_digit_length
,
MCC_MNC_TO_PLMNID
(
0
,
0
,
&
broadcast_plmnIdentity_1
);
&
served_cell
->
servedCellInfo
.
cellId
.
pLMN_Identity
);
MCC_MNC_TO_PLMNID
(
0
,
0
,
&
broadcast_plmnIdentity_2
);
MCC_MNC_TO_PLMNID
(
instance_p
->
mcc
,
instance_p
->
mnc
,
instance_p
->
mnc_digit_length
,
&
broadcast_plmnIdentity_1
);
MCC_MNC_TO_PLMNID
(
0
,
0
,
&
broadcast_plmnIdentity_3
);
MCC_MNC_TO_PLMNID
(
instance_p
->
mcc
,
instance_p
->
mnc
,
instance_p
->
mnc_digit_length
,
&
broadcast_plmnIdentity_2
);
MCC_MNC_TO_PLMNID
(
instance_p
->
mcc
,
instance_p
->
mnc
,
instance_p
->
mnc_digit_length
,
&
broadcast_plmnIdentity_3
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_1
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_1
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_2
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_2
);
...
@@ -192,10 +194,10 @@ x2ap_generate_x2_setup_response (x2ap_eNB_data_t * eNB_association)
...
@@ -192,10 +194,10 @@ x2ap_generate_x2_setup_response (x2ap_eNB_data_t * eNB_association)
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
uL_Transmission_Bandwidth
=
0
;
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
uL_Transmission_Bandwidth
=
0
;
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
dL_Transmission_Bandwidth
=
0
;
served_cell
->
servedCellInfo
.
eUTRA_Mode_Info
.
choice
.
fDD
.
dL_Transmission_Bandwidth
=
0
;
MCC_MNC_TO_PLMNID
(
instance
->
mcc
,
instance
->
mnc
,
&
served_cell
->
servedCellInfo
.
cellId
.
pLMN_Identity
);
MCC_MNC_TO_PLMNID
(
instance
->
mcc
,
instance
->
mnc
,
instance
->
mnc_digit_length
,
&
served_cell
->
servedCellInfo
.
cellId
.
pLMN_Identity
);
MCC_MNC_TO_PLMNID
(
0
,
0
,
&
broadcast_plmnIdentity_1
);
MCC_MNC_TO_PLMNID
(
instance
->
mcc
,
instance
->
mnc
,
instance
->
mnc_digit_length
,
&
broadcast_plmnIdentity_1
);
MCC_MNC_TO_PLMNID
(
0
,
0
,
&
broadcast_plmnIdentity_2
);
MCC_MNC_TO_PLMNID
(
instance
->
mcc
,
instance
->
mnc
,
instance
->
mnc_digit_length
,
&
broadcast_plmnIdentity_2
);
MCC_MNC_TO_PLMNID
(
0
,
0
,
&
broadcast_plmnIdentity_3
);
MCC_MNC_TO_PLMNID
(
instance
->
mcc
,
instance
->
mnc
,
instance
->
mnc_digit_length
,
&
broadcast_plmnIdentity_3
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_1
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_1
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_2
);
ASN_SEQUENCE_ADD
(
&
served_cell
->
servedCellInfo
.
broadcastPLMNs
.
list
,
&
broadcast_plmnIdentity_2
);
...
@@ -216,7 +218,7 @@ x2ap_generate_x2_setup_response (x2ap_eNB_data_t * eNB_association)
...
@@ -216,7 +218,7 @@ x2ap_generate_x2_setup_response (x2ap_eNB_data_t * eNB_association)
/*
/*
* Non-UE signalling -> stream 0
* Non-UE signalling -> stream 0
*/
*/
return
x2ap_eNB_itti_send_sctp_req
(
buffer
,
len
,
eNB_association
->
assoc_id
,
0
);
return
x2ap_eNB_itti_send_sctp_
data_
req
(
buffer
,
len
,
eNB_association
->
assoc_id
,
0
);
}
}
...
@@ -249,10 +251,10 @@ int x2ap_eNB_generate_x2_setup_failure ( uint32_t assoc_id,
...
@@ -249,10 +251,10 @@ int x2ap_eNB_generate_x2_setup_failure ( uint32_t assoc_id,
MSC_X2AP_TARGET_ENB
,
NULL
,
0
,
MSC_X2AP_TARGET_ENB
,
NULL
,
0
,
"0 X2Setup/unsuccessfulOutcome assoc_id %u cause %u value %u"
,
"0 X2Setup/unsuccessfulOutcome assoc_id %u cause %u value %u"
,
assoc_id
,
cause_type
,
cause_value
);
assoc_id
,
cause_type
,
cause_value
);
return
x2ap_eNB_itti_send_sctp_
request
(
buffer_p
,
length
,
assoc_id
,
0
);
return
x2ap_eNB_itti_send_sctp_
data_req
(
buffer_p
,
length
,
assoc_id
,
0
);
}
}
int
x2ap_eB_set_cause
(
X2ap_Cause_t
*
cause_p
,
int
x2ap_e
N
B_set_cause
(
X2ap_Cause_t
*
cause_p
,
X2ap_Cause_PR
cause_type
,
X2ap_Cause_PR
cause_type
,
long
cause_value
)
long
cause_value
)
{
{
...
...
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_itti_messaging.h
View file @
09e2b149
...
@@ -33,8 +33,7 @@ void x2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
...
@@ -33,8 +33,7 @@ void x2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
uint32_t
buffer_length
,
uint16_t
stream
);
uint32_t
buffer_length
,
uint16_t
stream
);
void
x2ap_eNB_itti_send_sctp_close_association
(
instance_t
instance
,
void
x2ap_eNB_itti_send_sctp_close_association
(
instance_t
instance
,
int32_t
assoc_id
);
int32_t
assoc_id
);
#endif
/* X2AP_ENB_ITTI_MESSAGING_H_ */
#endif
/* X2AP_ENB_ITTI_MESSAGING_H_ */
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_management_procedures.c
View file @
09e2b149
...
@@ -173,15 +173,15 @@ void x2ap_dump_eNB (x2ap_eNB_data_t * eNB_ref) {
...
@@ -173,15 +173,15 @@ void x2ap_dump_eNB (x2ap_eNB_data_t * eNB_ref) {
return
;
return
;
}
}
eNB_LIST_OUT
(
""
);
X2AP_
eNB_LIST_OUT
(
""
);
eNB_LIST_OUT
(
"eNB name: %s"
,
eNB_ref
->
eNB_name
==
NULL
?
"not present"
:
eNB_ref
->
eNB_name
);
X2AP_
eNB_LIST_OUT
(
"eNB name: %s"
,
eNB_ref
->
eNB_name
==
NULL
?
"not present"
:
eNB_ref
->
eNB_name
);
eNB_LIST_OUT
(
"eNB STATE: %07x"
,
eNB_ref
->
state
);
X2AP_
eNB_LIST_OUT
(
"eNB STATE: %07x"
,
eNB_ref
->
state
);
eNB_LIST_OUT
(
"eNB ID: %07x"
,
eNB_ref
->
eNB_id
);
X2AP_
eNB_LIST_OUT
(
"eNB ID: %07x"
,
eNB_ref
->
eNB_id
);
indent
++
;
indent
++
;
eNB_LIST_OUT
(
"SCTP cnx id: %d"
,
eNB_ref
->
cnx_id
);
X2AP_
eNB_LIST_OUT
(
"SCTP cnx id: %d"
,
eNB_ref
->
cnx_id
);
eNB_LIST_OUT
(
"SCTP assoc id: %d"
,
eNB_ref
->
assoc_id
);
X2AP_
eNB_LIST_OUT
(
"SCTP assoc id: %d"
,
eNB_ref
->
assoc_id
);
eNB_LIST_OUT
(
"SCTP instreams: %d"
,
eNB_ref
->
in_streams
);
X2AP_
eNB_LIST_OUT
(
"SCTP instreams: %d"
,
eNB_ref
->
in_streams
);
eNB_LIST_OUT
(
"SCTP outstreams: %d"
,
eNB_ref
->
out_streams
);
X2AP_
eNB_LIST_OUT
(
"SCTP outstreams: %d"
,
eNB_ref
->
out_streams
);
indent
--
;
indent
--
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair3/UTILS/conversions.h
View file @
09e2b149
...
@@ -197,6 +197,26 @@ do { \
...
@@ -197,6 +197,26 @@ do { \
(oCTETsTRING)->size = 3; \
(oCTETsTRING)->size = 3; \
} while(0)
} while(0)
#define ECI_TO_BIT_STRING(eci, bitstring) \
do { \
(bitstring)->size=4; \
(bitstring)->bits_unused=4; \
(bitstring)->buf=calloc (4, sizeof (uint8_t)); \
(bitstring)->buf[0] = (eci) >> 20; \
(bitstring)->buf[1] = (eci) >> 12; \
(bitstring)->buf[2] = (eci) >> 4; \
(bitstring)->buf[3] = (eci) << 4; \
}while(0)
#define TAC_TO_OCTET_STRING(tac, octetstring)\
do { \
(octetstring)->size=2; \
(octetstring)->buf=calloc (2, sizeof (uint8_t)); \
(octetstring)->buf[0] = (tac) >> 8; \
(octetstring)->buf[1] = (tac); \
}while(0)
#define MCC_MNC_TO_TBCD(mCC, mNC, mNCdIGITlENGTH, tBCDsTRING) \
#define MCC_MNC_TO_TBCD(mCC, mNC, mNCdIGITlENGTH, tBCDsTRING) \
do { \
do { \
char _buf[3]; \
char _buf[3]; \
...
...
This diff is collapsed.
Click to expand it.
targets/COMMON/create_tasks.c
View file @
09e2b149
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
# include "udp_eNB_task.h"
# include "udp_eNB_task.h"
# include "gtpv1u_eNB_task.h"
# include "gtpv1u_eNB_task.h"
# endif
# endif
# if defined (ENABLE_USE_X2)
# include "x2ap_eNB.h"
# endif
# if ENABLE_RAL
# if ENABLE_RAL
# include "lteRALue.h"
# include "lteRALue.h"
# include "lteRALenb.h"
# include "lteRALenb.h"
...
@@ -87,6 +90,12 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
...
@@ -87,6 +90,12 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
# endif
# endif
}
}
# endif
# endif
#if defined(ENABLE_USE_X2)
if
(
itti_create_task
(
TASK_X2AP
,
x2ap_task
,
NULL
)
<
0
)
{
LOG_E
(
X2AP
,
"Create task for X2AP failed
\n
"
);
return
-
1
;
}
#endif
if
(
enb_nb
>
0
)
{
if
(
enb_nb
>
0
)
{
if
(
itti_create_task
(
TASK_RRC_ENB
,
rrc_enb_task
,
NULL
)
<
0
)
{
if
(
itti_create_task
(
TASK_RRC_ENB
,
rrc_enb_task
,
NULL
)
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
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