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
5d8f17f3
Commit
5d8f17f3
authored
Sep 25, 2018
by
Bing-Kai Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add send UE CONTEXT RELEASE message procedure
parent
374c1087
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
283 additions
and
10 deletions
+283
-10
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+87
-2
openair2/F1AP/f1ap_cu_ue_context_management.h
openair2/F1AP/f1ap_cu_ue_context_management.h
+3
-1
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+182
-4
openair2/F1AP/f1ap_du_ue_context_management.h
openair2/F1AP/f1ap_du_ue_context_management.h
+11
-3
No files found.
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
5d8f17f3
...
@@ -775,8 +775,93 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -775,8 +775,93 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
int
CU_send_UE_CONTEXT_RELEASE_COMMAND
(
instance_t
instance
,
int
CU_send_UE_CONTEXT_RELEASE_COMMAND
(
instance_t
instance
,
F1AP_UEContextReleaseCommand_t
*
UEContextReleaseCommand
)
{
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
)
{
AssertFatal
(
1
==
0
,
"Not implemented yet
\n
"
);
F1AP_F1AP_PDU_t
pdu
;
F1AP_UEContextReleaseCommand_t
*
out
;
F1AP_UEContextReleaseCommandIEs_t
*
ie
;
uint8_t
*
buffer
;
uint32_t
len
;
//int i = 0, j = 0;
/* Create */
/* 0. Message Type */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
F1AP_F1AP_PDU_PR_initiatingMessage
;
pdu
.
choice
.
initiatingMessage
=
(
F1AP_InitiatingMessage_t
*
)
calloc
(
1
,
sizeof
(
F1AP_InitiatingMessage_t
));
pdu
.
choice
.
initiatingMessage
->
procedureCode
=
F1AP_ProcedureCode_id_UEContextRelease
;
pdu
.
choice
.
initiatingMessage
->
criticality
=
F1AP_Criticality_reject
;
pdu
.
choice
.
initiatingMessage
->
value
.
present
=
F1AP_InitiatingMessage__value_PR_UEContextReleaseCommand
;
out
=
&
pdu
.
choice
.
initiatingMessage
->
value
.
choice
.
UEContextReleaseCommand
;
/* mandatory */
/* c1. GNB_CU_UE_F1AP_ID */
ie
=
(
F1AP_UEContextReleaseCommandIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCommandIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCommandIEs__value_PR_GNB_CU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_ue_context_setup_req
->
gNB_CU_ue_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
ie
=
(
F1AP_UEContextReleaseCommandIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCommandIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCommandIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
*
f1ap_ue_context_setup_req
->
gNB_DU_ue_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c3. Cause */
ie
=
(
F1AP_UEContextReleaseCommandIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCommandIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_Cause
;
ie
->
criticality
=
F1AP_Criticality_ignore
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCommandIEs__value_PR_Cause
;
// dummy value
ie
->
value
.
choice
.
Cause
.
present
=
F1AP_Cause_PR_radioNetwork
;
switch
(
ie
->
value
.
choice
.
Cause
.
present
)
{
case
F1AP_Cause_PR_radioNetwork
:
ie
->
value
.
choice
.
Cause
.
choice
.
radioNetwork
=
F1AP_CauseRadioNetwork_unspecified
;
break
;
case
F1AP_Cause_PR_transport
:
ie
->
value
.
choice
.
Cause
.
choice
.
transport
=
F1AP_CauseTransport_unspecified
;
break
;
case
F1AP_Cause_PR_protocol
:
ie
->
value
.
choice
.
Cause
.
choice
.
protocol
=
F1AP_CauseProtocol_unspecified
;
break
;
case
F1AP_Cause_PR_misc
:
ie
->
value
.
choice
.
Cause
.
choice
.
misc
=
F1AP_CauseMisc_unspecified
;
break
;
case
F1AP_Cause_PR_NOTHING
:
default:
break
;
}
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* optional */
/* c4. RRCContainer */
ie
=
(
F1AP_UEContextReleaseCommandIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCommandIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_RRCContainer
;
ie
->
criticality
=
F1AP_Criticality_ignore
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCommandIEs__value_PR_RRCContainer
;
OCTET_STRING_fromBuf
(
&
ie
->
value
.
choice
.
RRCContainer
,
"asdsa1d32sa1d31asd31as"
,
strlen
(
"asdsa1d32sa1d31asd31as"
));
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* encode */
if
(
f1ap_encode_pdu
(
&
pdu
,
&
buffer
,
&
len
)
<
0
)
{
LOG_E
(
DU_F1AP
,
"Failed to encode F1 context release command
\n
"
);
return
-
1
;
}
// send
return
0
;
}
}
...
...
openair2/F1AP/f1ap_cu_ue_context_management.h
View file @
5d8f17f3
...
@@ -61,8 +61,10 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -61,8 +61,10 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/*
/*
* UE Context Release (gNB-CU initiated)
* UE Context Release (gNB-CU initiated)
*/
*/
// note: is temporary with f1ap_ue_context_setup_req_t
int
CU_send_UE_CONTEXT_RELEASE_COMMAND
(
instance_t
instance
,
int
CU_send_UE_CONTEXT_RELEASE_COMMAND
(
instance_t
instance
,
F1AP_UEContextReleaseCommand_t
*
UEContextReleaseCommand
);
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
);
int
CU_handle_UE_CONTEXT_RELEASE_COMPLETE
(
instance_t
instance
,
int
CU_handle_UE_CONTEXT_RELEASE_COMPLETE
(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
assoc_id
,
uint32_t
stream
,
uint32_t
stream
,
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
5d8f17f3
...
@@ -424,8 +424,84 @@ int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance) {
...
@@ -424,8 +424,84 @@ int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance) {
}
}
int
DU_send_UE_CONTEXT_RELEASE_REQUEST
(
instance_t
instance
)
{
// note: is temporary with f1ap_ue_context_setup_req_t
AssertFatal
(
1
==
0
,
"Not implemented yet
\n
"
);
int
DU_send_UE_CONTEXT_RELEASE_REQUEST
(
instance_t
instance
,
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
)
{
F1AP_F1AP_PDU_t
pdu
;
F1AP_UEContextReleaseRequest_t
*
out
;
F1AP_UEContextReleaseRequestIEs_t
*
ie
;
uint8_t
*
buffer
;
uint32_t
len
;
//int i = 0, j = 0;
/* Create */
/* 0. Message Type */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
F1AP_F1AP_PDU_PR_initiatingMessage
;
pdu
.
choice
.
initiatingMessage
=
(
F1AP_InitiatingMessage_t
*
)
calloc
(
1
,
sizeof
(
F1AP_InitiatingMessage_t
));
pdu
.
choice
.
initiatingMessage
->
procedureCode
=
F1AP_ProcedureCode_id_UEContextRelease
;
pdu
.
choice
.
initiatingMessage
->
criticality
=
F1AP_Criticality_reject
;
pdu
.
choice
.
initiatingMessage
->
value
.
present
=
F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest
;
out
=
&
pdu
.
choice
.
initiatingMessage
->
value
.
choice
.
UEContextReleaseRequest
;
/* mandatory */
/* c1. GNB_CU_UE_F1AP_ID */
ie
=
(
F1AP_UEContextReleaseRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseRequestIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_UEContextReleaseRequestIEs__value_PR_GNB_CU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_ue_context_setup_req
->
gNB_CU_ue_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
ie
=
(
F1AP_UEContextReleaseRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseRequestIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_UEContextReleaseRequestIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
*
f1ap_ue_context_setup_req
->
gNB_DU_ue_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c3. Cause */
ie
=
(
F1AP_UEContextReleaseRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseRequestIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_Cause
;
ie
->
criticality
=
F1AP_Criticality_ignore
;
ie
->
value
.
present
=
F1AP_UEContextReleaseRequestIEs__value_PR_Cause
;
// dummy value
ie
->
value
.
choice
.
Cause
.
present
=
F1AP_Cause_PR_radioNetwork
;
switch
(
ie
->
value
.
choice
.
Cause
.
present
)
{
case
F1AP_Cause_PR_radioNetwork
:
ie
->
value
.
choice
.
Cause
.
choice
.
radioNetwork
=
F1AP_CauseRadioNetwork_unspecified
;
break
;
case
F1AP_Cause_PR_transport
:
ie
->
value
.
choice
.
Cause
.
choice
.
transport
=
F1AP_CauseTransport_unspecified
;
break
;
case
F1AP_Cause_PR_protocol
:
ie
->
value
.
choice
.
Cause
.
choice
.
protocol
=
F1AP_CauseProtocol_unspecified
;
break
;
case
F1AP_Cause_PR_misc
:
ie
->
value
.
choice
.
Cause
.
choice
.
misc
=
F1AP_CauseMisc_unspecified
;
break
;
case
F1AP_Cause_PR_NOTHING
:
default:
break
;
}
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* encode */
if
(
f1ap_encode_pdu
(
&
pdu
,
&
buffer
,
&
len
)
<
0
)
{
LOG_E
(
DU_F1AP
,
"Failed to encode F1 context release request
\n
"
);
return
-
1
;
}
// send
return
0
;
}
}
...
@@ -437,8 +513,110 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
...
@@ -437,8 +513,110 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
}
}
int
DU_send_UE_CONTEXT_RELEASE_COMPLETE
(
instance_t
instance
)
{
// note: is temporary with f1ap_ue_context_setup_req_t
AssertFatal
(
1
==
0
,
"Not implemented yet
\n
"
);
int
DU_send_UE_CONTEXT_RELEASE_COMPLETE
(
instance_t
instance
,
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
)
{
F1AP_F1AP_PDU_t
pdu
;
F1AP_UEContextReleaseComplete_t
*
out
;
F1AP_UEContextReleaseCompleteIEs_t
*
ie
;
uint8_t
*
buffer
;
uint32_t
len
;
int
i
=
0
;
//, j = 0;
/* Create */
/* 0. Message Type */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
F1AP_F1AP_PDU_PR_successfulOutcome
;
pdu
.
choice
.
successfulOutcome
=
(
F1AP_SuccessfulOutcome_t
*
)
calloc
(
1
,
sizeof
(
F1AP_SuccessfulOutcome_t
));
pdu
.
choice
.
successfulOutcome
->
procedureCode
=
F1AP_ProcedureCode_id_UEContextRelease
;
pdu
.
choice
.
successfulOutcome
->
criticality
=
F1AP_Criticality_reject
;
pdu
.
choice
.
successfulOutcome
->
value
.
present
=
F1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete
;
out
=
&
pdu
.
choice
.
successfulOutcome
->
value
.
choice
.
UEContextReleaseComplete
;
/* mandatory */
/* c1. GNB_CU_UE_F1AP_ID */
ie
=
(
F1AP_UEContextReleaseCompleteIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCompleteIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_CU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_ue_context_setup_req
->
gNB_CU_ue_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
ie
=
(
F1AP_UEContextReleaseCompleteIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCompleteIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
*
f1ap_ue_context_setup_req
->
gNB_DU_ue_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* optional */
/* c3. CriticalityDiagnostics */
if
(
0
)
{
ie
=
(
F1AP_UEContextReleaseCompleteIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextReleaseCompleteIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_CriticalityDiagnostics
;
ie
->
criticality
=
F1AP_Criticality_ignore
;
ie
->
value
.
present
=
F1AP_UEContextReleaseCompleteIEs__value_PR_CriticalityDiagnostics
;
// dummy value
/* optional */
/* procedureCode */
if
(
0
)
{
ie
->
value
.
choice
.
CriticalityDiagnostics
.
procedureCode
=
(
F1AP_ProcedureCode_t
*
)
calloc
(
1
,
sizeof
(
F1AP_ProcedureCode_t
));
ie
->
value
.
choice
.
CriticalityDiagnostics
.
procedureCode
=
0L
;
}
/* optional */
/* triggeringMessage */
if
(
0
)
{
ie
->
value
.
choice
.
CriticalityDiagnostics
.
triggeringMessage
=
(
F1AP_TriggeringMessage_t
*
)
calloc
(
1
,
sizeof
(
F1AP_TriggeringMessage_t
));
ie
->
value
.
choice
.
CriticalityDiagnostics
.
triggeringMessage
=
(
F1AP_TriggeringMessage_t
*
)
F1AP_TriggeringMessage_successful_outcome
;
}
/* optional */
/* procedureCriticality */
if
(
0
)
{
ie
->
value
.
choice
.
CriticalityDiagnostics
.
procedureCriticality
=
(
F1AP_Criticality_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Criticality_t
));
ie
->
value
.
choice
.
CriticalityDiagnostics
.
procedureCriticality
=
F1AP_Criticality_reject
;
}
/* optional */
/* transactionID */
if
(
0
)
{
ie
->
value
.
choice
.
CriticalityDiagnostics
.
transactionID
=
(
F1AP_TransactionID_t
*
)
calloc
(
1
,
sizeof
(
F1AP_TransactionID_t
));
ie
->
value
.
choice
.
CriticalityDiagnostics
.
transactionID
=
0L
;
}
/* optional */
/* F1AP_CriticalityDiagnostics_IE_List */
if
(
0
)
{
for
(
i
=
0
;
i
<
0
;
i
++
)
{
F1AP_CriticalityDiagnostics_IE_Item_t
*
criticalityDiagnostics_ie_item
=
(
F1AP_CriticalityDiagnostics_IE_Item_t
*
)
calloc
(
1
,
sizeof
(
F1AP_CriticalityDiagnostics_IE_Item_t
));;
criticalityDiagnostics_ie_item
->
iECriticality
=
F1AP_Criticality_reject
;
criticalityDiagnostics_ie_item
->
iE_ID
=
0L
;
criticalityDiagnostics_ie_item
->
typeOfError
=
F1AP_TypeOfError_not_understood
;
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
CriticalityDiagnostics
.
iEsCriticalityDiagnostics
->
list
,
criticalityDiagnostics_ie_item
);
}
}
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
}
/* encode */
if
(
f1ap_encode_pdu
(
&
pdu
,
&
buffer
,
&
len
)
<
0
)
{
LOG_E
(
DU_F1AP
,
"Failed to encode F1 context release complete
\n
"
);
return
-
1
;
}
// send
return
0
;
}
}
...
...
openair2/F1AP/f1ap_du_ue_context_management.h
View file @
5d8f17f3
...
@@ -47,17 +47,25 @@ int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance);
...
@@ -47,17 +47,25 @@ int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance);
/*
/*
* UE Context Release Request (gNB-DU initiated)
* UE Context Release Request (gNB-DU initiated)
*/
*/
int
DU_send_UE_CONTEXT_RELEASE_REQUEST
(
instance_t
instance
);
// note: is temporary with f1ap_ue_context_setup_req_t
int
DU_send_UE_CONTEXT_RELEASE_REQUEST
(
instance_t
instance
,
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
);
/*
/*
* UE Context Release (gNB-CU initiated)
* UE Context Release
Command
(gNB-CU initiated)
*/
*/
int
DU_handle_UE_CONTEXT_RELEASE_COMMAND
(
instance_t
instance
,
int
DU_handle_UE_CONTEXT_RELEASE_COMMAND
(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
assoc_id
,
uint32_t
stream
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
);
F1AP_F1AP_PDU_t
*
pdu
);
int
DU_send_UE_CONTEXT_RELEASE_COMPLETE
(
instance_t
instance
);
/*
* UE Context Release Complete (gNB-DU initiated)
*/
// note: is temporary with f1ap_ue_context_setup_req_t
int
DU_send_UE_CONTEXT_RELEASE_COMPLETE
(
instance_t
instance
,
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
);
/*
/*
...
...
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