Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
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
zzha zzha
OpenXG-RAN
Commits
3936ceaa
Commit
3936ceaa
authored
Jul 01, 2020
by
RS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE socket changed from SCTP to UDP
parent
4b5f608c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+5
-3
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
3936ceaa
...
...
@@ -51,6 +51,7 @@ queue_t hi_dci0_req_queue;
int
current_sfn_sf
;
static
int
ue_sock_descriptor
=
-
1
;
struct
sockaddr_in
server_address
;
extern
nfapi_tx_request_pdu_t
*
tx_request_pdu
[
1023
][
10
][
10
];
//extern int timer_subframe;
...
...
@@ -1116,13 +1117,12 @@ void UE_config_stub_pnf(void) {
void
ue_init_standalone_socket
(
const
char
*
addr
,
int
port
)
{
struct
sockaddr_in
server_address
;
int
addr_len
=
sizeof
(
server_address
);
memset
(
&
server_address
,
0
,
addr_len
);
server_address
.
sin_family
=
AF_INET
;
server_address
.
sin_port
=
htons
(
port
);
int
sd
=
socket
(
server_address
.
sin_family
,
SOCK_
STREAM
,
IPPROTO_SCTP
);
int
sd
=
socket
(
server_address
.
sin_family
,
SOCK_
DGRAM
,
0
);
if
(
sd
<
0
)
{
LOG_E
(
MAC
,
"Socket creation error standalone PNF
\n
"
);
return
;
...
...
@@ -1134,6 +1134,7 @@ void ue_init_standalone_socket(const char *addr, int port)
return
;
}
// Using connect to use send() instead of sendto()
while
(
connect
(
sd
,
(
struct
sockaddr
*
)
&
server_address
,
addr_len
)
<
0
)
{
LOG_E
(
MAC
,
"Connection to standalone PNF failed: %s
\n
"
,
strerror
(
errno
));
sleep
(
1
);
...
...
@@ -1146,13 +1147,14 @@ void ue_init_standalone_socket(const char *addr, int port)
void
*
ue_standalone_pnf_task
(
void
*
context
)
{
int
addr_len
=
sizeof
(
server_address
);
char
buffer
[
1024
];
int
sd
=
ue_sock_descriptor
;
assert
(
sd
>
0
);
while
(
true
)
{
ssize_t
len
=
re
ad
(
sd
,
buffer
,
sizeof
(
buffer
)
);
ssize_t
len
=
re
cvfrom
(
sd
,
buffer
,
sizeof
(
buffer
),
0
,
(
struct
sockaddr
*
)
&
server_address
,
&
addr_len
);
if
(
len
==
-
1
)
{
LOG_E
(
MAC
,
"reading from standalone pnf sctp socket failed
\n
"
);
...
...
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