阅读:2136回复:3
为什么找不到 SIO_RCVALL 连MSDN都没有这个东西
为什么找不到 SIO_RCVALL 连MSDN都没有这个东西
|
|
沙发#
发布于:2004-07-12 01:00
在一个头文件里面有,但是具体名字我忘了不过用下面这句也可以解决
#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1) |
|
|
板凳#
发布于:2004-07-23 17:36
WSAIoctl The WSAIoctl function controls the mode of a socket. int WSAIoctl( SOCKET s, DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine ); Parameters s [in] Descriptor identifying a socket. dwIoControlCode [in] Control code of operation to perform. lpvInBuffer [in] Pointer to the input buffer. cbInBuffer [in] Size of the input buffer. lpvOutBuffer [out] Pointer to the output buffer. cbOutBuffer [in] Size of the output buffer. lpcbBytesReturned [out] Pointer to actual number of bytes of output. lpOverlapped [in] Pointer to a WSAOVERLAPPED structure (ignored for nonoverlapped sockets). lpCompletionRoutine [in] Pointer to the completion routine called when the operation has been completed (ignored for nonoverlapped sockets). SIO_RCVALL Enables a socket to receive all IP packets on the network. The socket handle passed to the WSAIoctl function must be of AF_INET address family, SOCK_RAW socket type, and IPPROTO_IP protocol. The socket also must be bound to an explicit local interface, which means that you cannot bind to INADDR_ANY. Once the socket is bound and the ioctl set, calls to the WSARecv or recv functions return IP datagrams passing through the given interface. Note that you must supply a sufficiently large buffer. Setting this ioctl requires Administrator privilege on the local machine. SIO_RCVALL is available in Windows 2000 and later versions of Windows. |
|
地板#
发布于:2004-07-23 17:37
装个SDK
在MSTcpIp.h |
|