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 = ioctl (fd, FIONCREAD, &value); ^^^^^^^^^ (typo? should be FIONREAD not FION_C_READ) > assert (res != -1); > bytes_received = recvmsg (fd, &msg_recv, MSG_NOSIGNAL | MSG_DONTWAIT); > assert (bytes_received == value); I think you want to use SIOCINQ, FIONREAD is only valid on files. I'm surprised you didn't get an error return from ioctl() as the VFS code seems to enforce this. - 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