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
5103c14a
Commit
5103c14a
authored
Aug 20, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CPP Check
parent
2756b871
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
58 additions
and
34 deletions
+58
-34
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+26
-23
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+1
-1
src/contexts/nas_context.cpp
src/contexts/nas_context.cpp
+1
-0
src/contexts/pdu_session_context.cpp
src/contexts/pdu_session_context.cpp
+1
-0
src/nas/ies/5GSMobilityIdentity.cpp
src/nas/ies/5GSMobilityIdentity.cpp
+1
-1
src/nas/ies/UESecurityCapability.cpp
src/nas/ies/UESecurityCapability.cpp
+4
-0
src/ngap/ngapIEs/PDUSessionResourceHandoverRequiredTransfer.cpp
...ap/ngapIEs/PDUSessionResourceHandoverRequiredTransfer.cpp
+1
-1
src/ngap/ngapIEs/PacketLossRate.cpp
src/ngap/ngapIEs/PacketLossRate.cpp
+3
-1
src/ngap/ngapIEs/SecurityIndication.cpp
src/ngap/ngapIEs/SecurityIndication.cpp
+5
-3
src/ngap/ngapIEs/ServedGUAMIItem.cpp
src/ngap/ngapIEs/ServedGUAMIItem.cpp
+1
-1
src/ngap/ngapIEs/UEAssociationLogicalNGConnectionItem.cpp
src/ngap/ngapIEs/UEAssociationLogicalNGConnectionItem.cpp
+1
-1
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
+9
-1
src/ngap/ngapMsgs/DownlinkRANStatusTransfer.cpp
src/ngap/ngapMsgs/DownlinkRANStatusTransfer.cpp
+1
-1
src/ngap/ngapMsgs/HandoverPreparationFailure.cpp
src/ngap/ngapMsgs/HandoverPreparationFailure.cpp
+1
-0
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.cpp
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.cpp
+2
-0
No files found.
src/amf-app/amf_config.cpp
View file @
5103c14a
...
...
@@ -58,29 +58,32 @@ namespace config {
//------------------------------------------------------------------------------
amf_config
::
amf_config
()
{
nrf_addr
.
ipv4_addr
.
s_addr
=
INADDR_ANY
;
nrf_addr
.
port
=
80
;
nrf_addr
.
api_version
=
"v1"
;
enable_nf_registration
=
false
;
enable_smf_selection
=
false
;
enable_external_ausf
=
false
;
enable_external_udm
=
false
;
instance
=
0
;
n2
=
{};
n11
=
{};
statistics_interval
=
0
;
guami
=
{};
guami_list
=
{};
relativeAMFCapacity
=
0
;
plmn_list
=
{};
auth_conf
auth_para
=
{};
nas_cfg
=
{};
smf_pool
=
{};
enable_nf_registration
=
false
;
enable_smf_selection
=
false
;
enable_external_ausf
=
false
;
enable_external_udm
=
false
;
use_fqdn_dns
=
false
;
nrf_addr
.
ipv4_addr
.
s_addr
=
INADDR_ANY
;
nrf_addr
.
port
=
80
;
nrf_addr
.
api_version
=
"v1"
;
ausf_addr
.
ipv4_addr
.
s_addr
=
INADDR_ANY
;
ausf_addr
.
port
=
80
;
ausf_addr
.
api_version
=
"v1"
;
enable_nf_registration
=
false
;
enable_smf_selection
=
false
;
enable_external_ausf
=
false
;
enable_external_udm
=
false
;
instance
=
0
;
n2
=
{};
n11
=
{};
statistics_interval
=
0
;
guami
=
{};
guami_list
=
{};
relativeAMFCapacity
=
0
;
plmn_list
=
{};
auth_conf
auth_para
=
{};
nas_cfg
=
{};
smf_pool
=
{};
enable_nf_registration
=
false
;
enable_smf_selection
=
false
;
enable_external_ausf
=
false
;
enable_external_udm
=
false
;
use_fqdn_dns
=
false
;
struct
{
struct
in_addr
ipv4_addr
;
...
...
src/amf-app/amf_n1.cpp
View file @
5103c14a
...
...
@@ -1291,7 +1291,7 @@ bool amf_n1::get_authentication_vectors_from_ausf(
Logger
::
amf_n1
().
debug
(
"********* has auts *********"
);
char
*
auts_s
=
(
char
*
)
malloc
(
auts_len
*
2
+
1
);
// char *rand_s = (char *)malloc(RAND_LENGTH * 2 + 1);
memset
(
auts_s
,
0
,
sizeof
(
auts_s
)
);
memset
(
auts_s
,
0
,
auts_len
*
2
);
// memset(rand_s, 0, sizeof(rand_s));
// uint8_t rand_value[RAND_LENGTH];
...
...
src/contexts/nas_context.cpp
View file @
5103c14a
...
...
@@ -64,6 +64,7 @@ nas_context::nas_context() : _vector(), _5g_he_av(), _5g_av(), kamf() {
is_auth_vectors_present
=
false
;
to_be_register_by_new_suci
=
false
;
ueSecurityCaplen
=
0
;
nas_status
=
{};
}
//------------------------------------------------------------------------------
...
...
src/contexts/pdu_session_context.cpp
View file @
5103c14a
...
...
@@ -44,6 +44,7 @@ pdu_session_context::pdu_session_context() {
smf_available
=
false
;
snssai
=
{};
plmn
=
{};
is_ho_accepted
=
false
;
}
//------------------------------------------------------------------------------
...
...
src/nas/ies/5GSMobilityIdentity.cpp
View file @
5103c14a
...
...
@@ -133,7 +133,7 @@ int _5GSMobilityIdentity::_5g_s_tmsi_encode2buffer(uint8_t* buf, int len) {
//------------------------------------------------------------------------------
int
_5GSMobilityIdentity
::
_5g_s_tmsi_decodefrombuffer
(
uint8_t
*
buf
,
int
len
)
{
int
decoded_size
=
0
;
_5g_s_tmsi
=
(
_5G_S_TMSI_t
*
)
calloc
(
1
,
sizeof
(
_5G_S_TMSI_t
));
if
(
!
_5g_s_tmsi
)
_5g_s_tmsi
=
(
_5G_S_TMSI_t
*
)
calloc
(
1
,
sizeof
(
_5G_S_TMSI_t
));
decoded_size
++
;
// type of identity
uint8_t
octet
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
...
...
src/nas/ies/UESecurityCapability.cpp
View file @
5103c14a
...
...
@@ -36,6 +36,8 @@ UESecurityCapability::UESecurityCapability(uint8_t iei) {
_iei
=
iei
;
_5g_EASel
=
0
;
_5g_IASel
=
0
;
EEASel
=
0
;
EIASel
=
0
;
length
=
0
;
}
...
...
@@ -44,6 +46,8 @@ UESecurityCapability::UESecurityCapability() {
_iei
=
0
;
_5g_EASel
=
0
;
_5g_IASel
=
0
;
EEASel
=
0
;
EIASel
=
0
;
length
=
0
;
}
...
...
src/ngap/ngapIEs/PDUSessionResourceHandoverRequiredTransfer.cpp
View file @
5103c14a
...
...
@@ -94,7 +94,7 @@ bool PDUSessionResourceHandoverRequiredTransfer::decodefromIE(
bool
PDUSessionResourceHandoverRequiredTransfer
::
getDirectForwardingPathAvailability
(
long
*
directForwardingPathAvailability
)
{
directForwardingPathAvailability
=
(
long
*
)
DirectForwardingPathAvailability
;
*
directForwardingPathAvailability
=
(
long
)
*
DirectForwardingPathAvailability
;
return
true
;
}
...
...
src/ngap/ngapIEs/PacketLossRate.cpp
View file @
5103c14a
...
...
@@ -34,7 +34,9 @@ using namespace std;
namespace
ngap
{
//------------------------------------------------------------------------------
PacketLossRate
::
PacketLossRate
()
{}
PacketLossRate
::
PacketLossRate
()
{
packetlossrate
=
0
;
}
//------------------------------------------------------------------------------
PacketLossRate
::~
PacketLossRate
()
{}
...
...
src/ngap/ngapIEs/SecurityIndication.cpp
View file @
5103c14a
...
...
@@ -89,9 +89,11 @@ bool SecurityIndication::encode2SecurityIndication(
//------------------------------------------------------------------------------
bool
SecurityIndication
::
decodefromSecurityIndication
(
Ngap_SecurityIndication_t
*
securityIndication
)
{
integrityProtectionIndication
=
new
IntegrityProtectionIndication
();
confidentialityProtectionIndication
=
new
ConfidentialityProtectionIndication
();
if
(
!
integrityProtectionIndication
)
integrityProtectionIndication
=
new
IntegrityProtectionIndication
();
if
(
!
confidentialityProtectionIndication
)
confidentialityProtectionIndication
=
new
ConfidentialityProtectionIndication
();
if
(
!
integrityProtectionIndication
->
decodefromIntegrityProtectionIndication
(
securityIndication
->
integrityProtectionIndication
))
...
...
src/ngap/ngapIEs/ServedGUAMIItem.cpp
View file @
5103c14a
...
...
@@ -70,7 +70,7 @@ bool ServedGUAMIItem::encode2ServedGUAMIItem(
//------------------------------------------------------------------------------
bool
ServedGUAMIItem
::
decodefromServedGUAMIItem
(
Ngap_ServedGUAMIItem
*
pdu
)
{
guamiGroup
=
new
GUAMI
();
if
(
!
guamiGroup
)
guamiGroup
=
new
GUAMI
();
if
(
!
guamiGroup
->
decodefromGUAMI
(
&
pdu
->
gUAMI
))
return
false
;
if
(
pdu
->
backupAMFName
)
{
backupAMFNameIsSet
=
true
;
...
...
src/ngap/ngapIEs/UEAssociationLogicalNGConnectionItem.cpp
View file @
5103c14a
...
...
@@ -105,7 +105,7 @@ bool UEAssociationLogicalNGConnectionItem::encode(
//------------------------------------------------------------------------------
bool
UEAssociationLogicalNGConnectionItem
::
decode
(
Ngap_UE_associatedLogicalNG_connectionItem_t
*
item
)
{
amfUeNgapId
=
new
AMF_UE_NGAP_ID
();
if
(
!
amfUeNgapId
)
amfUeNgapId
=
new
AMF_UE_NGAP_ID
();
if
(
!
amfUeNgapId
->
decodefromAMF_UE_NGAP_ID
(
*
item
->
aMF_UE_NGAP_ID
))
{
cout
<<
"Decoded NGAP AMF_UE_NGAP_ID IE error"
<<
endl
;
return
false
;
...
...
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
View file @
5103c14a
...
...
@@ -24,6 +24,11 @@
#include <iostream>
#include <vector>
using
namespace
std
;
extern
"C"
{
#include "dynamic_memory_check.h"
}
namespace
ngap
{
dRBSubjectList
::
dRBSubjectList
()
{
drbsubjectitem
=
nullptr
;
...
...
@@ -46,7 +51,10 @@ bool dRBSubjectList::encodefromdRBSubjectlist(
1
,
sizeof
(
Ngap_DRBsSubjectToStatusTransferItem_t
));
if
(
!
ie
)
return
false
;
if
(
!
drbsubjectitem
)
return
false
;
if
(
!
drbsubjectitem
)
{
free_wrapper
((
void
**
)
&
ie
);
return
false
;
}
if
(
!
drbsubjectitem
[
i
].
encodedRBSubjectItem
(
ie
))
{
cout
<<
"encodefromdRBSubjectlist error"
<<
endl
;
return
false
;
...
...
src/ngap/ngapMsgs/DownlinkRANStatusTransfer.cpp
View file @
5103c14a
...
...
@@ -104,7 +104,7 @@ void DownlinkRANStatusTransfer::setRANStatusTransfer_TransparentContainer(
new
RANStatusTransferTransparentContainer
();
}
Ngap_DRB_ID_t
*
dRB_id
=
(
Ngap_DRB_ID_t
*
)
calloc
(
1
,
sizeof
(
Ngap_DRB_ID_t
));
dRB_id
=
&
drb_id
;
*
dRB_id
=
drb_id
;
COUNTValueForPDCP_SN18
*
UL_value
=
(
COUNTValueForPDCP_SN18
*
)
calloc
(
1
,
sizeof
(
COUNTValueForPDCP_SN18
));
UL_value
->
setvalue
(
ul_pcdp
,
ul_hfn_pdcp
);
...
...
src/ngap/ngapMsgs/HandoverPreparationFailure.cpp
View file @
5103c14a
...
...
@@ -45,6 +45,7 @@ HandoverPreparationFailure::HandoverPreparationFailure() {
ranUeNgapId
=
nullptr
;
cause
=
nullptr
;
hoPreparationFailureIEs
=
nullptr
;
hoPreparationFailurePdu
=
nullptr
;
CriticalityDiagnostics
=
nullptr
;
}
...
...
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.cpp
View file @
5103c14a
...
...
@@ -53,6 +53,7 @@ PduSessionResourceSetupRequestMsg::PduSessionResourceSetupRequestMsg() {
nasPdu
=
nullptr
;
pduSessionResourceSetupRequestList
=
nullptr
;
uEAggregateMaxBitRate
=
nullptr
;
pduSessionAggregateMaximumBitRate
=
nullptr
;
}
//------------------------------------------------------------------------------
...
...
@@ -78,6 +79,7 @@ void PduSessionResourceSetupRequestMsg::setUEAggregateMaxBitRate(
ie
->
value
.
choice
.
UEAggregateMaximumBitRate
);
if
(
!
ret
)
{
Logger
::
ngap
().
error
(
"Encode NGAP UEAggregateMaxBitRate IE error"
);
free_wrapper
((
void
**
)
&
ie
);
return
;
}
...
...
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