Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AUSF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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-AUSF
Commits
000551a5
Commit
000551a5
authored
May 31, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
b184354a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
src/ausf_app/ausf_app.cpp
src/ausf_app/ausf_app.cpp
+2
-14
src/common/conversions.cpp
src/common/conversions.cpp
+5
-0
No files found.
src/ausf_app/ausf_app.cpp
View file @
000551a5
...
...
@@ -238,11 +238,6 @@ void ausf_app::handle_ue_authentications(
uint8_t
hxresStar
[
16
]
=
{
0
};
// Getting params from UDM 5G HE AV
// TODO: use std::copy instead of memcpy
// memcpy(xresStar_ausf, xresStar, 16); // xres*
// memcpy(rand_ausf, rand, 16); // rand
// memcpy(autn_ausf, autn, 16); // autn
// memcpy(kausf_ausf, kausf, 32); // kausf
std
::
copy
(
std
::
begin
(
xresStar
),
std
::
end
(
xresStar
),
std
::
begin
(
xresStar_ausf
));
std
::
copy
(
std
::
begin
(
rand
),
std
::
end
(
rand
),
std
::
begin
(
rand_ausf
));
...
...
@@ -275,23 +270,18 @@ void ausf_app::handle_ue_authentications(
// Update information
sc
->
supi_ausf
=
supi
;
// TODO: setter/getter
// memcpy(sc->ausf_av_s.rand, rand_ausf, 16); // store 5g av in ausf
std
::
copy
(
std
::
begin
(
rand_ausf
),
std
::
end
(
rand_ausf
),
std
::
begin
(
sc
->
ausf_av_s
.
rand
));
// memcpy(sc->ausf_av_s.autn, autn_ausf, 16);
std
::
copy
(
std
::
begin
(
autn_ausf
),
std
::
end
(
autn_ausf
),
std
::
begin
(
sc
->
ausf_av_s
.
autn
));
// memcpy(sc->ausf_av_s.hxresStar, hxresStar, 16);
std
::
copy
(
std
::
begin
(
hxresStar
),
std
::
end
(
hxresStar
),
std
::
begin
(
sc
->
ausf_av_s
.
hxresStar
));
// memcpy(sc->ausf_av_s.kseaf, kseaf, 32);
std
::
copy
(
std
::
begin
(
kseaf
),
std
::
end
(
kseaf
),
std
::
begin
(
sc
->
ausf_av_s
.
kseaf
));
// memcpy(sc->xres_star, xresStar, 16); // store xres* in
// ausf
// store xres* in ausf
std
::
copy
(
std
::
begin
(
xresStar
),
std
::
end
(
xresStar
),
std
::
begin
(
sc
->
xres_star
));
...
...
@@ -404,9 +394,7 @@ void ausf_app::handle_ue_authentications_confirmation(
Logger
::
ausf_server
().
info
(
"AV is up to date, handling received res*..."
);
// Get stored xres* and compare with res*
uint8_t
xresStar
[
16
]
=
{
0
};
// memcpy(
// xresStar, sc->xres_star, 16); // xres* stored for
// 5g-aka-confirmation
// xres* stored for 5g-aka-confirmation
std
::
copy
(
std
::
begin
(
sc
->
xres_star
),
std
::
end
(
sc
->
xres_star
),
std
::
begin
(
xresStar
));
...
...
src/common/conversions.cpp
View file @
000551a5
...
...
@@ -129,6 +129,7 @@ struct in_addr conv::fromString(const std::string addr4) {
struct
in_addr
*
ia
=
(
struct
in_addr
*
)
buf
;
return
*
ia
;
}
//------------------------------------------------------------------------------
std
::
string
conv
::
toString
(
const
struct
in_addr
&
inaddr
)
{
std
::
string
s
=
{};
...
...
@@ -142,6 +143,7 @@ std::string conv::toString(const struct in_addr& inaddr) {
return
s
;
}
//------------------------------------------------------------------------------
std
::
string
conv
::
toString
(
const
struct
in6_addr
&
in6addr
)
{
std
::
string
s
=
{};
char
str
[
INET6_ADDRSTRLEN
]
=
{};
...
...
@@ -154,6 +156,7 @@ std::string conv::toString(const struct in6_addr& in6addr) {
return
s
;
}
//------------------------------------------------------------------------------
// Convert data from UDM
std
::
string
conv
::
uint8_to_hex_string
(
const
uint8_t
*
v
,
const
size_t
s
)
{
std
::
stringstream
ss
;
...
...
@@ -167,6 +170,7 @@ std::string conv::uint8_to_hex_string(const uint8_t* v, const size_t s) {
return
ss
.
str
();
}
//------------------------------------------------------------------------------
void
conv
::
hex_str_to_uint8
(
const
char
*
string
,
uint8_t
*
des
)
{
if
(
string
==
NULL
)
return
;
...
...
@@ -199,6 +203,7 @@ void conv::hex_str_to_uint8(const char* string, uint8_t* des) {
}
}
//------------------------------------------------------------------------------
uint64_t
supi_to_u64
(
std
::
string
&
supi
)
{
uint64_t
uint_supi
;
...
...
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