[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1192144096.4147.16.camel@balance>
Date: Thu, 11 Oct 2007 16:08:15 -0700
From: Steven Dake <sdake@...hat.com>
To: netdev@...r.kernel.org
Subject: bytes received from recvmsg doesn't match FIONREAD
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists