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
6c897504
Commit
6c897504
authored
Sep 30, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First version for Mobile Identity
parent
d2eff68f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
154 additions
and
130 deletions
+154
-130
src/nas/ies/5GSMobileIdentity.cpp
src/nas/ies/5GSMobileIdentity.cpp
+116
-101
src/nas/ies/5GSMobileIdentity.hpp
src/nas/ies/5GSMobileIdentity.hpp
+26
-21
src/nas/msgs/DeregistrationRequest.cpp
src/nas/msgs/DeregistrationRequest.cpp
+3
-2
src/nas/msgs/IdentityResponse.cpp
src/nas/msgs/IdentityResponse.cpp
+3
-2
src/nas/msgs/RegistrationAccept.cpp
src/nas/msgs/RegistrationAccept.cpp
+3
-2
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+3
-2
No files found.
src/nas/ies/5GSMobileIdentity.cpp
View file @
6c897504
This diff is collapsed.
Click to expand it.
src/nas/ies/5GSMobileIdentity.hpp
View file @
6c897504
...
...
@@ -81,55 +81,61 @@ class _5GSMobileIdentity {
_5GSMobileIdentity
(
uint8_t
_iei
,
const
uint16_t
amfSetId
,
const
uint8_t
amfPointer
,
const
string
tmsi
);
// 5G-S-TMSI
_5GSMobileIdentity
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
);
// TODO: SetSUCI, SUCI and SUPI format IMSI
_5GSMobileIdentity
();
~
_5GSMobileIdentity
();
// Common
uint8_t
getTypeOfIdentity
()
const
{
return
typeOfIdentity
;
};
void
setIEI
(
uint8_t
_iei
);
int
encode2Buffer
(
uint8_t
*
buf
,
int
len
);
int
_5g_guti_encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
suci_encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
decodeFromBuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
int
encodeMccMnc2buffer
(
const
std
::
string
&
mcc_str
,
const
std
::
string
&
mnc_str
,
uint8_t
*
buf
);
int
encodeRoutid2buffer
(
string
routid
,
uint8_t
*
buf
);
int
encodeMSIN2buffer
(
string
msinstr
,
uint8_t
*
buf
);
int
_5g_s_tmsi_encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
_5g_s_tmsi_decodefrombuffer
(
uint8_t
*
buf
,
int
len
);
int
imeisv_encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
imeisv_decodefrombuffer
(
uint8_t
*
buf
,
int
len
);
int
decodeFromBuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
int
suci_decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
int
length
);
// 5G GUTI
int
_5g_guti_decodefrombuffer
(
uint8_t
*
buf
,
int
len
);
int
_5g_guti_encode2buffer
(
uint8_t
*
buf
,
int
len
);
void
set5GGUTI
(
const
string
&
mcc
,
const
string
&
mnc
,
const
uint8_t
&
amf_region_id
,
const
uint16_t
&
amf_set_id
,
const
uint8_t
&
amf_pointer
,
const
uint32_t
&
_5g_tmsi
);
void
get5GGUTI
(
std
::
optional
<
_5G_GUTI_t
>&
)
const
;
// SUCI
int
suci_decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
int
length
);
int
suci_encode2buffer
(
uint8_t
*
buf
,
int
len
);
void
setSuciWithSupiImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
);
// TODO: SetSUCI, SUCI and SUPI format IMSI
void
setSuciWithSupiImsi
(
const
string
&
mcc
,
const
string
&
mnc
,
const
string
&
routingInd
,
uint8_t
protecSchId
,
uint8_t
home_pki
,
const
string
&
msin_digits
);
/*
void setSuciWithSupiImsi(
const string& mcc, const string& mnc, const string& routingInd,
uint8_t protecSchId, const string& msin_digits);
*/
bool
getSuciWithSupiImsi
(
SUCI_imsi_t
&
);
int
encodeRoutid2buffer
(
string
routid
,
uint8_t
*
buf
);
int
encodeMSIN2buffer
(
string
msinstr
,
uint8_t
*
buf
);
// TMSI
int
_5g_s_tmsi_encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
_5g_s_tmsi_decodefrombuffer
(
uint8_t
*
buf
,
int
len
);
bool
get5G_S_TMSI
(
uint16_t
&
amfSetId
,
uint8_t
&
amfPointer
,
string
&
tmsi
);
// IMEISV
int
imeisv_encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
imeisv_decodefrombuffer
(
uint8_t
*
buf
,
int
len
);
void
setIMEISV
(
const
IMEISV_t
&
imeisv
);
bool
getIMEISV
(
IMEISV_t
&
imeisv
);
...
...
@@ -143,8 +149,7 @@ class _5GSMobileIdentity {
std
::
optional
<
IMEI_IMEISV_t
>
_imei
;
// TODO:
std
::
optional
<
IMEISV_t
>
_IMEISV
;
_5G_S_TMSI_t
*
_5g_s_tmsi
;
bool
is_no_identity
;
std
::
optional
<
_5G_S_TMSI_t
>
_5g_s_tmsi
;
};
}
// namespace nas
...
...
src/nas/msgs/DeregistrationRequest.cpp
View file @
6c897504
...
...
@@ -105,8 +105,9 @@ void DeregistrationRequest::setSUCI_SUPI_format_IMSI(
"protection scheme"
);
return
;
}
else
{
ie_5gs_mobility_id
=
new
_5GSMobileIdentity
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
ie_5gs_mobility_id
=
new
_5GSMobileIdentity
();
ie_5gs_mobility_id
->
setSuciWithSupiImsi
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
}
}
...
...
src/nas/msgs/IdentityResponse.cpp
View file @
6c897504
...
...
@@ -60,8 +60,9 @@ void IdentityResponse::setSUCI_SUPI_format_IMSI(
"interface"
);
return
;
}
else
{
ie_mobility_id
=
new
_5GSMobileIdentity
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
ie_mobility_id
=
new
_5GSMobileIdentity
();
ie_mobility_id
->
setSuciWithSupiImsi
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
}
}
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
6c897504
...
...
@@ -94,8 +94,9 @@ void RegistrationAccept::setSUCI_SUPI_format_IMSI(
"interface"
);
return
;
}
else
{
ie_5g_guti
=
new
_5GSMobileIdentity
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
ie_5g_guti
=
new
_5GSMobileIdentity
();
ie_5g_guti
->
setSuciWithSupiImsi
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
ie_5g_guti
->
setIEI
(
0x77
);
}
}
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
6c897504
...
...
@@ -104,8 +104,9 @@ void RegistrationRequest::setSUCI_SUPI_format_IMSI(
"interface"
);
return
;
}
else
{
ie_5gs_mobility_id
=
new
_5GSMobileIdentity
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
ie_5gs_mobility_id
=
new
_5GSMobileIdentity
();
ie_5gs_mobility_id
->
setSuciWithSupiImsi
(
mcc
,
mnc
,
routingInd
,
protection_sch_id
,
msin
);
}
}
...
...
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