Questions of this sort should normally be directed to linux-net mailing
list.
>From the code you quoted, I see at least one case where it
will fail -- when the allocated buffer you pass to recvmsg is smaller than
"value" (ie. the datagram is too big for the read buffer).
If that's not the proble
From: Steven Dake <[EMAIL PROTECTED]>
Date: Thu, 11 Oct 2007 16:08:15 -0700
> I wanted to verify that the size of a multicast UDP message received
> with recvmsg matches the size of the message the kernel thinks the
> message is.
>
> So I went about using the FIONREAD ioctl as follows:
>
> res =
I wanted to verify that the size of a multicast UDP message received
with recvmsg matches the size of the message the kernel thinks the
message is.
So I went about using the FIONREAD ioctl as follows:
res = ioctl (fd, FIONCREAD, &value);
assert (res != -1);
bytes_received = recvmsg (fd, &msg_recv