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
b9b60fb1
Commit
b9b60fb1
authored
Dec 03, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json
parent
1b1a7ea9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+4
-4
src/ngap/ngap_app/ngap_app.cpp
src/ngap/ngap_app/ngap_app.cpp
+0
-3
No files found.
src/amf-app/amf_n2.cpp
View file @
b9b60fb1
...
...
@@ -1169,18 +1169,18 @@ void amf_n2::handle_itti_message(
{
nlohmann
::
json
aggregation
=
{};
std
::
string
hex_str
;
for
(
int
i
=
0
;
i
<
BUFFER_SIZE_4096
;
++
i
)
{
for
(
int
i
=
0
;
i
<
encoded_size
;
++
i
)
{
char
hex
[
3
];
snprintf
(
hex
,
sizeof
(
hex
),
"%02X"
,
buffer
[
i
]);
hex_str
+=
hex
;
}
aggregation
[
"buffer"
]
=
hex_str
;
aggregation
[
"encoded"
]
=
encoded_size
;
aggregation
[
"message_type_id"
]
=
"
0
"
;
aggregation
[
"message_type_id"
]
=
"
29
"
;
// nas-> json
aggregation
[
"ran_ue_ngap_id"
]
=
unc
.
get
()
->
ran_ue_ngap_id
;
aggregation
[
"amf_ue_ngap_id"
]
=
unc
.
get
()
->
amf_ue_ngap_id
;
aggregation
[
"ran_ue_ngap_id"
]
=
itti_msg
.
ran_ue_ngap_id
;
aggregation
[
"amf_ue_ngap_id"
]
=
itti_msg
.
amf_ue_ngap_id
;
aggregation
[
"assoc_id"
]
=
(
gc
->
sctp_assoc_id
);
aggregation
[
"stream"
]
=
(
unc
->
sctp_stream_send
);
...
...
src/ngap/ngap_app/ngap_app.cpp
View file @
b9b60fb1
...
...
@@ -106,15 +106,12 @@ void UdpSend_downlink(nlohmann::json aggregation,string ip,int port){
cAddr
.
sin_family
=
AF_INET
;
//协议类型 和socket函数第一个参数一致
cAddr
.
sin_addr
.
s_addr
=
inet_addr
(
ipAddr
);
//将字符串转整数
cAddr
.
sin_port
=
htons
(
port
);
//整数转整数 小端转大端
//3.通信
char
temp
[
256
];
int
r
;
int
len
=
sizeof
cAddr
;
int
sendNum
;
sendNum
=
sendto
(
clientSocket
,
jsonData
.
c_str
(),
jsonData
.
length
(),
0
,
(
struct
sockaddr
*
)
&
cAddr
,
len
);
close
(
clientSocket
);
gettimeofday
(
&
time
,
NULL
);
Logger
::
ngap
().
info
(
"udpsend complete, ms: %ld
\n
"
,
(
time
.
tv_sec
*
1000
+
time
.
tv_usec
/
1000
));
}
//------------------------------------------------------------------------------
...
...
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