reactos/include/afd
diff -u -r1.7 -r1.7.16.1
--- shared.h 10 Feb 2004 16:22:56 -0000 1.7
+++ shared.h 9 Jul 2004 04:42:21 -0000 1.7.16.1
@@ -9,207 +9,136 @@
#include <pshpack1.h>
-
#define AfdSocket "AfdSocket"
#define AFD_SOCKET_LENGTH (sizeof(AfdSocket) - 1)
-typedef struct _AFD_SOCKET_INFORMATION {
- BOOL CommandChannel;
- INT AddressFamily;
- INT SocketType;
- INT Protocol;
- PVOID HelperContext;
- DWORD NotificationEvents;
- UNICODE_STRING TdiDeviceName;
- SOCKADDR Name;
-} AFD_SOCKET_INFORMATION, *PAFD_SOCKET_INFORMATION;
-
+#define AFD_INFO_RECEIVE_WINDOW_SIZE 0x6
+#define AFD_INFO_SEND_WINDOW_SIZE 0x7
+#define AFD_INFO_GROUP_ID_TYPE 0x10
+
+typedef struct _AFD_SGID {
+ UINT Flags;
+ UINT Group;
+ UINT TDNameLength;
+} AFD_SGID, *PAFD_SGID;
+
+typedef struct _AFD_INFO {
+ UINT InfoClass;
+ union {
+ ULONG Ulong;
+ LARGE_INTEGER LargeInteger;
+ } Information;
+} AFD_INFO, *PAFD_INFO;
+
+typedef struct _AFD_WSABUF {
+ UINT len;
+ PCHAR buf;
+} AFD_WSABUF, *PAFD_WSABUF;
+
+typedef struct _AFD_BIND_REQ {
+ UINT SharedAccess;
+ TRANSPORT_ADDRESS Address;
+} AFD_BIND_REQ, *PAFD_BIND_REQ;
+
+typedef struct _AFD_LISTEN_REQ {
+ UINT UseSAN;
+ UINT Backlog;
+ UINT DelayedAccept;
+} AFD_LISTEN_REQ, *PAFD_LISTEN_REQ;
+
+typedef struct _AFD_CONNECT_REQ {
+ AFD_WSABUF CallerData, CalleeData;
+ QOS SQos, GQos;
+ TRANSPORT_ADDRESS Address;
+} AFD_CONNECT_REQ, *PAFD_CONNECT_REQ;
+
+typedef struct _AFD_RECV_REQ {
+ PAFD_WSABUF BufferArray;
+ ULONG BufferCount;
+ ULONG AfdFlags;
+ ULONG TdiFlags;
+} AFD_RECV_REQ, *PAFD_RECV_REQ, AFD_SEND_REQ, *PAFD_SEND_REQ;
+
+typedef struct _AFD_POLL_HANDLE {
+ HANDLE Handle;
+ ULONG Events;
+ NTSTATUS Status;
+} AFD_POLL_HANDLE, *PAFD_POLL_HANDLE;
+
+typedef struct _AFD_POLL_REQ {
+ LARGE_INTEGER Timeout;
+ ULONG HandleCount;
+ ULONG UnknownMaybeFlags;
+ AFD_POLL_HANDLE Handles[1];
+} AFD_POLL_REQ, *PAFD_POLL_REQ;
/* AFD IOCTL code definitions */
-#define FSCTL_AFD_BASE FILE_DEVICE_NAMED_PIPE /* ??? */
+#define FSCTL_AFD_BASE FILE_DEVICE_NETWORK /* ??? */
#define AFD_CTL_CODE(Function, Method, Access) \
- CTL_CODE(FSCTL_AFD_BASE, Function, Method, Access)
+ CTL_CODE(FSCTL_AFD_BASE, Function, Method, 0)
#define IOCTL_AFD_BIND \
AFD_CTL_CODE(0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_LISTEN \
+#define IOCTL_AFD_CONNECT \
AFD_CTL_CODE(1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_SENDTO \
+#define IOCTL_AFD_LISTEN \
AFD_CTL_CODE(2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_RECVFROM \
+#define IOCTL_AFD_LISTEN_WAIT \
AFD_CTL_CODE(3, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_SELECT \
+#define IOCTL_AFD_ACCEPT \
AFD_CTL_CODE(4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_EVENTSELECT \
+#define IOCTL_AFD_RECV \
AFD_CTL_CODE(5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_ENUMNETWORKEVENTS \
+#define IOCTL_AFD_RECVFROM \
AFD_CTL_CODE(6, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_RECV \
+#define IOCTL_AFD_SEND \
AFD_CTL_CODE(7, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_SEND \
+#define IOCTL_AFD_SENDTO \
AFD_CTL_CODE(8, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_ACCEPT \
+#define IOCTL_AFD_SELECT \
AFD_CTL_CODE(9, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_CONNECT \
- AFD_CTL_CODE(10, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_AFD_GET_TDI_HANDLES \
+ AFD_CTL_CODE(13, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_AFD_GETNAME \
- AFD_CTL_CODE(11, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_AFD_SET_INFO \
+ AFD_CTL_CODE(14, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_AFD_GET_CONTEXT \
+ AFD_CTL_CODE(16, METHOD_BUFFERED, FILE_ANY_ACCESS)
-typedef struct _FILE_REQUEST_BIND {
- SOCKADDR Name;
-} FILE_REQUEST_BIND, *PFILE_REQUEST_BIND;
-
-typedef struct _FILE_REPLY_BIND {
- INT Status;
- HANDLE TdiAddressObjectHandle;
- HANDLE TdiConnectionObjectHandle;
-} FILE_REPLY_BIND, *PFILE_REPLY_BIND;
-
-typedef struct _FILE_REQUEST_LISTEN {
- INT Backlog;
-} FILE_REQUEST_LISTEN, *PFILE_REQUEST_LISTEN;
-
-typedef struct _FILE_REPLY_LISTEN {
- INT Status;
-} FILE_REPLY_LISTEN, *PFILE_REPLY_LISTEN;
-
-
-typedef struct _FILE_REQUEST_SENDTO {
- LPWSABUF Buffers;
- DWORD BufferCount;
- DWORD Flags;
- SOCKADDR To;
- INT ToLen;
-} FILE_REQUEST_SENDTO, *PFILE_REQUEST_SENDTO;
-
-typedef struct _FILE_REPLY_SENDTO {
- INT Status;
- DWORD NumberOfBytesSent;
-} FILE_REPLY_SENDTO, *PFILE_REPLY_SENDTO;
-
-
-typedef struct _FILE_REQUEST_RECVFROM {
- LPWSABUF Buffers;
- DWORD BufferCount;
- LPDWORD Flags;
- LPSOCKADDR From;
- LPINT FromLen;
-} FILE_REQUEST_RECVFROM, *PFILE_REQUEST_RECVFROM;
-
-typedef struct _FILE_REPLY_RECVFROM {
- INT Status;
- DWORD NumberOfBytesRecvd;
-} FILE_REPLY_RECVFROM, *PFILE_REPLY_RECVFROM;
-
-
-typedef struct _FILE_REQUEST_SELECT {
- LPFD_SET ReadFDSet;
- LPFD_SET WriteFDSet;
- LPFD_SET ExceptFDSet;
- TIMEVAL Timeout;
-} FILE_REQUEST_SELECT, *PFILE_REQUEST_SELECT;
-
-typedef struct _FILE_REPLY_SELECT {
- INT Status;
- DWORD SocketCount;
-} FILE_REPLY_SELECT, *PFILE_REPLY_SELECT;
-
-
-typedef struct _FILE_REQUEST_EVENTSELECT {
- WSAEVENT hEventObject;
- LONG lNetworkEvents;
-} FILE_REQUEST_EVENTSELECT, *PFILE_REQUEST_EVENTSELECT;
-
-typedef struct _FILE_REPLY_EVENTSELECT {
- INT Status;
-} FILE_REPLY_EVENTSELECT, *PFILE_REPLY_EVENTSELECT;
-
-
-typedef struct _FILE_REQUEST_ENUMNETWORKEVENTS {
- WSAEVENT hEventObject;
-} FILE_REQUEST_ENUMNETWORKEVENTS, *PFILE_REQUEST_ENUMNETWORKEVENTS;
-
-typedef struct _FILE_REPLY_ENUMNETWORKEVENTS {
- INT Status;
- WSANETWORKEVENTS NetworkEvents;
-} FILE_REPLY_ENUMNETWORKEVENTS, *PFILE_REPLY_ENUMNETWORKEVENTS;
-
-
-typedef struct _FILE_REQUEST_RECV {
- LPWSABUF Buffers;
- DWORD BufferCount;
- LPDWORD Flags;
-} FILE_REQUEST_RECV, *PFILE_REQUEST_RECV;
-
-typedef struct _FILE_REPLY_RECV {
- INT Status;
- DWORD NumberOfBytesRecvd;
-} FILE_REPLY_RECV, *PFILE_REPLY_RECV;
-
-
-typedef struct _FILE_REQUEST_SEND {
- LPWSABUF Buffers;
- DWORD BufferCount;
- DWORD Flags;
-} FILE_REQUEST_SEND, *PFILE_REQUEST_SEND;
-
-typedef struct _FILE_REPLY_SEND {
- INT Status;
- DWORD NumberOfBytesSent;
-} FILE_REPLY_SEND, *PFILE_REPLY_SEND;
-
-
-typedef struct _FILE_REQUEST_ACCEPT {
- LPSOCKADDR addr;
- INT addrlen;
- LPCONDITIONPROC lpfnCondition;
- DWORD dwCallbackData;
-} FILE_REQUEST_ACCEPT, *PFILE_REQUEST_ACCEPT;
-
-typedef struct _FILE_REPLY_ACCEPT {
- INT Status;
- INT addrlen;
- SOCKET Socket;
-} FILE_REPLY_ACCEPT, *PFILE_REPLY_ACCEPT;
-
-
-typedef struct _FILE_REQUEST_CONNECT {
- LPSOCKADDR name;
- INT namelen;
- LPWSABUF lpCallerData;
- LPWSABUF lpCalleeData;
- LPQOS lpSQOS;
- LPQOS lpGQOS;
-} FILE_REQUEST_CONNECT, *PFILE_REQUEST_CONNECT;
-
-typedef struct _FILE_REPLY_CONNECT {
- INT Status;
-} FILE_REPLY_CONNECT, *PFILE_REPLY_CONNECT;
-
-
-typedef struct _FILE_REQUEST_GETNAME {
- BOOL Peer;
-} FILE_REQUEST_GETNAME, *PFILE_REQUEST_GETNAME;
-
-typedef struct _FILE_REPLY_GETNAME {
- INT Status;
- SOCKADDR Name;
- INT NameSize;
-} FILE_REPLY_GETNAME, *PFILE_REPLY_GETNAME;
+#define IOCTL_AFD_SET_CONTEXT \
+ AFD_CTL_CODE(17, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define IOCTL_AFD_GET_INFO \
+ AFD_CTL_CODE(30, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define IOCTL_AFD_DEFER_ACCEPT \
+ AFD_CTL_CODE(35, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define IOCTL_AFD_GET_PENDING_CONNECT_DATA \
+ AFD_CTL_CODE(41, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define AFD_EVENT_RECEIVE 0x1L
+#define AFD_EVENT_OOB_RECEIVE 0x2L
+#define AFD_EVENT_SEND 0x4L
+#define AFD_EVENT_DISCONNECT 0x8L
+#define AFD_EVENT_ABORT 0x10L
+#define AFD_EVENT_CLOSE 0x20L
+#define AFD_EVENT_CONNECT 0x40L
+#define AFD_EVENT_ACCEPT 0x80L
+#define AFD_EVENT_CONNECT_FAIL 0x100L
#include <poppack.h>