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
c892f4d6
Commit
c892f4d6
authored
Jan 15, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Identity Response
parent
30c34599
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
118 additions
and
105 deletions
+118
-105
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+11
-11
src/nas/msgs/DeregistrationRequest.cpp
src/nas/msgs/DeregistrationRequest.cpp
+4
-4
src/nas/msgs/DeregistrationRequest.hpp
src/nas/msgs/DeregistrationRequest.hpp
+4
-4
src/nas/msgs/IdentityRequest.hpp
src/nas/msgs/IdentityRequest.hpp
+2
-0
src/nas/msgs/IdentityResponse.cpp
src/nas/msgs/IdentityResponse.cpp
+64
-50
src/nas/msgs/IdentityResponse.hpp
src/nas/msgs/IdentityResponse.hpp
+15
-18
src/nas/msgs/RegistrationAccept.cpp
src/nas/msgs/RegistrationAccept.cpp
+4
-4
src/nas/msgs/RegistrationAccept.hpp
src/nas/msgs/RegistrationAccept.hpp
+5
-5
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+4
-4
src/nas/msgs/RegistrationRequest.hpp
src/nas/msgs/RegistrationRequest.hpp
+4
-4
src/nas/msgs/ULNASTransport.cpp
src/nas/msgs/ULNASTransport.cpp
+1
-1
No files found.
src/amf-app/amf_n1.cpp
View file @
c892f4d6
...
@@ -705,17 +705,17 @@ void amf_n1::identity_response_handle(
...
@@ -705,17 +705,17 @@ void amf_n1::identity_response_handle(
bstring
plain_msg
)
{
bstring
plain_msg
)
{
auto
identity_response
=
std
::
make_unique
<
IdentityResponse
>
();
auto
identity_response
=
std
::
make_unique
<
IdentityResponse
>
();
if
(
!
identity_response
->
Decode
(
if
(
!
identity_response
->
Decode
(
NULL
,
(
uint8_t
*
)
bdata
(
plain_msg
),
blength
(
plain_msg
)))
{
(
uint8_t
*
)
bdata
(
plain_msg
),
blength
(
plain_msg
)))
{
Logger
::
amf_n1
().
error
(
"Decode Identity Response error"
);
Logger
::
amf_n1
().
error
(
"Decode Identity Response error"
);
return
;
return
;
}
}
string
supi
=
{};
string
supi
=
{};
if
(
identity_response
->
ie_mobility_id
)
{
//_5GSMobileIdentity mobile_identity = {};
nas
::
SUCI_imsi_t
imsi
;
// TODO: avoid accessing member function directly
identity_response
->
ie_mobility_id
->
GetSuciWithSupiImsi
(
imsi
)
;
nas
::
SUCI_imsi_t
imsi
=
{}
;
supi
=
imsi
.
mcc
+
imsi
.
mnc
+
imsi
.
msin
;
identity_response
->
ie_mobile_identity
.
GetSuciWithSupiImsi
(
imsi
)
;
Logger
::
amf_n1
().
debug
(
"Identity Response: SUCI (%s)"
,
supi
.
c_str
())
;
supi
=
imsi
.
mcc
+
imsi
.
mnc
+
imsi
.
msin
;
}
Logger
::
amf_n1
().
debug
(
"Identity Response: SUCI (%s)"
,
supi
.
c_str
());
string
ue_context_key
=
"app_ue_ranid_"
+
to_string
(
ran_ue_ngap_id
)
+
string
ue_context_key
=
"app_ue_ranid_"
+
to_string
(
ran_ue_ngap_id
)
+
":amfid_"
+
to_string
(
amf_ue_ngap_id
);
":amfid_"
+
to_string
(
amf_ue_ngap_id
);
...
@@ -2540,7 +2540,7 @@ void amf_n1::security_mode_complete_handle(
...
@@ -2540,7 +2540,7 @@ void amf_n1::security_mode_complete_handle(
// TODO:
// TODO:
return
;
return
;
}
}
registration_accept
->
set5G_GUTI
(
registration_accept
->
Set5gGuti
(
mcc
,
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
AmfSetID
,
mcc
,
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
tmsi
);
amf_cfg
.
guami
.
AmfPointer
,
tmsi
);
...
@@ -3373,7 +3373,7 @@ void amf_n1::run_mobility_registration_update_procedure(
...
@@ -3373,7 +3373,7 @@ void amf_n1::run_mobility_registration_update_procedure(
return
;
return
;
}
}
reg_accept
->
set5G_GUTI
(
reg_accept
->
Set5gGuti
(
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
...
@@ -3457,7 +3457,7 @@ void amf_n1::run_periodic_registration_update_procedure(
...
@@ -3457,7 +3457,7 @@ void amf_n1::run_periodic_registration_update_procedure(
return
;
return
;
}
}
reg_accept
->
set5G_GUTI
(
reg_accept
->
Set5gGuti
(
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
...
@@ -3525,7 +3525,7 @@ void amf_n1::run_periodic_registration_update_procedure(
...
@@ -3525,7 +3525,7 @@ void amf_n1::run_periodic_registration_update_procedure(
return
;
return
;
}
}
reg_accept
->
set5G_GUTI
(
reg_accept
->
Set5gGuti
(
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
...
...
src/nas/msgs/DeregistrationRequest.cpp
View file @
c892f4d6
...
@@ -97,7 +97,7 @@ bool DeregistrationRequest::getngKSI(uint8_t& ng_ksi) {
...
@@ -97,7 +97,7 @@ bool DeregistrationRequest::getngKSI(uint8_t& ng_ksi) {
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
DeregistrationRequest
::
setSUCI_SUPI_format_IMSI
(
void
DeregistrationRequest
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
)
{
uint8_t
protection_sch_id
,
const
string
msin
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
...
@@ -151,15 +151,15 @@ std::string DeregistrationRequest::get_5g_guti() {
...
@@ -151,15 +151,15 @@ std::string DeregistrationRequest::get_5g_guti() {
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
DeregistrationRequest
::
setSUCI_SUPI_format_IMSI
(
void
DeregistrationRequest
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{}
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
DeregistrationRequest
::
set5G_GUTI
()
{}
void
DeregistrationRequest
::
Set5gGuti
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
DeregistrationRequest
::
setIMEI_IMEISV
()
{}
void
DeregistrationRequest
::
SetImeiImeisv
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
DeregistrationRequest
::
Set5gSTmsi
()
{}
void
DeregistrationRequest
::
Set5gSTmsi
()
{}
...
...
src/nas/msgs/DeregistrationRequest.hpp
View file @
c892f4d6
...
@@ -46,14 +46,14 @@ class DeregistrationRequest {
...
@@ -46,14 +46,14 @@ class DeregistrationRequest {
void
SetNgKsi
(
uint8_t
tsc
,
uint8_t
key_set_id
);
void
SetNgKsi
(
uint8_t
tsc
,
uint8_t
key_set_id
);
void
setMobilityIdentityType
(
uint8_t
type
);
void
setMobilityIdentityType
(
uint8_t
type
);
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
);
uint8_t
protection_sch_id
,
const
string
msin
);
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
void
set5G_GUTI
();
void
Set5gGuti
();
void
setIMEI_IMEISV
();
void
SetImeiImeisv
();
void
Set5gSTmsi
();
void
Set5gSTmsi
();
void
getDeregistrationType
(
uint8_t
&
dereg_type
);
void
getDeregistrationType
(
uint8_t
&
dereg_type
);
...
...
src/nas/msgs/IdentityRequest.hpp
View file @
c892f4d6
...
@@ -35,7 +35,9 @@ class IdentityRequest : public NasMmPlainHeader {
...
@@ -35,7 +35,9 @@ class IdentityRequest : public NasMmPlainHeader {
int
Decode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
);
void
SetHeader
(
uint8_t
security_header_type
);
void
SetHeader
(
uint8_t
security_header_type
);
void
Set5gsIdentityType
(
uint8_t
value
);
void
Set5gsIdentityType
(
uint8_t
value
);
// TODO: Get
public:
public:
_5gsIdentityType
_5gs_identity_type_
;
// Mandatory
_5gsIdentityType
_5gs_identity_type_
;
// Mandatory
...
...
src/nas/msgs/IdentityResponse.cpp
View file @
c892f4d6
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "IdentityResponse.hpp"
#include "IdentityResponse.hpp"
#include "3gpp_24.501.hpp"
#include "3gpp_24.501.hpp"
...
@@ -34,88 +27,109 @@
...
@@ -34,88 +27,109 @@
using
namespace
nas
;
using
namespace
nas
;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
IdentityResponse
::
IdentityResponse
()
{
IdentityResponse
::
IdentityResponse
()
Logger
::
nas_mm
().
debug
(
"initiating class IdentityResponse"
);
:
NasMmPlainHeader
(
EPD_5GS_MM_MSG
,
IDENTITY_RESPONSE
)
{}
plain_header
=
NULL
;
ie_mobility_id
=
NULL
;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
IdentityResponse
::~
IdentityResponse
()
{}
IdentityResponse
::~
IdentityResponse
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
IdentityResponse
::
SetHeader
(
uint8_t
security_header_type
)
{
void
IdentityResponse
::
SetHeader
(
uint8_t
security_header_type
)
{
plain_header
=
new
NasMmPlainHeader
();
NasMmPlainHeader
::
SetSecurityHeaderType
(
security_header_type
);
plain_header
->
SetHeader
(
EPD_5GS_MM_MSG
,
security_header_type
,
IDENTITY_RESPONSE
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
IdentityResponse
::
setSUCI_SUPI_format_IMSI
(
void
IdentityResponse
::
Get5gsMobileIdentity
(
_5GSMobileIdentity
&
mobile_identity
)
const
{
mobile_identity
=
ie_mobile_identity
;
}
//------------------------------------------------------------------------------
void
IdentityResponse
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
)
{
uint8_t
protection_sch_id
,
const
string
msin
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
Logger
::
nas_mm
().
error
(
Logger
::
nas_mm
().
error
(
"
e
ncoding suci and supi format for imsi error, please choose right "
"
E
ncoding suci and supi format for imsi error, please choose right "
"interface"
);
"interface"
);
return
;
return
;
}
else
{
}
else
{
ie_mobility_id
=
new
_5GSMobileIdentity
();
ie_mobile_identity
.
SetSuciWithSupiImsi
(
ie_mobility_id
->
SetSuciWithSupiImsi
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
}
}
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
IdentityResponse
::
setSUCI_SUPI_format_IMSI
(
void
IdentityResponse
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{}
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{
// TODO:
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
IdentityResponse
::
set5G_GUTI
()
{}
void
IdentityResponse
::
Set5gGuti
()
{
// TODO:
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
IdentityResponse
::
setIMEI_IMEISV
()
{}
void
IdentityResponse
::
SetImeiImeisv
()
{
// TODO:
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
IdentityResponse
::
Set5gSTmsi
()
{}
void
IdentityResponse
::
Set5gSTmsi
()
{
// TODO:
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
IdentityResponse
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
int
IdentityResponse
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"encoding IdentityResponse message"
);
Logger
::
nas_mm
().
debug
(
"encoding IdentityResponse message"
);
int
encoded_size
=
0
;
int
encoded_size
=
0
;
if
(
!
plain_header
)
{
int
encoded_ie_size
=
0
;
Logger
::
nas_mm
().
error
(
"Mandatory IE missing Header"
);
return
0
;
// Header
if
((
encoded_ie_size
=
NasMmPlainHeader
::
Encode
(
buf
,
len
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding NAS Header error"
);
return
KEncodeDecodeError
;
}
}
if
(
!
(
plain_header
->
Encode
(
buf
,
len
)))
return
0
;
encoded_size
+=
encoded_ie_size
;
encoded_size
+=
3
;
if
(
!
ie_mobility_id
)
{
// Mobile Identity
Logger
::
nas_mm
().
warn
(
"IE ie_mobility_id is not available"
);
int
size
=
ie_mobile_identity
.
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
);
if
(
size
!=
KEncodeDecodeError
)
{
encoded_size
+=
size
;
}
else
{
}
else
{
if
(
int
size
=
Logger
::
nas_mm
().
error
(
"encoding ie_mobile_identity error"
);
ie_mobility_id
->
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
return
KEncodeDecodeError
;
encoded_size
+=
size
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_mobility_id error"
);
return
0
;
}
}
}
Logger
::
nas_mm
().
debug
(
Logger
::
nas_mm
().
debug
(
"encoded IdentityResponse message len(%d)"
,
encoded_size
);
"encoded IdentityResponse message len
(%d)"
,
encoded_size
);
return
1
;
return
encoded_size
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
IdentityResponse
::
Decode
(
NasMmPlainHeader
*
header
,
uint8_t
*
buf
,
int
len
)
{
int
IdentityResponse
::
Decode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"decoding IdentityResponse message"
);
Logger
::
nas_mm
().
debug
(
"Decoding IdentityResponse message"
);
int
decoded_size
=
3
;
plain_header
=
header
;
int
decoded_size
=
0
;
ie_mobility_id
=
new
_5GSMobileIdentity
();
int
decoded_result
=
0
;
decoded_size
+=
ie_mobility_id
->
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
false
);
// Header
Logger
::
nas_mm
().
debug
(
"decoded_size(%d)"
,
decoded_size
);
decoded_result
=
NasMmPlainHeader
::
Decode
(
buf
,
len
);
if
(
decoded_result
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Decoding NAS Header error"
);
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
// Mobile Identity
decoded_result
=
ie_mobile_identity
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
false
);
if
(
decoded_result
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_result
;
Logger
::
nas_mm
().
debug
(
Logger
::
nas_mm
().
debug
(
"decoded IdentityResponse message len(%d)"
,
decoded_size
);
"decoded IdentityResponse message len(%d)"
,
decoded_size
);
return
tru
e
;
return
decoded_siz
e
;
}
}
src/nas/msgs/IdentityResponse.hpp
View file @
c892f4d6
...
@@ -19,40 +19,37 @@
...
@@ -19,40 +19,37 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file
#ifndef _IDENTITY_RESPONSE_H_
\brief
#define _IDENTITY_RESPONSE_H_
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _IdentityResponse_H_
#define _IdentityResponse_H_
#include "NasIeHeader.hpp"
#include "NasIeHeader.hpp"
namespace
nas
{
namespace
nas
{
class
IdentityResponse
{
class
IdentityResponse
:
public
NasMmPlainHeader
{
public:
public:
IdentityResponse
();
IdentityResponse
();
~
IdentityResponse
();
~
IdentityResponse
();
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
NasMmPlainHeader
*
header
,
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
);
void
SetHeader
(
uint8_t
security_header_type
);
void
SetHeader
(
uint8_t
security_header_type
);
void
setSUCI_SUPI_format_IMSI
(
void
Get5gsMobileIdentity
(
_5GSMobileIdentity
&
mobile_identity
)
const
;
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
);
uint8_t
protection_sch_id
,
const
string
msin
);
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
void
set5G_GUTI
();
void
Set5gGuti
();
void
setIMEI_IMEISV
();
void
SetImeiImeisv
();
void
Set5gSTmsi
();
void
Set5gSTmsi
();
/*** belongs to _5GSMobileIdentity**/
public:
public:
NasMmPlainHeader
*
plain_header
;
_5GSMobileIdentity
ie_mobile_identity
;
// Mandatory
_5GSMobileIdentity
*
ie_mobility_id
;
};
};
}
// namespace nas
}
// namespace nas
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
c892f4d6
...
@@ -82,7 +82,7 @@ void RegistrationAccept::set5GSRegistrationResult(
...
@@ -82,7 +82,7 @@ void RegistrationAccept::set5GSRegistrationResult(
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setSUCI_SUPI_format_IMSI
(
void
RegistrationAccept
::
SetSuciSupiFormatImsi
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
std
::
string
&
msin
)
{
const
std
::
string
&
msin
)
{
...
@@ -101,7 +101,7 @@ void RegistrationAccept::setSUCI_SUPI_format_IMSI(
...
@@ -101,7 +101,7 @@ void RegistrationAccept::setSUCI_SUPI_format_IMSI(
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setSUCI_SUPI_format_IMSI
(
void
RegistrationAccept
::
SetSuciSupiFormatImsi
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
uint8_t
&
hnpki
,
const
std
::
string
&
msin
)
{
const
uint8_t
&
hnpki
,
const
std
::
string
&
msin
)
{
...
@@ -109,7 +109,7 @@ void RegistrationAccept::setSUCI_SUPI_format_IMSI(
...
@@ -109,7 +109,7 @@ void RegistrationAccept::setSUCI_SUPI_format_IMSI(
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
set5G_GUTI
(
void
RegistrationAccept
::
Set5gGuti
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
amfRegionId
,
const
std
::
string
&
amfSetId
,
const
std
::
string
&
amfRegionId
,
const
std
::
string
&
amfSetId
,
const
std
::
string
&
amfPointer
,
const
uint32_t
&
tmsi
)
{
const
std
::
string
&
amfPointer
,
const
uint32_t
&
tmsi
)
{
...
@@ -124,7 +124,7 @@ void RegistrationAccept::set5G_GUTI(
...
@@ -124,7 +124,7 @@ void RegistrationAccept::set5G_GUTI(
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setIMEI_IMEISV
()
{}
void
RegistrationAccept
::
SetImeiImeisv
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
Set5gSTmsi
()
{}
void
RegistrationAccept
::
Set5gSTmsi
()
{}
...
...
src/nas/msgs/RegistrationAccept.hpp
View file @
c892f4d6
...
@@ -43,20 +43,20 @@ class RegistrationAccept : public NasMmPlainHeader {
...
@@ -43,20 +43,20 @@ class RegistrationAccept : public NasMmPlainHeader {
// TODO: Get
// TODO: Get
// 5GSMobileIdentity
// 5GSMobileIdentity
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
std
::
string
&
msin
);
const
std
::
string
&
msin
);
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
std
::
string
&
routingInd
,
const
uint8_t
&
protection_sch_id
,
const
uint8_t
&
hnpki
,
const
std
::
string
&
msin
);
const
uint8_t
&
hnpki
,
const
std
::
string
&
msin
);
void
set5G_GUTI
(
void
Set5gGuti
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
amfRegionId
,
const
std
::
string
&
amfSetId
,
const
std
::
string
&
amfRegionId
,
const
std
::
string
&
amfSetId
,
const
std
::
string
&
amfPointer
,
const
uint32_t
&
tmsi
);
const
std
::
string
&
amfPointer
,
const
uint32_t
&
tmsi
);
void
setIMEI_IMEISV
();
// TODO:
void
SetImeiImeisv
();
// TODO:
void
Set5gSTmsi
();
// TODO:
void
Set5gSTmsi
();
// TODO:
// TODO: Get
// TODO: Get
// Equivalent PLMNs
// Equivalent PLMNs
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
c892f4d6
...
@@ -90,7 +90,7 @@ bool RegistrationRequest::getngKSI(uint8_t& ng_ksi) {
...
@@ -90,7 +90,7 @@ bool RegistrationRequest::getngKSI(uint8_t& ng_ksi) {
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setSUCI_SUPI_format_IMSI
(
void
RegistrationRequest
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
)
{
uint8_t
protection_sch_id
,
const
string
msin
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
...
@@ -157,15 +157,15 @@ bool RegistrationRequest::getAdditionalGuti(nas::_5G_GUTI_t& guti) {
...
@@ -157,15 +157,15 @@ bool RegistrationRequest::getAdditionalGuti(nas::_5G_GUTI_t& guti) {
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setSUCI_SUPI_format_IMSI
(
void
RegistrationRequest
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{}
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationRequest
::
set5G_GUTI
()
{}
void
RegistrationRequest
::
Set5gGuti
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setIMEI_IMEISV
()
{}
void
RegistrationRequest
::
SetImeiImeisv
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationRequest
::
Set5gSTmsi
()
{}
void
RegistrationRequest
::
Set5gSTmsi
()
{}
...
...
src/nas/msgs/RegistrationRequest.hpp
View file @
c892f4d6
...
@@ -53,18 +53,18 @@ class RegistrationRequest : public NasMmPlainHeader {
...
@@ -53,18 +53,18 @@ class RegistrationRequest : public NasMmPlainHeader {
uint8_t
getMobileIdentityType
();
uint8_t
getMobileIdentityType
();
// TODO: SetMobileIdentityType(uint8_t);
// TODO: SetMobileIdentityType(uint8_t);
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
);
uint8_t
protection_sch_id
,
const
string
msin
);
void
setSUCI_SUPI_format_IMSI
(
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
bool
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
);
bool
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
);
void
set5G_GUTI
();
void
Set5gGuti
();
std
::
string
get_5g_guti
();
std
::
string
get_5g_guti
();
void
setIMEI_IMEISV
();
void
SetImeiImeisv
();
void
Set5gSTmsi
();
void
Set5gSTmsi
();
void
setAdditional_GUTI_SUCI_SUPI_format_IMSI
(
void
setAdditional_GUTI_SUCI_SUPI_format_IMSI
(
const
string
mcc
,
const
string
mnc
,
uint8_t
amf_region_id
,
const
string
mcc
,
const
string
mnc
,
uint8_t
amf_region_id
,
...
...
src/nas/msgs/ULNASTransport.cpp
View file @
c892f4d6
...
@@ -338,7 +338,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
...
@@ -338,7 +338,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
decoded_size
++
;
// 1/2 octet for PayloadContainerType, 1/2 octet for spare
decoded_size
++
;
// 1/2 octet for PayloadContainerType, 1/2 octet for spare
// Payload Container
// Payload Container
decoded_result
+
=
ie_payload_container
.
Decode
(
decoded_result
=
ie_payload_container
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
false
,
buf
+
decoded_size
,
len
-
decoded_size
,
false
,
ie_payload_container_type
.
GetValue
());
ie_payload_container_type
.
GetValue
());
if
(
decoded_result
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
if
(
decoded_result
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
...
...
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