10 modified files
reactos/include/afd
diff -u -r1.7.16.3 -r1.7.16.4
--- shared.h 16 Jul 2004 04:38:39 -0000 1.7.16.3
+++ shared.h 16 Jul 2004 14:35:21 -0000 1.7.16.4
@@ -10,6 +10,13 @@
#define AFD_PACKET_COMMAND_LENGTH 15
#define AfdCommand "AfdOpenPacketXX"
+/* Extra definition of WSABUF for AFD so that I don't have to include any
+ * userland winsock headers. */
+typedef struct _AFD_WSABUF {
+ PCHAR buf;
+ UINT len;
+} AFD_WSABUF, *PAFD_WSABUF;
+
typedef struct _AFD_CREATE_PACKET {
DWORD EndpointFlags;
DWORD GroupID;
@@ -18,12 +25,12 @@
} AFD_CREATE_PACKET, *PAFD_CREATE_PACKET;
typedef struct _AFD_INFO {
- ULONG InformationClass;
+ ULONG InformationClass;
union {
- ULONG Ulong;
- LARGE_INTEGER LargeInteger;
+ ULONG Ulong;
+ LARGE_INTEGER LargeInteger;
} Information;
- ULONG Padding;
+ ULONG Padding;
} AFD_INFO, *PAFD_INFO;
typedef struct _AFD_BIND_DATA {
@@ -40,14 +47,14 @@
typedef struct _AFD_HANDLE_ {
SOCKET Handle;
ULONG Events;
- NTSTATUS Status;
+ NTSTATUS Status;
} AFD_HANDLE, *PAFD_HANDLE;
typedef struct _AFD_POLL_INFO {
- LARGE_INTEGER Timeout;
+ LARGE_INTEGER Timeout;
ULONG HandleCount;
ULONG Unknown;
- AFD_HANDLE Handles[1];
+ AFD_HANDLE Handles[1];
} AFD_POLL_INFO, *PAFD_POLL_INFO;
typedef struct _AFD_ACCEPT_DATA {
@@ -57,334 +64,364 @@
} AFD_ACCEPT_DATA, *PAFD_ACCEPT_DATA;
typedef struct _AFD_RECEIVED_ACCEPT_DATA {
- ULONG SequenceNumber;
+ ULONG SequenceNumber;
TRANSPORT_ADDRESS Address;
} AFD_RECEIVED_ACCEPT_DATA, *PAFD_RECEIVED_ACCEPT_DATA;
typedef struct _AFD_PENDING_ACCEPT_DATA {
- ULONG SequenceNumber;
- ULONG SizeOfData;
- ULONG ReturnSize;
+ ULONG SequenceNumber;
+ ULONG SizeOfData;
+ ULONG ReturnSize;
} AFD_PENDING_ACCEPT_DATA, *PAFD_PENDING_ACCEPT_DATA;
typedef struct _AFD_DEFER_ACCEPT_DATA {
- ULONG SequenceNumber;
- BOOLEAN RejectConnection;
+ ULONG SequenceNumber;
+ BOOLEAN RejectConnection;
} AFD_DEFER_ACCEPT_DATA, *PAFD_DEFER_ACCEPT_DATA;
typedef struct _AFD_RECV_INFO {
- PVOID BufferArray;
- ULONG BufferCount;
- ULONG AfdFlags;
- ULONG TdiFlags;
+ PAFD_WSABUF BufferArray;
+ ULONG BufferCount;
+ ULONG AfdFlags;
+ ULONG TdiFlags;
} AFD_RECV_INFO , *PAFD_RECV_INFO ;
typedef struct _AFD_RECV_INFO_UDP {
- PVOID BufferArray;
- ULONG BufferCount;
- ULONG AfdFlags;
- ULONG TdiFlags;
- PVOID Address;
- PINT AddressLength;
+ PAFD_WSABUF BufferArray;
+ ULONG BufferCount;
+ ULONG AfdFlags;
+ ULONG TdiFlags;
+ PVOID Address;
+ PINT AddressLength;
} AFD_RECV_INFO_UDP, *PAFD_RECV_INFO_UDP;
typedef struct _AFD_SEND_INFO {
- PVOID BufferArray;
- ULONG BufferCount;
- ULONG AfdFlags;
- ULONG TdiFlags;
+ PAFD_WSABUF BufferArray;
+ ULONG BufferCount;
+ ULONG AfdFlags;
+ ULONG TdiFlags;
} AFD_SEND_INFO , *PAFD_SEND_INFO ;
typedef struct _AFD_SEND_INFO_UDP {
- PVOID BufferArray;
- ULONG BufferCount;
- ULONG AfdFlags;
- ULONG Padding[9];
- ULONG SizeOfRemoteAddress;
- PVOID RemoteAddress;
+ PAFD_WSABUF BufferArray;
+ ULONG BufferCount;
+ ULONG AfdFlags;
+ ULONG Padding[9];
+ ULONG SizeOfRemoteAddress;
+ PVOID RemoteAddress;
} AFD_SEND_INFO_UDP, *PAFD_SEND_INFO_UDP;
typedef struct _AFD_CONNECT_INFO {
- BOOLEAN UseSAN;
- ULONG Root;
- ULONG Unknown;
+ BOOLEAN UseSAN;
+ ULONG Root;
+ ULONG Unknown;
TRANSPORT_ADDRESS RemoteAddress;
} AFD_CONNECT_INFO , *PAFD_CONNECT_INFO ;
typedef struct _AFD_EVENT_SELECT_INFO {
- HANDLE EventObject;
- ULONG Events;
+ HANDLE EventObject;
+ ULONG Events;
} AFD_EVENT_SELECT_INFO, *PAFD_EVENT_SELECT_INFO;
typedef struct _AFD_DISCONNECT_INFO {
- ULONG DisconnectType;
- LARGE_INTEGER Timeout;
+ ULONG DisconnectType;
+ LARGE_INTEGER Timeout;
} AFD_DISCONNECT_INFO, *PAFD_DISCONNECT_INFO;
/* AFD Packet Endpoint Flags */
-#define AFD_ENDPOINT_CONNECTIONLESS 0x1
+#define AFD_ENDPOINT_CONNECTIONLESS 0x1
#define AFD_ENDPOINT_MESSAGE_ORIENTED 0x10
-#define AFD_ENDPOINT_RAW 0x100
-#define AFD_ENDPOINT_MULTIPOINT 0x1000
-#define AFD_ENDPOINT_C_ROOT 0x10000
-#define AFD_ENDPOINT_D_ROOT 0x100000
+#define AFD_ENDPOINT_RAW 0x100
+#define AFD_ENDPOINT_MULTIPOINT 0x1000
+#define AFD_ENDPOINT_C_ROOT 0x10000
+#define AFD_ENDPOINT_D_ROOT 0x100000
/* AFD Info Flags */
-#define AFD_INFO_BLOCKING_MODE 0x02L
-#define AFD_INFO_RECEIVE_WINDOW_SIZE 0x6L
-#define AFD_INFO_SEND_WINDOW_SIZE 0x7L
-#define AFD_INFO_GROUP_ID_TYPE 0x10L
+#define AFD_INFO_BLOCKING_MODE 0x02L
+#define AFD_INFO_RECEIVE_WINDOW_SIZE 0x06L
+#define AFD_INFO_SEND_WINDOW_SIZE 0x07L
+#define AFD_INFO_GROUP_ID_TYPE 0x10L
/* AFD Share Flags */
-#define AFD_SHARE_UNIQUE 0x0L
-#define AFD_SHARE_REUSE 0x1L
-#define AFD_SHARE_WILDCARD 0x2L
-#define AFD_SHARE_EXCLUSIVE 0x3L
+#define AFD_SHARE_UNIQUE 0x0L
+#define AFD_SHARE_REUSE 0x1L
+#define AFD_SHARE_WILDCARD 0x2L
+#define AFD_SHARE_EXCLUSIVE 0x3L
/* AFD Disconnect Flags */
-#define AFD_DISCONNECT_SEND 0x01L
-#define AFD_DISCONNECT_RECV 0x02L
+#define AFD_DISCONNECT_SEND 0x01L
+#define AFD_DISCONNECT_RECV 0x02L
/* AFD Event Flags */
-#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
-#define AFD_EVENT_QOS 0x200L
-#define AFD_EVENT_GROUP_QOS 0x400L
+#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
+#define AFD_EVENT_QOS 0x200L
+#define AFD_EVENT_GROUP_QOS 0x400L
/* AFD SEND/RECV Flags */
-#define AFD_SKIP_FIO 0x1L
-#define AFD_OVERLAPPED 0x2L
+#define AFD_SKIP_FIO 0x1L
+#define AFD_OVERLAPPED 0x2L
/* IOCTL Generation */
#define FSCTL_AFD_BASE FILE_DEVICE_NETWORK
-#define _AFD_CONTROL_CODE(Operation,Method) ((FSCTL_AFD_BASE)<<12 | (Operation<<2) | Method)
+#define _AFD_CONTROL_CODE(Operation,Method) \
+ ((FSCTL_AFD_BASE)<<12 | (Operation<<2) | Method)
/* AFD Commands */
-#define AFD_BIND 0
-#define AFD_CONNECT 1
-#define AFD_START_LISTEN 2
-#define AFD_WAIT_FOR_LISTEN 3
-#define AFD_ACCEPT 4
-#define AFD_RECV 5
-#define AFD_RECV_DATAGRAM 6
-#define AFD_SEND 7
-#define AFD_SEND_DATAGRAM 8
-#define AFD_SELECT 9
-#define AFD_DISCONNECT 10
-#define AFD_GET_TDI_HANDLES 13
-#define AFD_SET_INFO 14
-#define AFD_GET_CONTEXT 16
-#define AFD_SET_CONTEXT 17
-#define AFD_SET_CONNECT_DATA 18
-#define AFD_SET_CONNECT_OPTIONS 19
-#define AFD_SET_DISCONNECT_DATA 20
-#define AFD_SET_DISCONNECT_OPTIONS 21
-#define AFD_GET_CONNECT_DATA 22
-#define AFD_GET_CONNECT_OPTIONS 23
-#define AFD_GET_DISCONNECT_DATA 24
-#define AFD_GET_DISCONNECT_OPTIONS 25
+#define AFD_BIND 0
+#define AFD_CONNECT 1
+#define AFD_START_LISTEN 2
+#define AFD_WAIT_FOR_LISTEN 3
+#define AFD_ACCEPT 4
+#define AFD_RECV 5
+#define AFD_RECV_DATAGRAM 6
+#define AFD_SEND 7
+#define AFD_SEND_DATAGRAM 8
+#define AFD_SELECT 9
+#define AFD_DISCONNECT 10
+#define AFD_GET_TDI_HANDLES 13
+#define AFD_SET_INFO 14
+#define AFD_GET_CONTEXT 16
+#define AFD_SET_CONTEXT 17
+#define AFD_SET_CONNECT_DATA 18
+#define AFD_SET_CONNECT_OPTIONS 19
+#define AFD_SET_DISCONNECT_DATA 20
+#define AFD_SET_DISCONNECT_OPTIONS 21
+#define AFD_GET_CONNECT_DATA 22
+#define AFD_GET_CONNECT_OPTIONS 23
+#define AFD_GET_DISCONNECT_DATA 24
+#define AFD_GET_DISCONNECT_OPTIONS 25
#define AFD_SET_CONNECT_DATA_SIZE 26
#define AFD_SET_CONNECT_OPTIONS_SIZE 27
#define AFD_SET_DISCONNECT_DATA_SIZE 28
#define AFD_SET_DISCONNECT_OPTIONS_SIZE 29
-#define AFD_GET_INFO 30
-#define AFD_EVENT_SELECT 33
-#define AFD_DEFER_ACCEPT 35
+#define AFD_GET_INFO 30
+#define AFD_EVENT_SELECT 33
+#define AFD_DEFER_ACCEPT 35
#define AFD_GET_PENDING_CONNECT_DATA 41
/* AFD IOCTLs */
-#define IOCTL_AFD_BIND _AFD_CONTROL_CODE(AFD_BIND, METHOD_NEITHER)
-#define IOCTL_AFD_CONNECT _AFD_CONTROL_CODE(AFD_CONNECT, METHOD_NEITHER)
-#define IOCTL_AFD_START_LISTEN _AFD_CONTROL_CODE(AFD_START_LISTEN, METHOD_NEITHER)
-#define IOCTL_AFD_WAIT_FOR_LISTEN _AFD_CONTROL_CODE(AFD_WAIT_FOR_LISTEN, METHOD_BUFFERED )
-#define IOCTL_AFD_ACCEPT _AFD_CONTROL_CODE(AFD_ACCEPT, METHOD_BUFFERED )
-#define IOCTL_AFD_RECV _AFD_CONTROL_CODE(AFD_RECV, METHOD_NEITHER)
-#define IOCTL_AFD_RECV_DATAGRAM _AFD_CONTROL_CODE(AFD_RECV_DATAGRAM, METHOD_NEITHER)
-#define IOCTL_AFD_SEND _AFD_CONTROL_CODE(AFD_SEND, METHOD_NEITHER)
-#define IOCTL_AFD_SEND_DATAGRAM _AFD_CONTROL_CODE(AFD_SEND_DATAGRAM, METHOD_NEITHER)
-#define IOCTL_AFD_SELECT _AFD_CONTROL_CODE(AFD_SELECT, METHOD_BUFFERED )
-#define IOCTL_AFD_DISCONNECT _AFD_CONTROL_CODE(AFD_DISCONNECT, METHOD_NEITHER)
-#define IOCTL_AFD_GET_TDI_HANDLES _AFD_CONTROL_CODE(AFD_GET_TDI_HANDLES, METHOD_NEITHER)
-#define IOCTL_AFD_SET_INFO _AFD_CONTROL_CODE(AFD_SET_INFO, METHOD_NEITHER)
-#define IOCTL_AFD_GET_CONTEXT _AFD_CONTROL_CODE(AFD_GET_CONTEXT, METHOD_NEITHER)
-#define IOCTL_AFD_SET_CONTEXT _AFD_CONTROL_CODE(AFD_SET_CONTEXT, METHOD_NEITHER)
-#define IOCTL_AFD_SET_CONNECT_DATA _AFD_CONTROL_CODE(AFD_SET_CONNECT_DATA, METHOD_NEITHER)
-#define IOCTL_AFD_SET_CONNECT_OPTIONS _AFD_CONTROL_CODE(AFD_SET_CONNECT_OPTIONS, METHOD_NEITHER)
-#define IOCTL_AFD_SET_DISCONNECT_DATA _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_DATA, METHOD_NEITHER)
-#define IOCTL_AFD_SET_DISCONNECT_OPTIONS _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_OPTIONS, METHOD_NEITHER)
-#define IOCTL_AFD_GET_CONNECT_DATA _AFD_CONTROL_CODE(AFD_GET_CONNECT_DATA, METHOD_NEITHER)
-#define IOCTL_AFD_GET_CONNECT_OPTIONS _AFD_CONTROL_CODE(AFD_GET_CONNECT_OPTIONS, METHOD_NEITHER)
-#define IOCTL_AFD_GET_DISCONNECT_DATA _AFD_CONTROL_CODE(AFD_GET_DISCONNECT_DATA, METHOD_NEITHER)
-#define IOCTL_AFD_GET_DISCONNECT_OPTIONS _AFD_CONTROL_CODE(AFD_GET_DISCONNECT_OPTIONS, METHOD_NEITHER)
-#define IOCTL_AFD_SET_CONNECT_DATA_SIZE _AFD_CONTROL_CODE(AFD_SET_CONNECT_DATA_SIZE, METHOD_NEITHER)
-#define IOCTL_AFD_SET_CONNECT_OPTIONS_SIZE _AFD_CONTROL_CODE(AFD_SET_CONNECT_OPTIONS_SIZE, METHOD_NEITHER)
-#define IOCTL_AFD_SET_DISCONNECT_DATA_SIZE _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_DATA_SIZE, METHOD_NEITHER)
-#define IOCTL_AFD_SET_DISCONNECT_OPTIONS_SIZE _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_OPTIONS_SIZE, METHOD_NEITHER)
-#define IOCTL_AFD_GET_INFO _AFD_CONTROL_CODE(AFD_GET_INFO, METHOD_NEITHER)
-#define IOCTL_AFD_EVENT_SELECT _AFD_CONTROL_CODE(AFD_EVENT_SELECT, METHOD_NEITHER)
-#define IOCTL_AFD_DEFER_ACCEPT _AFD_CONTROL_CODE(AFD_DEFER_ACCEPT, METHOD_NEITHER)
-#define IOCTL_AFD_GET_PENDING_CONNECT_DATA _AFD_CONTROL_CODE(AFD_GET_PENDING_CONNECT_DATA, METHOD_NEITHER)
-
+#define IOCTL_AFD_BIND \
+ _AFD_CONTROL_CODE(AFD_BIND, METHOD_NEITHER)
+#define IOCTL_AFD_CONNECT \
+ _AFD_CONTROL_CODE(AFD_CONNECT, METHOD_NEITHER)
+#define IOCTL_AFD_START_LISTEN \
+ _AFD_CONTROL_CODE(AFD_START_LISTEN, METHOD_NEITHER)
+#define IOCTL_AFD_WAIT_FOR_LISTEN \
+ _AFD_CONTROL_CODE(AFD_WAIT_FOR_LISTEN, METHOD_BUFFERED )
+#define IOCTL_AFD_ACCEPT \
+ _AFD_CONTROL_CODE(AFD_ACCEPT, METHOD_BUFFERED )
+#define IOCTL_AFD_RECV \
+ _AFD_CONTROL_CODE(AFD_RECV, METHOD_NEITHER)
+#define IOCTL_AFD_RECV_DATAGRAM \
+ _AFD_CONTROL_CODE(AFD_RECV_DATAGRAM, METHOD_NEITHER)
+#define IOCTL_AFD_SEND \
+ _AFD_CONTROL_CODE(AFD_SEND, METHOD_NEITHER)
+#define IOCTL_AFD_SEND_DATAGRAM \
+ _AFD_CONTROL_CODE(AFD_SEND_DATAGRAM, METHOD_NEITHER)
+#define IOCTL_AFD_SELECT \
+ _AFD_CONTROL_CODE(AFD_SELECT, METHOD_BUFFERED )
+#define IOCTL_AFD_DISCONNECT \
+ _AFD_CONTROL_CODE(AFD_DISCONNECT, METHOD_NEITHER)
+#define IOCTL_AFD_GET_TDI_HANDLES \
+ _AFD_CONTROL_CODE(AFD_GET_TDI_HANDLES, METHOD_NEITHER)
+#define IOCTL_AFD_SET_INFO \
+ _AFD_CONTROL_CODE(AFD_SET_INFO, METHOD_NEITHER)
+#define IOCTL_AFD_GET_CONTEXT \
+ _AFD_CONTROL_CODE(AFD_GET_CONTEXT, METHOD_NEITHER)
+#define IOCTL_AFD_SET_CONTEXT \
+ _AFD_CONTROL_CODE(AFD_SET_CONTEXT, METHOD_NEITHER)
+#define IOCTL_AFD_SET_CONNECT_DATA \
+ _AFD_CONTROL_CODE(AFD_SET_CONNECT_DATA, METHOD_NEITHER)
+#define IOCTL_AFD_SET_CONNECT_OPTIONS \
+ _AFD_CONTROL_CODE(AFD_SET_CONNECT_OPTIONS, METHOD_NEITHER)
+#define IOCTL_AFD_SET_DISCONNECT_DATA \
+ _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_DATA, METHOD_NEITHER)
+#define IOCTL_AFD_SET_DISCONNECT_OPTIONS \
+ _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_OPTIONS, METHOD_NEITHER)
+#define IOCTL_AFD_GET_CONNECT_DATA \
+ _AFD_CONTROL_CODE(AFD_GET_CONNECT_DATA, METHOD_NEITHER)
+#define IOCTL_AFD_GET_CONNECT_OPTIONS \
+ _AFD_CONTROL_CODE(AFD_GET_CONNECT_OPTIONS, METHOD_NEITHER)
+#define IOCTL_AFD_GET_DISCONNECT_DATA \
+ _AFD_CONTROL_CODE(AFD_GET_DISCONNECT_DATA, METHOD_NEITHER)
+#define IOCTL_AFD_GET_DISCONNECT_OPTIONS \
+ _AFD_CONTROL_CODE(AFD_GET_DISCONNECT_OPTIONS, METHOD_NEITHER)
+#define IOCTL_AFD_SET_CONNECT_DATA_SIZE \
+ _AFD_CONTROL_CODE(AFD_SET_CONNECT_DATA_SIZE, METHOD_NEITHER)
+#define IOCTL_AFD_SET_CONNECT_OPTIONS_SIZE \
+ _AFD_CONTROL_CODE(AFD_SET_CONNECT_OPTIONS_SIZE, METHOD_NEITHER)
+#define IOCTL_AFD_SET_DISCONNECT_DATA_SIZE \
+ _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_DATA_SIZE, METHOD_NEITHER)
+#define IOCTL_AFD_SET_DISCONNECT_OPTIONS_SIZE \
+ _AFD_CONTROL_CODE(AFD_SET_DISCONNECT_OPTIONS_SIZE, METHOD_NEITHER)
+#define IOCTL_AFD_GET_INFO \
+ _AFD_CONTROL_CODE(AFD_GET_INFO, METHOD_NEITHER)
+#define IOCTL_AFD_EVENT_SELECT \
+ _AFD_CONTROL_CODE(AFD_EVENT_SELECT, METHOD_NEITHER)
+#define IOCTL_AFD_DEFER_ACCEPT \
+ _AFD_CONTROL_CODE(AFD_DEFER_ACCEPT, METHOD_NEITHER)
+#define IOCTL_AFD_GET_PENDING_CONNECT_DATA \
+ _AFD_CONTROL_CODE(AFD_GET_PENDING_CONNECT_DATA, METHOD_NEITHER)
typedef struct _AFD_SOCKET_INFORMATION {
- BOOL CommandChannel;
- INT AddressFamily;
- INT SocketType;
- INT Protocol;
- PVOID HelperContext;
- DWORD NotificationEvents;
- UNICODE_STRING TdiDeviceName;
- SOCKADDR Name;
+ BOOL CommandChannel;
+ INT AddressFamily;
+ INT SocketType;
+ INT Protocol;
+ PVOID HelperContext;
+ DWORD NotificationEvents;
+ UNICODE_STRING TdiDeviceName;
+ SOCKADDR Name;
} AFD_SOCKET_INFORMATION, *PAFD_SOCKET_INFORMATION;
typedef struct _FILE_REQUEST_BIND {
- SOCKADDR Name;
+ SOCKADDR Name;
} FILE_REQUEST_BIND, *PFILE_REQUEST_BIND;
typedef struct _FILE_REPLY_BIND {
- INT Status;
- HANDLE TdiAddressObjectHandle;
- HANDLE TdiConnectionObjectHandle;
+ INT Status;
+ HANDLE TdiAddressObjectHandle;
+ HANDLE TdiConnectionObjectHandle;
} FILE_REPLY_BIND, *PFILE_REPLY_BIND;
typedef struct _FILE_REQUEST_LISTEN {
- INT Backlog;
+ INT Backlog;
} FILE_REQUEST_LISTEN, *PFILE_REQUEST_LISTEN;
typedef struct _FILE_REPLY_LISTEN {
- INT Status;
+ INT Status;
} FILE_REPLY_LISTEN, *PFILE_REPLY_LISTEN;
-
typedef struct _FILE_REQUEST_SENDTO {
- LPWSABUF Buffers;
- DWORD BufferCount;
- DWORD Flags;
- SOCKADDR To;
- INT ToLen;
+ 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;
+ 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;
+ 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;
+ 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;
+ 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;
+ INT Status;
+ DWORD SocketCount;
} FILE_REPLY_SELECT, *PFILE_REPLY_SELECT;
typedef struct _FILE_REQUEST_EVENTSELECT {
- WSAEVENT hEventObject;
- LONG lNetworkEvents;
+ WSAEVENT hEventObject;
+ LONG lNetworkEvents;
} FILE_REQUEST_EVENTSELECT, *PFILE_REQUEST_EVENTSELECT;
typedef struct _FILE_REPLY_EVENTSELECT {
- INT Status;
+ INT Status;
} FILE_REPLY_EVENTSELECT, *PFILE_REPLY_EVENTSELECT;
typedef struct _FILE_REQUEST_ENUMNETWORKEVENTS {
- WSAEVENT hEventObject;
+ WSAEVENT hEventObject;
} FILE_REQUEST_ENUMNETWORKEVENTS, *PFILE_REQUEST_ENUMNETWORKEVENTS;
typedef struct _FILE_REPLY_ENUMNETWORKEVENTS {
- INT Status;
- WSANETWORKEVENTS NetworkEvents;
+ INT Status;
+ WSANETWORKEVENTS NetworkEvents;
} FILE_REPLY_ENUMNETWORKEVENTS, *PFILE_REPLY_ENUMNETWORKEVENTS;
typedef struct _FILE_REQUEST_RECV {
- LPWSABUF Buffers;
- DWORD BufferCount;
- LPDWORD Flags;
+ LPWSABUF Buffers;
+ DWORD BufferCount;
+ LPDWORD Flags;
} FILE_REQUEST_RECV, *PFILE_REQUEST_RECV;
typedef struct _FILE_REPLY_RECV {
- INT Status;
- DWORD NumberOfBytesRecvd;
+ INT Status;
+ DWORD NumberOfBytesRecvd;
} FILE_REPLY_RECV, *PFILE_REPLY_RECV;
typedef struct _FILE_REQUEST_SEND {
- LPWSABUF Buffers;
- DWORD BufferCount;
- DWORD Flags;
+ LPWSABUF Buffers;
+ DWORD BufferCount;
+ DWORD Flags;
} FILE_REQUEST_SEND, *PFILE_REQUEST_SEND;
typedef struct _FILE_REPLY_SEND {
- INT Status;
- DWORD NumberOfBytesSent;
+ INT Status;
+ DWORD NumberOfBytesSent;
} FILE_REPLY_SEND, *PFILE_REPLY_SEND;
typedef struct _FILE_REQUEST_ACCEPT {
- LPSOCKADDR addr;
- INT addrlen;
- LPCONDITIONPROC lpfnCondition;
- DWORD dwCallbackData;
+ 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;
+ 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;
+ 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;
+ INT Status;
} FILE_REPLY_CONNECT, *PFILE_REPLY_CONNECT;
typedef struct _FILE_REQUEST_GETNAME {
- BOOL Peer;
+ BOOL Peer;
} FILE_REQUEST_GETNAME, *PFILE_REQUEST_GETNAME;
typedef struct _FILE_REPLY_GETNAME {
- INT Status;
- SOCKADDR Name;
- INT NameSize;
+ INT Status;
+ SOCKADDR Name;
+ INT NameSize;
} FILE_REPLY_GETNAME, *PFILE_REPLY_GETNAME;
#endif /*__AFD_SHARED_H */
reactos/lib/msafd/misc
diff -u -r1.7.10.1 -r1.7.10.2
--- sndrcv.c 16 Jul 2004 04:36:29 -0000 1.7.10.1
+++ sndrcv.c 16 Jul 2004 14:35:21 -0000 1.7.10.2
@@ -49,7 +49,7 @@
HANDLE Event;
/* Set up the Receive Structure */
- RecvInfo.BufferArray = lpBuffers;
+ RecvInfo.BufferArray = (PAFD_WSABUF)lpBuffers;
RecvInfo.BufferCount = dwBufferCount;
RecvInfo.TdiFlags = 0;
RecvInfo.AfdFlags = 0;
@@ -183,7 +183,7 @@
HANDLE Event;
/* Set up the Receive Structure */
- RecvInfo.BufferArray = lpBuffers;
+ RecvInfo.BufferArray = (PAFD_WSABUF)lpBuffers;
RecvInfo.BufferCount = dwBufferCount;
RecvInfo.TdiFlags = 0;
RecvInfo.AfdFlags = 0;
@@ -318,7 +318,7 @@
HANDLE Event;
/* Set up the Send Structure */
- SendInfo.BufferArray = lpBuffers;
+ SendInfo.BufferArray = (PAFD_WSABUF)lpBuffers;
SendInfo.BufferCount = dwBufferCount;
SendInfo.TdiFlags = 0;
SendInfo.AfdFlags = 0;
@@ -446,7 +446,7 @@
RtlCopyMemory(&RemoteAddress->Address[0].AddressType, SocketAddress, SocketAddressLength);
/* Set up Structure */
- SendInfo.BufferArray = lpBuffers;
+ SendInfo.BufferArray = (PAFD_WSABUF)lpBuffers;
SendInfo.AfdFlags = 0;
SendInfo.BufferCount = dwBufferCount;
SendInfo.RemoteAddress = RemoteAddress;
reactos/drivers/net/afd/afd
diff -u -r1.1.2.2 -r1.1.2.3
--- bind.c 14 Jul 2004 16:54:14 -0000 1.1.2.2
+++ bind.c 16 Jul 2004 14:35:21 -0000 1.1.2.3
@@ -1,4 +1,4 @@
-/* $Id: bind.c,v 1.1.2.2 2004/07/14 16:54:14 arty Exp $
+/* $Id: bind.c,v 1.1.2.3 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/bind.c
@@ -43,7 +43,7 @@
NTSTATUS Status = STATUS_SUCCESS;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_BIND_REQ BindReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_BIND_DATA BindReq = Irp->AssociatedIrp.SystemBuffer;
AFD_DbgPrint(MID_TRACE,("Called\n"));
reactos/drivers/net/afd/afd
diff -u -r1.1.2.2 -r1.1.2.3
--- connect.c 11 Jul 2004 23:04:34 -0000 1.1.2.2
+++ connect.c 16 Jul 2004 14:35:21 -0000 1.1.2.3
@@ -1,4 +1,4 @@
-/* $Id: connect.c,v 1.1.2.2 2004/07/11 23:04:34 arty Exp $
+/* $Id: connect.c,v 1.1.2.3 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/connect.c
@@ -126,7 +126,7 @@
NTSTATUS Status = STATUS_INVALID_PARAMETER;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_CONNECT_REQ ConnectReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_CONNECT_INFO ConnectReq = Irp->AssociatedIrp.SystemBuffer;
AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
@@ -145,18 +145,19 @@
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT );
case SOCKET_STATE_CREATED: {
- FCB->LocalAddress = TaCopyTransportAddress( &ConnectReq->Address );
+ FCB->LocalAddress =
+ TaCopyTransportAddress( &ConnectReq->RemoteAddress );
if( FCB->LocalAddress ) {
RtlZeroMemory( FCB->LocalAddress,
TaLengthOfTransportAddress
- ( &ConnectReq->Address ) );
+ ( &ConnectReq->RemoteAddress ) );
FCB->LocalAddress->TAAddressCount = 1;
FCB->LocalAddress->Address[0].AddressType =
- ConnectReq->Address.Address[0].AddressType;
+ ConnectReq->RemoteAddress.Address[0].AddressType;
FCB->LocalAddress->Address[0].AddressLength =
- ConnectReq->Address.Address[0].AddressLength;
+ ConnectReq->RemoteAddress.Address[0].AddressLength;
Status = WarmSocketForBind( FCB );
@@ -170,7 +171,8 @@
} /* Drop through to SOCKET_STATE_BOUND */
case SOCKET_STATE_BOUND:
- FCB->RemoteAddress = TaCopyTransportAddress( &ConnectReq->Address );
+ FCB->RemoteAddress =
+ TaCopyTransportAddress( &ConnectReq->RemoteAddress );
Status = WarmSocketForConnection( FCB );
reactos/drivers/net/afd/afd
diff -u -r1.1.2.1 -r1.1.2.2
--- info.c 9 Jul 2004 04:41:18 -0000 1.1.2.1
+++ info.c 16 Jul 2004 14:35:21 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-/* $Id: info.c,v 1.1.2.1 2004/07/09 04:41:18 arty Exp $
+/* $Id: info.c,v 1.1.2.2 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/info.c
@@ -20,11 +20,12 @@
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq, InfoReq ? InfoReq->InfoClass : 0));
+ AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq,
+ InfoReq ? InfoReq->InformationClass : 0));
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
- switch( InfoReq->InfoClass ) {
+ switch( InfoReq->InformationClass ) {
case AFD_INFO_RECEIVE_WINDOW_SIZE:
InfoReq->Information.Ulong = FCB->Recv.Size;
break;
@@ -39,7 +40,8 @@
break;
default:
- AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n", InfoReq->InfoClass));
+ AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n",
+ InfoReq->InformationClass));
Status = STATUS_INVALID_PARAMETER;
break;
}
reactos/drivers/net/afd/afd
diff -u -r1.1.2.1 -r1.1.2.2
--- listen.c 9 Jul 2004 04:41:18 -0000 1.1.2.1
+++ listen.c 16 Jul 2004 14:35:21 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-/* $Id: listen.c,v 1.1.2.1 2004/07/09 04:41:18 arty Exp $
+/* $Id: listen.c,v 1.1.2.2 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/listen.c
@@ -28,7 +28,7 @@
NTSTATUS Status = STATUS_SUCCESS;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_LISTEN_REQ ListenReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_LISTEN_DATA ListenReq = Irp->AssociatedIrp.SystemBuffer;
AFD_DbgPrint(MID_TRACE,("Called\n"));
@@ -40,7 +40,7 @@
return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
}
- FCB->DelayedAccept = ListenReq->DelayedAccept;
+ FCB->DelayedAccept = ListenReq->UseDelayedAcceptance;
Status = WarmSocketForConnection( FCB );
reactos/drivers/net/afd/afd
diff -u -r1.1.2.3 -r1.1.2.4
--- main.c 15 Jul 2004 03:21:47 -0000 1.1.2.3
+++ main.c 16 Jul 2004 14:35:21 -0000 1.1.2.4
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.1.2.3 2004/07/15 03:21:47 arty Exp $
+/* $Id: main.c,v 1.1.2.4 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/main.c
@@ -46,7 +46,7 @@
PFILE_OBJECT FileObject;
PAFD_DEVICE_EXTENSION DeviceExt;
PFILE_FULL_EA_INFORMATION EaInfo;
- PAFD_SGID ConnectInfo;
+ PAFD_CREATE_PACKET ConnectInfo;
ULONG EaLength;
PWCHAR EaInfoValue;
UINT Disposition, i;
@@ -61,8 +61,8 @@
Irp->IoStatus.Information = 0;
EaInfo = Irp->AssociatedIrp.SystemBuffer;
- ConnectInfo = (PAFD_SGID)(EaInfo->EaName + EaInfo->EaNameLength + 1);
- EaInfoValue = (PWCHAR)(((PCHAR)ConnectInfo) + sizeof(AFD_SGID));
+ ConnectInfo = (PAFD_CREATE_PACKET)(EaInfo->EaName + EaInfo->EaNameLength + 1);
+ EaInfoValue = (PWCHAR)(((PCHAR)ConnectInfo) + sizeof(AFD_CREATE_PACKET));
if(!EaInfo) {
AFD_DbgPrint(MIN_TRACE, ("No EA Info in IRP.\n"));
@@ -91,7 +91,7 @@
RtlZeroMemory( FCB, sizeof( *FCB ) );
- FCB->Flags = ConnectInfo->Flags;
+ FCB->Flags = ConnectInfo->EndpointFlags;
FCB->State = SOCKET_STATE_CREATED;
FCB->FileObject = FileObject;
FCB->DeviceExt = DeviceExt;
@@ -108,7 +108,7 @@
AFD_DbgPrint(MID_TRACE,("%x: Checking command channel\n", FCB));
- FCB->TdiDeviceName.Length = ConnectInfo->TDNameLength;
+ FCB->TdiDeviceName.Length = ConnectInfo->SizeOfTransportName;
FCB->TdiDeviceName.MaximumLength = FCB->TdiDeviceName.Length;
FCB->TdiDeviceName.Buffer =
ExAllocatePool( NonPagedPool, FCB->TdiDeviceName.Length );
@@ -234,7 +234,7 @@
case IOCTL_AFD_CONNECT:
return AfdStreamSocketConnect( DeviceObject, Irp, IrpSp );
- case IOCTL_AFD_LISTEN:
+ case IOCTL_AFD_START_LISTEN:
return AfdListenSocket( DeviceObject, Irp, IrpSp );
case IOCTL_AFD_RECV:
@@ -244,14 +244,14 @@
case IOCTL_AFD_SELECT:
return AfdSelect( DeviceObject, Irp, IrpSp );
- case IOCTL_AFD_RECVFROM:
+ case IOCTL_AFD_RECV_DATAGRAM:
return AfdPacketSocketReadData( DeviceObject, Irp, IrpSp );
case IOCTL_AFD_SEND:
return AfdConnectedSocketWriteData( DeviceObject, Irp, IrpSp,
FALSE );
- case IOCTL_AFD_SENDTO:
+ case IOCTL_AFD_SEND_DATAGRAM:
return AfdPacketSocketWriteData( DeviceObject, Irp, IrpSp );
case IOCTL_AFD_GET_INFO:
reactos/drivers/net/afd/afd
diff -u -r1.1.2.2 -r1.1.2.3
--- read.c 14 Jul 2004 16:54:14 -0000 1.1.2.2
+++ read.c 16 Jul 2004 14:35:21 -0000 1.1.2.3
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.1.2.2 2004/07/14 16:54:14 arty Exp $
+/* $Id: read.c,v 1.1.2.3 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/read.c
@@ -15,7 +15,7 @@
#include "debug.h"
NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
- PAFD_RECV_REQ RecvReq,
+ PAFD_RECV_INFO RecvReq,
PUINT TotalBytesCopied ) {
UINT i, BytesToCopy = 0,
BytesAvailable =
@@ -69,7 +69,7 @@
PAFD_FCB FCB = (PAFD_FCB)Context;
PLIST_ENTRY NextIrpEntry;
PIRP NextIrp;
- PAFD_RECV_REQ RecvReq;
+ PAFD_RECV_INFO RecvReq;
UINT TotalBytesCopied = 0;
AFD_DbgPrint(MID_TRACE,("Called\n"));
@@ -164,7 +164,7 @@
NTSTATUS Status = STATUS_INVALID_PARAMETER;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_RECV_REQ RecvReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_RECV_INFO RecvReq = Irp->AssociatedIrp.SystemBuffer;
UINT TotalBytesCopied = 0;
AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
@@ -192,7 +192,7 @@
SatisfyPacketRecvRequest( PAFD_FCB FCB, PIRP Irp,
PAFD_STORED_DATAGRAM DatagramRecv ) {
NTSTATUS Status = STATUS_SUCCESS;
- PAFD_RECV_REQ RecvReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_RECV_INFO RecvReq = Irp->AssociatedIrp.SystemBuffer;
UINT CopyLen = 0;
CopyLen = MIN(DatagramRecv->Len, RecvReq->BufferArray[0].len);
@@ -215,7 +215,7 @@
PAFD_FCB FCB = Context;
PIRP NextIrp;
PLIST_ENTRY ListEntry;
- PAFD_RECV_REQ RecvReq;
+ PAFD_RECV_INFO RecvReq;
PAFD_STORED_DATAGRAM DatagramRecv;
UINT DGSize = Irp->IoStatus.Information + sizeof( AFD_STORED_DATAGRAM );
@@ -291,7 +291,7 @@
NTSTATUS Status = STATUS_SUCCESS;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_RECV_REQ RecvReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_RECV_INFO RecvReq = Irp->AssociatedIrp.SystemBuffer;
PLIST_ENTRY ListEntry;
PAFD_STORED_DATAGRAM DatagramRecv;
reactos/drivers/net/afd/afd
diff -u -r1.1.2.2 -r1.1.2.3
--- select.c 14 Jul 2004 16:54:14 -0000 1.1.2.2
+++ select.c 16 Jul 2004 14:35:21 -0000 1.1.2.3
@@ -1,4 +1,4 @@
-/* $Id: select.c,v 1.1.2.2 2004/07/14 16:54:14 arty Exp $
+/* $Id: select.c,v 1.1.2.3 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/select.c
@@ -12,7 +12,7 @@
#include "tdiconn.h"
#include "debug.h"
-VOID CopyBackStatus( PAFD_POLL_HANDLE HandleArray,
+VOID CopyBackStatus( PAFD_HANDLE HandleArray,
UINT HandleCount ) {
UINT i;
@@ -22,7 +22,7 @@
}
}
-VOID ZeroEvents( PAFD_POLL_HANDLE HandleArray,
+VOID ZeroEvents( PAFD_HANDLE HandleArray,
UINT HandleCount ) {
UINT i;
@@ -33,7 +33,7 @@
}
NTSTATUS STDCALL
-ScanForImmediateTrigger( PAFD_POLL_HANDLE HandleArray,
+ScanForImmediateTrigger( PAFD_HANDLE HandleArray,
UINT HandleCount,
PUINT HandlesSet ) {
NTSTATUS Status = STATUS_SUCCESS;
@@ -46,7 +46,7 @@
HandleArray[i].Status = 0;
Status =
ObReferenceObjectByHandle
- ( HandleArray[i].Handle,
+ ( (PVOID)HandleArray[i].Handle,
FILE_ALL_ACCESS,
NULL,
KernelMode,
@@ -62,7 +62,7 @@
HandleArray[i].Status =
FCB->PollState & HandleArray[i].Events;
if( HandleArray[i].Status ) ShouldReturnNow = TRUE;
- ObDereferenceObject( HandleArray[i].Handle );
+ ObDereferenceObject( (PVOID)HandleArray[i].Handle );
}
}
@@ -75,7 +75,7 @@
PVOID SystemArgument1,
PVOID SystemArgument2 ) {
PAFD_ACTIVE_POLL Poll = DeferredContext;
- PAFD_POLL_REQ PollReq;
+ PAFD_POLL_INFO PollReq;
PAFD_DEVICE_EXTENSION DeviceExt;
PIRP Irp;
KIRQL OldIrql;
@@ -103,12 +103,12 @@
AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp,
PIO_STACK_LOCATION IrpSp ) {
NTSTATUS Status = STATUS_NO_MEMORY;
- PAFD_POLL_REQ PollReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_POLL_INFO PollReq = Irp->AssociatedIrp.SystemBuffer;
PAFD_DEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension;
PAFD_ACTIVE_POLL Poll = NULL;
UINT CopySize = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
UINT AllocSize =
- CopySize + sizeof(AFD_ACTIVE_POLL) - sizeof(AFD_POLL_REQ);
+ CopySize + sizeof(AFD_ACTIVE_POLL) - sizeof(AFD_POLL_INFO);
KIRQL OldIrql;
UINT HandlesSignalled;
@@ -161,7 +161,7 @@
return Status;
}
-VOID SignalSocket( PAFD_ACTIVE_POLL Poll, PAFD_POLL_REQ PollReq, UINT i ) {
+VOID SignalSocket( PAFD_ACTIVE_POLL Poll, PAFD_POLL_INFO PollReq, UINT i ) {
/* One of the files was destroyed. We return now with error. */
Poll->Irp->IoStatus.Status = STATUS_SUCCESS; /* XXX REVISIT */
Poll->Irp->IoStatus.Information = 1;
@@ -175,12 +175,12 @@
NTSTATUS Status;
PFILE_OBJECT TargetFile;
PAFD_FCB FCB;
- PAFD_POLL_REQ PollReq = Poll->Irp->AssociatedIrp.SystemBuffer;
+ PAFD_POLL_INFO PollReq = Poll->Irp->AssociatedIrp.SystemBuffer;
for( i = 0; i < PollReq->HandleCount; i++ ) {
Status =
ObReferenceObjectByHandle
- ( PollReq->Handles[i].Handle,
+ ( (PVOID)PollReq->Handles[i].Handle,
FILE_ALL_ACCESS,
NULL,
KernelMode,
reactos/drivers/net/afd/afd
diff -u -r1.1.2.4 -r1.1.2.5
--- write.c 15 Jul 2004 03:21:47 -0000 1.1.2.4
+++ write.c 16 Jul 2004 14:35:21 -0000 1.1.2.5
@@ -1,4 +1,4 @@
-/* $Id: write.c,v 1.1.2.4 2004/07/15 03:21:47 arty Exp $
+/* $Id: write.c,v 1.1.2.5 2004/07/16 14:35:21 arty Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/write.c
@@ -21,7 +21,7 @@
PAFD_FCB FCB = (PAFD_FCB)Context;
PLIST_ENTRY NextIrpEntry;
PIRP NextIrp = NULL;
- PAFD_SEND_REQ SendReq;
+ PAFD_SEND_INFO SendReq;
PAFD_MAPBUF Map;
UINT TotalBytesCopied = 0, SpaceAvail, i, CopySize = 0;
@@ -78,7 +78,8 @@
Map[i].BufferAddress =
MmMapLockedPages( Map[i].Mdl, KernelMode );
- CopySize = MIN( SpaceAvail, SendReq->BufferArray[i].len );
+ CopySize = MIN( SpaceAvail,
+ SendReq->BufferArray[i].len );
RtlCopyMemory( FCB->Send.Window + FCB->Send.BytesUsed,
Map[i].BufferAddress,
@@ -136,7 +137,7 @@
NTSTATUS Status = STATUS_SUCCESS;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_SEND_REQ SendReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_SEND_INFO SendReq = Irp->AssociatedIrp.SystemBuffer;
UINT TotalBytesCopied = 0, i, CopySize = 0,
SpaceAvail = 0, TotalBytesEncountered = 0;
@@ -168,7 +169,8 @@
for( i = 0; FCB->Send.BytesUsed < FCB->Send.Size &&
i < SendReq->BufferCount; i++ ) {
- CopySize = MIN( SpaceAvail, SendReq->BufferArray[i].len );
+ CopySize = MIN( SpaceAvail,
+ SendReq->BufferArray[i].len );
TotalBytesEncountered += SendReq->BufferArray[i].len;
@@ -229,7 +231,7 @@
NTSTATUS Status = STATUS_SUCCESS;
PFILE_OBJECT FileObject = IrpSp->FileObject;
PAFD_FCB FCB = FileObject->FsContext;
- PAFD_SEND_REQ SendReq = Irp->AssociatedIrp.SystemBuffer;
+ PAFD_SEND_INFO_UDP SendReq = Irp->AssociatedIrp.SystemBuffer;
AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
@@ -242,7 +244,7 @@
FCB->AddressFile.Object,
SendReq->BufferArray[0].buf,
SendReq->BufferArray[0].len,
- &SendReq->Address,
+ SendReq->RemoteAddress,
&FCB->SendIrp.Iosb,
NULL,
NULL );
CVSspam 0.2.8