title: ioctl FIOREAD on raw socket in Linux
body: <p>I have an implementation which uses ioctl(FIONREAD) to determine the number of pending octets in the Raw Socket receive buffer in Linux and then call a recv on that.</p>
  
  <p>I read somewhere that the ioctl interface for raw sockets in Linux does not actually return the actual pending octets. Is this correct? </p>
  
  <p>I am asking because I am loosing some messages every now and then on high loads and so far havent been able to figure out where. Is their a better way to figure out the number of pending octets in the Raw Socket.</p>