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
Michael Black
OpenXG-RAN
Commits
0eb2acb0
Commit
0eb2acb0
authored
Apr 06, 2022
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
F1 code cleanup before merge
-Remove commented out code, debug logs, some hardcodings, fix indentation
parent
038e70b0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
419 additions
and
510 deletions
+419
-510
openair2/COMMON/f1ap_messages_types.h
openair2/COMMON/f1ap_messages_types.h
+16
-22
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+287
-290
openair2/F1AP/f1ap_du_interface_management.c
openair2/F1AP/f1ap_du_interface_management.c
+12
-18
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+64
-61
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+1
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+0
-4
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+15
-74
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+22
-27
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+2
-2
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+0
-6
No files found.
openair2/COMMON/f1ap_messages_types.h
View file @
0eb2acb0
...
@@ -352,6 +352,15 @@ typedef struct cu_to_du_rrc_information_s {
...
@@ -352,6 +352,15 @@ typedef struct cu_to_du_rrc_information_s {
uint8_t
measConfig_length
;
uint8_t
measConfig_length
;
}
cu_to_du_rrc_information_t
;
}
cu_to_du_rrc_information_t
;
typedef
struct
du_to_du_rrc_information_s
{
uint8_t
*
cellGroupConfig
;
uint8_t
cellGroupConfig_length
;
uint8_t
*
measGapConfig
;
uint8_t
measGapConfig_length
;
uint8_t
*
requestedP_MaxFR1
;
uint8_t
requestedP_MaxFR1_length
;
}
du_to_cu_rrc_information_t
;
typedef
enum
QoS_information_e
{
typedef
enum
QoS_information_e
{
NG_RAN_QoS
=
0
,
NG_RAN_QoS
=
0
,
EUTRAN_QoS
=
1
,
EUTRAN_QoS
=
1
,
...
@@ -377,10 +386,13 @@ typedef struct f1ap_ue_context_setup_s {
...
@@ -377,10 +386,13 @@ typedef struct f1ap_ue_context_setup_s {
uint32_t
servCellId
;
uint32_t
servCellId
;
cu_to_du_rrc_information_t
*
cu_to_du_rrc_information
;
cu_to_du_rrc_information_t
*
cu_to_du_rrc_information
;
uint8_t
cu_to_du_rrc_information_length
;
uint8_t
cu_to_du_rrc_information_length
;
uint8_t
*
du_to_cu_rrc_information
;
//uint8_t *du_to_cu_rrc_information;
uint8_t
du_to_cu_rrc_information_length
;
du_to_cu_rrc_information_t
*
du_to_cu_rrc_information
;
f1ap_drb_to_be_setup_t
*
drbs_to_be_setup
;
// BK: need to replace by s1ap_initial_context_setup_req
uint32_t
du_to_cu_rrc_information_length
;
uint8_t
drbs_to_be_setup_length
;
// BK: need to replace by s1ap_initial_context_setup_req
f1ap_drb_to_be_setup_t
*
drbs_to_be_setup
;
uint8_t
drbs_to_be_setup_length
;
f1ap_drb_to_be_setup_t
*
drbs_to_be_modified
;
uint8_t
drbs_to_be_modified_length
;
QoS_information_t
QoS_information_type
;
QoS_information_t
QoS_information_type
;
uint8_t
drbs_failed_to_be_setup_length
;
uint8_t
drbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
drbs_failed_to_be_setup
;
f1ap_rb_failed_to_be_setup_t
*
drbs_failed_to_be_setup
;
...
@@ -388,29 +400,11 @@ typedef struct f1ap_ue_context_setup_s {
...
@@ -388,29 +400,11 @@ typedef struct f1ap_ue_context_setup_s {
uint8_t
srbs_to_be_setup_length
;
uint8_t
srbs_to_be_setup_length
;
uint8_t
srbs_failed_to_be_setup_length
;
uint8_t
srbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
srbs_failed_to_be_setup
;
f1ap_rb_failed_to_be_setup_t
*
srbs_failed_to_be_setup
;
s1ap_initial_context_setup_req_t
*
s1ap_initial_context_setup_req
;
ReconfigurationCompl_t
ReconfigComplOutcome
;
ReconfigurationCompl_t
ReconfigComplOutcome
;
// coniatner for the rrc_eNB_generate_SecurityModeCommand message
uint8_t
*
rrc_container
;
uint8_t
*
rrc_container
;
int
rrc_container_length
;
int
rrc_container_length
;
}
f1ap_ue_context_setup_t
;
}
f1ap_ue_context_setup_t
;
typedef
struct
f1ap_ue_context_setup_resp_s
{
uint32_t
gNB_CU_ue_id
;
// BK: need to replace by use from rnti
uint32_t
gNB_DU_ue_id
;
uint16_t
rnti
;
uint8_t
du_to_cu_rrc_information
[
1024
/*Arbitrarily big enough*/
];
uint32_t
du_to_cu_rrc_information_length
;
f1ap_drb_to_be_setup_t
*
drbs_setup
;
// BK: need to replace by s1ap_initial_context_setup_req
uint8_t
drbs_setup_length
;
// BK: need to replace by s1ap_initial_context_setup_req
f1ap_srb_to_be_setup_t
*
srbs_setup
;
uint8_t
srbs_setup_length
;
uint8_t
srbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
srbs_failed_to_be_setup
;
uint8_t
drbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
drbs_failed_to_be_setup
;
}
f1ap_ue_context_setup_resp_t
;
typedef
enum
F1ap_Cause_e
{
typedef
enum
F1ap_Cause_e
{
F1AP_CAUSE_NOTHING
,
/* No components present */
F1AP_CAUSE_NOTHING
,
/* No components present */
F1AP_CAUSE_RADIO_NETWORK
,
F1AP_CAUSE_RADIO_NETWORK
,
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
0eb2acb0
...
@@ -135,23 +135,23 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -135,23 +135,23 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* optional */
/* optional */
/* 6.1 cG_ConfigInfo */
/* 6.1 cG_ConfigInfo */
if
(
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
cG_ConfigInfo
!=
NULL
){
if
(
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
cG_ConfigInfo
!=
NULL
){
const
char
cG_ConfigInfoStr
[]
=
"asdsa1d32sa1d31asd31as"
;
asn1cCalloc
(
ie6
->
value
.
choice
.
CUtoDURRCInformation
.
cG_ConfigInfo
,
cG_ConfigInfo
);
asn1cCalloc
(
ie6
->
value
.
choice
.
CUtoDURRCInformation
.
cG_ConfigInfo
,
cG_ConfigInfo
);
OCTET_STRING_fromBuf
(
cG_ConfigInfo
,
cG_ConfigInfoStr
,
strlen
(
cG_ConfigInfoStr
))
;
OCTET_STRING_fromBuf
(
cG_ConfigInfo
,
(
const
char
*
)
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
cG_ConfigInfo
,
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
cG_ConfigInfo_length
);
}
}
/* optional */
/* optional */
/* 6.2 uE_CapabilityRAT_ContainerList */
/* 6.2 uE_CapabilityRAT_ContainerList */
if
(
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
uE_CapabilityRAT_ContainerList
!=
NULL
){
if
(
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
uE_CapabilityRAT_ContainerList
!=
NULL
){
asn1cCalloc
(
ie6
->
value
.
choice
.
CUtoDURRCInformation
.
uE_CapabilityRAT_ContainerList
,
uE_CapabilityRAT_ContainerList
);
asn1cCalloc
(
ie6
->
value
.
choice
.
CUtoDURRCInformation
.
uE_CapabilityRAT_ContainerList
,
uE_CapabilityRAT_ContainerList
);
OCTET_STRING_fromBuf
(
uE_CapabilityRAT_ContainerList
,
(
const
char
*
)
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
uE_CapabilityRAT_ContainerList
,
OCTET_STRING_fromBuf
(
uE_CapabilityRAT_ContainerList
,
(
const
char
*
)
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
uE_CapabilityRAT_ContainerList
,
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
uE_CapabilityRAT_ContainerList_length
);
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
uE_CapabilityRAT_ContainerList_length
);
}
}
/* optional */
/* optional */
/* 6.3 measConfig */
/* 6.3 measConfig */
if
(
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
measConfig
!=
NULL
){
if
(
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
measConfig
!=
NULL
){
const
char
measConfigStr
[]
=
"asdsa1d32sa1d31asd31as"
;
asn1cCalloc
(
ie6
->
value
.
choice
.
CUtoDURRCInformation
.
measConfig
,
measConfig
);
asn1cCalloc
(
ie6
->
value
.
choice
.
CUtoDURRCInformation
.
measConfig
,
measConfig
);
OCTET_STRING_fromBuf
(
measConfig
,
measConfigStr
,
strlen
(
measConfigStr
))
;
OCTET_STRING_fromBuf
(
measConfig
,
(
const
char
*
)
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
measConfig
,
f1ap_ue_context_setup_req
->
cu_to_du_rrc_information
->
measConfig_length
);
}
}
}
}
...
@@ -248,201 +248,95 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -248,201 +248,95 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* mandatory */
/* mandatory */
/* c11. SRBs_ToBeSetup_List */
/* c11. SRBs_ToBeSetup_List */
if
(
f1ap_ue_context_setup_req
->
srbs_to_be_setup_length
>
0
){
if
(
f1ap_ue_context_setup_req
->
srbs_to_be_setup_length
>
0
){
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextSetupRequestIEs_t
,
ie11
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextSetupRequestIEs_t
,
ie11
);
ie11
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_ToBeSetup_List
;
ie11
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_ToBeSetup_List
;
ie11
->
criticality
=
F1AP_Criticality_reject
;
// ?
ie11
->
criticality
=
F1AP_Criticality_reject
;
// ?
ie11
->
value
.
present
=
F1AP_UEContextSetupRequestIEs__value_PR_SRBs_ToBeSetup_List
;
ie11
->
value
.
present
=
F1AP_UEContextSetupRequestIEs__value_PR_SRBs_ToBeSetup_List
;
for
(
int
i
=
0
;
i
<
f1ap_ue_context_setup_req
->
srbs_to_be_setup_length
;
i
++
)
{
for
(
int
i
=
0
;
i
<
f1ap_ue_context_setup_req
->
srbs_to_be_setup_length
;
i
++
)
{
//
asn1cSequenceAdd
(
ie11
->
value
.
choice
.
SRBs_ToBeSetup_List
.
list
,
F1AP_SRBs_ToBeSetup_ItemIEs_t
,
srbs_toBeSetup_item_ies
);
asn1cSequenceAdd
(
ie11
->
value
.
choice
.
SRBs_ToBeSetup_List
.
list
,
F1AP_SRBs_ToBeSetup_ItemIEs_t
,
srbs_toBeSetup_item_ies
);
srbs_toBeSetup_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_ToBeSetup_Item
;
// 73
srbs_toBeSetup_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_ToBeSetup_Item
;
// 73
srbs_toBeSetup_item_ies
->
criticality
=
F1AP_Criticality_ignore
;
srbs_toBeSetup_item_ies
->
criticality
=
F1AP_Criticality_ignore
;
srbs_toBeSetup_item_ies
->
value
.
present
=
F1AP_SRBs_ToBeSetup_ItemIEs__value_PR_SRBs_ToBeSetup_Item
;
srbs_toBeSetup_item_ies
->
value
.
present
=
F1AP_SRBs_ToBeSetup_ItemIEs__value_PR_SRBs_ToBeSetup_Item
;
/* 11.1 SRBs_ToBeSetup_Item */
/* 11.1 SRBs_ToBeSetup_Item */
F1AP_SRBs_ToBeSetup_Item_t
*
srbs_toBeSetup_item
=&
srbs_toBeSetup_item_ies
->
value
.
choice
.
SRBs_ToBeSetup_Item
;
F1AP_SRBs_ToBeSetup_Item_t
*
srbs_toBeSetup_item
=&
srbs_toBeSetup_item_ies
->
value
.
choice
.
SRBs_ToBeSetup_Item
;
/* 11.1.1 sRBID */
/* 11.1.1 sRBID */
srbs_toBeSetup_item
->
sRBID
=
f1ap_ue_context_setup_req
->
srbs_to_be_setup
[
i
].
srb_id
;
srbs_toBeSetup_item
->
sRBID
=
f1ap_ue_context_setup_req
->
srbs_to_be_setup
[
i
].
srb_id
;
/* OPTIONAL */
/* OPTIONAL */
/* 11.1.2 duplicationIndication */
/* 11.1.2 duplicationIndication */
asn1cCallocOne
(
srbs_toBeSetup_item
->
duplicationIndication
,
//if (0) {
asn1cCallocOne
(
srbs_toBeSetup_item
->
duplicationIndication
,
F1AP_DuplicationIndication_true
);
// enum
F1AP_DuplicationIndication_true
);
// enum
//}
}
}
}
}
/* mandatory */
/* mandatory */
/* c12. DRBs_ToBeSetup_List */
/* c12. DRBs_ToBeSetup_List */
if
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
){
if
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
){
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextSetupRequestIEs_t
,
ie12
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextSetupRequestIEs_t
,
ie12
);
ie12
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List
;
ie12
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List
;
ie12
->
criticality
=
F1AP_Criticality_reject
;
ie12
->
criticality
=
F1AP_Criticality_reject
;
ie12
->
value
.
present
=
F1AP_UEContextSetupRequestIEs__value_PR_DRBs_ToBeSetup_List
;
ie12
->
value
.
present
=
F1AP_UEContextSetupRequestIEs__value_PR_DRBs_ToBeSetup_List
;
LOG_I
(
F1AP
,
"Length of drbs_to_be_setup: %d
\n
"
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
);
LOG_I
(
F1AP
,
"Length of drbs_to_be_setup: %d
\n
"
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
);
for
(
int
i
=
0
;
i
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
;
i
++
)
{
//
asn1cSequenceAdd
(
ie12
->
value
.
choice
.
DRBs_ToBeSetup_List
.
list
,
F1AP_DRBs_ToBeSetup_ItemIEs_t
,
drbs_toBeSetup_item_ies
);
drbs_toBeSetup_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_Item
;
drbs_toBeSetup_item_ies
->
criticality
=
F1AP_Criticality_reject
;
drbs_toBeSetup_item_ies
->
value
.
present
=
F1AP_DRBs_ToBeSetup_ItemIEs__value_PR_DRBs_ToBeSetup_Item
;
/* 12.1 DRBs_ToBeSetup_Item */
F1AP_DRBs_ToBeSetup_Item_t
*
drbs_toBeSetup_item
=&
drbs_toBeSetup_item_ies
->
value
.
choice
.
DRBs_ToBeSetup_Item
;
/* 12.1.1 dRBID */
drbs_toBeSetup_item
->
dRBID
=
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
;
// 9
/* 12.1.2 qoSInformation */
int
some_decide_qos
=
0
;
// BK: Need Check
if
(
some_decide_qos
)
{
drbs_toBeSetup_item
->
qoSInformation
.
present
=
F1AP_QoSInformation_PR_eUTRANQoS
;
/* 12.1.2.1 eUTRANQoS */
asn1cCalloc
(
drbs_toBeSetup_item
->
qoSInformation
.
choice
.
eUTRANQoS
,
eUTRANQoS
);
/* 12.1.2.1.1 qCI */
eUTRANQoS
->
qCI
=
254L
;
/* 12.1.2.1.2 allocationAndRetentionPriority */
{
/* 12.1.2.1.2.1 priorityLevel */
eUTRANQoS
->
allocationAndRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
/* 12.1.2.1.2.2 pre_emptionCapability */
eUTRANQoS
->
allocationAndRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_may_trigger_pre_emption
;
// enum
/* 12.1.2.1.2.2 pre_emptionVulnerability */
eUTRANQoS
->
allocationAndRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
}
/* OPTIONAL */
/* 12.1.2.1.3 gbrQosInformation */
if
(
0
)
{
eUTRANQoS
->
gbrQosInformation
=
(
F1AP_GBR_QosInformation_t
*
)
calloc
(
1
,
sizeof
(
F1AP_GBR_QosInformation_t
));
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_MaximumBitrateDL
,
1L
);
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_MaximumBitrateUL
,
1L
);
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_GuaranteedBitrateDL
,
1L
);
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_GuaranteedBitrateUL
,
1L
);
}
}
else
{
/* 12.1.2 DRB_Information */
drbs_toBeSetup_item
->
qoSInformation
.
present
=
F1AP_QoSInformation_PR_choice_extension
;
F1AP_QoSInformation_ExtIEs_t
*
ie
=
(
F1AP_QoSInformation_ExtIEs_t
*
)
calloc
(
1
,
sizeof
(
*
ie
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_DRB_Information
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_QoSInformation_ExtIEs__value_PR_DRB_Information
;
F1AP_DRB_Information_t
*
DRB_Information
=
&
ie
->
value
.
choice
.
DRB_Information
;
drbs_toBeSetup_item
->
qoSInformation
.
choice
.
choice_extension
=
(
struct
F1AP_ProtocolIE_SingleContainer
*
)
ie
;
/* 12.1.2.1 dRB_QoS */
{
/* qoS_Characteristics */
{
int
some_decide_qoS_characteristics
=
0
;
// BK: Need Check
if
(
some_decide_qoS_characteristics
)
{
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_non_Dynamic_5QI
;
setQos
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
non_Dynamic_5QI
);
}
else
{
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_dynamic_5QI
;
asn1cCalloc
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
,
tmp
);
/* qoSPriorityLevel */
tmp
->
qoSPriorityLevel
=
1L
;
/* packetDelayBudget */
tmp
->
packetDelayBudget
=
1L
;
/* packetErrorRate */
tmp
->
packetErrorRate
.
pER_Scalar
=
1L
;
tmp
->
packetErrorRate
.
pER_Exponent
=
6L
;
/* OPTIONAL */
/* delayCritical */
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
delayCritical
,
1L
);
}
/* OPTIONAL */
/* averagingWindow */
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
averagingWindow
,
1L
);
}
/* OPTIONAL */
for
(
int
i
=
0
;
i
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
;
i
++
)
{
/* maxDataBurstVolume */
//
if
(
0
)
{
asn1cSequenceAdd
(
ie12
->
value
.
choice
.
DRBs_ToBeSetup_List
.
list
,
F1AP_DRBs_ToBeSetup_ItemIEs_t
,
drbs_toBeSetup_item_ies
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
maxDataBurstVolume
,
1L
);
drbs_toBeSetup_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_Item
;
}
drbs_toBeSetup_item_ies
->
criticality
=
F1AP_Criticality_reject
;
}
// if some_decide_qoS_characteristics
drbs_toBeSetup_item_ies
->
value
.
present
=
F1AP_DRBs_ToBeSetup_ItemIEs__value_PR_DRBs_ToBeSetup_Item
;
}
// qoS_Characteristics
/* 12.1 DRBs_ToBeSetup_Item */
/* nGRANallocationRetentionPriority */
F1AP_DRBs_ToBeSetup_Item_t
*
drbs_toBeSetup_item
=&
drbs_toBeSetup_item_ies
->
value
.
choice
.
DRBs_ToBeSetup_Item
;
/* 12.1.1 dRBID */
drbs_toBeSetup_item
->
dRBID
=
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
;
// 9
/* 12.1.2 qoSInformation */
int
some_decide_qos
=
0
;
// BK: Need Check
if
(
some_decide_qos
)
{
drbs_toBeSetup_item
->
qoSInformation
.
present
=
F1AP_QoSInformation_PR_eUTRANQoS
;
/* 12.1.2.1 eUTRANQoS */
asn1cCalloc
(
drbs_toBeSetup_item
->
qoSInformation
.
choice
.
eUTRANQoS
,
eUTRANQoS
);
/* 12.1.2.1.1 qCI */
eUTRANQoS
->
qCI
=
254L
;
/* 12.1.2.1.2 allocationAndRetentionPriority */
{
{
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
/* 12.1.2.1.2.1 priorityLevel */
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
// enum
eUTRANQoS
->
allocationAndRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
/* 12.1.2.1.2.2 pre_emptionCapability */
}
// nGRANallocationRetentionPriority
eUTRANQoS
->
allocationAndRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_may_trigger_pre_emption
;
// enum
/* 12.1.2.1.2.2 pre_emptionVulnerability */
/* OPTIONAL */
eUTRANQoS
->
allocationAndRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
/* gBR_QoS_Flow_Information */
if
(
0
)
{
asn1cCalloc
(
DRB_Information
->
dRB_QoS
.
gBR_QoS_Flow_Information
,
tmp
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateUplink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
guaranteedFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
guaranteedFlowBitRateUplink
,
1L
);
/* OPTIONAL */
/* maxPacketLossRateDownlink */
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
gBR_QoS_Flow_Information
->
maxPacketLossRateDownlink
,
1L
);
}
/* OPTIONAL */
/* maxPacketLossRateUplink */
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
gBR_QoS_Flow_Information
->
maxPacketLossRateUplink
,
1L
);
}
}
/* OPTIONAL */
/* reflective_QoS_Attribute */
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
reflective_QoS_Attribute
,
1L
);
}
}
}
// dRB_QoS
/* 12.1.2.2 sNSSAI */
{
/* sST */
OCTET_STRING_fromBuf
(
&
DRB_Information
->
sNSSAI
.
sST
,
"1"
,
1
);
/* OPTIONAL */
/* OPTIONAL */
/*
sD
*/
/*
12.1.2.1.3 gbrQosInformation
*/
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
DRB_Information
->
sNSSAI
.
sD
,
tmp
);
eUTRANQoS
->
gbrQosInformation
=
(
F1AP_GBR_QosInformation_t
*
)
calloc
(
1
,
sizeof
(
F1AP_GBR_QosInformation_t
));
OCTET_STRING_fromBuf
(
tmp
,
"asdsa1d32sa1d31asd31as"
,
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_MaximumBitrateDL
,
1L
);
strlen
(
"asdsa1d32sa1d31asd31as"
));
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_MaximumBitrateUL
,
1L
);
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_GuaranteedBitrateDL
,
1L
);
asn_long2INTEGER
(
&
eUTRANQoS
->
gbrQosInformation
->
e_RAB_GuaranteedBitrateUL
,
1L
);
}
}
}
}
else
{
/* 12.1.2 DRB_Information */
/* OPTIONAL */
drbs_toBeSetup_item
->
qoSInformation
.
present
=
F1AP_QoSInformation_PR_choice_extension
;
/* 12.1.2.3 notificationControl */
F1AP_QoSInformation_ExtIEs_t
*
ie
=
(
F1AP_QoSInformation_ExtIEs_t
*
)
calloc
(
1
,
sizeof
(
*
ie
));
if
(
0
)
{
ie
->
id
=
F1AP_ProtocolIE_ID_id_DRB_Information
;
asn1cCallocOne
(
DRB_Information
->
notificationControl
,
ie
->
criticality
=
F1AP_Criticality_reject
;
F1AP_NotificationControl_active
);
// enum
ie
->
value
.
present
=
F1AP_QoSInformation_ExtIEs__value_PR_DRB_Information
;
}
F1AP_DRB_Information_t
*
DRB_Information
=
&
ie
->
value
.
choice
.
DRB_Information
;
drbs_toBeSetup_item
->
qoSInformation
.
choice
.
choice_extension
=
(
struct
F1AP_ProtocolIE_SingleContainer
*
)
ie
;
/* 12.1.2.4 flows_Mapped_To_DRB_List */
// BK: need verifiy
/* 12.1.2.1 dRB_QoS */
for
(
int
k
=
0
;
k
<
1
;
k
++
)
{
asn1cSequenceAdd
(
DRB_Information
->
flows_Mapped_To_DRB_List
.
list
,
F1AP_Flows_Mapped_To_DRB_Item_t
,
flows_mapped_to_drb_item
);
/* qoSFlowIndicator */
flows_mapped_to_drb_item
->
qoSFlowIdentifier
=
1L
;
/* qoSFlowLevelQoSParameters */
{
{
/* qoS_Characteristics */
/* qoS_Characteristics */
{
{
int
some_decide_qoS_characteristics
=
0
;
// BK: Need Check
int
some_decide_qoS_characteristics
=
0
;
// BK: Need Check
F1AP_QoS_Characteristics_t
*
QosParams
=&
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
qoS_Characteristics
;
if
(
some_decide_qoS_characteristics
)
{
if
(
some_decide_qoS_characteristics
)
{
QosParams
->
present
=
F1AP_QoS_Characteristics_PR_non_Dynamic_5QI
;
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_non_Dynamic_5QI
;
setQos
(
QosParams
->
choice
.
non_Dynamic_5QI
);
setQos
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
non_Dynamic_5QI
);
}
else
{
}
else
{
QosParams
->
present
=
F1AP_QoS_Characteristics_PR_dynamic_5QI
;
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_dynamic_5QI
;
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
,
tmp
);
asn1cCalloc
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
,
tmp
);
/* qoSPriorityLevel */
/* qoSPriorityLevel */
tmp
->
qoSPriorityLevel
=
1L
;
tmp
->
qoSPriorityLevel
=
1L
;
/* packetDelayBudget */
/* packetDelayBudget */
...
@@ -454,36 +348,33 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -454,36 +348,33 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */
/* OPTIONAL */
/* delayCritical */
/* delayCritical */
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
->
delayCritical
,
tmp
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
delayCritical
,
1L
);
*
tmp
=
1L
;
}
}
/* OPTIONAL */
/* OPTIONAL */
/* averagingWindow */
/* averagingWindow */
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
->
averagingWindow
,
tmp
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
averagingWindow
,
1L
);
*
tmp
=
1L
;
}
}
/* OPTIONAL */
/* OPTIONAL */
/* maxDataBurstVolume */
/* maxDataBurstVolume */
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
->
maxDataBurstVolume
,
tmp
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
maxDataBurstVolume
,
1L
);
*
tmp
=
1L
;
}
}
}
// if some_decide_qoS_characteristics
}
// if some_decide_qoS_characteristics
}
// qoS_Characteristics
}
// qoS_Characteristics
/* nGRANallocationRetentionPriority */
/* nGRANallocationRetentionPriority */
{
{
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
// enum
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
}
// nGRANallocationRetentionPriority
}
// nGRANallocationRetentionPriority
/* OPTIONAL */
/* OPTIONAL */
/* gBR_QoS_Flow_Information */
/* gBR_QoS_Flow_Information */
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
gBR_QoS_Flow_Information
,
tmp
);
asn1cCalloc
(
DRB_Information
->
dRB_QoS
.
gBR_QoS_Flow_Information
,
tmp
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateUplink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateUplink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
guaranteedFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
guaranteedFlowBitRateDownlink
,
1L
);
...
@@ -492,81 +383,187 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -492,81 +383,187 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */
/* OPTIONAL */
/* maxPacketLossRateDownlink */
/* maxPacketLossRateDownlink */
if
(
0
)
{
if
(
0
)
{
asn1cCallocOne
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
gBR_QoS_Flow_Information
->
maxPacketLossRateDownlink
,
1L
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
gBR_QoS_Flow_Information
->
maxPacketLossRateDownlink
,
1L
);
}
}
/* OPTIONAL */
/* OPTIONAL */
/* maxPacketLossRateUplink */
/* maxPacketLossRateUplink */
if
(
0
)
{
if
(
0
)
{
asn1cCallocOne
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
gBR_QoS_Flow_Information
->
maxPacketLossRateUplink
,
1L
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
gBR_QoS_Flow_Information
->
maxPacketLossRateUplink
,
1L
);
}
}
}
}
/* OPTIONAL */
/* OPTIONAL */
/* reflective_QoS_Attribute */
/* reflective_QoS_Attribute */
if
(
0
)
{
if
(
0
)
{
asn1cCallocOne
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
reflective_QoS_Attribute
,
1L
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
reflective_QoS_Attribute
,
1L
);
}
}
}
// qoSFlowLevelQoSParameters
}
// dRB_QoS
}
/* 12.1.2.2 sNSSAI */
}
// if some_decide_qos
{
/* sST */
/* 12.1.3 uLUPTNLInformation_ToBeSetup_List */
OCTET_STRING_fromBuf
(
&
DRB_Information
->
sNSSAI
.
sST
,
"1"
,
1
);
for
(
int
j
=
0
;
j
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl_length
;
j
++
)
{
/*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/
/* OPTIONAL */
transport_layer_addr_t
addr
;
/* sD */
int
sz
=
sizeof
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
);
if
(
0
)
{
memcpy
(
addr
.
buffer
,
&
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
,
sz
);
asn1cCalloc
(
DRB_Information
->
sNSSAI
.
sD
,
tmp
);
addr
.
length
=
sz
*
8
;
OCTET_STRING_fromBuf
(
tmp
,
"asdsa1d32sa1d31asd31as"
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
=
strlen
(
"asdsa1d32sa1d31asd31as"
));
newGtpuCreateTunnel
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
}
f1ap_ue_context_setup_req
->
rnti
,
}
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
/* OPTIONAL */
0xFFFF
,
// We will set the right value from DU answer
/* 12.1.2.3 notificationControl */
addr
,
if
(
0
)
{
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
port
,
asn1cCallocOne
(
DRB_Information
->
notificationControl
,
cu_f1u_data_req
);
F1AP_NotificationControl_active
);
// enum
/* 12.3.1 ULTunnels_ToBeSetup_Item */
}
asn1cSequenceAdd
(
drbs_toBeSetup_item
->
uLUPTNLInformation_ToBeSetup_List
.
list
,
F1AP_ULUPTNLInformation_ToBeSetup_Item_t
,
uLUPTNLInformation_ToBeSetup_Item
);
/* 12.1.2.4 flows_Mapped_To_DRB_List */
// BK: need verifiy
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
present
=
F1AP_UPTransportLayerInformation_PR_gTPTunnel
;
asn1cCalloc
(
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
choice
.
gTPTunnel
,
for
(
int
k
=
0
;
k
<
1
;
k
++
)
{
gTPTunnel
);
asn1cSequenceAdd
(
DRB_Information
->
flows_Mapped_To_DRB_List
.
list
,
/* 12.3.1.1.1 transportLayerAddress */
F1AP_Flows_Mapped_To_DRB_Item_t
,
flows_mapped_to_drb_item
);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
tl_address
,
/* qoSFlowIndicator */
flows_mapped_to_drb_item
->
qoSFlowIdentifier
=
1L
;
/* qoSFlowLevelQoSParameters */
{
/* qoS_Characteristics */
{
int
some_decide_qoS_characteristics
=
0
;
// BK: Need Check
F1AP_QoS_Characteristics_t
*
QosParams
=&
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
qoS_Characteristics
;
if
(
some_decide_qoS_characteristics
)
{
QosParams
->
present
=
F1AP_QoS_Characteristics_PR_non_Dynamic_5QI
;
setQos
(
QosParams
->
choice
.
non_Dynamic_5QI
);
}
else
{
QosParams
->
present
=
F1AP_QoS_Characteristics_PR_dynamic_5QI
;
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
,
tmp
);
/* qoSPriorityLevel */
tmp
->
qoSPriorityLevel
=
1L
;
/* packetDelayBudget */
tmp
->
packetDelayBudget
=
1L
;
/* packetErrorRate */
tmp
->
packetErrorRate
.
pER_Scalar
=
1L
;
tmp
->
packetErrorRate
.
pER_Exponent
=
6L
;
/* OPTIONAL */
/* delayCritical */
if
(
0
)
{
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
->
delayCritical
,
tmp
);
*
tmp
=
1L
;
}
/* OPTIONAL */
/* averagingWindow */
if
(
0
)
{
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
->
averagingWindow
,
tmp
);
*
tmp
=
1L
;
}
/* OPTIONAL */
/* maxDataBurstVolume */
if
(
0
)
{
asn1cCalloc
(
QosParams
->
choice
.
dynamic_5QI
->
maxDataBurstVolume
,
tmp
);
*
tmp
=
1L
;
}
}
// if some_decide_qoS_characteristics
}
// qoS_Characteristics
/* nGRANallocationRetentionPriority */
{
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
// enum
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
}
// nGRANallocationRetentionPriority
/* OPTIONAL */
/* gBR_QoS_Flow_Information */
if
(
0
)
{
asn1cCalloc
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
gBR_QoS_Flow_Information
,
tmp
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
maxFlowBitRateUplink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
guaranteedFlowBitRateDownlink
,
1L
);
asn_long2INTEGER
(
&
tmp
->
guaranteedFlowBitRateUplink
,
1L
);
/* OPTIONAL */
/* maxPacketLossRateDownlink */
if
(
0
)
{
asn1cCallocOne
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
gBR_QoS_Flow_Information
->
maxPacketLossRateDownlink
,
1L
);
}
/* OPTIONAL */
/* maxPacketLossRateUplink */
if
(
0
)
{
asn1cCallocOne
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
gBR_QoS_Flow_Information
->
maxPacketLossRateUplink
,
1L
);
}
}
/* OPTIONAL */
/* reflective_QoS_Attribute */
if
(
0
)
{
asn1cCallocOne
(
flows_mapped_to_drb_item
->
qoSFlowLevelQoSParameters
.
reflective_QoS_Attribute
,
1L
);
}
}
// qoSFlowLevelQoSParameters
}
}
// if some_decide_qos
/* 12.1.3 uLUPTNLInformation_ToBeSetup_List */
for
(
int
j
=
0
;
j
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl_length
;
j
++
)
{
/*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/
transport_layer_addr_t
addr
;
int
sz
=
sizeof
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
);
memcpy
(
addr
.
buffer
,
&
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
,
sz
);
addr
.
length
=
sz
*
8
;
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
=
newGtpuCreateTunnel
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_setup_req
->
rnti
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
0xFFFF
,
// We will set the right value from DU answer
addr
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
port
,
cu_f1u_data_req
);
/* 12.3.1 ULTunnels_ToBeSetup_Item */
asn1cSequenceAdd
(
drbs_toBeSetup_item
->
uLUPTNLInformation_ToBeSetup_List
.
list
,
F1AP_ULUPTNLInformation_ToBeSetup_Item_t
,
uLUPTNLInformation_ToBeSetup_Item
);
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
present
=
F1AP_UPTransportLayerInformation_PR_gTPTunnel
;
asn1cCalloc
(
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
choice
.
gTPTunnel
,
gTPTunnel
);
/* 12.3.1.1.1 transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
tl_address
,
&
gTPTunnel
->
transportLayerAddress
);
&
gTPTunnel
->
transportLayerAddress
);
/* 12.3.1.1.2 gTP_TEID */
/* 12.3.1.1.2 gTP_TEID */
INT32_TO_OCTET_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
,
INT32_TO_OCTET_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
,
&
gTPTunnel
->
gTP_TEID
);
&
gTPTunnel
->
gTP_TEID
);
}
}
/* 12.1.4 rLCMode */
/* 12.1.4 rLCMode */
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
switch
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
rlc_mode
)
{
switch
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
rlc_mode
)
{
case
RLC_MODE_AM
:
case
RLC_MODE_AM
:
drbs_toBeSetup_item
->
rLCMode
=
F1AP_RLCMode_rlc_am
;
drbs_toBeSetup_item
->
rLCMode
=
F1AP_RLCMode_rlc_am
;
break
;
break
;
default:
default:
drbs_toBeSetup_item
->
rLCMode
=
F1AP_RLCMode_rlc_um_bidirectional
;
drbs_toBeSetup_item
->
rLCMode
=
F1AP_RLCMode_rlc_um_bidirectional
;
}
}
/* OPTIONAL */
/* OPTIONAL */
/* 12.1.5 ULConfiguration */
/* 12.1.5 ULConfiguration */
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
drbs_toBeSetup_item
->
uLConfiguration
,
tmp
);
asn1cCalloc
(
drbs_toBeSetup_item
->
uLConfiguration
,
tmp
);
tmp
->
uLUEConfiguration
=
F1AP_ULUEConfiguration_no_data
;
tmp
->
uLUEConfiguration
=
F1AP_ULUEConfiguration_no_data
;
}
}
/* OPTIONAL */
/* OPTIONAL */
/* 12.1.6 duplicationActivation */
/* 12.1.6 duplicationActivation */
if
(
0
)
{
if
(
0
)
{
asn1cCalloc
(
drbs_toBeSetup_item
->
duplicationActivation
,
tmp
);
asn1cCalloc
(
drbs_toBeSetup_item
->
duplicationActivation
,
tmp
);
*
tmp
=
F1AP_DuplicationActivation_active
;
// enum
*
tmp
=
F1AP_DuplicationActivation_active
;
// enum
}
}
}
}
}
}
/* OPTIONAL */
/* OPTIONAL */
/* InactivityMonitoringRequest */
/* InactivityMonitoringRequest */
...
@@ -673,9 +670,10 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
...
@@ -673,9 +670,10 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
return
-
1
;
return
-
1
;
}
}
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
=
(
uint8_t
*
)
calloc
(
1
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
=
(
du_to_cu_rrc_information_t
*
)
calloc
(
1
,
sizeof
(
du_to_cu_rrc_information_t
));
memcpy
(
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
buf
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
->
cellGroupConfig
=
(
uint8_t
*
)
calloc
(
1
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information_length
=
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
;
memcpy
(
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
buf
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
->
cellGroupConfig_length
=
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
;
// DRBs_Setup_List
// DRBs_Setup_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_Setup_List
,
false
);
F1AP_ProtocolIE_ID_id_DRBs_Setup_List
,
false
);
...
@@ -1143,7 +1141,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
...
@@ -1143,7 +1141,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
/* optional */
/* optional */
/* c7. RRCRconfigurationCompleteIndicator */
/* c7. RRCRconfigurationCompleteIndicator */
if
(
0
)
{
if
(
f1ap_ue_context_modification_req
->
ReconfigComplOutcome
==
RRCreconf_success
)
{
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationRequestIEs_t
,
ie71
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationRequestIEs_t
,
ie71
);
ie71
->
id
=
F1AP_ProtocolIE_ID_id_RRCReconfigurationCompleteIndicator
;
ie71
->
id
=
F1AP_ProtocolIE_ID_id_RRCReconfigurationCompleteIndicator
;
ie71
->
criticality
=
F1AP_Criticality_ignore
;
ie71
->
criticality
=
F1AP_Criticality_ignore
;
...
@@ -1153,13 +1151,13 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
...
@@ -1153,13 +1151,13 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
/* optional */
/* optional */
/* c8. RRCContainer */
/* c8. RRCContainer */
if
(
0
)
{
if
(
f1ap_ue_context_modification_req
->
rrc_container
!=
NULL
)
{
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationRequestIEs_t
,
ie81
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationRequestIEs_t
,
ie81
);
ie81
->
id
=
F1AP_ProtocolIE_ID_id_RRCContainer
;
ie81
->
id
=
F1AP_ProtocolIE_ID_id_RRCContainer
;
ie81
->
criticality
=
F1AP_Criticality_ignore
;
ie81
->
criticality
=
F1AP_Criticality_ignore
;
ie81
->
value
.
present
=
F1AP_UEContextModificationRequestIEs__value_PR_RRCContainer
;
ie81
->
value
.
present
=
F1AP_UEContextModificationRequestIEs__value_PR_RRCContainer
;
OCTET_STRING_fromBuf
(
&
ie81
->
value
.
choice
.
RRCContainer
,
"asdsa1d32sa1d31asd31as"
,
OCTET_STRING_fromBuf
(
&
ie81
->
value
.
choice
.
RRCContainer
,
f1ap_ue_context_modification_req
->
rrc_container
,
strlen
(
"asdsa1d32sa1d31asd31as"
)
);
f1ap_ue_context_modification_req
->
rrc_container_length
);
}
}
/* optional */
/* optional */
...
@@ -1232,10 +1230,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
...
@@ -1232,10 +1230,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
srbs_toBeSetupMod_item
->
sRBID
=
f1ap_ue_context_modification_req
->
srbs_to_be_setup
[
i
].
srb_id
;
srbs_toBeSetupMod_item
->
sRBID
=
f1ap_ue_context_modification_req
->
srbs_to_be_setup
[
i
].
srb_id
;
/* OPTIONAL */
/* OPTIONAL */
/* 11.1.2 duplicationIndication */
/* 11.1.2 duplicationIndication */
//if (0) {
asn1cCallocOne
(
srbs_toBeSetupMod_item
->
duplicationIndication
,
asn1cCallocOne
(
srbs_toBeSetupMod_item
->
duplicationIndication
,
F1AP_DuplicationIndication_true
);
// enum
F1AP_DuplicationIndication_true
);
// enum
//}
}
}
}
}
...
@@ -1310,42 +1306,42 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
...
@@ -1310,42 +1306,42 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_non_Dynamic_5QI
;
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_non_Dynamic_5QI
;
setQos
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
non_Dynamic_5QI
);
setQos
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
non_Dynamic_5QI
);
}
else
{
}
else
{
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_dynamic_5QI
;
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
present
=
F1AP_QoS_Characteristics_PR_dynamic_5QI
;
asn1cCalloc
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
,
tmp
);
asn1cCalloc
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
,
tmp
);
/* qoSPriorityLevel */
/* qoSPriorityLevel */
tmp
->
qoSPriorityLevel
=
1L
;
tmp
->
qoSPriorityLevel
=
1L
;
/* packetDelayBudget */
/* packetDelayBudget */
tmp
->
packetDelayBudget
=
1L
;
tmp
->
packetDelayBudget
=
1L
;
/* packetErrorRate */
/* packetErrorRate */
tmp
->
packetErrorRate
.
pER_Scalar
=
1L
;
tmp
->
packetErrorRate
.
pER_Scalar
=
1L
;
tmp
->
packetErrorRate
.
pER_Exponent
=
6L
;
tmp
->
packetErrorRate
.
pER_Exponent
=
6L
;
/* OPTIONAL */
/* OPTIONAL */
/* delayCritical */
/* delayCritical */
if
(
0
)
{
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
delayCritical
,
1L
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
delayCritical
,
1L
);
}
}
/* OPTIONAL */
/* OPTIONAL */
/* averagingWindow */
/* averagingWindow */
if
(
0
)
{
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
averagingWindow
,
1L
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
averagingWindow
,
1L
);
}
}
/* OPTIONAL */
/* OPTIONAL */
/* maxDataBurstVolume */
/* maxDataBurstVolume */
if
(
0
)
{
if
(
0
)
{
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
maxDataBurstVolume
,
1L
);
asn1cCallocOne
(
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
maxDataBurstVolume
,
1L
);
}
}
}
// if some_decide_qoS_characteristics
}
// if some_decide_qoS_characteristics
}
// qoS_Characteristics
}
// qoS_Characteristics
/* nGRANallocationRetentionPriority */
/* nGRANallocationRetentionPriority */
{
{
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
priorityLevel
=
F1AP_PriorityLevel_highest
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
DRB_Information
->
dRB_QoS
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
F1AP_Pre_emptionVulnerability_not_pre_emptable
;
// enum
}
// nGRANallocationRetentionPriority
}
// nGRANallocationRetentionPriority
/* OPTIONAL */
/* OPTIONAL */
/* gBR_QoS_Flow_Information */
/* gBR_QoS_Flow_Information */
...
@@ -1682,10 +1678,11 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
...
@@ -1682,10 +1678,11 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
,
false
);
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
,
false
);
if
(
ie
!=
NULL
){
if
(
ie
!=
NULL
){
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
=
(
uint8_t
*
)
calloc
(
1
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
=
(
du_to_cu_rrc_information_t
*
)
calloc
(
1
,
sizeof
(
du_to_cu_rrc_information_t
));
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
->
cellGroupConfig
=
(
uint8_t
*
)
calloc
(
1
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
memcpy
(
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
buf
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
memcpy
(
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
buf
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information_length
=
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
;
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
->
cellGroupConfig
_length
=
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
;
}
}
// DRBs_SetupMod_List
// DRBs_SetupMod_List
...
...
openair2/F1AP/f1ap_du_interface_management.c
View file @
0eb2acb0
...
@@ -172,25 +172,19 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
...
@@ -172,25 +172,19 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
MCC_MNC_TO_PLMNID
(
cell
->
mcc
,
cell
->
mnc
,
cell
->
mnc_digit_length
,
&
servedPLMN_item
->
pLMN_Identity
);
MCC_MNC_TO_PLMNID
(
cell
->
mcc
,
cell
->
mnc
,
cell
->
mnc_digit_length
,
&
servedPLMN_item
->
pLMN_Identity
);
// // /* - CHOICE NR-MODE-Info */
// // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t
*
nR_Mode_Info
=
&
served_cell_information
->
nR_Mode_Info
;
F1AP_NR_Mode_Info_t
*
nR_Mode_Info
=
&
served_cell_information
->
nR_Mode_Info
;
//if(0){
F1AP_ProtocolExtensionContainer_154P34_t
*
p_154P34
=
calloc
(
1
,
sizeof
(
*
p_154P34
));
//F1AP_ProtocolExtensionContainer_154P260_t *p_154P260=calloc(1, sizeof(* p_154P260));
servedPLMN_item
->
iE_Extensions
=
(
struct
F1AP_ProtocolExtensionContainer
*
)
p_154P34
;
F1AP_ProtocolExtensionContainer_154P34_t
*
p_154P34
=
calloc
(
1
,
sizeof
(
*
p_154P34
));
asn1cSequenceAdd
(
p_154P34
->
list
,
F1AP_ServedPLMNs_ItemExtIEs_t
,
served_plmns_itemExtIEs
);
servedPLMN_item
->
iE_Extensions
=
(
struct
F1AP_ProtocolExtensionContainer
*
)
p_154P34
;
served_plmns_itemExtIEs
->
criticality
=
F1AP_Criticality_ignore
;
asn1cSequenceAdd
(
p_154P34
->
list
,
F1AP_ServedPLMNs_ItemExtIEs_t
,
served_plmns_itemExtIEs
);
served_plmns_itemExtIEs
->
id
=
F1AP_ProtocolIE_ID_id_TAISliceSupportList
;
served_plmns_itemExtIEs
->
criticality
=
F1AP_Criticality_ignore
;
served_plmns_itemExtIEs
->
extensionValue
.
present
=
F1AP_ServedPLMNs_ItemExtIEs__extensionValue_PR_SliceSupportList
;
served_plmns_itemExtIEs
->
id
=
F1AP_ProtocolIE_ID_id_TAISliceSupportList
;
F1AP_SliceSupportList_t
*
slice_support_list
=
&
served_plmns_itemExtIEs
->
extensionValue
.
choice
.
SliceSupportList
;
served_plmns_itemExtIEs
->
extensionValue
.
present
=
F1AP_ServedPLMNs_ItemExtIEs__extensionValue_PR_SliceSupportList
;
F1AP_SliceSupportList_t
*
slice_support_list
=
&
served_plmns_itemExtIEs
->
extensionValue
.
choice
.
SliceSupportList
;
asn1cSequenceAdd
(
slice_support_list
->
list
,
F1AP_SliceSupportItem_t
,
SliceSupport_item
);
INT8_TO_OCTET_STRING
(
1
,
&
SliceSupport_item
->
sNSSAI
.
sST
);
asn1cSequenceAdd
(
slice_support_list
->
list
,
F1AP_SliceSupportItem_t
,
SliceSupport_item
);
asn1cCalloc
(
SliceSupport_item
->
sNSSAI
.
sD
,
tmp
);
INT8_TO_OCTET_STRING
(
1
,
&
SliceSupport_item
->
sNSSAI
.
sST
);
INT24_TO_OCTET_STRING
(
1
,
tmp
);
//OCTET_STRING_fromBuf(&SliceSupport_item->sNSSAI.sST, "1", 1);
asn1cCalloc
(
SliceSupport_item
->
sNSSAI
.
sD
,
tmp
);
INT24_TO_OCTET_STRING
(
1
,
tmp
);
//OCTET_STRING_fromBuf(tmp, "1",1);
//}
if
(
f1ap_req
(
false
,
instance
)
->
fdd_flag
)
{
// FDD
if
(
f1ap_req
(
false
,
instance
)
->
fdd_flag
)
{
// FDD
nR_Mode_Info
->
present
=
F1AP_NR_Mode_Info_PR_fDD
;
nR_Mode_Info
->
present
=
F1AP_NR_Mode_Info_PR_fDD
;
asn1cCalloc
(
nR_Mode_Info
->
choice
.
fDD
,
fDD_Info
);
asn1cCalloc
(
nR_Mode_Info
->
choice
.
fDD
,
fDD_Info
);
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
0eb2acb0
...
@@ -280,27 +280,30 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
...
@@ -280,27 +280,30 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* mandatory */
/* mandatory */
/* c3. DUtoCURRCInformation */
/* c3. DUtoCURRCInformation */
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextSetupResponseIEs_t
,
ie3
);
if
(
resp
->
du_to_cu_rrc_information
){
ie3
->
id
=
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
;
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextSetupResponseIEs_t
,
ie3
);
ie3
->
criticality
=
F1AP_Criticality_reject
;
ie3
->
id
=
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
;
ie3
->
value
.
present
=
F1AP_UEContextSetupResponseIEs__value_PR_DUtoCURRCInformation
;
ie3
->
criticality
=
F1AP_Criticality_reject
;
{
ie3
->
value
.
present
=
F1AP_UEContextSetupResponseIEs__value_PR_DUtoCURRCInformation
;
/* cellGroupConfig */
if
(
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
!=
NULL
){
OCTET_STRING_fromBuf
(
&
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
,
(
const
char
*
)
resp
->
du_to_cu_rrc_information
,
/* cellGroupConfig */
resp
->
du_to_cu_rrc_information_length
);
OCTET_STRING_fromBuf
(
&
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
,
(
const
char
*
)
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
resp
->
du_to_cu_rrc_information
->
cellGroupConfig_length
);
}
/* OPTIONAL */
/* OPTIONAL */
/* measGapConfig */
/* measGapConfig */
if
(
0
)
{
if
(
resp
->
du_to_cu_rrc_information
->
measGapConfig
!=
NULL
)
{
asn1cCalloc
(
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
measGapConfig
,
tmp
);
OCTET_STRING_fromBuf
(
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
measGapConfig
,
resp
->
du_to_cu_rrc_information
->
measGapConfig
,
OCTET_STRING_fromBuf
(
tmp
,
"asdsa"
,
strlen
(
"asdsa"
)
);
resp
->
du_to_cu_rrc_information
->
measGapConfig_length
);
}
}
/* OPTIONAL */
/* OPTIONAL */
/* requestedP_MaxFR1 */
/* requestedP_MaxFR1 */
if
(
0
)
{
if
(
resp
->
du_to_cu_rrc_information
->
requestedP_MaxFR1
!=
NULL
)
{
asn1cCalloc
(
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
requestedP_MaxFR1
,
tmp
);
asn1cCalloc
(
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
requestedP_MaxFR1
,
tmp
);
OCTET_STRING_fromBuf
(
tmp
,
"asdsa"
,
strlen
(
"asdsa"
));
OCTET_STRING_fromBuf
(
ie3
->
value
.
choice
.
DUtoCURRCInformation
.
requestedP_MaxFR1
,
resp
->
du_to_cu_rrc_information
->
requestedP_MaxFR1
,
resp
->
du_to_cu_rrc_information
->
requestedP_MaxFR1_length
);
}
}
}
}
...
@@ -676,14 +679,14 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -676,14 +679,14 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
protocol_ctxt_t ctxt;
protocol_ctxt_t ctxt;
DevAssert(pdu);
DevAssert(pdu);
container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
// GNB_CU_UE_F1AP_ID
// GNB_CU_UE_F1AP_ID
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
ctxt.rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
ctxt.rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
ctxt.instance = instance;
ctxt.instance = instance;
ctxt.module_id = instance;
ctxt.module_id = instance;
ctxt.enb_flag = 1;
ctxt.enb_flag = 1;
// GNB_DU_UE_F1AP_ID
// GNB_DU_UE_F1AP_ID
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance,
const rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance,
...
@@ -711,13 +714,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -711,13 +714,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
}
}
}
}
// We don't need the Cause
// We don't need the Cause
// Optional RRC Container: if present, send to UE
// Optional RRC Container: if present, send to UE
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false);
F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie && !UE_out_of_sync) {
if (ie && !UE_out_of_sync) {
// RRC message and UE is reachable, send message
// RRC message and UE is reachable, send message
const sdu_size_t sdu_len = ie->value.choice.RRCContainer.size;
const sdu_size_t sdu_len = ie->value.choice.RRCContainer.size;
mem_block_t *pdu_p = NULL;
mem_block_t *pdu_p = NULL;
pdu_p = get_free_mem_block(sdu_len, __func__);
pdu_p = get_free_mem_block(sdu_len, __func__);
...
@@ -769,7 +772,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -769,7 +772,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
if (ue_context_p && !UE_out_of_sync) {
if (ue_context_p && !UE_out_of_sync) {
// UE exists and is in sync so we start a timer before releasing the
// UE exists and is in sync so we start a timer before releasing the
// connection
// connection
pthread_mutex_lock(&rrc_release_freelist);
pthread_mutex_lock(&rrc_release_freelist);
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
...
@@ -793,13 +796,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -793,13 +796,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
pthread_mutex_unlock(&rrc_release_freelist);
pthread_mutex_unlock(&rrc_release_freelist);
ue_context_p->ue_context.ue_release_timer_s1 = 0;
ue_context_p->ue_context.ue_release_timer_s1 = 0;
} else if (ue_context_p && UE_out_of_sync) {
} else if (ue_context_p && UE_out_of_sync) {
// UE exists and is out of sync, drop the connection
// UE exists and is out of sync, drop the connection
mac_eNB_rrc_ul_failure(instance, 0, 0, 0, rnti);
mac_eNB_rrc_ul_failure(instance, 0, 0, 0, rnti);
} else {
} else {
LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti);
LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti);
}
}
// TODO send this once the connection has really been released
// TODO send this once the connection has really been released
f1ap_ue_context_release_cplt_t cplt;
f1ap_ue_context_release_cplt_t cplt;
cplt.rnti = ctxt.rnti;
cplt.rnti = ctxt.rnti;
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
...
@@ -1210,11 +1213,9 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
...
@@ -1210,11 +1213,9 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
f1ap_ue_context_modification_req
->
rrc_container
=
malloc
(
ieRRC
->
value
.
choice
.
RRCContainer
.
size
);
f1ap_ue_context_modification_req
->
rrc_container
=
malloc
(
ieRRC
->
value
.
choice
.
RRCContainer
.
size
);
memcpy
(
f1ap_ue_context_modification_req
->
rrc_container
,
memcpy
(
f1ap_ue_context_modification_req
->
rrc_container
,
ieRRC
->
value
.
choice
.
RRCContainer
.
buf
,
ieRRC
->
value
.
choice
.
RRCContainer
.
size
);
ieRRC
->
value
.
choice
.
RRCContainer
.
buf
,
ieRRC
->
value
.
choice
.
RRCContainer
.
size
);
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t
ctxt
;
protocol_ctxt_t
ctxt
;
// decode RRC Container and act on the message type
// decode RRC Container and act on the message type
//FIXME
ctxt
.
rnti
=
f1ap_ue_context_modification_req
->
rnti
;
//rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id);
ctxt
.
instance
=
instance
;
ctxt
.
instance
=
instance
;
ctxt
.
module_id
=
instance
;
ctxt
.
module_id
=
instance
;
ctxt
.
enb_flag
=
1
;
ctxt
.
enb_flag
=
1
;
...
@@ -1223,10 +1224,10 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
...
@@ -1223,10 +1224,10 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
memcpy
(
&
pdcp_pdu_p
->
data
[
0
],
ieRRC
->
value
.
choice
.
RRCContainer
.
buf
,
ieRRC
->
value
.
choice
.
RRCContainer
.
size
);
memcpy
(
&
pdcp_pdu_p
->
data
[
0
],
ieRRC
->
value
.
choice
.
RRCContainer
.
buf
,
ieRRC
->
value
.
choice
.
RRCContainer
.
size
);
du_rlc_data_req
(
&
ctxt
,
1
,
0x00
,
1
,
1
,
0
,
ieRRC
->
value
.
choice
.
RRCContainer
.
size
,
pdcp_pdu_p
);
du_rlc_data_req
(
&
ctxt
,
1
,
0x00
,
1
,
1
,
0
,
ieRRC
->
value
.
choice
.
RRCContainer
.
size
,
pdcp_pdu_p
);
}
else
{
}
else
{
LOG_E
(
F1AP
,
" RRCContainer in UEContext
Setup
RequestIEs size id 0
\n
"
);
LOG_E
(
F1AP
,
" RRCContainer in UEContext
Modification
RequestIEs size id 0
\n
"
);
}
}
}
else
{
}
else
{
LOG_W
(
F1AP
,
"can't find RRCContainer in UEContext
Setup
RequestIEs by id %ld
\n
"
,
F1AP_ProtocolIE_ID_id_RRCContainer
);
LOG_W
(
F1AP
,
"can't find RRCContainer in UEContext
Modification
RequestIEs by id %ld
\n
"
,
F1AP_ProtocolIE_ID_id_RRCContainer
);
}
}
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
msg_p
);
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
msg_p
);
...
@@ -1273,31 +1274,33 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
...
@@ -1273,31 +1274,33 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
strlen
(
"asdsa1d32sa1d31asd31as"
));
strlen
(
"asdsa1d32sa1d31asd31as"
));
}
}
/*
mandatory
*/
/*
optional
*/
/* c4. DUtoCURRCInformation */
/* c4. DUtoCURRCInformation */
if
(
resp
->
du_to_cu_rrc_information
!=
NULL
){
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie4
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie4
);
ie4
->
id
=
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
;
ie4
->
id
=
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
;
ie4
->
criticality
=
F1AP_Criticality_reject
;
ie4
->
criticality
=
F1AP_Criticality_reject
;
ie4
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_DUtoCURRCInformation
;
ie4
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_DUtoCURRCInformation
;
{
if
(
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
!=
NULL
)
{
/* cellGroupConfig */
/* cellGroupConfig */
OCTET_STRING_fromBuf
(
&
ie4
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
,
(
const
char
*
)
resp
->
du_to_cu_rrc_information
,
OCTET_STRING_fromBuf
(
&
ie4
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
,
(
const
char
*
)
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
resp
->
du_to_cu_rrc_information_length
);
resp
->
du_to_cu_rrc_information
->
cellGroupConfig_length
);
}
/* OPTIONAL */
/* OPTIONAL */
/* measGapConfig */
/* measGapConfig */
if
(
0
)
{
if
(
resp
->
du_to_cu_rrc_information
->
measGapConfig
!=
NULL
)
{
asn1cCalloc
(
ie4
->
value
.
choice
.
DUtoCURRCInformation
.
measGapConfig
,
tmp
);
OCTET_STRING_fromBuf
(
ie4
->
value
.
choice
.
DUtoCURRCInformation
.
measGapConfig
,
resp
->
du_to_cu_rrc_information
->
measGapConfig
,
OCTET_STRING_fromBuf
(
tmp
,
"asdsa"
,
strlen
(
"asdsa"
)
);
resp
->
du_to_cu_rrc_information
->
measGapConfig_length
);
}
}
/* OPTIONAL */
/* OPTIONAL */
/* requestedP_MaxFR1 */
/* requestedP_MaxFR1 */
if
(
0
)
{
if
(
resp
->
du_to_cu_rrc_information
->
requestedP_MaxFR1
!=
NULL
)
{
asn1cCalloc
(
ie4
->
value
.
choice
.
DUtoCURRCInformation
.
requestedP_MaxFR1
,
tmp
);
OCTET_STRING_fromBuf
(
ie4
->
value
.
choice
.
DUtoCURRCInformation
.
requestedP_MaxFR1
,
resp
->
du_to_cu_rrc_information
->
requestedP_MaxFR1
,
OCTET_STRING_fromBuf
(
tmp
,
"asdsa"
,
strlen
(
"asdsa"
));
resp
->
du_to_cu_rrc_information
->
requestedP_MaxFR1_length
);
}
}
}
}
/* optional */
/* optional */
...
@@ -1318,11 +1321,6 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
...
@@ -1318,11 +1321,6 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
/* dRBID */
/* dRBID */
drbs_setupmod_item
->
dRBID
=
resp
->
drbs_to_be_setup
[
i
].
drb_id
;
drbs_setupmod_item
->
dRBID
=
resp
->
drbs_to_be_setup
[
i
].
drb_id
;
/* OPTIONAL */
/* lCID */
//drbs_setup_item.lCID = (F1AP_LCID_t *)calloc(1, sizeof(F1AP_LCID_t));
//drbs_setup_item.lCID = 1L;
for
(
int
j
=
0
;
j
<
resp
->
drbs_to_be_setup
[
i
].
up_dl_tnl_length
;
j
++
)
{
for
(
int
j
=
0
;
j
<
resp
->
drbs_to_be_setup
[
i
].
up_dl_tnl_length
;
j
++
)
{
/* ADD */
/* ADD */
asn1cSequenceAdd
(
drbs_setupmod_item
->
dLUPTNLInformation_ToBeSetup_List
.
list
,
asn1cSequenceAdd
(
drbs_setupmod_item
->
dLUPTNLInformation_ToBeSetup_List
.
list
,
...
@@ -1344,47 +1342,52 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
...
@@ -1344,47 +1342,52 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
/* optional */
/* optional */
/* c6. DRBs_Modified_List */
/* c6. DRBs_Modified_List */
if
(
0
){
if
(
resp
->
drbs_to_be_modified_length
>
0
){
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie6
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie6
);
ie6
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_Modified_List
;
ie6
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_Modified_List
;
ie6
->
criticality
=
F1AP_Criticality_
reject
;
ie6
->
criticality
=
F1AP_Criticality_
ignore
;
ie6
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_DRBs_Modified_List
;
ie6
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_DRBs_Modified_List
;
for
(
int
i
=
0
;
i
<
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
resp
->
drbs_to_be_modified_length
;
i
++
)
{
asn1cSequenceAdd
(
ie6
->
value
.
choice
.
DRBs_Modified_List
.
list
,
asn1cSequenceAdd
(
ie6
->
value
.
choice
.
DRBs_Modified_List
.
list
,
F1AP_DRBs_Modified_ItemIEs_t
,
drbs_modified_item_ies
);
F1AP_DRBs_Modified_ItemIEs_t
,
drbs_modified_item_ies
);
drbs_modified_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_Modified_Item
;
drbs_modified_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_Modified_Item
;
drbs_modified_item_ies
->
criticality
=
F1AP_Criticality_
reject
;
drbs_modified_item_ies
->
criticality
=
F1AP_Criticality_
ignore
;
drbs_modified_item_ies
->
value
.
present
=
F1AP_DRBs_Modified_ItemIEs__value_PR_DRBs_Modified_Item
;
drbs_modified_item_ies
->
value
.
present
=
F1AP_DRBs_Modified_ItemIEs__value_PR_DRBs_Modified_Item
;
/* DRBs_modified_Item */
/* DRBs_modified_Item */
F1AP_DRBs_Modified_Item_t
*
drbs_modified_item
=
&
drbs_modified_item_ies
->
value
.
choice
.
DRBs_Modified_Item
;
F1AP_DRBs_Modified_Item_t
*
drbs_modified_item
=
&
drbs_modified_item_ies
->
value
.
choice
.
DRBs_Modified_Item
;
/* dRBID */
/* dRBID */
drbs_modified_item
->
dRBID
=
25L
;
drbs_modified_item
->
dRBID
=
resp
->
drbs_to_be_modified
[
i
].
drb_id
;
/* ULTunnels_Modified_List */
/* ULTunnels_Modified_List */
int
maxnoofULTunnels
=
1
;
// 2;
int
maxnoofULTunnels
=
1
;
// 2;
for
(
int
j
=
0
;
j
<
maxnoofULTunnels
;
j
++
)
{
for
(
int
j
=
0
;
j
<
resp
->
drbs_to_be_modified
[
i
].
up_dl_tnl_length
;
j
++
)
{
/* DLTunnels_Modified_Item */
/* DLTunnels_Modified_Item */
asn1cSequenceAdd
(
drbs_modified_item
->
dLUPTNLInformation_ToBeSetup_List
.
list
,
asn1cSequenceAdd
(
drbs_modified_item
->
dLUPTNLInformation_ToBeSetup_List
.
list
,
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
,
dLUPTNLInformation_ToBeSetup_Item
);
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
,
dLUPTNLInformation_ToBeSetup_Item
);
asn1cCalloc
(
dLUPTNLInformation_ToBeSetup_Item
,
tmp
);
asn1cCalloc
(
dLUPTNLInformation_ToBeSetup_Item
,
tmp
);
tmp
->
dLUPTNLInformation
.
present
=
F1AP_UPTransportLayerInformation_PR_gTPTunnel
;
tmp
->
dLUPTNLInformation
.
present
=
F1AP_UPTransportLayerInformation_PR_gTPTunnel
;
asn1cCalloc
(
dLUPTNLInformation_ToBeSetup_Item
->
dLUPTNLInformation
.
choice
.
gTPTunnel
,
gTPTunnel
);
asn1cCalloc
(
dLUPTNLInformation_ToBeSetup_Item
->
dLUPTNLInformation
.
choice
.
gTPTunnel
,
gTPTunnel
);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
1234
,
&
gTPTunnel
->
transportLayerAddress
);
/* transportLayerAddress */
OCTET_STRING_fromBuf
(
&
gTPTunnel
->
gTP_TEID
,
"1204"
,
strlen
(
"1204"
));
struct
sockaddr_in
addr
=
{
0
};
inet_pton
(
AF_INET
,
getCxt
(
false
,
instance
)
->
setupReq
.
DU_f1_ip_address
.
ipv4_address
,
&
addr
.
sin_addr
.
s_addr
);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
addr
.
sin_addr
.
s_addr
,
&
gTPTunnel
->
transportLayerAddress
);
/* gTP_TEID */
INT32_TO_OCTET_STRING
(
resp
->
drbs_to_be_modified
[
i
].
up_dl_tnl
[
j
].
teid
,
&
gTPTunnel
->
gTP_TEID
);
}
}
}
}
}
}
/* optional */
/* optional */
/* c7. SRBs_FailedToBeSetupMod_List */
/* c7. SRBs_FailedToBeSetupMod_List */
if
(
0
){
if
(
resp
->
srbs_failed_to_be_setup_length
>
0
){
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie7
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie7
);
ie7
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetupMod_List
;
ie7
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetupMod_List
;
ie7
->
criticality
=
F1AP_Criticality_reject
;
ie7
->
criticality
=
F1AP_Criticality_reject
;
ie7
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_SRBs_FailedToBeSetupMod_List
;
ie7
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_SRBs_FailedToBeSetupMod_List
;
for
(
int
i
=
0
;
i
<
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
resp
->
srbs_to_be_setup_length
;
i
++
)
{
asn1cSequenceAdd
(
ie7
->
value
.
choice
.
SRBs_FailedToBeSetupMod_List
.
list
,
asn1cSequenceAdd
(
ie7
->
value
.
choice
.
SRBs_FailedToBeSetupMod_List
.
list
,
F1AP_SRBs_FailedToBeSetupMod_ItemIEs_t
,
srbs_failedToBeSetupMod_item_ies
);
F1AP_SRBs_FailedToBeSetupMod_ItemIEs_t
,
srbs_failedToBeSetupMod_item_ies
);
srbs_failedToBeSetupMod_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetupMod_Item
;
srbs_failedToBeSetupMod_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetupMod_Item
;
...
@@ -1394,7 +1397,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
...
@@ -1394,7 +1397,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
F1AP_SRBs_FailedToBeSetupMod_Item_t
*
srbs_failedToBeSetupMod_item
=
F1AP_SRBs_FailedToBeSetupMod_Item_t
*
srbs_failedToBeSetupMod_item
=
&
srbs_failedToBeSetupMod_item_ies
->
value
.
choice
.
SRBs_FailedToBeSetupMod_Item
;
&
srbs_failedToBeSetupMod_item_ies
->
value
.
choice
.
SRBs_FailedToBeSetupMod_Item
;
/* - sRBID */
/* - sRBID */
srbs_failedToBeSetupMod_item
->
sRBID
=
50L
;
srbs_failedToBeSetupMod_item
->
sRBID
=
resp
->
srbs_failed_to_be_setup
[
i
].
rb_id
;
asn1cCalloc
(
srbs_failedToBeSetupMod_item
->
cause
,
tmp
)
asn1cCalloc
(
srbs_failedToBeSetupMod_item
->
cause
,
tmp
)
tmp
->
present
=
F1AP_Cause_PR_radioNetwork
;
tmp
->
present
=
F1AP_Cause_PR_radioNetwork
;
tmp
->
choice
.
radioNetwork
=
F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id
;
tmp
->
choice
.
radioNetwork
=
F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id
;
...
@@ -1403,13 +1406,13 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
...
@@ -1403,13 +1406,13 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
/* optional */
/* optional */
/* c8. DRBs_FailedToBeSetupMod_List */
/* c8. DRBs_FailedToBeSetupMod_List */
if
(
0
){
if
(
resp
->
drbs_failed_to_be_setup_length
>
0
){
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie8
);
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
F1AP_UEContextModificationResponseIEs_t
,
ie8
);
ie8
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetupMod_List
;
ie8
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetupMod_List
;
ie8
->
criticality
=
F1AP_Criticality_reject
;
ie8
->
criticality
=
F1AP_Criticality_reject
;
ie8
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_DRBs_FailedToBeSetupMod_List
;
ie8
->
value
.
present
=
F1AP_UEContextModificationResponseIEs__value_PR_DRBs_FailedToBeSetupMod_List
;
for
(
int
i
=
0
;
i
<
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
resp
->
drbs_failed_to_be_setup_length
;
i
++
)
{
asn1cSequenceAdd
(
ie8
->
value
.
choice
.
DRBs_FailedToBeSetupMod_List
.
list
,
asn1cSequenceAdd
(
ie8
->
value
.
choice
.
DRBs_FailedToBeSetupMod_List
.
list
,
F1AP_DRBs_FailedToBeSetupMod_ItemIEs_t
,
drbs_failedToBeSetupMod_item_ies
);
F1AP_DRBs_FailedToBeSetupMod_ItemIEs_t
,
drbs_failedToBeSetupMod_item_ies
);
drbs_failedToBeSetupMod_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetupMod_Item
;
drbs_failedToBeSetupMod_item_ies
->
id
=
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetupMod_Item
;
...
@@ -1419,7 +1422,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
...
@@ -1419,7 +1422,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
F1AP_DRBs_FailedToBeSetupMod_Item_t
*
drbs_failedToBeSetupMod_item
=
F1AP_DRBs_FailedToBeSetupMod_Item_t
*
drbs_failedToBeSetupMod_item
=
&
drbs_failedToBeSetupMod_item_ies
->
value
.
choice
.
DRBs_FailedToBeSetupMod_Item
;
&
drbs_failedToBeSetupMod_item_ies
->
value
.
choice
.
DRBs_FailedToBeSetupMod_Item
;
/* dRBID */
/* dRBID */
drbs_failedToBeSetupMod_item
->
dRBID
=
30L
;
drbs_failedToBeSetupMod_item
->
dRBID
=
resp
->
drbs_failed_to_be_setup
[
i
].
rb_id
;
drbs_failedToBeSetupMod_item
->
cause
=
(
F1AP_Cause_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Cause_t
));
drbs_failedToBeSetupMod_item
->
cause
=
(
F1AP_Cause_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Cause_t
));
drbs_failedToBeSetupMod_item
->
cause
->
present
=
F1AP_Cause_PR_radioNetwork
;
drbs_failedToBeSetupMod_item
->
cause
->
present
=
F1AP_Cause_PR_radioNetwork
;
drbs_failedToBeSetupMod_item
->
cause
->
choice
.
radioNetwork
=
F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id
;
drbs_failedToBeSetupMod_item
->
cause
->
choice
.
radioNetwork
=
F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
0eb2acb0
...
@@ -1879,11 +1879,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
...
@@ -1879,11 +1879,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
f1Setup
->
ranac
[
k
]
=
0
;
f1Setup
->
ranac
[
k
]
=
0
;
f1Setup
->
mib
[
k
]
=
rrc
->
carrier
.
MIB
;
f1Setup
->
mib
[
k
]
=
rrc
->
carrier
.
MIB
;
f1Setup
->
mib_length
[
k
]
=
rrc
->
carrier
.
sizeof_MIB
;
f1Setup
->
mib_length
[
k
]
=
rrc
->
carrier
.
sizeof_MIB
;
if
(
0
){
f1Setup
->
sib1
[
k
]
=
rrc
->
carrier
.
SIB1
;
f1Setup
->
sib1_length
[
k
]
=
rrc
->
carrier
.
sizeof_SIB1
;
}
else
{
NR_BCCH_DL_SCH_Message_t
*
bcch_message
=
NULL
;
NR_BCCH_DL_SCH_Message_t
*
bcch_message
=
NULL
;
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
...
@@ -1914,7 +1910,6 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
...
@@ -1914,7 +1910,6 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,(
void
*
)
bcch_message
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,(
void
*
)
bcch_message
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
);
//}
//}
f1Setup
->
sib1_length
[
k
]
=
(
enc_rval
.
encoded
+
7
)
/
8
;
f1Setup
->
sib1_length
[
k
]
=
(
enc_rval
.
encoded
+
7
)
/
8
;
}
break
;
break
;
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0eb2acb0
...
@@ -992,10 +992,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -992,10 +992,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
return
;
return
;
/* PREPROCESSOR */
/* PREPROCESSOR */
//Following commented section condition should be removed before update with develop.
/*if(slot!= 1 && slot!=11){
return;
}*/
gNB_mac
->
pre_processor_dl
(
module_id
,
frame
,
slot
);
gNB_mac
->
pre_processor_dl
(
module_id
,
frame
,
slot
);
const
int
CC_id
=
0
;
const
int
CC_id
=
0
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
0eb2acb0
...
@@ -1388,49 +1388,6 @@ rrc_gNB_process_RRCReconfigurationComplete(
...
@@ -1388,49 +1388,6 @@ rrc_gNB_process_RRCReconfigurationComplete(
NULL
,
NULL
,
get_softmodem_params
()
->
sa
?
ue_context_pP
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
get_softmodem_params
()
->
sa
?
ue_context_pP
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
}
}
/*else if(SRB_configList!=NULL || DRB_configList!=NULL){
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_SETUP_REQ (message_p);
req->gNB_CU_ue_id = 0;
req->gNB_DU_ue_id = 0;
req->rnti = ue_context_pP->ue_context.rnti;
req->mcc = rrc->configuration.mcc[0];
req->mnc = rrc->configuration.mnc[0];
req->mnc_digit_length = rrc->configuration.mnc_digit_length[0];
req->nr_cellid = rrc->nr_cellid;
if(SRB_configList!=NULL){
req->srbs_to_be_setup = malloc(SRB_configList->list.count*sizeof(f1ap_srb_to_be_setup_t));
req->srbs_to_be_setup_length = SRB_configList->list.count;
f1ap_srb_to_be_setup_t *SRBs=req->srbs_to_be_setup;
for (int i = 0; i < SRB_configList->list.count; i++){
if(SRB_configList->list.array[i]->srb_Identity > 1){
SRBs[i].srb_id = SRB_configList->list.array[i]->srb_Identity;
SRBs[i].lcid = SRB_configList->list.array[i]->srb_Identity;
}
}
}
if(DRB_configList!=NULL){
gtpv1u_gnb_create_tunnel_req_t create_tunnel_req;
memset(&create_tunnel_req, 0, sizeof(gtpv1u_gnb_create_tunnel_req_t));
req->drbs_to_be_setup = malloc(DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
req->drbs_to_be_setup_length = DRB_configList->list.count;
f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup;
LOG_I(RRC, "Length of DRB list:%d, %d \n", DRB_configList->list.count, req->drbs_to_be_setup_length);
for (int i = 0; i < DRB_configList->list.count; i++){
DRBs[i].drb_id = DRB_configList->list.array[i]->drb_Identity;
DRBs[i].rlc_mode = RLC_MODE_AM;
DRBs[i].up_ul_tnl[0].tl_address = inet_addr(rrc->eth_params_s.my_addr);
DRBs[i].up_ul_tnl[0].port=rrc->eth_params_s.my_portd;
DRBs[i].up_ul_tnl_length = 1;
DRBs[i].up_dl_tnl[0].tl_address = inet_addr(rrc->eth_params_s.remote_addr);
DRBs[i].up_dl_tnl[0].port=rrc->eth_params_s.remote_portd;
DRBs[i].up_dl_tnl_length = 1;
}
LOG_I(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
}
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
}*/
#endif
#endif
/* Set the SRB active in UE context */
/* Set the SRB active in UE context */
...
@@ -2840,9 +2797,6 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
...
@@ -2840,9 +2797,6 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
memset
(
mib
->
message
.
choice
.
mib
,
0
,
sizeof
(
struct
NR_MIB
));
memset
(
mib
->
message
.
choice
.
mib
,
0
,
sizeof
(
struct
NR_MIB
));
memcpy
(
mib
->
message
.
choice
.
mib
,
mib_DU
->
message
.
choice
.
mib
,
sizeof
(
struct
NR_MIB
));
memcpy
(
mib
->
message
.
choice
.
mib
,
mib_DU
->
message
.
choice
.
mib
,
sizeof
(
struct
NR_MIB
));
/*rrc->carrier.SIB1 = malloc(f1_setup_req->sib1_length[i]);
rrc->carrier.sizeof_SIB1 = f1_setup_req->sib1_length[i];
memcpy((void *)rrc->carrier.SIB1,f1_setup_req->sib1[i],f1_setup_req->sib1_length[i]);*/
dec_rval
=
uper_decode_complete
(
NULL
,
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_SIB1
,
//&asn_DEF_NR_BCCH_DL_SCH_Message,
&
asn_DEF_NR_SIB1
,
//&asn_DEF_NR_BCCH_DL_SCH_Message,
(
void
**
)
&
rrc
->
carrier
.
siblock1_DU
,
(
void
**
)
&
rrc
->
carrier
.
siblock1_DU
,
...
@@ -2860,12 +2814,6 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
...
@@ -2860,12 +2814,6 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,(
void
*
)
rrc
->
carrier
.
sib1
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_SIB1
,(
void
*
)
rrc
->
carrier
.
sib1
);
}
}
/*NR_BCCH_DL_SCH_Message_t *bcch_message = rrc->carrier.siblock1_DU;
AssertFatal(bcch_message->message.present == NR_BCCH_DL_SCH_MessageType_PR_c1,
"bcch_message->message.present != NR_BCCH_DL_SCH_MessageType_PR_c1\n");
AssertFatal(bcch_message->message.choice.c1->present == NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1,
"bcch_message->message.choice.c1->present != NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1\n");
rrc->carrier.sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1;*/
rrc
->
carrier
.
physCellId
=
f1_setup_req
->
cell
[
i
].
nr_pci
;
rrc
->
carrier
.
physCellId
=
f1_setup_req
->
cell
[
i
].
nr_pci
;
F1AP_GNB_CU_CONFIGURATION_UPDATE
(
msg_p2
).
gNB_CU_name
=
rrc
->
node_name
;
F1AP_GNB_CU_CONFIGURATION_UPDATE
(
msg_p2
).
gNB_CU_name
=
rrc
->
node_name
;
...
@@ -3387,20 +3335,20 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
...
@@ -3387,20 +3335,20 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
LOG_W
(
NR_RRC
,
"No SRB added upon reception of F1 UE Context setup request at the DU
\n
"
);
LOG_W
(
NR_RRC
,
"No SRB added upon reception of F1 UE Context setup request at the DU
\n
"
);
}
}
/* fixme:
/* fixme:
* Here we should be encoding the updates on cellgroupconfig. Currently the content of
* Here we should be encoding the updates on cellgroupconfig based on the content of UE capabilities
* celGroupConfig is empty because update_cellGroupConfig() function that is previously called is empty.
*/
*/
resp
->
du_to_cu_rrc_information
=
calloc
(
1
,
1024
*
sizeof
(
uint8_t
));
resp
->
du_to_cu_rrc_information
=
calloc
(
1
,
sizeof
(
du_to_cu_rrc_information_t
));
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
=
calloc
(
1
,
1024
);
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
NULL
,
ue_context_p
->
ue_context
.
masterCellGroup
,
//(void *)cellGroupConfig,
ue_context_p
->
ue_context
.
masterCellGroup
,
//(void *)cellGroupConfig,
resp
->
du_to_cu_rrc_information
,
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
1024
);
1024
);
if
(
enc_rval
.
encoded
==
-
1
)
{
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_E
(
F1AP
,
"Could not encode ue_context.masterCellGroup, failed element %s
\n
"
,
enc_rval
.
failed_type
->
name
);
LOG_E
(
F1AP
,
"Could not encode ue_context.masterCellGroup, failed element %s
\n
"
,
enc_rval
.
failed_type
->
name
);
exit
(
-
1
);
exit
(
-
1
);
}
}
resp
->
du_to_cu_rrc_information_length
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
_length
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
free
(
cellGroupConfig
);
free
(
cellGroupConfig
);
itti_send_msg_to_task
(
TASK_DU_F1
,
ctxt
.
module_id
,
message_p
);
itti_send_msg_to_task
(
TASK_DU_F1
,
ctxt
.
module_id
,
message_p
);
}
}
...
@@ -3520,13 +3468,14 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co
...
@@ -3520,13 +3468,14 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co
}
}
//if(cellGroupConfig != NULL) {
//if(cellGroupConfig != NULL) {
resp
->
du_to_cu_rrc_information
=
calloc
(
1
,
1024
*
sizeof
(
uint8_t
));
resp
->
du_to_cu_rrc_information
=
calloc
(
1
,
sizeof
(
du_to_cu_rrc_information_t
));
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
=
calloc
(
1
,
1024
);
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
NULL
,
ue_context_p
->
ue_context
.
masterCellGroup
,
//(void *)cellGroupConfig,
ue_context_p
->
ue_context
.
masterCellGroup
,
//(void *)cellGroupConfig,
resp
->
du_to_cu_rrc_information
,
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
1024
);
1024
);
resp
->
du_to_cu_rrc_information_length
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
_length
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
//}
//}
itti_send_msg_to_task
(
TASK_DU_F1
,
ctxt
.
module_id
,
message_p
);
itti_send_msg_to_task
(
TASK_DU_F1
,
ctxt
.
module_id
,
message_p
);
}
}
...
@@ -3546,8 +3495,8 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
...
@@ -3546,8 +3495,8 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_CellGroupConfig
,
&
asn_DEF_NR_CellGroupConfig
,
(
void
**
)
&
cellGroupConfig
,
(
void
**
)
&
cellGroupConfig
,
(
uint8_t
*
)
resp
->
du_to_cu_rrc_information
,
(
uint8_t
*
)
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
(
int
)
resp
->
du_to_cu_rrc_information_length
);
(
int
)
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
_length
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
AssertFatal
(
1
==
0
,
"Cell group config decode error
\n
"
);
AssertFatal
(
1
==
0
,
"Cell group config decode error
\n
"
);
...
@@ -3601,12 +3550,12 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c
...
@@ -3601,12 +3550,12 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
rrc_gNB_get_ue_context
(
rrc
,
ctxt
.
rnti
);
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
rrc_gNB_get_ue_context
(
rrc
,
ctxt
.
rnti
);
NR_CellGroupConfig_t
*
cellGroupConfig
=
NULL
;
NR_CellGroupConfig_t
*
cellGroupConfig
=
NULL
;
if
(
resp
->
du_to_cu_rrc_information
!=
NULL
){
if
(
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
!=
NULL
){
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_CellGroupConfig
,
&
asn_DEF_NR_CellGroupConfig
,
(
void
**
)
&
cellGroupConfig
,
(
void
**
)
&
cellGroupConfig
,
(
uint8_t
*
)
resp
->
du_to_cu_rrc_information
,
(
uint8_t
*
)
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
,
(
int
)
resp
->
du_to_cu_rrc_information_length
);
(
int
)
resp
->
du_to_cu_rrc_information
->
cellGroupConfig
_length
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
AssertFatal
(
1
==
0
,
"Cell group config decode error
\n
"
);
AssertFatal
(
1
==
0
,
"Cell group config decode error
\n
"
);
...
@@ -3619,15 +3568,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c
...
@@ -3619,15 +3568,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c
if
(
ue_context_p
->
ue_context
.
masterCellGroup
==
NULL
){
if
(
ue_context_p
->
ue_context
.
masterCellGroup
==
NULL
){
ue_context_p
->
ue_context
.
masterCellGroup
=
calloc
(
1
,
sizeof
(
NR_CellGroupConfig_t
));
ue_context_p
->
ue_context
.
masterCellGroup
=
calloc
(
1
,
sizeof
(
NR_CellGroupConfig_t
));
}
}
/*if(cellGroupConfig->rlc_BearerToAddModList!=NULL){
if(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList != NULL){
LOG_I(NR_RRC, "rlc_BearerToAddModList not empty before filling it \n");
free(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList);
}
ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList));
memcpy(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList, cellGroupConfig->rlc_BearerToAddModList,
sizeof(*cellGroupConfig->rlc_BearerToAddModList));
}*/
if
(
cellGroupConfig
->
rlc_BearerToAddModList
!=
NULL
){
if
(
cellGroupConfig
->
rlc_BearerToAddModList
!=
NULL
){
if
(
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
!=
NULL
){
if
(
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
!=
NULL
){
int
ue_ctxt_rlc_Bearers
=
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
->
list
.
count
;
int
ue_ctxt_rlc_Bearers
=
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
->
list
.
count
;
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
0eb2acb0
...
@@ -1058,39 +1058,34 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
...
@@ -1058,39 +1058,34 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
MessageDef
*
message_p
;
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
F1AP_UE_CONTEXT_MODIFICATION_REQ
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
F1AP_UE_CONTEXT_MODIFICATION_REQ
);
f1ap_ue_context_setup_t
*
req
=&
F1AP_UE_CONTEXT_MODIFICATION_REQ
(
message_p
);
f1ap_ue_context_setup_t
*
req
=&
F1AP_UE_CONTEXT_MODIFICATION_REQ
(
message_p
);
//UE_IDs will be extracted from F1AP layer
req
->
gNB_CU_ue_id
=
0
;
req
->
gNB_DU_ue_id
=
0
;
req
->
rnti
=
ue_context_p
->
ue_context
.
rnti
;
req
->
rnti
=
ue_context_p
->
ue_context
.
rnti
;
req
->
mcc
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
configuration
.
mcc
[
0
];
req
->
mcc
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
configuration
.
mcc
[
0
];
req
->
mnc
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
configuration
.
mnc
[
0
];
req
->
mnc
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
configuration
.
mnc
[
0
];
req
->
mnc_digit_length
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
configuration
.
mnc_digit_length
[
0
];
req
->
mnc_digit_length
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
configuration
.
mnc_digit_length
[
0
];
req
->
nr_cellid
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
nr_cellid
;
req
->
nr_cellid
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
nr_cellid
;
//if (ue_context_p->ue_context.established_pdu_sessions_flag == 1) {
/*Instruction towards the DU for SRB2 configuration*/
/*Instruction towards the DU for SRB2 configuration*/
req
->
srbs_to_be_setup
=
malloc
(
1
*
sizeof
(
f1ap_srb_to_be_setup_t
));
req
->
srbs_to_be_setup
=
malloc
(
1
*
sizeof
(
f1ap_srb_to_be_setup_t
));
req
->
srbs_to_be_setup_length
=
1
;
req
->
srbs_to_be_setup_length
=
1
;
f1ap_srb_to_be_setup_t
*
SRBs
=
req
->
srbs_to_be_setup
;
f1ap_srb_to_be_setup_t
*
SRBs
=
req
->
srbs_to_be_setup
;
SRBs
[
0
].
srb_id
=
2
;
SRBs
[
0
].
srb_id
=
2
;
SRBs
[
0
].
lcid
=
2
;
SRBs
[
0
].
lcid
=
2
;
/*Instruction towards the DU for DRB configuration and tunnel creation*/
/*Instruction towards the DU for DRB configuration and tunnel creation*/
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
;
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
;
memset
(
&
create_tunnel_req
,
0
,
sizeof
(
gtpv1u_gnb_create_tunnel_req_t
));
memset
(
&
create_tunnel_req
,
0
,
sizeof
(
gtpv1u_gnb_create_tunnel_req_t
));
req
->
drbs_to_be_setup
=
malloc
(
1
*
sizeof
(
f1ap_drb_to_be_setup_t
));
req
->
drbs_to_be_setup
=
malloc
(
1
*
sizeof
(
f1ap_drb_to_be_setup_t
));
req
->
drbs_to_be_setup_length
=
1
;
req
->
drbs_to_be_setup_length
=
1
;
f1ap_drb_to_be_setup_t
*
DRBs
=
req
->
drbs_to_be_setup
;
f1ap_drb_to_be_setup_t
*
DRBs
=
req
->
drbs_to_be_setup
;
LOG_D
(
RRC
,
"Length of DRB list:%d
\n
"
,
req
->
drbs_to_be_setup_length
);
LOG_I
(
RRC
,
"Length of DRB list:%d
\n
"
,
req
->
drbs_to_be_setup_length
);
DRBs
[
0
].
drb_id
=
1
;
DRBs
[
0
].
drb_id
=
1
;
DRBs
[
0
].
rlc_mode
=
RLC_MODE_AM
;
DRBs
[
0
].
rlc_mode
=
RLC_MODE_AM
;
DRBs
[
0
].
up_ul_tnl
[
0
].
tl_address
=
inet_addr
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
my_addr
);
DRBs
[
0
].
up_ul_tnl
[
0
].
tl_address
=
inet_addr
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
my_addr
);
DRBs
[
0
].
up_ul_tnl
[
0
].
port
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
my_portd
;
DRBs
[
0
].
up_ul_tnl
[
0
].
port
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
my_portd
;
DRBs
[
0
].
up_ul_tnl_length
=
1
;
DRBs
[
0
].
up_ul_tnl_length
=
1
;
DRBs
[
0
].
up_dl_tnl
[
0
].
tl_address
=
inet_addr
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
remote_addr
);
DRBs
[
0
].
up_dl_tnl
[
0
].
tl_address
=
inet_addr
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
remote_addr
);
DRBs
[
0
].
up_dl_tnl
[
0
].
port
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
remote_portd
;
DRBs
[
0
].
up_dl_tnl
[
0
].
port
=
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
remote_portd
;
DRBs
[
0
].
up_dl_tnl_length
=
1
;
DRBs
[
0
].
up_dl_tnl_length
=
1
;
//}
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt
.
module_id
,
message_p
);
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt
.
module_id
,
message_p
);
}
}
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
0eb2acb0
...
@@ -2699,9 +2699,9 @@ nr_rrc_ue_process_ueCapabilityEnquiry(
...
@@ -2699,9 +2699,9 @@ nr_rrc_ue_process_ueCapabilityEnquiry(
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
//
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
//
}
}
LOG_I
(
NR_RRC
,
"UECapabilityInformation Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
LOG_I
(
NR_RRC
,
"UECapabilityInformation Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
#ifdef ITTI_SIM
#ifdef ITTI_SIM
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
0eb2acb0
...
@@ -815,12 +815,6 @@ static int Gtpv1uHandleGpdu(int h,
...
@@ -815,12 +815,6 @@ static int Gtpv1uHandleGpdu(int h,
return
GTPNOK
;
return
GTPNOK
;
}
}
/*int offset=8;
if( msgHdr->E || msgHdr->S ||msgHdr->PN)
offset+=8;*/
//Minimum length of GTP-U header if non of the optional fields are present
//Minimum length of GTP-U header if non of the optional fields are present
int
offset
=
sizeof
(
Gtpv1uMsgHeaderT
);
int
offset
=
sizeof
(
Gtpv1uMsgHeaderT
);
...
...
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