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
0293dac6
Commit
0293dac6
authored
Dec 07, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index
parent
4a131e5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
16 deletions
+29
-16
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+22
-11
src/ngap/ngap_app/ngap_app.cpp
src/ngap/ngap_app/ngap_app.cpp
+3
-1
src/ngap/ngap_app/udp.cpp
src/ngap/ngap_app/udp.cpp
+4
-4
No files found.
src/amf-app/amf_n2.cpp
View file @
0293dac6
...
...
@@ -427,7 +427,8 @@ void amf_n2::handle_itti_message(
aggregation
[
"encoded"
]
=
encoded
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
itti_msg
->
assoc_id
;
aggregation
[
"stream"
]
=
itti_msg
->
stream
;
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
itti_msg
->
stream
;
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
...
...
@@ -499,7 +500,8 @@ void amf_n2::handle_itti_message(
aggregation
[
"encoded"
]
=
encoded
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
itti_msg
->
assoc_id
);
aggregation
[
"stream"
]
=
(
itti_msg
->
stream
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
itti_msg
->
stream
;
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
...
...
@@ -602,7 +604,8 @@ void amf_n2::handle_itti_message(itti_ng_reset& itti_msg) {
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
itti_msg
.
stream
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
itti_msg
.
stream
;
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
bdestroy_wrapper
(
&
b
);
...
...
@@ -899,7 +902,8 @@ void amf_n2::handle_itti_message(itti_dl_nas_transport& dl_nas_transport) {
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
...
...
@@ -1085,7 +1089,8 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
...
...
@@ -1203,7 +1208,8 @@ void amf_n2::handle_itti_message(
aggregation
[
"imsi"
]
=
nc
->
imsi
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
...
...
@@ -1283,7 +1289,8 @@ void amf_n2::handle_itti_message(
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
...
...
@@ -1529,7 +1536,8 @@ void amf_n2::handle_itti_message(
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
unc
->
gnb_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
}
...
...
@@ -1602,7 +1610,8 @@ void amf_n2::handle_itti_message(
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
...
...
@@ -1646,7 +1655,8 @@ void amf_n2::handle_itti_message(itti_ue_context_release_request& itti_msg) {
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
itti_msg
.
assoc_id
);
aggregation
[
"stream"
]
=
(
itti_msg
.
stream
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
itti_msg
.
stream
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(itti_msg.assoc_id, itti_msg.stream, b);
...
...
@@ -1713,7 +1723,8 @@ void amf_n2::handle_itti_message(itti_ue_context_release_command& itti_msg) {
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"0"
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
aggregation
[
"stream"
]
=
0
;
aggregation
[
"index"
]
=
(
unc
->
sctp_stream_send
);
UdpSend_downlink
(
aggregation
,
"10.103.239.31"
,
20004
);
}
// sctp_s_38412.curl_http_client_Plugin(gc->sctp_assoc_id, unc->sctp_stream_send, b);
...
...
src/ngap/ngap_app/ngap_app.cpp
View file @
0293dac6
...
...
@@ -118,6 +118,7 @@ void UdpSend_downlink(nlohmann::json aggregation,string ip,int port){
ngap_app
::~
ngap_app
()
{}
//------------------------------------------------------------------------------
int
sendindex
=
0
;
void
ngap_app
::
handle_receive
(
bstring
payload
,
sctp_assoc_id_t
assoc_id
,
sctp_stream_id_t
stream
,
sctp_stream_id_t
instreams
,
sctp_stream_id_t
outstreams
,
uint8_t
buffer
[],
int
n
)
{
...
...
@@ -164,7 +165,8 @@ void ngap_app::handle_receive(
// std::cout<<std::endl;
buffer
[
n
]
=
assoc_id
;
buffer
[
n
+
1
]
=
stream
;
UdpSend_uplink
(
buffer
,
n
+
2
,
"10.103.239.31"
,
20001
);
buffer
[
n
+
2
]
=
sendindex
;
UdpSend_uplink
(
buffer
,
n
+
3
,
"10.103.239.31"
,
20001
);
}
else
{
//Handle the message
...
...
src/ngap/ngap_app/udp.cpp
View file @
0293dac6
...
...
@@ -261,12 +261,12 @@ void udp_server::handle_receive_udp(int r,uint8_t udp_recv[]){
sctp_assoc_id_t
assoc_id
;
vector
<
string
>
MsgVec
;
uint8_t
buffer
[
2048
];
for
(
int
i
=
0
;
i
<
r
-
2
;
i
++
){
for
(
int
i
=
0
;
i
<
r
-
3
;
i
++
){
buffer
[
i
]
=
udp_recv
[
i
];
}
int
_assoc_id
=
udp_recv
[
r
-
2
];
int
_stream
=
udp_recv
[
r
-
1
];
int
_assoc_id
=
udp_recv
[
r
-
3
];
int
_stream
=
udp_recv
[
r
-
2
];
stream
=
udp_recv
[
r
-
1
];
assoc_id
=
_assoc_id
;
bstring
payload
=
blk2bstr
(
buffer
,
r
-
2
);
// bstring udp_recv_bstr=bfromcstr(content.c_str());
...
...
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