2001-01-14 17:44:38 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Ancillary Function Driver
|
|
|
|
* FILE: include/afd.h
|
|
|
|
* PURPOSE: Main driver header
|
|
|
|
*/
|
|
|
|
#ifndef __AFD_H
|
|
|
|
#define __AFD_H
|
|
|
|
|
|
|
|
#include <winsock2.h>
|
2002-09-08 10:23:54 +00:00
|
|
|
#include <ddk/ntddk.h>
|
2004-01-11 20:46:06 +00:00
|
|
|
#include <ddk/ntifs.h>
|
2004-03-02 18:18:15 +00:00
|
|
|
#include <ddk/tdiinfo.h>
|
|
|
|
#include <ddk/tdikrnl.h>
|
2001-01-14 17:44:38 +00:00
|
|
|
#include <afd/shared.h>
|
|
|
|
#include <debug.h>
|
|
|
|
|
2004-03-02 18:18:15 +00:00
|
|
|
#define IP_MIB_STATS_ID 1
|
|
|
|
#define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
/* Forward declarations */
|
|
|
|
struct _AFDFCB;
|
|
|
|
|
|
|
|
typedef struct _DEVICE_EXTENSION {
|
|
|
|
PDEVICE_OBJECT StorageDevice;
|
|
|
|
KSPIN_LOCK FCBListLock;
|
|
|
|
LIST_ENTRY FCBListHead;
|
|
|
|
} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
|
|
|
|
|
|
|
|
/* Context Control Block structure */
|
|
|
|
typedef struct _AFDCCB {
|
|
|
|
struct _AFDFCB *FCB;
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
PFILE_OBJECT FileObject;
|
|
|
|
ULONG Flags;
|
|
|
|
LARGE_INTEGER CurrentByteOffset;
|
|
|
|
} AFDCCB, *PAFDCCB;
|
|
|
|
|
|
|
|
/* Flags for CCB structure */
|
|
|
|
#define CCB_CLEANED 0x00000001
|
|
|
|
|
|
|
|
typedef struct _FsdNTRequiredFCB {
|
|
|
|
FSRTL_COMMON_FCB_HEADER CommonFCBHeader;
|
|
|
|
SECTION_OBJECT_POINTERS SectionObject;
|
|
|
|
ERESOURCE MainResource;
|
|
|
|
ERESOURCE PagingIoResource;
|
|
|
|
} FsdNTRequiredFCB, *PFsdNTRequiredFCB;
|
|
|
|
|
|
|
|
typedef struct _AFDFCB {
|
|
|
|
FsdNTRequiredFCB NTRequiredFCB;
|
|
|
|
LIST_ENTRY ListEntry;
|
2001-06-04 11:26:13 +00:00
|
|
|
BOOL CommandChannel;
|
2001-01-14 17:44:38 +00:00
|
|
|
PDEVICE_EXTENSION DeviceExt;
|
|
|
|
SHARE_ACCESS ShareAccess;
|
|
|
|
ULONG ReferenceCount;
|
|
|
|
ULONG OpenHandleCount;
|
|
|
|
HANDLE TdiAddressObjectHandle;
|
|
|
|
PFILE_OBJECT TdiAddressObject;
|
|
|
|
HANDLE TdiConnectionObjectHandle;
|
|
|
|
PFILE_OBJECT TdiConnectionObject;
|
|
|
|
LIST_ENTRY CCBListHead;
|
|
|
|
INT AddressFamily;
|
|
|
|
INT SocketType;
|
|
|
|
INT Protocol;
|
2001-06-04 11:26:13 +00:00
|
|
|
SOCKADDR SocketName;
|
2001-01-14 17:44:38 +00:00
|
|
|
PVOID HelperContext;
|
|
|
|
DWORD NotificationEvents;
|
|
|
|
UNICODE_STRING TdiDeviceName;
|
|
|
|
DWORD State;
|
2001-05-01 22:44:07 +00:00
|
|
|
PVOID SendBuffer;
|
2001-06-04 11:26:13 +00:00
|
|
|
LIST_ENTRY ReceiveQueue;
|
|
|
|
KSPIN_LOCK ReceiveQueueLock;
|
|
|
|
LIST_ENTRY ReadRequestQueue;
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
LIST_ENTRY ListenRequestQueue;
|
2001-07-04 20:40:24 +00:00
|
|
|
/* For WSAEventSelect() */
|
|
|
|
WSANETWORKEVENTS NetworkEvents;
|
2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/tcpip/i386: New directory.
* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
* drivers/net/tcpip/notes.txt: New file.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
network event.
(AfdDispEventSelect): Reference event handle.
* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
EventObject of type PKEVENT.
* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
(TARGET_OBJECTS): Add ARCH_OBJECTS.
* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
prototype.
(TCPv4Checksum): New macro.
(CorrectChecksum): Rename to IPv4CorrectChecksum.
(TCPv4CorrectChecksum): New macro.
* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
and AckNumber.
(TCP_SEGMENT): New structure.
(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
for Data on failure.
* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
from ChecksumCompute.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
operation.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
PTDI_ADDRESS_IP.
Initialize ReceivedSegments.
* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
(DisplayIPPacket): Call DisplayIPHeader().
(DisplayTCPHeader): Change format strings.
* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
TCPSegmentList): Add.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
function.
(TCPiBuildPacket): Build segment.
(TCPStartup): Initialize TCPSegmentList.
(TCPShutdown): Cleanup TCPSegmentList.
svn path=/trunk/; revision=8537
2004-03-04 20:45:39 +00:00
|
|
|
PKEVENT EventObject;
|
2001-01-14 17:44:38 +00:00
|
|
|
} AFDFCB, *PAFDFCB;
|
|
|
|
|
|
|
|
/* Socket states */
|
|
|
|
#define SOCKET_STATE_CREATED 0
|
|
|
|
#define SOCKET_STATE_BOUND 1
|
|
|
|
#define SOCKET_STATE_LISTENING 2
|
2001-07-04 20:40:24 +00:00
|
|
|
#define SOCKET_STATE_CONNECTED 3
|
2001-01-14 17:44:38 +00:00
|
|
|
|
2001-06-04 11:26:13 +00:00
|
|
|
typedef struct _AFD_BUFFER {
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
WSABUF Buffer;
|
2004-06-14 03:22:27 +00:00
|
|
|
UINT Offset;
|
2001-06-04 11:26:13 +00:00
|
|
|
} AFD_BUFFER, *PAFD_BUFFER;
|
|
|
|
|
|
|
|
typedef struct _AFD_READ_REQUEST {
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
PIRP Irp;
|
|
|
|
PFILE_REQUEST_RECVFROM RecvFromRequest;
|
|
|
|
PFILE_REPLY_RECVFROM RecvFromReply;
|
|
|
|
} AFD_READ_REQUEST, *PAFD_READ_REQUEST;
|
|
|
|
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
typedef struct _AFD_LISTEN_REQUEST {
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
PAFDFCB Fcb;
|
2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/tcpip/i386: New directory.
* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
* drivers/net/tcpip/notes.txt: New file.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
network event.
(AfdDispEventSelect): Reference event handle.
* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
EventObject of type PKEVENT.
* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
(TARGET_OBJECTS): Add ARCH_OBJECTS.
* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
prototype.
(TCPv4Checksum): New macro.
(CorrectChecksum): Rename to IPv4CorrectChecksum.
(TCPv4CorrectChecksum): New macro.
* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
and AckNumber.
(TCP_SEGMENT): New structure.
(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
for Data on failure.
* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
from ChecksumCompute.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
operation.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
PTDI_ADDRESS_IP.
Initialize ReceivedSegments.
* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
(DisplayIPPacket): Call DisplayIPHeader().
(DisplayTCPHeader): Change format strings.
* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
TCPSegmentList): Add.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
function.
(TCPiBuildPacket): Build segment.
(TCPStartup): Initialize TCPSegmentList.
(TCPShutdown): Cleanup TCPSegmentList.
svn path=/trunk/; revision=8537
2004-03-04 20:45:39 +00:00
|
|
|
PTDI_CONNECTION_INFORMATION RequestConnectionInfo;
|
|
|
|
IO_STATUS_BLOCK Iosb;
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
} AFD_LISTEN_REQUEST, *PAFD_LISTEN_REQUEST;
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
typedef struct IPSNMP_INFO {
|
|
|
|
ULONG Forwarding;
|
|
|
|
ULONG DefaultTTL;
|
|
|
|
ULONG InReceives;
|
|
|
|
ULONG InHdrErrors;
|
|
|
|
ULONG InAddrErrors;
|
|
|
|
ULONG ForwDatagrams;
|
|
|
|
ULONG InUnknownProtos;
|
|
|
|
ULONG InDiscards;
|
|
|
|
ULONG InDelivers;
|
|
|
|
ULONG OutRequests;
|
|
|
|
ULONG RoutingDiscards;
|
|
|
|
ULONG OutDiscards;
|
|
|
|
ULONG OutNoRoutes;
|
|
|
|
ULONG ReasmTimeout;
|
|
|
|
ULONG ReasmReqds;
|
|
|
|
ULONG ReasmOks;
|
|
|
|
ULONG ReasmFails;
|
|
|
|
ULONG FragOks;
|
|
|
|
ULONG FragFails;
|
|
|
|
ULONG FragCreates;
|
|
|
|
ULONG NumIf;
|
|
|
|
ULONG NumAddr;
|
|
|
|
ULONG NumRoutes;
|
|
|
|
} IPSNMP_INFO, *PIPSNMP_INFO;
|
|
|
|
|
|
|
|
typedef struct IPADDR_ENTRY {
|
|
|
|
ULONG Addr;
|
|
|
|
ULONG Index;
|
|
|
|
ULONG Mask;
|
|
|
|
ULONG BcastAddr;
|
|
|
|
ULONG ReasmSize;
|
|
|
|
USHORT Context;
|
|
|
|
USHORT Pad;
|
|
|
|
} IPADDR_ENTRY, *PIPADDR_ENTRY;
|
|
|
|
|
|
|
|
|
|
|
|
#define TL_INSTANCE 0
|
|
|
|
|
2001-06-04 11:26:13 +00:00
|
|
|
/* IPv4 header format */
|
|
|
|
typedef struct IPv4_HEADER {
|
|
|
|
UCHAR VerIHL; /* 4-bit version, 4-bit Internet Header Length */
|
|
|
|
UCHAR Tos; /* Type of Service */
|
|
|
|
USHORT TotalLength; /* Total Length */
|
|
|
|
USHORT Id; /* Identification */
|
|
|
|
USHORT FlagsFragOfs; /* 3-bit Flags, 13-bit Fragment Offset */
|
|
|
|
UCHAR Ttl; /* Time to Live */
|
|
|
|
UCHAR Protocol; /* Protocol */
|
|
|
|
USHORT Checksum; /* Header Checksum */
|
|
|
|
ULONG SrcAddr; /* Source Address */
|
|
|
|
ULONG DstAddr; /* Destination Address */
|
|
|
|
} IPv4_HEADER, *PIPv4_HEADER;
|
|
|
|
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
/* IOCTL codes */
|
|
|
|
|
|
|
|
#define IOCTL_TCP_QUERY_INFORMATION_EX \
|
|
|
|
CTL_CODE(FILE_DEVICE_NETWORK, 0, METHOD_NEITHER, FILE_ANY_ACCESS)
|
|
|
|
|
|
|
|
#define IOCTL_TCP_SET_INFORMATION_EX \
|
|
|
|
CTL_CODE(FILE_DEVICE_NETWORK, 1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef i386
|
|
|
|
|
|
|
|
/* DWORD network to host byte order conversion for i386 */
|
|
|
|
#define DN2H(dw) \
|
|
|
|
((((dw) & 0xFF000000L) >> 24) | \
|
|
|
|
(((dw) & 0x00FF0000L) >> 8) | \
|
|
|
|
(((dw) & 0x0000FF00L) << 8) | \
|
|
|
|
(((dw) & 0x000000FFL) << 24))
|
|
|
|
|
|
|
|
/* DWORD host to network byte order conversion for i386 */
|
|
|
|
#define DH2N(dw) \
|
|
|
|
((((dw) & 0xFF000000L) >> 24) | \
|
|
|
|
(((dw) & 0x00FF0000L) >> 8) | \
|
|
|
|
(((dw) & 0x0000FF00L) << 8) | \
|
|
|
|
(((dw) & 0x000000FFL) << 24))
|
|
|
|
|
|
|
|
/* WORD network to host order conversion for i386 */
|
|
|
|
#define WN2H(w) \
|
|
|
|
((((w) & 0xFF00) >> 8) | \
|
|
|
|
(((w) & 0x00FF) << 8))
|
|
|
|
|
|
|
|
/* WORD host to network byte order conversion for i386 */
|
|
|
|
#define WH2N(w) \
|
|
|
|
((((w) & 0xFF00) >> 8) | \
|
|
|
|
(((w) & 0x00FF) << 8))
|
|
|
|
|
|
|
|
#else /* i386 */
|
|
|
|
|
|
|
|
/* DWORD network to host byte order conversion for other architectures */
|
|
|
|
#define DN2H(dw) \
|
|
|
|
(dw)
|
|
|
|
|
|
|
|
/* DWORD host to network byte order conversion for other architectures */
|
|
|
|
#define DH2N(dw) \
|
|
|
|
(dw)
|
|
|
|
|
|
|
|
/* WORD network to host order conversion for other architectures */
|
|
|
|
#define WN2H(w) \
|
|
|
|
(w)
|
|
|
|
|
|
|
|
/* WORD host to network byte order conversion for other architectures */
|
|
|
|
#define WH2N(w) \
|
|
|
|
(w)
|
|
|
|
|
|
|
|
#endif /* i386 */
|
|
|
|
|
|
|
|
|
2001-06-04 11:26:13 +00:00
|
|
|
extern NPAGED_LOOKASIDE_LIST BufferLookasideList;
|
2001-06-15 17:48:43 +00:00
|
|
|
extern NPAGED_LOOKASIDE_LIST ReadRequestLookasideList;
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
extern NPAGED_LOOKASIDE_LIST ListenRequestLookasideList;
|
2001-06-04 11:26:13 +00:00
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
/* Prototypes from dispatch.c */
|
|
|
|
|
|
|
|
NTSTATUS AfdDispBind(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispListen(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispSendTo(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispRecvFrom(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
2001-06-04 11:26:13 +00:00
|
|
|
NTSTATUS AfdDispSelect(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
2001-07-04 20:40:24 +00:00
|
|
|
NTSTATUS AfdDispEventSelect(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispEnumNetworkEvents(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispRecv(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispSend(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
|
|
|
NTSTATUS AfdDispConnect(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
2004-02-10 17:12:42 +00:00
|
|
|
NTSTATUS AfdDispGetName(
|
|
|
|
PIRP Irp,
|
|
|
|
PIO_STACK_LOCATION IrpSp);
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
/* Prototypes from event.c */
|
|
|
|
|
|
|
|
NTSTATUS AfdRegisterEventHandlers(
|
|
|
|
PAFDFCB FCB);
|
|
|
|
|
|
|
|
NTSTATUS AfdDeregisterEventHandlers(
|
|
|
|
PAFDFCB FCB);
|
|
|
|
|
|
|
|
/* Prototypes from opnclose.c */
|
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
NTSTATUS STDCALL AfdCreate(
|
2001-01-14 17:44:38 +00:00
|
|
|
PDEVICE_OBJECT DeviceObject,
|
|
|
|
PIRP Irp);
|
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
NTSTATUS STDCALL AfdClose(
|
2001-01-14 17:44:38 +00:00
|
|
|
PDEVICE_OBJECT DeviceObject,
|
|
|
|
PIRP Irp);
|
|
|
|
|
|
|
|
/* Prototypes from rdwr.c */
|
|
|
|
|
|
|
|
NTSTATUS AfdEventReceiveDatagramHandler(
|
|
|
|
IN PVOID TdiEventContext,
|
|
|
|
IN LONG SourceAddressLength,
|
|
|
|
IN PVOID SourceAddress,
|
|
|
|
IN LONG OptionsLength,
|
|
|
|
IN PVOID Options,
|
|
|
|
IN ULONG ReceiveDatagramFlags,
|
|
|
|
IN ULONG BytesIndicated,
|
|
|
|
IN ULONG BytesAvailable,
|
|
|
|
OUT ULONG * BytesTaken,
|
|
|
|
IN PVOID Tsdu,
|
|
|
|
OUT PIRP * IoRequestPacket);
|
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
NTSTATUS STDCALL AfdRead(
|
2001-01-14 17:44:38 +00:00
|
|
|
PDEVICE_OBJECT DeviceObject,
|
|
|
|
PIRP Irp);
|
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
NTSTATUS STDCALL AfdWrite(
|
2001-01-14 17:44:38 +00:00
|
|
|
PDEVICE_OBJECT DeviceObject,
|
|
|
|
PIRP Irp);
|
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
/* Prototypes from routines.c */
|
|
|
|
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
VOID DumpName(
|
|
|
|
LPSOCKADDR Name);
|
|
|
|
|
2004-06-15 02:56:13 +00:00
|
|
|
/* Requires caller to hold the recv queue lock */
|
|
|
|
VOID TryToSatisfyRecvRequest( PAFDFCB FCB, BOOL Continuous );
|
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
ULONG WSABufferSize(
|
|
|
|
LPWSABUF Buffers,
|
|
|
|
DWORD BufferCount);
|
|
|
|
|
|
|
|
NTSTATUS MergeWSABuffers(
|
|
|
|
LPWSABUF Buffers,
|
|
|
|
DWORD BufferCount,
|
|
|
|
PVOID Destination,
|
|
|
|
ULONG MaxLength,
|
|
|
|
PULONG BytesCopied);
|
|
|
|
|
2001-06-04 11:26:13 +00:00
|
|
|
NTSTATUS FillWSABuffers(
|
|
|
|
PAFDFCB FCB,
|
|
|
|
LPWSABUF Buffers,
|
|
|
|
DWORD BufferCount,
|
2004-06-14 03:22:27 +00:00
|
|
|
PULONG BytesCopied,
|
|
|
|
BOOL Continuous);
|
2001-06-04 11:26:13 +00:00
|
|
|
|
|
|
|
VOID BuildIPv4Header(
|
|
|
|
PIPv4_HEADER IPHeader,
|
|
|
|
ULONG TotalSize,
|
|
|
|
ULONG Protocol,
|
|
|
|
PSOCKADDR SourceAddress,
|
|
|
|
PSOCKADDR DestinationAddress);
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
/* Prototypes from tdi.c */
|
|
|
|
|
|
|
|
NTSTATUS TdiCloseDevice(
|
2001-07-04 20:40:24 +00:00
|
|
|
HANDLE Handle,
|
|
|
|
PFILE_OBJECT FileObject);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
|
|
|
NTSTATUS TdiOpenAddressFileIPv4(
|
2001-07-04 20:40:24 +00:00
|
|
|
PUNICODE_STRING DeviceName,
|
|
|
|
LPSOCKADDR Name,
|
|
|
|
PHANDLE AddressHandle,
|
|
|
|
PFILE_OBJECT *AddressObject);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
2001-05-01 22:44:07 +00:00
|
|
|
NTSTATUS TdiOpenAddressFile(
|
2001-07-04 20:40:24 +00:00
|
|
|
PUNICODE_STRING DeviceName,
|
|
|
|
LPSOCKADDR Name,
|
|
|
|
PHANDLE AddressHandle,
|
|
|
|
PFILE_OBJECT *AddressObject);
|
|
|
|
|
|
|
|
NTSTATUS TdiOpenConnectionEndpointFile(
|
|
|
|
PUNICODE_STRING DeviceName,
|
|
|
|
PHANDLE ConnectionHandle,
|
|
|
|
PFILE_OBJECT *ConnectionObject);
|
|
|
|
|
|
|
|
NTSTATUS TdiConnect(
|
|
|
|
PFILE_OBJECT ConnectionObject,
|
|
|
|
LPSOCKADDR RemoteAddress);
|
|
|
|
|
|
|
|
NTSTATUS TdiAssociateAddressFile(
|
|
|
|
HANDLE AddressHandle,
|
|
|
|
PFILE_OBJECT ConnectionObject);
|
2001-05-01 22:44:07 +00:00
|
|
|
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
NTSTATUS TdiListen(
|
2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/tcpip/i386: New directory.
* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
* drivers/net/tcpip/notes.txt: New file.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
network event.
(AfdDispEventSelect): Reference event handle.
* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
EventObject of type PKEVENT.
* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
(TARGET_OBJECTS): Add ARCH_OBJECTS.
* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
prototype.
(TCPv4Checksum): New macro.
(CorrectChecksum): Rename to IPv4CorrectChecksum.
(TCPv4CorrectChecksum): New macro.
* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
and AckNumber.
(TCP_SEGMENT): New structure.
(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
for Data on failure.
* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
from ChecksumCompute.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
operation.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
PTDI_ADDRESS_IP.
Initialize ReceivedSegments.
* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
(DisplayIPPacket): Call DisplayIPHeader().
(DisplayTCPHeader): Change format strings.
* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
TCPSegmentList): Add.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
function.
(TCPiBuildPacket): Build segment.
(TCPStartup): Initialize TCPSegmentList.
(TCPShutdown): Cleanup TCPSegmentList.
svn path=/trunk/; revision=8537
2004-03-04 20:45:39 +00:00
|
|
|
PAFD_LISTEN_REQUEST Request,
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
PIO_COMPLETION_ROUTINE CompletionRoutine,
|
|
|
|
PVOID CompletionContext);
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
NTSTATUS TdiSetEventHandler(
|
2001-07-04 20:40:24 +00:00
|
|
|
PFILE_OBJECT FileObject,
|
|
|
|
LONG EventType,
|
|
|
|
PVOID Handler,
|
|
|
|
PVOID Context);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
2004-03-05 00:48:11 +00:00
|
|
|
NTSTATUS TdiQueryInformation(
|
|
|
|
PFILE_OBJECT FileObject,
|
|
|
|
LONG QueryType,
|
|
|
|
PMDL MdlBuffer);
|
|
|
|
|
2001-01-14 17:44:38 +00:00
|
|
|
NTSTATUS TdiQueryDeviceControl(
|
2001-07-04 20:40:24 +00:00
|
|
|
PFILE_OBJECT FileObject,
|
|
|
|
ULONG IoControlCode,
|
|
|
|
PVOID InputBuffer,
|
|
|
|
ULONG InputBufferLength,
|
|
|
|
PVOID OutputBuffer,
|
|
|
|
ULONG OutputBufferLength,
|
|
|
|
PULONG Return);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
|
|
|
NTSTATUS TdiQueryInformationEx(
|
2001-07-04 20:40:24 +00:00
|
|
|
PFILE_OBJECT FileObject,
|
|
|
|
ULONG Entity,
|
|
|
|
ULONG Instance,
|
|
|
|
ULONG Class,
|
|
|
|
ULONG Type,
|
|
|
|
ULONG Id,
|
|
|
|
PVOID OutputBuffer,
|
|
|
|
PULONG OutputLength);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
|
|
|
NTSTATUS TdiQueryAddress(
|
2001-07-04 20:40:24 +00:00
|
|
|
PFILE_OBJECT FileObject,
|
|
|
|
PULONG Address);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
|
|
|
NTSTATUS TdiSend(
|
2001-07-04 20:40:24 +00:00
|
|
|
PFILE_OBJECT TransportObject,
|
|
|
|
PVOID Buffer,
|
|
|
|
ULONG BufferSize);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
|
|
|
NTSTATUS TdiSendDatagram(
|
2001-07-04 20:40:24 +00:00
|
|
|
PFILE_OBJECT TransportObject,
|
|
|
|
LPSOCKADDR Address,
|
|
|
|
PMDL Mdl,
|
|
|
|
ULONG BufferSize);
|
2001-01-14 17:44:38 +00:00
|
|
|
|
|
|
|
#endif /*__AFD_H */
|
|
|
|
|
|
|
|
/* EOF */
|