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
26692630
Commit
26692630
authored
Nov 07, 2019
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENDC X2AP: Implementation of handler function for SgNB addition request message
parent
587f9f63
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
67 deletions
+124
-67
openair2/COMMON/s1ap_messages_types.h
openair2/COMMON/s1ap_messages_types.h
+16
-0
openair2/COMMON/x2ap_messages_def.h
openair2/COMMON/x2ap_messages_def.h
+3
-0
openair2/COMMON/x2ap_messages_types.h
openair2/COMMON/x2ap_messages_types.h
+16
-6
openair2/X2AP/x2ap_eNB_generate_messages.c
openair2/X2AP/x2ap_eNB_generate_messages.c
+25
-3
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+64
-58
No files found.
openair2/COMMON/s1ap_messages_types.h
View file @
26692630
...
@@ -273,6 +273,22 @@ typedef struct e_rab_setup_s {
...
@@ -273,6 +273,22 @@ typedef struct e_rab_setup_s {
uint32_t
gtp_teid
;
uint32_t
gtp_teid
;
}
e_rab_setup_t
;
}
e_rab_setup_t
;
typedef
struct
e_rab_tobe_added_s
{
/* Unique e_rab_id for the UE. */
uint8_t
e_rab_id
;
/* Unique drb_ID for the UE. */
uint8_t
drb_ID
;
/* The transport layer address for the IP packets */
transport_layer_addr_t
eNB_addr
;
/* S-GW Tunnel endpoint identifier */
uint32_t
gtp_teid
;
}
e_rab_tobe_added_t
;
typedef
struct
e_rab_tobeswitched_s
{
typedef
struct
e_rab_tobeswitched_s
{
/* Unique e_rab_id for the UE. */
/* Unique e_rab_id for the UE. */
uint8_t
e_rab_id
;
uint8_t
e_rab_id
;
...
...
openair2/COMMON/x2ap_messages_def.h
View file @
26692630
...
@@ -50,3 +50,6 @@ MESSAGE_DEF(X2AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, x2ap_ue_
...
@@ -50,3 +50,6 @@ MESSAGE_DEF(X2AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, x2ap_ue_
/*Senb bearer addition messages X2AP <-> RRC */
/*Senb bearer addition messages X2AP <-> RRC */
MESSAGE_DEF
(
X2AP_SENB_ADDITION_REQ
,
MESSAGE_PRIORITY_MED
,
x2ap_senb_addition_req_t
,
x2ap_senb_addition_req
)
MESSAGE_DEF
(
X2AP_SENB_ADDITION_REQ
,
MESSAGE_PRIORITY_MED
,
x2ap_senb_addition_req_t
,
x2ap_senb_addition_req
)
/*SGnb bearer addition messages X2AP <-> RRC */
MESSAGE_DEF
(
X2AP_ENDC_SGNB_ADDITION_REQ
,
MESSAGE_PRIORITY_MED
,
x2ap_ENDC_sgnb_addition_req_t
,
x2ap_ENDC_sgnb_addition_req
)
openair2/COMMON/x2ap_messages_types.h
View file @
26692630
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#define X2AP_UE_CONTEXT_RELEASE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ue_context_release
#define X2AP_UE_CONTEXT_RELEASE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ue_context_release
#define X2AP_HANDOVER_CANCEL(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_cancel
#define X2AP_HANDOVER_CANCEL(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_cancel
#define X2AP_SENB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_senb_addition_req
#define X2AP_SENB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_senb_addition_req
#define X2AP_ENDC_SGNB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_addition_req
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2
...
@@ -286,7 +287,7 @@ typedef struct x2ap_senb_addition_req_ack_s {
...
@@ -286,7 +287,7 @@ typedef struct x2ap_senb_addition_req_ack_s {
int
MeNB_UE_X2_id
;
int
MeNB_UE_X2_id
;
int
S
e
NB_UE_X2_id
;
int
S
g
NB_UE_X2_id
;
uint8_t
nb_sCG_e_rabs_tobeadded
;
uint8_t
nb_sCG_e_rabs_tobeadded
;
...
@@ -304,12 +305,15 @@ typedef struct x2ap_senb_addition_req_ack_s {
...
@@ -304,12 +305,15 @@ typedef struct x2ap_senb_addition_req_ack_s {
}
x2ap_senb_addition_req_ack_t
;
}
x2ap_senb_addition_req_ack_t
;
typedef
struct
x2ap_ENDC_sgnb_addition_req_s
{
typedef
struct
x2ap_ENDC_sgnb_addition_req_s
{
int
ue_x2_id
;
/* used for RRC->X2AP in source eNB */
/* used for RRC->X2AP in source eNB */
int
rnti
;
int
rnti
;
security_capabilities_t
security_capabilities
;
security_capabilities_t
security_capabilities
;
uint8_t
kgnb
[
32
];
// keNB or keNB*
/* SgNB Security Key */
uint8_t
kgnb
[
32
];
/*next_hop_chaining_coun */
/*next_hop_chaining_coun */
long
int
kgnb_ncc
;
long
int
kgnb_ncc
;
...
@@ -317,10 +321,10 @@ typedef struct x2ap_ENDC_sgnb_addition_req_s {
...
@@ -317,10 +321,10 @@ typedef struct x2ap_ENDC_sgnb_addition_req_s {
/* UE aggregate maximum bitrate */
/* UE aggregate maximum bitrate */
ambr_t
ue_ambr
;
ambr_t
ue_ambr
;
uint8_t
nb_e_rabs_tobe
setup
;
uint8_t
nb_e_rabs_tobe
added
;
/* list of e_rab
setup-
ed by RRC layers */
/* list of e_rab
to be add
ed by RRC layers */
e_rab_
setup_t
e_rabs_tobesetup
[
S1AP_MAX_E_RAB
];
e_rab_
tobe_added_t
e_rabs_tobeadded
[
S1AP_MAX_E_RAB
];
/* list of e_rab to be setup by RRC layers */
/* list of e_rab to be setup by RRC layers */
e_rab_t
e_rab_param
[
S1AP_MAX_E_RAB
];
e_rab_t
e_rab_param
[
S1AP_MAX_E_RAB
];
...
@@ -331,7 +335,13 @@ typedef struct x2ap_ENDC_sgnb_addition_req_s {
...
@@ -331,7 +335,13 @@ typedef struct x2ap_ENDC_sgnb_addition_req_s {
int
rrc_buffer_size
;
int
rrc_buffer_size
;
int
target_assoc_id
;
int
target_assoc_id
;
}
x2ap_ENDC_sgnb_addition_req__t
;
/*long int pDCPatSgNB = X2AP_EN_DC_ResourceConfiguration__pDCPatSgNB_present;
long int mCGresources = X2AP_EN_DC_ResourceConfiguration__mCGresources_not_present;
long int sCGresources = X2AP_EN_DC_ResourceConfiguration__sCGresources_not_present;*/
}
x2ap_ENDC_sgnb_addition_req_t
;
#endif
/* X2AP_MESSAGES_TYPES_H_ */
#endif
/* X2AP_MESSAGES_TYPES_H_ */
openair2/X2AP/x2ap_eNB_generate_messages.c
View file @
26692630
...
@@ -1524,14 +1524,29 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
...
@@ -1524,14 +1524,29 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
long
qCI
=
1
;
long
qCI
=
1
;
X2AP_Pre_emptionCapability_t
pre_emptionCapability
=
X2AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
X2AP_Pre_emptionCapability_t
pre_emptionCapability
=
X2AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
X2AP_Pre_emptionVulnerability_t
pre_emptionVulnerability
=
X2AP_Pre_emptionVulnerability_not_pre_emptable
;
X2AP_Pre_emptionVulnerability_t
pre_emptionVulnerability
=
X2AP_Pre_emptionVulnerability_not_pre_emptable
;
priority_level_t
priority_level
=
PRIORITY_LEVEL_NO_PRIORITY
;
e_rab_setup_t
e_MCG_rabs_tobeadded
;
e_rab_setup_t
e_MCG_rabs_tobeadded
;
e_MCG_rabs_tobeadded
.
gtp_teid
=
0
;
e_MCG_rabs_tobeadded
.
gtp_teid
=
0
;
e_MCG_rabs_tobeadded
.
eNB_addr
.
length
=
24
;
e_MCG_rabs_tobeadded
.
eNB_addr
.
length
=
24
;
uint8_t
buf
[
20
]
=
{
0
};
uint8_t
buf
[
20
]
=
{
0
};
memcpy
(
e_MCG_rabs_tobeadded
.
eNB_addr
.
buffer
,
buf
,
20
*
sizeof
(
uint8_t
));
memcpy
(
e_MCG_rabs_tobeadded
.
eNB_addr
.
buffer
,
buf
,
20
*
sizeof
(
uint8_t
));
OCTET_STRING_t
CG_Config_Info
;
FILE
*
fd
;
fd
=
fopen
(
"uecap.raw"
,
"r"
);
if
(
fd
!=
NULL
)
{
OCTET_STRING_t
CG_Config_Info
;
CG_Config_Info
.
size
=
4096
;
CG_Config_Info
.
buf
=
(
uint8_t
*
)
calloc
(
4096
,
sizeof
(
uint8_t
));
int
msg_len
=
fread
(
CG_Config_Info
.
buf
,
1
,
CG_Config_Info
.
size
,
fd
);
/*char buffer[4096];
int msg_len=fread(buffer,1,4096,fd);*/
LOG_I
(
RRC
,
"Read in %d bytes for uecap
\n
"
,
msg_len
);
/*OCTET_STRING_t CG_Config_Info;
CG_Config_Info.size = 4096;
CG_Config_Info.size = 4096;
CG_Config_Info
.
buf
=
(
uint8_t
*
)
calloc
(
4096
,
sizeof
(
uint8_t
));
CG_Config_Info.buf = (uint8_t *)calloc(4096, sizeof(uint8_t));
*/
DevAssert
(
instance_p
!=
NULL
);
DevAssert
(
instance_p
!=
NULL
);
...
@@ -1608,7 +1623,8 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
...
@@ -1608,7 +1623,8 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
qCI
=
qCI
;
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
qCI
=
qCI
;
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionCapability
=
pre_emptionCapability
;
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionCapability
=
pre_emptionCapability
;
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionVulnerability
=
pre_emptionVulnerability
;
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionVulnerability
=
pre_emptionVulnerability
;
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
full_E_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
priorityLevel
=
priority_level
;
//Continue from filling the UL_GTPtunnelEndpointInformation inspired from how it is done for the HO case
//Continue from filling the UL_GTPtunnelEndpointInformation inspired from how it is done for the HO case
INT32_TO_OCTET_STRING
(
e_MCG_rabs_tobeadded
.
gtp_teid
,
&
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_UL_GTPtunnelEndpoint
.
gTP_TEID
);
INT32_TO_OCTET_STRING
(
e_MCG_rabs_tobeadded
.
gtp_teid
,
&
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_UL_GTPtunnelEndpoint
.
gTP_TEID
);
...
@@ -1644,6 +1660,12 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
...
@@ -1644,6 +1660,12 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
MSC_LOG_TX_MESSAGE
(
MSC_X2AP_SRC_ENB
,
MSC_X2AP_TARGET_ENB
,
NULL
,
0
,
"0 X2Setup/initiatingMessage assoc_id %u"
,
x2ap_eNB_data_p
->
assoc_id
);
MSC_LOG_TX_MESSAGE
(
MSC_X2AP_SRC_ENB
,
MSC_X2AP_TARGET_ENB
,
NULL
,
0
,
"0 X2Setup/initiatingMessage assoc_id %u"
,
x2ap_eNB_data_p
->
assoc_id
);
x2ap_eNB_itti_send_sctp_data_req
(
instance_p
->
instance
,
x2ap_eNB_data_p
->
assoc_id
,
buffer
,
len
,
0
);
x2ap_eNB_itti_send_sctp_data_req
(
instance_p
->
instance
,
x2ap_eNB_data_p
->
assoc_id
,
buffer
,
len
,
0
);
fclose
(
fd
);
}
else
{
LOG_I
(
RRC
,
"uecap.raw file could not be opened...
\n
"
);
return
-
1
;
}
return
ret
;
return
ret
;
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
26692630
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