Questions tagged [recvmmsg]
7 questions
9
votes
3 answers
How do I get the size of the msg_control buffer for recvmsg?
when using recvmsg I use MSG_TRUNC and MSG_PEEK like so:
msgLen = recvmsg(fd, &hdr, MSG_PEEK | MSG_TRUNC)
this gives me the size of the buffer to allocate for the next message
my question is how do I get the size of the buffer I should allocate for…

user3076936
- 169
- 13
5
votes
0 answers
recvmmsg/recv/recvfrom blocks under high load
We have an application on Centos 6 that calls recvmmsg() on a multicast address to read 1024 UDP packets at a time. When we run multiple instances of this application on the same box (all listening to the same traffic), sometimes this call will…

Tars AC
- 79
- 2
1
vote
1 answer
Linux C sockets - recvmsg - getting source ifindex
I'm opening a RAW socket in Linux and reading all messages.
recvmsg(mysock, &msg, 0);
I'm traversing on all cmsg on that msg buffer and I get only one.
for (c = CMSG_FIRSTHDR(&msg); c; c = CMSG_NXTHDR(&msg, c)) {
How can I extract the ifindex…

User121212
- 35
- 5
1
vote
2 answers
Reading multiple UDP messages without polling
I would like to use the recvmmsg call to read multiple UDP messages from ONE single socket at once. I'm reading data from a single multicast group.
When I read TCP data, I usually use poll/select with a non-blocking socket (and timeout) to be…

Abruzzo Forte e Gentile
- 14,423
- 28
- 99
- 173
0
votes
0 answers
process hangs on socket recvmsg call while receiving complete mmapped memory block
I have a server process (C program)which does mmap for a physical memory of size around 70MB and when I'm sending this entire memory block over socket to a client process, My socket send api returns success but client keeps waiting for the message…
0
votes
1 answer
MPI_Send getting stuck when executing with different nodes
I have a very simple MPI program where node 0 sends a character to node 1, but the send and receive are getting stuck whenever I use two or more different machines. The program works fine when I use several processes in only one machine. It seems to…

Matheus Mendonça
- 21
- 6
0
votes
0 answers
recvmmsg remains blocked on CTRL-C
I am using recvmmsg to read from a blocking UDP socket out of a mutlicast group.
In the man pages of that API I noted that the errors messages don't mention EINTR so it looks like that api cannot catch when a signal has been received.
I tested and…

Abruzzo Forte e Gentile
- 14,423
- 28
- 99
- 173