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
094d85e1
Commit
094d85e1
authored
Dec 05, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json
parent
75ff49e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+2
-1
src/udp/cooudp.cpp
src/udp/cooudp.cpp
+19
-3
No files found.
src/smf_app/smf_procedure.cpp
View file @
094d85e1
...
...
@@ -740,9 +740,10 @@ smf_procedure_code session_create_sm_context_procedure::run(
Logger
::
smf_app
().
info
(
"-----------------udpsend"
,
sm_context_req
->
scid
);
nlohmann
::
json
udpsmfcontext
;
udpsmfcontext
[
"scid"
]
=
sm_context_req
->
scid
;
udpsmfcontext
[
"supi"
]
=
smf_supi_to_string
(
scf
.
get
()
->
supi
);
udpsmfcontext
[
"pdu_session_id"
]
=
scf
.
get
()
->
pdu_session_id
;
UdpSend_smf
(
udpsmfcontext
,
"10.103.239.31"
,
2023
);
UdpSend_smf
(
udpsmfcontext
,
"10.103.239.31"
,
20
0
23
);
return
send_n4_session_establishment_request
();
...
...
src/udp/cooudp.cpp
View file @
094d85e1
...
...
@@ -154,16 +154,32 @@ int udp_server_coop::udp_read_from_peer_smf() {
printf
(
"smf receive context from ground smf
\n
"
);
std
::
string
received_data
(
reinterpret_cast
<
char
*>
(
udp_recv
),
bytes_received
);
nlohmann
::
json
smfcontext
=
nlohmann
::
json
::
parse
(
received_data
);
supi_t
supi
=
{.
length
=
0
};
scid_t
scid
=
smfcontext
[
"scid"
];
if
(
!
smf_app_inst
->
is_scid_2_smf_context
(
scid
))
{
Logger
::
smf_app
().
warn
(
"SM Context associated with this id "
SCID_FMT
" does not exit!"
,
scid
);
std
::
shared_ptr
<
smf_context_ref
>
scf
=
std
::
shared_ptr
<
smf_context_ref
>
(
new
smf_context_ref
());
// supi_t supi = smreq->req.get_supi();
// scf.get()->supi = smfcontext["supi"];
std
::
string
supiudp
=
smfcontext
[
"supi"
];
smf_string_to_supi
(
&
supi
,
supiudp
.
c_str
());
scf
.
get
()
->
supi
=
supi
;
scf
.
get
()
->
pdu_session_id
=
smfcontext
[
"pdu_session_id"
];
smf_app_inst
->
set_scid_2_smf_context
(
scid
,
scf
);
}
supi64_t
supi64
=
smf_supi_to_u64
(
supi
);
std
::
shared_ptr
<
smf_context
>
sc
=
{};
if
(
!
is_supi_2_smf_context
(
supi64
))
{
Logger
::
smf_app
().
debug
(
"Create a new SMF context with SUPI "
SUPI_64_FMT
""
,
supi64
);
sc
=
std
::
shared_ptr
<
smf_context
>
(
new
smf_context
());
sc
.
get
()
->
set_supi
(
supi
);
sc
.
get
()
->
set_supi_prefix
(
supi_prefix
);
set_supi_2_smf_context
(
supi64
,
sc
);
sc
.
get
()
->
set_plmn
(
smreq
->
req
.
get_plmn
());
// PLMN
}
}
}
...
...
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