Commit d43cd8ec authored by Joanne Hugé's avatar Joanne Hugé

Add control field to message hardware in recv packet function

parent 33d0cb10
......@@ -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 iovec iov; // The iovec structures stores the RX buffer
struct sockaddr_in sin;
struct {
struct cmsghdr cm;
char control[512];
} control;
int recvmsgerr;
......@@ -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_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = &control;
msg.msg_controllen = sizeof(control);
if (use_timestamps) {
clock_gettime(CLOCK_REALTIME, &ts);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment