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, MSG_NOSIGNAL | MSG_DONTWAIT);
assert (bytes_received == value);

It appears the value and bytes_received do not match after many
thousands of runs with a UDP multicast protocol (www.openais.org).
(neither is -1)

Am I using this ioctl improperly?  Shouldn't I expect that the full
datagram is returned by recvmsg no matter the state of the blocking or
nonblocking mode of the file descriptor?

pls copy me on responses - i am not onlist.

Regards
-steve

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to