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
75ff49e5
Commit
75ff49e5
authored
Dec 05, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smfcontext
parent
cfe412f5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
16 deletions
+14
-16
src/oai_smf/main.cpp
src/oai_smf/main.cpp
+1
-1
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+6
-6
src/udp/cooudp.cpp
src/udp/cooudp.cpp
+7
-9
No files found.
src/oai_smf/main.cpp
View file @
75ff49e5
...
...
@@ -135,7 +135,7 @@ int main(int argc, char** argv) {
udp_server_coop
udp_uplink_
(
inet_ntoa
(
smf_cfg
.
sbi
.
addr4
),
20001
);
udp_server_coop
udp_downlink_
(
inet_ntoa
(
smf_cfg
.
sbi
.
addr4
),
20004
);
udp_server_coop
udp_smf_
(
inet_ntoa
(
smf_cfg
.
sbi
.
addr4
),
2023
);
udp_server_coop
udp_smf_
(
inet_ntoa
(
smf_cfg
.
sbi
.
addr4
),
20
0
23
);
// SMF Pistache API server (HTTP1)
Pistache
::
Address
addr
(
...
...
src/smf_app/smf_procedure.cpp
View file @
75ff49e5
...
...
@@ -53,7 +53,7 @@ using namespace std;
extern
itti_mw
*
itti_inst
;
extern
smf
::
smf_app
*
smf_app_inst
;
extern
smf
::
smf_config
smf_cfg
;
extern
void
UdpSend_smf
(
nlohmann
::
json
aggregation
,
string
ip
,
int
port
);
pfcp
::
ue_ip_address_t
smf_session_procedure
::
pfcp_ue_ip_address
(
const
edge
&
edge
)
{
// only used in PDR,so when it is an downlink edge, we are in UL procedure
...
...
@@ -738,12 +738,12 @@ smf_procedure_code session_create_sm_context_procedure::run(
get_next_upf
(
dl_edges
,
ul_edges
,
upf
);
Logger
::
smf_app
().
info
(
"-----------------udpsend"
,
sm_context_req
->
scid
);
// nlohmann::json udpsmfcontext;
// udpsmfcontext["scid"] = "2";
// udpsmfcontext["pdu_session_id"] = "2";
nlohmann
::
json
udpsmfcontext
;
udpsmfcontext
[
"scid"
]
=
sm_context_req
->
scid
;
udpsmfcontext
[
"pdu_session_id"
]
=
scf
.
get
()
->
pdu_session_id
;
UdpSend_smf
(
udpsmfcontext
,
"10.103.239.31"
,
2023
);
// UdpSend_smf(udpsmfcontext,"10.103.239.31", 2023);
// extern void UdpSend_downlink(nlohmann::json aggregation,string ip,int port);
return
send_n4_session_establishment_request
();
}
...
...
src/udp/cooudp.cpp
View file @
75ff49e5
...
...
@@ -107,12 +107,13 @@ void udp_server_coop::start_receive(udp_server_coop* udp, uint16_t udp_port_num)
thread_
=
std
::
thread
(
&
udp_server_coop
::
udp_read_from_socket_to_center
,
this
);
thread_
.
detach
();
}
if
(
udp_port_num
==
2023
)
if
(
udp_port_num
==
20
0
23
)
{
thread_
=
std
::
thread
(
&
udp_server_coop
::
udp_read_from_peer_smf
,
this
);
thread_
.
detach
();
}
else
{
if
(
udp_port_num
==
20004
)
{
thread_
=
std
::
thread
(
&
udp_server_coop
::
udp_read_from_socket_from_center
,
this
);
thread_
.
detach
();
}
...
...
@@ -137,7 +138,7 @@ int udp_server_coop::udp_read_from_peer_smf() {
//socklen_t addr_len;
int
udp_len
;
size_t
bytes_received
=
0
;
cout
<<
"start receive"
<<
endl
;
cout
<<
"start receive
udp_read_from_peer_smf
"
<<
endl
;
struct
timeval
time
;
while
(
1
){
...
...
@@ -155,10 +156,7 @@ int udp_server_coop::udp_read_from_peer_smf() {
nlohmann
::
json
smfcontext
=
nlohmann
::
json
::
parse
(
received_data
);
scid_t
scid
=
smfcontext
[
"scid"
];
std
::
shared_ptr
<
smf_context_ref
>
scf
=
{};
if
(
smf_app_inst
->
is_scid_2_smf_context
(
scid
))
{
scf
=
smf_app_inst
->
scid_2_smf_context
(
scid
);
}
else
{
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();
...
...
@@ -183,7 +181,7 @@ int udp_server_coop::udp_read_from_socket_to_center() {
//socklen_t addr_len;
int
udp_len
;
size_t
bytes_received
=
0
;
cout
<<
"start receive"
<<
endl
;
cout
<<
"start receive
udp_read_from_socket_to_center
"
<<
endl
;
struct
timeval
time
;
while
(
1
){
...
...
@@ -225,7 +223,7 @@ int udp_server_coop::udp_read_from_socket_from_center() {
//socklen_t addr_len;
int
udp_len
;
size_t
bytes_received
=
0
;
cout
<<
"start receive"
<<
endl
;
cout
<<
"start receive
udp_read_from_socket_from_center
"
<<
endl
;
struct
timeval
time
;
while
(
1
){
...
...
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