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
9589186d
Commit
9589186d
authored
Jun 24, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix to ignore SD for SST<=127 for the moment (TODO: for SST<=127 with SD)
parent
508b7d51
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+5
-1
src/nas/ies/NSSAI.cpp
src/nas/ies/NSSAI.cpp
+8
-7
src/ngap/ngapIEs/S-NSSAI.cpp
src/ngap/ngapIEs/S-NSSAI.cpp
+1
-2
No files found.
src/amf-app/amf_n1.cpp
View file @
9589186d
...
@@ -3766,7 +3766,11 @@ void amf_n1::initialize_registration_accept(
...
@@ -3766,7 +3766,11 @@ void amf_n1::initialize_registration_accept(
for
(
auto
s
:
p
.
slice_list
)
{
for
(
auto
s
:
p
.
slice_list
)
{
SNSSAI_t
snssai
=
{};
SNSSAI_t
snssai
=
{};
snssai
.
sst
=
s
.
sst
;
snssai
.
sst
=
s
.
sst
;
snssai
.
sd
=
SD_NO_VALUE
;
// Default value
// Get SD if available for non standardized SST
if
(
s
.
sst
>
SST_MAX_STANDARDIZED_VALUE
)
{
snssai
.
sd
=
s
.
sd
;
snssai
.
sd
=
s
.
sd
;
}
nssai
.
push_back
(
snssai
);
nssai
.
push_back
(
snssai
);
}
}
}
}
...
...
src/nas/ies/NSSAI.cpp
View file @
9589186d
...
@@ -31,8 +31,9 @@
...
@@ -31,8 +31,9 @@
#include <vector>
#include <vector>
#include "logger.hpp"
#include "logger.hpp"
#include "amf.hpp"
using
namespace
nas
;
using
namespace
nas
;
using
namespace
std
;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
NSSAI
::
NSSAI
(
uint8_t
iei
)
{
NSSAI
::
NSSAI
(
uint8_t
iei
)
{
...
@@ -48,9 +49,9 @@ NSSAI::NSSAI(const uint8_t iei, std::vector<struct SNSSAI_s> nssai) {
...
@@ -48,9 +49,9 @@ NSSAI::NSSAI(const uint8_t iei, std::vector<struct SNSSAI_s> nssai) {
S_NSSAI
.
assign
(
nssai
.
begin
(),
nssai
.
end
());
S_NSSAI
.
assign
(
nssai
.
begin
(),
nssai
.
end
());
for
(
int
i
=
0
;
i
<
nssai
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
nssai
.
size
();
i
++
)
{
length
+=
2
;
// 1 for IEI and 1 for sst
length
+=
2
;
// 1 for IEI and 1 for sst
if
(
nssai
[
i
].
sd
!=
-
1
)
length
+=
3
;
if
(
nssai
[
i
].
sd
!=
SD_NO_VALUE
)
length
+=
3
;
if
(
nssai
[
i
].
mHplmnSst
!=
-
1
)
length
+=
1
;
if
(
nssai
[
i
].
mHplmnSst
!=
-
1
)
length
+=
1
;
if
(
nssai
[
i
].
mHplmnSd
!=
-
1
)
length
+=
3
;
if
(
nssai
[
i
].
mHplmnSd
!=
SD_NO_VALUE
)
length
+=
3
;
}
}
}
}
...
@@ -87,7 +88,7 @@ int NSSAI::encode2buffer(uint8_t* buf, int len) {
...
@@ -87,7 +88,7 @@ int NSSAI::encode2buffer(uint8_t* buf, int len) {
encoded_size
++
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
S_NSSAI
.
at
(
i
).
sst
;
*
(
buf
+
encoded_size
)
=
S_NSSAI
.
at
(
i
).
sst
;
encoded_size
++
;
encoded_size
++
;
if
(
S_NSSAI
.
at
(
i
).
sd
!=
-
1
)
{
if
(
S_NSSAI
.
at
(
i
).
sd
!=
SD_NO_VALUE
)
{
len_s_nssai
+=
3
;
len_s_nssai
+=
3
;
*
(
buf
+
encoded_size
)
=
(
S_NSSAI
.
at
(
i
).
sd
&
0x00ff0000
)
>>
16
;
*
(
buf
+
encoded_size
)
=
(
S_NSSAI
.
at
(
i
).
sd
&
0x00ff0000
)
>>
16
;
encoded_size
++
;
encoded_size
++
;
...
@@ -107,7 +108,7 @@ int NSSAI::encode2buffer(uint8_t* buf, int len) {
...
@@ -107,7 +108,7 @@ int NSSAI::encode2buffer(uint8_t* buf, int len) {
*
(
buf
+
encoded_size
)
=
S_NSSAI
.
at
(
i
).
mHplmnSst
;
*
(
buf
+
encoded_size
)
=
S_NSSAI
.
at
(
i
).
mHplmnSst
;
encoded_size
++
;
encoded_size
++
;
}
}
if
(
S_NSSAI
.
at
(
i
).
mHplmnSd
!=
-
1
)
{
if
(
S_NSSAI
.
at
(
i
).
mHplmnSd
!=
SD_NO_VALUE
)
{
len_s_nssai
+=
3
;
len_s_nssai
+=
3
;
*
(
buf
+
encoded_size
)
=
(
S_NSSAI
.
at
(
i
).
mHplmnSd
&
0x00ff0000
)
>>
16
;
*
(
buf
+
encoded_size
)
=
(
S_NSSAI
.
at
(
i
).
mHplmnSd
&
0x00ff0000
)
>>
16
;
encoded_size
++
;
encoded_size
++
;
...
@@ -145,7 +146,7 @@ int NSSAI::decodefrombuffer(uint8_t* buf, int len, bool is_option) {
...
@@ -145,7 +146,7 @@ int NSSAI::decodefrombuffer(uint8_t* buf, int len, bool is_option) {
a
.
sst
=
*
(
buf
+
decoded_size
);
a
.
sst
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
decoded_size
++
;
length_tmp
--
;
length_tmp
--
;
a
.
sd
=
0
;
a
.
sd
=
SD_NO_VALUE
;
a
.
mHplmnSst
=
0
;
a
.
mHplmnSst
=
0
;
a
.
mHplmnSd
=
0
;
a
.
mHplmnSd
=
0
;
}
break
;
}
break
;
...
@@ -189,7 +190,7 @@ int NSSAI::decodefrombuffer(uint8_t* buf, int len, bool is_option) {
...
@@ -189,7 +190,7 @@ int NSSAI::decodefrombuffer(uint8_t* buf, int len, bool is_option) {
a
.
mHplmnSst
=
*
(
buf
+
decoded_size
);
a
.
mHplmnSst
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
decoded_size
++
;
length_tmp
--
;
length_tmp
--
;
a
.
mHplmnSd
=
0
;
a
.
mHplmnSd
=
SD_NO_VALUE
;
}
break
;
}
break
;
case
8
:
{
case
8
:
{
decoded_size
++
;
decoded_size
++
;
...
...
src/ngap/ngapIEs/S-NSSAI.cpp
View file @
9589186d
...
@@ -152,11 +152,10 @@ bool S_NSSAI::encode2S_NSSAI(Ngap_S_NSSAI_t* s_NSSAI) {
...
@@ -152,11 +152,10 @@ bool S_NSSAI::encode2S_NSSAI(Ngap_S_NSSAI_t* s_NSSAI) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
bool
S_NSSAI
::
decodefromS_NSSAI
(
Ngap_S_NSSAI_t
*
s_NSSAI
)
{
bool
S_NSSAI
::
decodefromS_NSSAI
(
Ngap_S_NSSAI_t
*
s_NSSAI
)
{
if
(
!
sSTdecodefromOctetString
(
s_NSSAI
->
sST
))
return
false
;
if
(
!
sSTdecodefromOctetString
(
s_NSSAI
->
sST
))
return
false
;
sd
=
SD_NO_VALUE
;
if
(
s_NSSAI
->
sD
)
{
if
(
s_NSSAI
->
sD
)
{
sdIsSet
=
true
;
sdIsSet
=
true
;
if
(
!
sDdecodefromOctetString
(
s_NSSAI
->
sD
))
return
false
;
if
(
!
sDdecodefromOctetString
(
s_NSSAI
->
sD
))
return
false
;
}
else
{
sd
=
SD_NO_VALUE
;
}
}
return
true
;
return
true
;
}
}
...
...
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