(bug #30185): added LWIP_FIONREAD_LINUXMODE that makes ioctl/FIONREAD return the size of the next pending datagram.

This commit is contained in:
Simon Goldschmidt
2011-07-21 20:15:39 +02:00
parent fc280c7cd6
commit bd69890ccd
3 changed files with 49 additions and 4 deletions

View File

@@ -1443,6 +1443,18 @@
#define SO_REUSE_RXTOALL 0
#endif
/**
* LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of
* pending data in the network buffer. This is the way windows does it. It's
* the default for lwIP since it is smaller.
* LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next
* pending datagram in bytes. This is the way linux does it. This code is only
* here for compatibility.
*/
#ifndef LWIP_FIONREAD_LINUXMODE
#define LWIP_FIONREAD_LINUXMODE 0
#endif
/*
----------------------------------------
---------- Statistics options ----------