Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/include/lwip/sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,16 @@ typedef struct ipv6_mreq {
* and the size of any in or out parameters in the upper
* word. The high 2 bits of the upper word are used
* to encode the in/out status of the parameter; for now
* we restrict parameters to at most 128 bytes.
* we restrict parameters to at most 16383 bytes.
*/
#if !defined(FIONREAD) || !defined(FIONBIO)
#define IOCPARM_MASK 0x7fU /* parameters must be < 128 bytes */
#define IOC_VOID 0x20000000UL /* no parameters */
#define IOCPARM_MASK 0x1fffU /* parameters must be < 8192 bytes */
#define IOC_VOID 0x00000000UL /* no parameters */
#define IOC_NESTED 0x20000000UL /* inside structure is nested and has to be treated specially */
#define IOC_OUT 0x40000000UL /* copy out parameters */
#define IOC_IN 0x80000000UL /* copy in parameters */
#define IOC_INOUT (IOC_IN|IOC_OUT)
/* 0x20000000 distinguishes new &
old ioctl's */

#define _IO(x,y) ((long)(IOC_VOID|((x)<<8)|(y)))

#define _IOR(x,y,t) ((long)(IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)))
Expand Down