Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
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
nexedi
tsn-measures
Commits
b76d0ada
Commit
b76d0ada
authored
May 26, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up the code
parent
82b6eedd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
packet-exchange/src/send_packet.c
packet-exchange/src/send_packet.c
+3
-10
No files found.
packet-exchange/src/send_packet.c
View file @
b76d0ada
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
#define MESSAGE ((uint32_t)0x00FACADE)
#define MESSAGE ((uint32_t)0x00FACADE)
#define NSEC_PER_SEC 1000000000
#define NSEC_PER_SEC 1000000000
static
int
process_socket_error_queue
();
static
void
print_timestamps
(
struct
msghdr
*
msg
);
static
void
print_timestamps
(
struct
msghdr
*
msg
);
static
void
process_timestamps
();
static
void
process_timestamps
();
...
@@ -52,7 +51,7 @@ static size_t tx_buffer_len = sizeof(tx_buffer);
...
@@ -52,7 +51,7 @@ static size_t tx_buffer_len = sizeof(tx_buffer);
static
int
fd
;
static
int
fd
;
static
int
so_timestamping_flags
=
static
int
so_timestamping_flags
=
SOF_TIMESTAMPING_
RX_SOFTWARE
|
SOF_TIMESTAMPING_
TX_SOFTWARE
|
SOF_TIMESTAMPING_SOFTWARE
;
SOF_TIMESTAMPING_TX_SOFTWARE
|
SOF_TIMESTAMPING_SOFTWARE
;
// Sets the interface
// Sets the interface
static
int
set_if
(
char
*
network_if
)
{
static
int
set_if
(
char
*
network_if
)
{
...
@@ -126,9 +125,6 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
...
@@ -126,9 +125,6 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
struct
cmsghdr
*
cmsg
;
struct
cmsghdr
*
cmsg
;
struct
msghdr
msg
;
struct
msghdr
msg
;
struct
iovec
iov
;
struct
iovec
iov
;
struct
pollfd
poll_fd
=
{
.
fd
=
fd
,
};
int
sendmsgerr
;
int
sendmsgerr
;
int
res
;
int
res
;
fd_set
readfs
;
fd_set
readfs
;
...
@@ -186,7 +182,6 @@ static void process_timestamps() {
...
@@ -186,7 +182,6 @@ static void process_timestamps() {
struct
cmsghdr
cm
;
struct
cmsghdr
cm
;
char
control
[
512
];
char
control
[
512
];
}
control
;
}
control
;
int
res
;
memset
(
&
msg
,
0
,
sizeof
(
msg
));
memset
(
&
msg
,
0
,
sizeof
(
msg
));
msg
.
msg_iov
=
&
entry
;
msg
.
msg_iov
=
&
entry
;
...
@@ -237,6 +232,7 @@ static void print_timestamps(struct msghdr *msg) {
...
@@ -237,6 +232,7 @@ static void print_timestamps(struct msghdr *msg) {
}
}
}
}
#ifdef DEBUG
/*
/*
* Code from scheduled_tx_tools
* Code from scheduled_tx_tools
*/
*/
...
@@ -253,9 +249,6 @@ static int process_socket_error_queue() {
...
@@ -253,9 +249,6 @@ static int process_socket_error_queue() {
.
msg_control
=
msg_control
,
.
msg_control
=
msg_control
,
.
msg_controllen
=
sizeof
(
msg_control
)};
.
msg_controllen
=
sizeof
(
msg_control
)};
#ifdef DEBUG
printf
(
"process_socket_error_queue
\n
"
);
#endif
if
(
recvmsg
(
fd
,
&
msg
,
MSG_ERRQUEUE
)
==
-
1
)
{
if
(
recvmsg
(
fd
,
&
msg
,
MSG_ERRQUEUE
)
==
-
1
)
{
fprintf
(
stderr
,
"recvmsg failed"
);
fprintf
(
stderr
,
"recvmsg failed"
);
...
@@ -289,4 +282,4 @@ static int process_socket_error_queue() {
...
@@ -289,4 +282,4 @@ static int process_socket_error_queue() {
return
0
;
return
0
;
}
}
#endif
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