Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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-SMF
Commits
4c2f4df0
Commit
4c2f4df0
authored
Mar 20, 2023
by
Stefan Spettel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into common_logger
parents
726dd9e0
3322d832
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
203 additions
and
158 deletions
+203
-158
src/common/smf.h
src/common/smf.h
+11
-0
src/common/utils/3gpp_conversions.cpp
src/common/utils/3gpp_conversions.cpp
+9
-2
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+166
-152
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+13
-0
src/smf_app/smf_n7.hpp
src/smf_app/smf_n7.hpp
+4
-4
No files found.
src/common/smf.h
View file @
4c2f4df0
...
...
@@ -60,6 +60,17 @@ static std::string smf_supi_to_string(supi_t const supi) {
return
supi_str
;
}
static
std
::
string
smf_get_supi_with_prefix
(
const
std
::
string
&
prefix
,
const
std
::
string
&
supi
)
{
std
::
string
supi_str
=
{};
if
(
!
prefix
.
empty
())
{
supi_str
=
prefix
+
"-"
+
supi
;
}
else
{
supi_str
=
supi
;
}
return
supi_str
;
}
// TODO should we just replace the other function? Because this null chars are
// annoying
static
std
::
string
smf_supi_to_string_without_nulls
(
supi_t
const
supi
)
{
...
...
src/common/utils/3gpp_conversions.cpp
View file @
4c2f4df0
...
...
@@ -184,9 +184,16 @@ void xgpp_conv::sm_context_create_from_openapi(
if
(
context_data
.
supiIsSet
())
{
// supi
supi_t
supi
=
{.
length
=
0
};
std
::
string
supi_str
=
{};
std
::
string
supi_prefix
=
{};
std
::
size_t
pos
=
context_data
.
getSupi
().
find
(
"-"
);
std
::
string
supi_str
=
context_data
.
getSupi
().
substr
(
pos
+
1
);
std
::
string
supi_prefix
=
context_data
.
getSupi
().
substr
(
0
,
pos
);
if
(
pos
!=
std
::
string
::
npos
)
{
supi_str
=
context_data
.
getSupi
().
substr
(
pos
+
1
);
supi_prefix
=
context_data
.
getSupi
().
substr
(
0
,
pos
);
}
else
{
supi_str
=
context_data
.
getSupi
();
}
smf_string_to_supi
(
&
supi
,
supi_str
.
c_str
());
pcr
.
set_supi
(
supi
);
pcr
.
set_supi_prefix
(
supi_prefix
);
...
...
src/smf_app/smf_context.cpp
View file @
4c2f4df0
This diff is collapsed.
Click to expand it.
src/smf_app/smf_context.hpp
View file @
4c2f4df0
...
...
@@ -1359,6 +1359,19 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
const
ng_ran_target_id_t
&
ran_target_id
,
const
pdu_session_id_t
&
pdu_session_id
)
const
;
/**
* Send a PDU Session Establishment response with a reject
* @param smreq Original request
* @param cause NAS cause value for PDU session establishment reject
* @param application_error PDU session establishment application error
* @param http_status
*/
void
send_pdu_session_establishment_response_reject
(
const
std
::
shared_ptr
<
itti_n11_create_sm_context_request
>
smreq
,
cause_value_5gsm_e
cause
,
pdu_session_application_error_e
application_error
,
http_status_code_e
http_status
);
/**
* Send a PDU session Create Response, based on the content of resp.
* @param resp
...
...
src/smf_app/smf_n7.hpp
View file @
4c2f4df0
...
...
@@ -72,8 +72,9 @@ struct policy_association {
std
::
string
pcf_location
;
void
set_context
(
const
std
::
string
&
supi
,
const
std
::
string
&
dnn
,
const
snssai_t
&
snssai
,
const
plmn_t
&
plmn
,
const
uint8_t
pdu_session_id
,
const
std
::
string
&
supi
,
const
std
::
string
&
supi_prefix
,
const
std
::
string
&
dnn
,
const
snssai_t
&
snssai
,
const
plmn_t
&
plmn
,
const
uint8_t
pdu_session_id
,
const
pdu_session_type_t
&
pdu_session_type
)
{
oai
::
smf_server
::
model
::
Snssai
snssai_model
;
snssai_model
.
setSst
(
snssai
.
sst
);
...
...
@@ -90,8 +91,7 @@ struct policy_association {
context
=
{};
context
.
setPduSessionId
(
pdu_session_id
);
// TODO only support imsi SUPI, not NAI
context
.
setSupi
(
"imsi-"
+
supi
);
context
.
setSupi
(
smf_get_supi_with_prefix
(
supi_prefix
,
supi
));
oai
::
smf_server
::
model
::
PduSessionType
pdu_session_type_model
;
// hacky
from_json
(
pdu_session_type
.
to_string
(),
pdu_session_type_model
);
...
...
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