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
d9ecd50f
Commit
d9ecd50f
authored
Apr 29, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for GUTI identity
parent
c2fa450b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
5 deletions
+22
-5
src/common/conversions.cpp
src/common/conversions.cpp
+12
-0
src/common/conversions.hpp
src/common/conversions.hpp
+1
-0
src/nas/ies/5GSMobilityIdentity.cpp
src/nas/ies/5GSMobilityIdentity.cpp
+2
-1
src/nas/msgs/DeregistrationRequest.cpp
src/nas/msgs/DeregistrationRequest.cpp
+4
-2
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+2
-1
src/nas/msgs/RegistrationRequest.hpp
src/nas/msgs/RegistrationRequest.hpp
+1
-1
No files found.
src/common/conversions.cpp
View file @
d9ecd50f
...
...
@@ -120,6 +120,18 @@ std::string conv::mncToString(
return
s
;
}
//------------------------------------------------------------------------------
std
::
string
conv
::
tmsi_to_string
(
const
uint32_t
tmsi
)
{
std
::
string
s
=
{};
std
::
string
tmsi_str
=
std
::
to_string
(
tmsi
);
uint8_t
length
=
4
-
tmsi_str
.
size
();
for
(
uint8_t
i
=
0
;
i
<
length
;
i
++
)
{
s
.
append
(
"0"
);
}
s
.
append
(
std
::
to_string
(
tmsi
));
return
s
;
}
//------------------------------------------------------------------------------
struct
in_addr
conv
::
fromString
(
const
std
::
string
addr4
)
{
unsigned
char
buf
[
sizeof
(
struct
in6_addr
)]
=
{};
...
...
src/common/conversions.hpp
View file @
d9ecd50f
...
...
@@ -63,6 +63,7 @@ class conv {
const
uint8_t
digit1
,
const
uint8_t
digit2
,
const
uint8_t
digit3
);
static
std
::
string
mncToString
(
const
uint8_t
digit1
,
const
uint8_t
digit2
,
const
uint8_t
digit3
);
static
std
::
string
tmsi_to_string
(
const
uint32_t
tmsi
);
static
void
msg_str_2_msg_hex
(
std
::
string
msg
,
bstring
&
b
);
static
char
*
bstring2charString
(
bstring
b
);
...
...
src/nas/ies/5GSMobilityIdentity.cpp
View file @
d9ecd50f
...
...
@@ -31,6 +31,7 @@
#include <math.h>
#include "3gpp_ts24501.hpp"
#include "conversions.hpp"
#include "String2Value.hpp"
#include "logger.hpp"
...
...
@@ -164,7 +165,7 @@ int _5GSMobilityIdentity::_5g_s_tmsi_decodefrombuffer(uint8_t* buf, int len) {
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
3
]
=
octet
;
tmsi
|=
octet
<<
24
;
_5g_s_tmsi
->
_5g_tmsi
=
(
const
string
)(
std
::
to_string
(
tmsi
)
);
_5g_s_tmsi
->
_5g_tmsi
=
conv
::
tmsi_to_string
(
tmsi
);
return
decoded_size
;
}
...
...
src/nas/msgs/DeregistrationRequest.cpp
View file @
d9ecd50f
...
...
@@ -31,8 +31,10 @@
#include <string>
#include "3gpp_ts24501.hpp"
#include "
String2Value
.hpp"
#include "
conversions
.hpp"
#include "logger.hpp"
#include "String2Value.hpp"
using
namespace
nas
;
//------------------------------------------------------------------------------
...
...
@@ -135,7 +137,7 @@ std::string DeregistrationRequest::get_5g_guti() {
std
::
string
guti_str
=
guti
.
mcc
+
guti
.
mnc
+
std
::
to_string
(
guti
.
amf_region_id
)
+
std
::
to_string
(
guti
.
amf_set_id
)
+
std
::
to_string
(
guti
.
amf_pointer
)
+
std
::
to_string
(
guti
.
_5g_tmsi
);
conv
::
tmsi_
to_string
(
guti
.
_5g_tmsi
);
Logger
::
nas_mm
().
debug
(
"5G GUTI %s"
,
guti_str
.
c_str
());
return
guti_str
;
}
else
{
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
d9ecd50f
...
...
@@ -29,6 +29,7 @@
#include "RegistrationRequest.hpp"
#include "3gpp_ts24501.hpp"
#include "conversions.hpp"
#include "String2Value.hpp"
#include "logger.hpp"
using
namespace
nas
;
...
...
@@ -145,7 +146,7 @@ std::string RegistrationRequest::get_5g_guti() {
std
::
string
guti_str
=
guti
.
mcc
+
guti
.
mnc
+
std
::
to_string
(
guti
.
amf_region_id
)
+
std
::
to_string
(
guti
.
amf_set_id
)
+
std
::
to_string
(
guti
.
amf_pointer
)
+
std
::
to_string
(
guti
.
_5g_tmsi
);
conv
::
tmsi_
to_string
(
guti
.
_5g_tmsi
);
Logger
::
nas_mm
().
debug
(
"5G GUTI %s"
,
guti_str
.
c_str
());
return
guti_str
;
}
else
{
...
...
src/nas/msgs/RegistrationRequest.hpp
View file @
d9ecd50f
...
...
@@ -95,7 +95,7 @@ class RegistrationRequest {
bool
get5GSRegistrationType
(
bool
&
is_for
,
uint8_t
&
reg_type
/*3bits*/
);
bool
getngKSI
(
uint8_t
&
ng_ksi
);
uint8_t
getMobilityIdentityType
();
std
::
string
get_5g_guti
();
//"error" for missing IE GUTI
std
::
string
get_5g_guti
();
bool
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
);
uint8_t
getNonCurrentNativeNasKSI
();
uint8_t
get5GMMCapability
();
...
...
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