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
d43cd8ec
Commit
d43cd8ec
authored
Jun 04, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add control field to message hardware in recv packet function
parent
33d0cb10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
packet-exchange/src/recv_packet.c
packet-exchange/src/recv_packet.c
+6
-0
No files found.
packet-exchange/src/recv_packet.c
View file @
d43cd8ec
...
@@ -112,6 +112,10 @@ packet_timestamps_t recv_udp_packet(int use_timestamps, int64_t histograms[NB_HI
...
@@ -112,6 +112,10 @@ packet_timestamps_t recv_udp_packet(int use_timestamps, int64_t histograms[NB_HI
struct
msghdr
msg
;
// Message hardware, sent to the socket
struct
msghdr
msg
;
// Message hardware, sent to the socket
struct
iovec
iov
;
// The iovec structures stores the RX buffer
struct
iovec
iov
;
// The iovec structures stores the RX buffer
struct
sockaddr_in
sin
;
struct
sockaddr_in
sin
;
struct
{
struct
cmsghdr
cm
;
char
control
[
512
];
}
control
;
int
recvmsgerr
;
int
recvmsgerr
;
...
@@ -132,6 +136,8 @@ packet_timestamps_t recv_udp_packet(int use_timestamps, int64_t histograms[NB_HI
...
@@ -132,6 +136,8 @@ packet_timestamps_t recv_udp_packet(int use_timestamps, int64_t histograms[NB_HI
msg
.
msg_namelen
=
sizeof
(
sin
);
msg
.
msg_namelen
=
sizeof
(
sin
);
msg
.
msg_iov
=
&
iov
;
msg
.
msg_iov
=
&
iov
;
msg
.
msg_iovlen
=
1
;
msg
.
msg_iovlen
=
1
;
msg
.
msg_control
=
&
control
;
msg
.
msg_controllen
=
sizeof
(
control
);
if
(
use_timestamps
)
{
if
(
use_timestamps
)
{
clock_gettime
(
CLOCK_REALTIME
,
&
ts
);
clock_gettime
(
CLOCK_REALTIME
,
&
ts
);
...
...
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