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
alex037yang
OpenXG-RAN
Commits
15a7b91c
Commit
15a7b91c
authored
Jun 13, 2017
by
vettel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'x2-ka-test' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into x2-ka-test
parents
8cd5e072
d9154232
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5651 additions
and
28 deletions
+5651
-28
openair2/COMMON/x2ap_messages_types.h
openair2/COMMON/x2ap_messages_types.h
+4
-0
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+49
-14
openair2/RRC/LITE/rrc_eNB.c.orig
openair2/RRC/LITE/rrc_eNB.c.orig
+5538
-0
openair2/X2AP/x2ap_eNB_generate_messages.c
openair2/X2AP/x2ap_eNB_generate_messages.c
+35
-11
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+25
-3
No files found.
openair2/COMMON/x2ap_messages_types.h
View file @
15a7b91c
...
@@ -154,9 +154,13 @@ typedef struct x2ap_handover_req_s {
...
@@ -154,9 +154,13 @@ typedef struct x2ap_handover_req_s {
/* UE aggregate maximum bitrate */
/* UE aggregate maximum bitrate */
ambr_t
ue_ambr
;
ambr_t
ue_ambr
;
uint8_t
nb_e_rabs_tobesetup
;
/* list of e_rab setup-ed by RRC layers */
/* list of e_rab setup-ed by RRC layers */
e_rab_setup_t
e_rabs_tobesetup
[
S1AP_MAX_E_RAB
];
e_rab_setup_t
e_rabs_tobesetup
[
S1AP_MAX_E_RAB
];
/* ue_context_pP->ue_context.e_rab[i].param.sgw_addr; */
x2ap_lastvisitedcell_info_t
lastvisitedcell_info
;
x2ap_lastvisitedcell_info_t
lastvisitedcell_info
;
/* TODO: this parameter has to be removed */
/* TODO: this parameter has to be removed */
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
15a7b91c
...
@@ -1854,7 +1854,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
...
@@ -1854,7 +1854,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
// CellToAdd->cellIndex = i + 1;
// CellToAdd->cellIndex = i + 1;
CellToAdd
->
cellIndex
=
1
;
CellToAdd
->
cellIndex
=
1
;
CellToAdd
->
physCellId
=
1
;
//get_adjacent_cell_id(ctxt_pP->module_id, i);
CellToAdd
->
physCellId
=
1
;
//get_adjacent_cell_id(ctxt_pP->module_id, i);
CellToAdd
->
cellIndividualOffset
=
Q_OffsetRange_dB0
;
CellToAdd
->
cellIndividualOffset
=
Q_OffsetRange_dB
1
0
;
ASN_SEQUENCE_ADD
(
&
CellsToAddModList
->
list
,
CellToAdd
);
ASN_SEQUENCE_ADD
(
&
CellsToAddModList
->
list
,
CellToAdd
);
// }
// }
...
@@ -2385,7 +2385,7 @@ rrc_eNB_process_MeasurementReport(
...
@@ -2385,7 +2385,7 @@ rrc_eNB_process_MeasurementReport(
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
int
target_rsrp
,
source_rsrp
;
int
target_rsrp
,
source_rsrp
;
int
offset_db
=
4
;
int
offset_db
=
-
10
;
T
(
T_ENB_RRC_MEASUREMENT_REPORT
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T
(
T_ENB_RRC_MEASUREMENT_REPORT
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
...
@@ -2457,6 +2457,10 @@ rrc_eNB_process_MeasurementReport(
...
@@ -2457,6 +2457,10 @@ rrc_eNB_process_MeasurementReport(
if
(
!
(
measResults2
->
measId
==
4
&&
target_rsrp
-
source_rsrp
>=
offset_db
))
if
(
!
(
measResults2
->
measId
==
4
&&
target_rsrp
-
source_rsrp
>=
offset_db
))
return
;
return
;
static
int
count
=
0
;
count
++
;
if
(
count
<
30
)
return
;
/* if the UE is not in handover mode, start handover procedure */
/* if the UE is not in handover mode, start handover procedure */
if
(
ue_context_pP
->
ue_context
.
Status
!=
RRC_HO_EXECUTION
)
{
if
(
ue_context_pP
->
ue_context
.
Status
!=
RRC_HO_EXECUTION
)
{
MessageDef
*
msg
;
MessageDef
*
msg
;
...
@@ -2495,8 +2499,16 @@ rrc_eNB_process_MeasurementReport(
...
@@ -2495,8 +2499,16 @@ rrc_eNB_process_MeasurementReport(
X2AP_HANDOVER_REQ
(
msg
).
ue_ambr
=
ue_context_pP
->
ue_context
.
ue_ambr
;
X2AP_HANDOVER_REQ
(
msg
).
ue_ambr
=
ue_context_pP
->
ue_context
.
ue_ambr
;
// to be done
X2AP_HANDOVER_REQ
(
msg
).
nb_e_rabs_tobesetup
=
ue_context_pP
->
ue_context
.
setup_e_rabs
;
// X2AP_HANDOVER_REQ(msg).e_rabs_tobesetu=;
int
i
=
0
;
for
(
i
=
0
;
i
<
ue_context_pP
->
ue_context
.
setup_e_rabs
;
i
++
){
X2AP_HANDOVER_REQ
(
msg
).
e_rabs_tobesetup
[
i
].
e_rab_id
=
ue_context_pP
->
ue_context
.
e_rab
[
i
].
param
.
e_rab_id
;
X2AP_HANDOVER_REQ
(
msg
).
e_rabs_tobesetup
[
i
].
eNB_addr
=
ue_context_pP
->
ue_context
.
e_rab
[
i
].
param
.
sgw_addr
;
X2AP_HANDOVER_REQ
(
msg
).
e_rabs_tobesetup
[
i
].
gtp_teid
=
ue_context_pP
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
;
}
/*add QoS related info*/
/* TODO: don't do that, X2AP should find the target by itself */
/* TODO: don't do that, X2AP should find the target by itself */
X2AP_HANDOVER_REQ
(
msg
).
target_mod_id
=
0
;
//get_adjacent_cell_mod_id(X2AP_HANDOVER_REQ(msg).target_physCellId);
X2AP_HANDOVER_REQ
(
msg
).
target_mod_id
=
0
;
//get_adjacent_cell_mod_id(X2AP_HANDOVER_REQ(msg).target_physCellId);
...
@@ -2669,7 +2681,7 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
...
@@ -2669,7 +2681,7 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
struct
rrc_eNB_ue_context_s
*
ue_context_target_p
=
NULL
;
struct
rrc_eNB_ue_context_s
*
ue_context_target_p
=
NULL
;
/* TODO: get proper UE rnti */
/* TODO: get proper UE rnti */
int
rnti
=
taus
()
&
0xffff
;
int
rnti
=
taus
()
&
0xffff
;
int
i
;
global_rnti
=
rnti
;
global_rnti
=
rnti
;
ue_context_target_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rnti
);
ue_context_target_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rnti
);
...
@@ -2704,6 +2716,19 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
...
@@ -2704,6 +2716,19 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
ue_context_target_p
->
ue_context
.
nh_ncc
=
-
1
;
ue_context_target_p
->
ue_context
.
nh_ncc
=
-
1
;
memcpy
(
ue_context_target_p
->
ue_context
.
kenb
,
m
->
kenb
,
32
);
memcpy
(
ue_context_target_p
->
ue_context
.
kenb
,
m
->
kenb
,
32
);
ue_context_target_p
->
ue_context
.
kenb_ncc
=
m
->
kenb_ncc
;
ue_context_target_p
->
ue_context
.
kenb_ncc
=
m
->
kenb_ncc
;
ue_context_target_p
->
ue_context
.
nb_of_e_rabs
=
m
->
nb_e_rabs_tobesetup
;
for
(
i
=
0
;
i
<
ue_context_target_p
->
ue_context
.
nb_of_e_rabs
;
i
++
)
{
ue_context_target_p
->
ue_context
.
e_rab
[
i
].
status
=
E_RAB_STATUS_NEW
;
ue_context_target_p
->
ue_context
.
e_rab
[
i
].
param
.
e_rab_id
=
m
->
e_rabs_tobesetup
[
i
].
e_rab_id
;
ue_context_target_p
->
ue_context
.
e_rab
[
i
].
param
.
sgw_addr
=
m
->
e_rabs_tobesetup
[
i
].
eNB_addr
;
ue_context_target_p
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
=
m
->
e_rabs_tobesetup
[
i
].
gtp_teid
;
LOG_D
(
RRC
,
"eNB %d: Update the UE context after HO, gto_teid %u
\n
"
,
mod_id
,
ue_context_target_p
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
);
}
}
}
void
rrc_eNB_process_handoverCommand
(
void
rrc_eNB_process_handoverCommand
(
...
@@ -3908,7 +3933,7 @@ rrc_eNB_generate_handover_reconfiguration(
...
@@ -3908,7 +3933,7 @@ rrc_eNB_generate_handover_reconfiguration(
mobilityInfo
->
additionalSpectrumEmission
=
CALLOC
(
1
,
sizeof
(
*
mobilityInfo
->
additionalSpectrumEmission
));
mobilityInfo
->
additionalSpectrumEmission
=
CALLOC
(
1
,
sizeof
(
*
mobilityInfo
->
additionalSpectrumEmission
));
*
mobilityInfo
->
additionalSpectrumEmission
=
1
;
//Check this value!
*
mobilityInfo
->
additionalSpectrumEmission
=
1
;
//Check this value!
mobilityInfo
->
t304
=
MobilityControlInfo__t304_ms
5
0
;
// need to configure an appropriate value here
mobilityInfo
->
t304
=
MobilityControlInfo__t304_ms
20
0
;
// need to configure an appropriate value here
// New UE Identity (C-RNTI) to identify an UE uniquely in a cell
// New UE Identity (C-RNTI) to identify an UE uniquely in a cell
mobilityInfo
->
newUE_Identity
.
size
=
2
;
mobilityInfo
->
newUE_Identity
.
size
=
2
;
...
@@ -4879,7 +4904,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
...
@@ -4879,7 +4904,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
mobilityInfo
->
additionalSpectrumEmission
=
CALLOC
(
1
,
sizeof
(
*
mobilityInfo
->
additionalSpectrumEmission
));
mobilityInfo
->
additionalSpectrumEmission
=
CALLOC
(
1
,
sizeof
(
*
mobilityInfo
->
additionalSpectrumEmission
));
*
mobilityInfo
->
additionalSpectrumEmission
=
1
;
//Check this value!
*
mobilityInfo
->
additionalSpectrumEmission
=
1
;
//Check this value!
mobilityInfo
->
t304
=
MobilityControlInfo__t304_ms
5
0
;
// need to configure an appropriate value here
mobilityInfo
->
t304
=
MobilityControlInfo__t304_ms
20
0
;
// need to configure an appropriate value here
// New UE Identity (C-RNTI) to identify an UE uniquely in a cell
// New UE Identity (C-RNTI) to identify an UE uniquely in a cell
mobilityInfo
->
newUE_Identity
.
size
=
2
;
mobilityInfo
->
newUE_Identity
.
size
=
2
;
...
@@ -6127,7 +6152,7 @@ rrc_eNB_decode_dcch(
...
@@ -6127,7 +6152,7 @@ rrc_eNB_decode_dcch(
int
i
;
int
i
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
int
dedicated_DRB
=
0
;
int
DRB_procedure
=
0
;
T
(
T_ENB_RRC_UL_DCCH_DATA_IN
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T
(
T_ENB_RRC_UL_DCCH_DATA_IN
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
...
@@ -6255,14 +6280,21 @@ rrc_eNB_decode_dcch(
...
@@ -6255,14 +6280,21 @@ rrc_eNB_decode_dcch(
if
(
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
criticalExtensions
.
if
(
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
criticalExtensions
.
present
==
present
==
RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8
)
{
RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8
)
{
/*NN: revise the condition */
/*NN: revise the condition
s and merge them with the corresponding action
*/
if
(
ue_context_p
->
ue_context
.
Status
==
RRC_RECONFIGURED
){
if
(
ue_context_p
->
ue_context
.
Status
==
RRC_RECONFIGURED
){
dedicated_DRB
=
1
;
DRB_procedure
=
1
;
LOG_I
(
RRC
,
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)
\n
"
,
PROTOCOL_RRC_CTXT_UE_FMT
" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
rrc_TransactionIdentifier
);
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
rrc_TransactionIdentifier
);
}
else
if
(
ue_context_p
->
ue_context
.
Status
==
RRC_HO_EXECUTION
){
DRB_procedure
=
2
;
ue_context_p
->
ue_context
.
Status
=
RRC_RECONFIGURED
;
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" UE State = RRC_HO_EXECUTION (xid %ld)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
rrc_TransactionIdentifier
);
}
else
{
}
else
{
dedicated_DRB
=
0
;
DRB_procedure
=
0
;
ue_context_p
->
ue_context
.
Status
=
RRC_RECONFIGURED
;
ue_context_p
->
ue_context
.
Status
=
RRC_RECONFIGURED
;
LOG_I
(
RRC
,
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" UE State = RRC_RECONFIGURED (default DRB, xid %ld)
\n
"
,
PROTOCOL_RRC_CTXT_UE_FMT
" UE State = RRC_RECONFIGURED (default DRB, xid %ld)
\n
"
,
...
@@ -6285,17 +6317,20 @@ rrc_eNB_decode_dcch(
...
@@ -6285,17 +6317,20 @@ rrc_eNB_decode_dcch(
#if defined(ENABLE_ITTI)
#if defined(ENABLE_ITTI)
# if defined(ENABLE_USE_MME)
# if defined(ENABLE_USE_MME)
if
(
EPC_MODE_ENABLED
==
1
)
{
if
(
EPC_MODE_ENABLED
==
1
)
{
if
(
dedicated_DRB
==
1
){
if
(
DRB_procedure
==
1
){
//s1ap E_RAB_SETUP
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
ctxt_pP
,
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
ctxt_pP
,
ue_context_p
,
ue_context_p
,
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
rrc_TransactionIdentifier
);
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
rrc_TransactionIdentifier
);
}
else
{
}
else
if
(
DRB_procedure
==
2
){
// x2ap path switch
rrc_eNB_send_PATH_SWITCH_REQ
(
ctxt_pP
,
ue_context_p
);
}
else
{
// S1AP_INITIAL_CONTEXT_SETUP
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP
(
ctxt_pP
,
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP
(
ctxt_pP
,
ue_context_p
);
ue_context_p
);
}
}
}
}
#else // establish a dedicated bearer
#else // establish a dedicated bearer
if
(
dedicated_DRB
==
0
)
{
if
(
DRB_procedure
==
0
)
{
// ue_context_p->ue_context.e_rab[0].status = E_RAB_STATUS_ESTABLISHED;
// ue_context_p->ue_context.e_rab[0].status = E_RAB_STATUS_ESTABLISHED;
rrc_eNB_reconfigure_DRBs
(
ctxt_pP
,
ue_context_p
);
rrc_eNB_reconfigure_DRBs
(
ctxt_pP
,
ue_context_p
);
}
}
...
...
openair2/RRC/LITE/rrc_eNB.c.orig
0 → 100644
View file @
15a7b91c
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_generate_messages.c
View file @
15a7b91c
...
@@ -374,23 +374,47 @@ int x2ap_eNB_generate_x2_handover_request(x2ap_eNB_instance_t *instance_p,
...
@@ -374,23 +374,47 @@ int x2ap_eNB_generate_x2_handover_request(x2ap_eNB_instance_t *instance_p,
UEAGMAXBITRTD_TO_ASN_PRIMITIVES
(
3L
,
&
message
.
msg
.
x2ap_HandoverRequest_IEs
.
uE_ContextInformation
.
uEaggregateMaximumBitRate
.
uEaggregateMaximumBitRateDownlink
);
UEAGMAXBITRTD_TO_ASN_PRIMITIVES
(
3L
,
&
message
.
msg
.
x2ap_HandoverRequest_IEs
.
uE_ContextInformation
.
uEaggregateMaximumBitRate
.
uEaggregateMaximumBitRateDownlink
);
UEAGMAXBITRTU_TO_ASN_PRIMITIVES
(
6L
,
&
message
.
msg
.
x2ap_HandoverRequest_IEs
.
uE_ContextInformation
.
uEaggregateMaximumBitRate
.
uEaggregateMaximumBitRateUplink
);
UEAGMAXBITRTU_TO_ASN_PRIMITIVES
(
6L
,
&
message
.
msg
.
x2ap_HandoverRequest_IEs
.
uE_ContextInformation
.
uEaggregateMaximumBitRate
.
uEaggregateMaximumBitRateUplink
);
X2ap_E_RABs_ToBeSetup_Item_t
*
e_RABs_ToBeSetup_Item1
=
calloc
(
1
,
sizeof
(
X2ap_E_RABs_ToBeSetup_Item_t
));
X2ap_E_RABs_ToBeSetup_Item_t
*
e_RABs_ToBeSetup_Item1
=
calloc
(
1
,
sizeof
(
X2ap_E_RABs_ToBeSetup_Item_t
));
int
i
;
for
(
i
=
0
;
i
<
rrc_eNB_ue_context
->
ue_context
.
setup_e_rabs
;
i
++
){
e_RABs_ToBeSetup_Item1
->
e_RAB_ID
=
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
e_rab_id
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
qCI
=
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
qos
.
qci
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
priorityLevel
=
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
qos
.
allocation_retention_priority
.
priority_level
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionCapability
=
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
qos
.
allocation_retention_priority
.
pre_emp_capability
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionVulnerability
=
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
qos
.
allocation_retention_priority
.
pre_emp_vulnerability
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
iE_Extensions
=
NULL
;
e_RABs_ToBeSetup_Item1
->
e_RAB_ID
=
10
;
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
=
(
uint8_t
)(
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
sgw_addr
.
length
/
8
);
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
qCI
=
1
;
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
bits_unused
=
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
sgw_addr
.
length
%
8
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
priorityLevel
=
1
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionCapability
=
0
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
pre_emptionVulnerability
=
0
;
e_RABs_ToBeSetup_Item1
->
e_RAB_Level_QoS_Parameters
.
allocationAndRetentionPriority
.
iE_Extensions
=
NULL
;
TRLA_TO_BIT_STRING
(
1
,
&
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
);
// IPv4
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
buf
=
GTP_TEID_TO_OCTET_STRING
(
12
,
&
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
gTP_TEID
);
calloc
(
1
,
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
);
X2ap_E_RABs_ToBeSetup_ListIEs_t
*
e_RABs_ToBeSetup_List1
=
calloc
(
1
,
sizeof
(
X2ap_E_RABs_ToBeSetup_ListIEs_t
));
ASN_SEQUENCE_ADD
(
e_RABs_ToBeSetup_List1
,
e_RABs_ToBeSetup_Item1
);
memcpy
(
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
buf
,
x2ap_encode_x2ap_e_rabs_tobesetup_list
(
&
message
.
msg
.
x2ap_HandoverRequest_IEs
.
uE_ContextInformation
.
e_RABs_ToBeSetup_List
,
e_RABs_ToBeSetup_List1
);
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
sgw_addr
.
buffer
,
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
);
//TRLA_TO_BIT_STRING(rrc_eNB_ue_context->ue_context.e_rab[i].param.sgw_addr.buffer,
// &e_RABs_ToBeSetup_Item1->uL_GTPtunnelEndpoint.transportLayerAddress); // IPv4
GTP_TEID_TO_OCTET_STRING
(
rrc_eNB_ue_context
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
,
&
e_RABs_ToBeSetup_Item1
->
uL_GTPtunnelEndpoint
.
gTP_TEID
);
X2ap_E_RABs_ToBeSetup_ListIEs_t
*
e_RABs_ToBeSetup_List1
=
calloc
(
1
,
sizeof
(
X2ap_E_RABs_ToBeSetup_ListIEs_t
));
ASN_SEQUENCE_ADD
(
e_RABs_ToBeSetup_List1
,
e_RABs_ToBeSetup_Item1
);
x2ap_encode_x2ap_e_rabs_tobesetup_list
(
&
message
.
msg
.
x2ap_HandoverRequest_IEs
.
uE_ContextInformation
.
e_RABs_ToBeSetup_List
,
e_RABs_ToBeSetup_List1
);
}
#if 0
#if 0
char RRC[81] = { 0x0a,0x10,0x00,0x00,0x03,0x41,0x60,0x08,0xcf,0x50,0x4a,0x0e,0x07,0x00,0x8c,0xf5,0x04,0xa0,0xe0,0x03,0xc0,0x51,0xc2,0x28,
char RRC[81] = { 0x0a,0x10,0x00,0x00,0x03,0x41,0x60,0x08,0xcf,0x50,0x4a,0x0e,0x07,0x00,0x8c,0xf5,0x04,0xa0,0xe0,0x03,0xc0,0x51,0xc2,0x28,
0xb8,0x56,0xd1,0x80,0x4a,0x00,0x00,0x08,0x18,0x02,0x20,0x42,0x08,0x00,0x80,0x60,0x00,0x20,0x00,0x00,0x03,0x82,0xca,0x04,
0xb8,0x56,0xd1,0x80,0x4a,0x00,0x00,0x08,0x18,0x02,0x20,0x42,0x08,0x00,0x80,0x60,0x00,0x20,0x00,0x00,0x03,0x82,0xca,0x04,
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
15a7b91c
...
@@ -211,6 +211,7 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
...
@@ -211,6 +211,7 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
X2ap_HandoverRequest_IEs_t
*
x2HandoverRequest
;
X2ap_HandoverRequest_IEs_t
*
x2HandoverRequest
;
x2ap_eNB_data_t
*
x2ap_eNB_data
;
x2ap_eNB_data_t
*
x2ap_eNB_data
;
uint32_t
eNB_id
=
0
;
uint32_t
eNB_id
=
0
;
uint8_t
i
;
int
ta_ret
;
int
ta_ret
;
//uint16_t max_enb_connected;
//uint16_t max_enb_connected;
MessageDef
*
m
;
MessageDef
*
m
;
...
@@ -234,16 +235,37 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
...
@@ -234,16 +235,37 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
extern
int
x2id_to_source_rnti
[
1
];
extern
int
x2id_to_source_rnti
[
1
];
X2AP_HANDOVER_REQ
(
m
).
source_x2id
=
x2HandoverRequest
->
old_eNB_UE_X2AP_ID
;
X2AP_HANDOVER_REQ
(
m
).
source_x2id
=
x2HandoverRequest
->
old_eNB_UE_X2AP_ID
;
X2AP_HANDOVER_REQ
(
m
).
source_rnti
=
x2id_to_source_rnti
[
x2HandoverRequest
->
old_eNB_UE_X2AP_ID
];
X2AP_HANDOVER_REQ
(
m
).
source_rnti
=
x2id_to_source_rnti
[
x2HandoverRequest
->
old_eNB_UE_X2AP_ID
];
X2AP_HANDOVER_REQ
(
m
).
nb_e_rabs_tobesetup
=
x2HandoverRequest
->
uE_ContextInformation
.
e_RABs_ToBeSetup_List
.
list
.
count
;
X2ap_E_RABs_ToBeSetup_Item_t
*
e_RABs_ToBeSetup_Item
;
for
(
i
=
0
;
i
<
x2HandoverRequest
->
uE_ContextInformation
.
e_RABs_ToBeSetup_List
.
list
.
count
;
i
++
){
e_RABs_ToBeSetup_Item
=
(
X2ap_E_RABs_ToBeSetup_Item_t
*
)
x2HandoverRequest
->
uE_ContextInformation
.
e_RABs_ToBeSetup_List
.
list
.
array
[
i
];
X2AP_HANDOVER_REQ
(
m
).
e_rabs_tobesetup
[
i
].
e_rab_id
=
e_RABs_ToBeSetup_Item
->
e_RAB_ID
;
memcpy
(
X2AP_HANDOVER_REQ
(
m
).
e_rabs_tobesetup
[
i
].
eNB_addr
.
buffer
,
e_RABs_ToBeSetup_Item
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
buf
,
e_RABs_ToBeSetup_Item
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
);
X2AP_HANDOVER_REQ
(
m
).
e_rabs_tobesetup
[
i
].
eNB_addr
.
length
=
e_RABs_ToBeSetup_Item
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
*
8
-
e_RABs_ToBeSetup_Item
->
uL_GTPtunnelEndpoint
.
transportLayerAddress
.
bits_unused
;
OCTET_STRING_TO_INT32
(
&
e_RABs_ToBeSetup_Item
->
uL_GTPtunnelEndpoint
.
gTP_TEID
,
X2AP_HANDOVER_REQ
(
m
).
e_rabs_tobesetup
[
i
].
gtp_teid
);
}
if
((
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
key_eNodeB_star
.
buf
)
&&
if
((
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
key_eNodeB_star
.
buf
)
&&
(
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
key_eNodeB_star
.
size
==
32
))
{
(
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
key_eNodeB_star
.
size
==
32
))
{
memcpy
(
X2AP_HANDOVER_REQ
(
m
).
kenb
,
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
key_eNodeB_star
.
buf
,
32
);
memcpy
(
X2AP_HANDOVER_REQ
(
m
).
kenb
,
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
key_eNodeB_star
.
buf
,
32
);
X2AP_HANDOVER_REQ
(
m
).
kenb_ncc
=
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
nextHopChainingCount
;
X2AP_HANDOVER_REQ
(
m
).
kenb_ncc
=
x2HandoverRequest
->
uE_ContextInformation
.
aS_SecurityInformation
.
nextHopChainingCount
;
itti_send_msg_to_task
(
TASK_RRC_ENB
,
x2ap_eNB_data
->
x2ap_eNB_instance
->
instance
,
m
);
return
0
;
}
else
{
}
else
{
return
-
1
;
X2AP_WARN
(
"Size of eNB key star does not match the expected value
\n
"
);
//return -1;
}
}
itti_send_msg_to_task
(
TASK_RRC_ENB
,
x2ap_eNB_data
->
x2ap_eNB_instance
->
instance
,
m
);
#if 0
#if 0
if (x2SetupRequest->globalENB_ID.eNB_ID.present == X2ap_ENB_ID_PR_home_eNB_ID) {
if (x2SetupRequest->globalENB_ID.eNB_ID.present == X2ap_ENB_ID_PR_home_eNB_ID) {
// Home eNB ID = 28 bits
// Home eNB ID = 28 bits
...
...
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