Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
330fc086
Commit
330fc086
authored
Jul 26, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add PDUSessionResourceListCxtRelCpl in UEContextReleaseComplete Msg
parent
c00a73a9
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
345 additions
and
4 deletions
+345
-4
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+1
-1
src/ngap/ngapIEs/NgapIEsStruct.hpp
src/ngap/ngapIEs/NgapIEsStruct.hpp
+4
-0
src/ngap/ngapIEs/PDUSessionResourceItemCxtRelCpl.cpp
src/ngap/ngapIEs/PDUSessionResourceItemCxtRelCpl.cpp
+62
-0
src/ngap/ngapIEs/PDUSessionResourceItemCxtRelCpl.hpp
src/ngap/ngapIEs/PDUSessionResourceItemCxtRelCpl.hpp
+54
-0
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.cpp
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.cpp
+73
-0
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.hpp
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.hpp
+59
-0
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
+82
-1
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
+8
-1
src/ngap/ngap_app/ngap_message_callback.hpp
src/ngap/ngap_app/ngap_message_callback.hpp
+2
-1
No files found.
src/amf-app/amf_n2.cpp
View file @
330fc086
...
...
@@ -1359,7 +1359,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) {
uint32_t
ran_ue_ngap_id
=
itti_msg
.
ueCtxRelCmpl
->
getRanUeNgapId
();
// Change UE status from CM-CONNECTED to CM-IDLE
std
::
shared_ptr
<
nas_context
>
nc
;
std
::
shared_ptr
<
nas_context
>
nc
=
{}
;
if
(
amf_n1_inst
->
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
else
{
...
...
src/ngap/ngapIEs/NgapIEsStruct.hpp
View file @
330fc086
...
...
@@ -146,6 +146,10 @@ typedef struct {
OCTET_STRING_t
pduSessionResourceReleaseResponseTransfer
;
}
PDUSessionResourceReleasedItem_t
;
typedef
struct
{
uint8_t
pduSessionId
;
}
PDUSessionResourceCxtRelCplItem_t
;
typedef
struct
{
std
::
string
ip_address
;
uint32_t
gtp_teid
;
...
...
src/ngap/ngapIEs/PDUSessionResourceItemCxtRelCpl.cpp
0 → 100644
View file @
330fc086
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PDUSessionResourceItemCxtRelCpl.hpp"
namespace
ngap
{
//------------------------------------------------------------------------------
PDUSessionResourceItemCxtRelCpl
::
PDUSessionResourceItemCxtRelCpl
()
{}
//------------------------------------------------------------------------------
PDUSessionResourceItemCxtRelCpl
::~
PDUSessionResourceItemCxtRelCpl
()
{}
//------------------------------------------------------------------------------
void
PDUSessionResourceItemCxtRelCpl
::
setPDUSessionResourceItemCxtRelCpl
(
const
PDUSessionID
&
m_pDUSessionID
)
{
pDUSessionID
=
m_pDUSessionID
;
}
//------------------------------------------------------------------------------
void
PDUSessionResourceItemCxtRelCpl
::
getPDUSessionResourceItemCxtRelCpl
(
PDUSessionID
&
m_pDUSessionID
)
{
m_pDUSessionID
=
pDUSessionID
;
}
//------------------------------------------------------------------------------
bool
PDUSessionResourceItemCxtRelCpl
::
encode2PDUSessionResourceItemCxtRelCpl
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
pduSessionResourceItemCxtRelCpl
)
{
if
(
!
pDUSessionID
.
encode2PDUSessionID
(
pduSessionResourceItemCxtRelCpl
->
pDUSessionID
))
return
false
;
return
true
;
}
//------------------------------------------------------------------------------
bool
PDUSessionResourceItemCxtRelCpl
::
decodefromPDUSessionResourceItemCxtRelCpl
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
pduSessionResourceItemCxtRelCpl
)
{
pDUSessionID
.
setPDUSessionID
(
pduSessionResourceItemCxtRelCpl
->
pDUSessionID
);
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/PDUSessionResourceItemCxtRelCpl.hpp
0 → 100644
View file @
330fc086
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _PDU_SESSION_RESOURCE_ITEM_REL_CPL_H_
#define _PDU_SESSION_RESOURCE_ITEM_REL_CPL_H_
#include "PDUSessionID.hpp"
extern
"C"
{
#include "Ngap_PDUSessionResourceItemCxtRelCpl.h"
}
namespace
ngap
{
class
PDUSessionResourceItemCxtRelCpl
{
public:
PDUSessionResourceItemCxtRelCpl
();
virtual
~
PDUSessionResourceItemCxtRelCpl
();
void
setPDUSessionResourceItemCxtRelCpl
(
const
PDUSessionID
&
m_pDUSessionID
);
void
getPDUSessionResourceItemCxtRelCpl
(
PDUSessionID
&
m_pDUSessionID
);
bool
encode2PDUSessionResourceItemCxtRelCpl
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
pduSessionResourceItemCxtRelCpl
);
bool
decodefromPDUSessionResourceItemCxtRelCpl
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
pduSessionResourceItemCxtRelCpl
);
private:
PDUSessionID
pDUSessionID
;
// OCTET_STRING_t pDUSessionResourceReleaseResponseTransfer;
};
}
// namespace ngap
#endif
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.cpp
0 → 100644
View file @
330fc086
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PDUSessionResourceListCxtRelCpl.hpp"
namespace
ngap
{
//------------------------------------------------------------------------------
PDUSessionResourceListCxtRelCpl
::
PDUSessionResourceListCxtRelCpl
()
{}
//------------------------------------------------------------------------------
PDUSessionResourceListCxtRelCpl
::~
PDUSessionResourceListCxtRelCpl
()
{}
//------------------------------------------------------------------------------
void
PDUSessionResourceListCxtRelCpl
::
setPDUSessionResourceListCxtRelCpl
(
const
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
)
{
cxtRelCplList
=
list
;
}
//------------------------------------------------------------------------------
void
PDUSessionResourceListCxtRelCpl
::
getPDUSessionResourceListCxtRelCpl
(
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
)
{
list
=
cxtRelCplList
;
}
//------------------------------------------------------------------------------
bool
PDUSessionResourceListCxtRelCpl
::
encode2PDUSessionResourceListCxtRelCpl
(
Ngap_PDUSessionResourceListCxtRelCpl_t
*
pduSessionResourceListCxtRelCpl
)
{
for
(
auto
&
cxtRelCpl
:
cxtRelCplList
)
{
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
item
=
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
)
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
));
if
(
!
item
)
return
false
;
if
(
!
cxtRelCpl
.
encode2PDUSessionResourceItemCxtRelCpl
(
item
))
return
false
;
if
(
ASN_SEQUENCE_ADD
(
&
pduSessionResourceListCxtRelCpl
->
list
,
item
)
!=
0
)
return
false
;
}
return
true
;
}
//------------------------------------------------------------------------------
bool
PDUSessionResourceListCxtRelCpl
::
decodefromPDUSessionResourceListCxtRelCpl
(
const
Ngap_PDUSessionResourceListCxtRelCpl_t
&
pduSessionResourceListCxtRelCpl
)
{
for
(
int
i
=
0
;
i
<
pduSessionResourceListCxtRelCpl
.
list
.
count
;
i
++
)
{
PDUSessionResourceItemCxtRelCpl
item
=
{};
if
(
!
item
.
decodefromPDUSessionResourceItemCxtRelCpl
(
pduSessionResourceListCxtRelCpl
.
list
.
array
[
i
]))
return
false
;
cxtRelCplList
.
push_back
(
item
);
}
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.hpp
0 → 100644
View file @
330fc086
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _PDU_SESSION_RESOURCE_LIST_CXT_REL_CPL_H_
#define _PDU_SESSION_RESOURCE_LIST_CXT_REL_CPL_H_
#include "PDUSessionResourceItemCxtRelCpl.hpp"
#include <vector>
extern
"C"
{
#include "Ngap_PDUSessionResourceItemCxtRelCpl.h"
#include "Ngap_PDUSessionResourceListCxtRelCpl.h"
}
namespace
ngap
{
class
PDUSessionResourceListCxtRelCpl
{
public:
PDUSessionResourceListCxtRelCpl
();
virtual
~
PDUSessionResourceListCxtRelCpl
();
void
setPDUSessionResourceListCxtRelCpl
(
const
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
);
void
getPDUSessionResourceListCxtRelCpl
(
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
);
bool
encode2PDUSessionResourceListCxtRelCpl
(
Ngap_PDUSessionResourceListCxtRelCpl_t
*
pduSessionResourceListCxtRelCpl
);
bool
decodefromPDUSessionResourceListCxtRelCpl
(
const
Ngap_PDUSessionResourceListCxtRelCpl_t
&
pduSessionResourceListCxtRelCpl
);
private:
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>
cxtRelCplList
;
};
}
// namespace ngap
#endif
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
View file @
330fc086
...
...
@@ -149,6 +149,66 @@ void UEContextReleaseCompleteMsg::getUserLocationInfoNR(
}
}
//------------------------------------------------------------------------------
void
UEContextReleaseCompleteMsg
::
setPduSessionResourceCxtRelCplList
(
const
std
::
vector
<
PDUSessionResourceCxtRelCplItem_t
>&
list
)
{
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>
cxtRelCplList
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
PDUSessionResourceItemCxtRelCpl
item
=
{};
PDUSessionID
pDUSessionID
=
{};
pDUSessionID
.
setPDUSessionID
(
list
[
i
].
pduSessionId
);
item
.
setPDUSessionResourceItemCxtRelCpl
(
pDUSessionID
);
cxtRelCplList
.
push_back
(
item
);
}
pduSessionResourceListCxtRelCpl
->
setPDUSessionResourceListCxtRelCpl
(
cxtRelCplList
);
Ngap_UEContextReleaseComplete_IEs
*
ie
=
(
Ngap_UEContextReleaseComplete_IEs
*
)
calloc
(
1
,
sizeof
(
Ngap_UEContextReleaseComplete_IEs
));
ie
->
id
=
Ngap_ProtocolIE_ID_id_PDUSessionResourceListCxtRelCpl
;
ie
->
criticality
=
Ngap_Criticality_reject
;
ie
->
value
.
present
=
Ngap_UEContextReleaseComplete_IEs__value_PR_PDUSessionResourceListCxtRelCpl
;
int
ret
=
pduSessionResourceListCxtRelCpl
->
encode2PDUSessionResourceListCxtRelCpl
(
&
ie
->
value
.
choice
.
PDUSessionResourceListCxtRelCpl
);
if
(
!
ret
)
{
Logger
::
ngap
().
error
(
"Encode NGAP PDUSessionResourceReleasedListRelRes IE error"
);
free_wrapper
((
void
**
)
&
ie
);
return
;
}
ret
=
ASN_SEQUENCE_ADD
(
&
ies
->
protocolIEs
.
list
,
ie
);
if
(
ret
!=
0
)
Logger
::
ngap
().
error
(
"Encode NGAP PDUSessionResourceReleasedListRelRes IE error"
);
}
//------------------------------------------------------------------------------
bool
UEContextReleaseCompleteMsg
::
getPduSessionResourceCxtRelCplList
(
std
::
vector
<
PDUSessionResourceCxtRelCplItem_t
>&
list
)
{
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>
cxtRelCplList
;
pduSessionResourceListCxtRelCpl
->
getPDUSessionResourceListCxtRelCpl
(
cxtRelCplList
);
for
(
auto
&
item
:
cxtRelCplList
)
{
PDUSessionResourceCxtRelCplItem_t
rel
=
{};
PDUSessionID
pDUSessionID
=
{};
item
.
getPDUSessionResourceItemCxtRelCpl
(
pDUSessionID
);
pDUSessionID
.
getPDUSessionID
(
rel
.
pduSessionId
);
list
.
push_back
(
rel
);
}
return
true
;
}
//------------------------------------------------------------------------------
bool
UEContextReleaseCompleteMsg
::
decodeFromPdu
(
Ngap_NGAP_PDU_t
*
ngapMsgPdu
)
{
ngapPdu
=
ngapMsgPdu
;
...
...
@@ -208,7 +268,28 @@ bool UEContextReleaseCompleteMsg::decodeFromPdu(Ngap_NGAP_PDU_t* ngapMsgPdu) {
}
break
;
// TODO: User Location Information
// TODO: Information on Recommended Cells and RAN Nodes for Paging
// TODO: PDU Session Resource List
case
Ngap_ProtocolIE_ID_id_PDUSessionResourceListCxtRelCpl
:
{
if
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
Ngap_Criticality_reject
&&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_UEContextReleaseComplete_IEs__value_PR_PDUSessionResourceListCxtRelCpl
)
{
pduSessionResourceListCxtRelCpl
=
new
PDUSessionResourceListCxtRelCpl
();
if
(
!
pduSessionResourceListCxtRelCpl
->
decodefromPDUSessionResourceListCxtRelCpl
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
PDUSessionResourceListCxtRelCpl
))
{
Logger
::
ngap
().
error
(
"Decode NGAP PDUSessionResourceListCxtRelCpl IE error"
);
return
false
;
}
}
else
{
Logger
::
ngap
().
error
(
"Decode NGAP PDUSessionResourceListCxtRelCpl IE error"
);
return
false
;
}
}
break
;
// TODO: Criticality Diagnostics
default:
{
...
...
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
View file @
330fc086
...
...
@@ -24,6 +24,7 @@
#include "NgapUEMessage.hpp"
#include "UserLocationInformation.hpp"
#include "PDUSessionResourceListCxtRelCpl.hpp"
extern
"C"
{
#include "Ngap_UEContextReleaseComplete.h"
...
...
@@ -44,13 +45,19 @@ class UEContextReleaseCompleteMsg : public NgapUEMessage {
void
setUserLocationInfoNR
(
const
NrCgi_t
&
cig
,
const
Tai_t
&
tai
);
void
getUserLocationInfoNR
(
NrCgi_t
&
cig
,
Tai_t
&
tai
);
void
setPduSessionResourceCxtRelCplList
(
const
std
::
vector
<
PDUSessionResourceCxtRelCplItem_t
>&
list
);
bool
getPduSessionResourceCxtRelCplList
(
std
::
vector
<
PDUSessionResourceCxtRelCplItem_t
>&
list
);
private:
Ngap_UEContextReleaseComplete_t
*
ies
;
// AMF_UE_NGAP_ID //Mandatory
// RAN_UE_NGAP_ID //Mandatory
UserLocationInformation
*
userLocationInformation
;
// Optional
// TODO: Information on Recommended Cells and RAN Nodes for Paging (Optional)
// TODO: PDU Session Resource List (Optional)
PDUSessionResourceListCxtRelCpl
*
pduSessionResourceListCxtRelCpl
;
// Optional
// TODO: Criticality Diagnostics (Optional)
};
...
...
src/ngap/ngap_app/ngap_message_callback.hpp
View file @
330fc086
...
...
@@ -205,7 +205,8 @@ int ngap_amf_handle_ue_radio_cap_indication(
UeRadioCapabilityInfoIndicationMsg
*
ueRadioCap
=
new
UeRadioCapabilityInfoIndicationMsg
();
if
(
!
ueRadioCap
->
decodeFromPdu
(
message_p
))
{
Logger
::
ngap
().
error
(
"Decoding UEContextReleaseRequest message error"
);
Logger
::
ngap
().
error
(
"Decoding UE Radio Capability Indication message error"
);
return
RETURNerror
;
}
itti_ue_radio_capability_indication
*
itti_msg
=
...
...
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