Re: bytes received from recvmsg doesn't match FIONREAD

2007-10-11 Thread David Stevens
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

Re: bytes received from recvmsg doesn't match FIONREAD

2007-10-11 Thread David Miller
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 =

bytes received from recvmsg doesn't match FIONREAD

2007-10-11 Thread Steven Dake
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