ReactOS 0.4.16-dev-297-gc569aee
|
#include <ntifs.h>
#include <ndk/obtypes.h>
#include <tdi.h>
#include <tcpioctl.h>
#include <windef.h>
#include <winsock2.h>
#include <afd/shared.h>
#include <pseh/pseh2.h>
#include "tdi_proto.h"
#include "tdiconn.h"
#include "debug.h"
Go to the source code of this file.
Classes | |
struct | IPADDR_ENTRY |
struct | _AFD_MAPBUF |
struct | _AFD_DEVICE_EXTENSION |
struct | _AFD_ACTIVE_POLL |
struct | _IRP_LIST |
struct | _AFD_TDI_OBJECT |
struct | _AFD_TDI_OBJECT_QELT |
struct | _AFD_IN_FLIGHT_REQUEST |
struct | _AFD_DATA_WINDOW |
struct | _AFD_STORED_DATAGRAM |
struct | _AFD_FCB |
Variables | |
DRIVER_CANCEL | AfdCancelHandler |
IO_COMPLETION_ROUTINE | ReceiveComplete |
IO_COMPLETION_ROUTINE | PacketSocketRecvComplete |
#define EXTRA_LOCK_BUFFERS |
typedef struct _AFD_ACTIVE_POLL AFD_ACTIVE_POLL |
typedef struct _AFD_DATA_WINDOW AFD_DATA_WINDOW |
typedef struct _AFD_MAPBUF AFD_MAPBUF |
typedef struct _AFD_TDI_OBJECT AFD_TDI_OBJECT |
typedef struct IPADDR_ENTRY IPADDR_ENTRY |
typedef struct _AFD_ACTIVE_POLL * PAFD_ACTIVE_POLL |
typedef struct _AFD_DATA_WINDOW * PAFD_DATA_WINDOW |
typedef struct _AFD_DEVICE_EXTENSION * PAFD_DEVICE_EXTENSION |
typedef struct _AFD_MAPBUF * PAFD_MAPBUF |
typedef struct _AFD_STORED_DATAGRAM * PAFD_STORED_DATAGRAM |
typedef struct _AFD_TDI_OBJECT * PAFD_TDI_OBJECT |
typedef struct _AFD_TDI_OBJECT_QELT * PAFD_TDI_OBJECT_QELT |
typedef struct IPADDR_ENTRY * PIPADDR_ENTRY |
NTSTATUS AfdAccept | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 337 of file listen.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdBindSocket | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 76 of file bind.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdConnectedSocketReadData | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp, | ||
BOOLEAN | Short | ||
) |
Definition at line 415 of file read.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdConnectedSocketWriteData | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp, | ||
BOOLEAN | Short | ||
) |
Definition at line 329 of file write.c.
Referenced by AfdDispatch(), and StreamSocketConnectComplete().
NTSTATUS NTAPI AfdEnumEvents | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 328 of file select.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdEventSelect | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 265 of file select.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetConnectData | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 127 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetConnectOptions | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 15 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetContext | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 14 of file context.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetContextSize | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 40 of file context.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetInfo | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 14 of file info.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetPeerName | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 281 of file info.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdGetSockName | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 232 of file info.c.
Referenced by AfdDispatch().
NTSTATUS AfdListenSocket | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 225 of file listen.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdPacketSocketReadData | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 696 of file read.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdPacketSocketWriteData | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 564 of file write.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSelect | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 165 of file select.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSetConnectData | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 157 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSetConnectDataSize | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 197 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSetConnectOptions | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 45 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSetConnectOptionsSize | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 86 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSetContext | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 64 of file context.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdSetInfo | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 102 of file info.c.
Referenced by AfdDispatch().
NTSTATUS NTAPI AfdStreamSocketConnect | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 431 of file connect.c.
Referenced by AfdDispatch().
NTSTATUS AfdWaitForListen | ( | PDEVICE_OBJECT | DeviceObject, |
PIRP | Irp, | ||
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 293 of file listen.c.
Referenced by AfdDispatch().
BOOLEAN CheckUnlockExtraBuffers | ( | PAFD_FCB | FCB, |
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 1089 of file main.c.
Referenced by CleanupPendingIrp(), PacketSocketRecvComplete(), and SatisfyPacketRecvRequest().
PVOID GetLockedData | ( | PIRP | Irp, |
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 13 of file lock.c.
Referenced by CleanupPendingIrp(), LockRequest(), PacketSocketRecvComplete(), PacketSocketSendComplete(), ReceiveActivity(), ReceiveComplete(), SatisfyPacketRecvRequest(), and SendComplete().
VOID KillSelectsForFCB | ( | PAFD_DEVICE_EXTENSION | DeviceExt, |
PFILE_OBJECT | FileObject, | ||
BOOLEAN | ExclusiveOnly | ||
) |
Definition at line 125 of file select.c.
Referenced by AfdCleanupSocket(), AfdCloseSocket(), and AfdSelect().
Definition at line 433 of file lock.c.
Referenced by AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdPacketSocketReadData(), AfdStreamSocketConnect(), and AfdWaitForListen().
PAFD_WSABUF LockBuffers | ( | PAFD_WSABUF | Buf, |
UINT | Count, | ||
PVOID | AddressBuf, | ||
PINT | AddressLen, | ||
BOOLEAN | Write, | ||
BOOLEAN | LockAddress, | ||
KPROCESSOR_MODE | LockMode | ||
) |
Definition at line 205 of file lock.c.
Referenced by AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdPacketSocketReadData(), and AfdPacketSocketWriteData().
PAFD_HANDLE LockHandles | ( | PAFD_HANDLE | HandleArray, |
UINT | HandleCount | ||
) |
Definition at line 310 of file lock.c.
Referenced by AfdSelect().
PVOID LockRequest | ( | PIRP | Irp, |
PIO_STACK_LOCATION | IrpSp, | ||
BOOLEAN | Output, | ||
KPROCESSOR_MODE * | LockMode | ||
) |
Definition at line 24 of file lock.c.
Referenced by AfdBindSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdEnumEvents(), AfdEventSelect(), AfdGetInfo(), AfdGetTdiHandles(), AfdListenSocket(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), AfdSetConnectData(), AfdSetConnectDataSize(), AfdSetConnectOptions(), AfdSetConnectOptionsSize(), AfdSetContext(), AfdSetDisconnectData(), AfdSetDisconnectDataSize(), AfdSetDisconnectOptions(), AfdSetDisconnectOptionsSize(), AfdSetInfo(), AfdStreamSocketConnect(), MimeProtocol_LockRequest(), PersistMoniker_Load(), Protocol_Continue(), Protocol_LockRequest(), Protocol_Start(), ProtocolEmul_LockRequest(), test_binding(), test_BindToStorage(), test_download(), test_submit(), and thread_proc().
Definition at line 387 of file lock.c.
Referenced by AfdAccept(), AfdBindSocket(), AfdCleanupSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdEnumEvents(), AfdEventSelect(), AfdGetConnectData(), AfdGetConnectOptions(), AfdGetContext(), AfdGetContextSize(), AfdGetDisconnectData(), AfdGetDisconnectOptions(), AfdGetInfo(), AfdGetPeerName(), AfdGetSockName(), AfdGetTdiHandles(), AfdListenSocket(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), AfdSetConnectData(), AfdSetConnectDataSize(), AfdSetConnectOptions(), AfdSetConnectOptionsSize(), AfdSetContext(), AfdSetDisconnectData(), AfdSetDisconnectDataSize(), AfdSetDisconnectOptions(), AfdSetDisconnectOptionsSize(), AfdSetInfo(), AfdStreamSocketConnect(), AfdWaitForListen(), and SatisfyAccept().
Definition at line 259 of file connect.c.
Referenced by SatisfyAccept(), and StreamSocketConnectComplete().
Definition at line 29 of file main.c.
Referenced by AfdStreamSocketConnect().
VOID PollReeval | ( | PAFD_DEVICE_EXTENSION | DeviceObject, |
PFILE_OBJECT | FileObject | ||
) |
Definition at line 407 of file select.c.
Referenced by AfdAccept(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdCreateSocket(), AfdPacketSocketReadData(), AfdWaitForListen(), DisconnectComplete(), ListenComplete(), MakeSocketIntoConnection(), PacketSocketRecvComplete(), PacketSocketSendComplete(), ReceiveActivity(), SendComplete(), and StreamSocketConnectComplete().
Definition at line 397 of file lock.c.
Referenced by AfdConnectedSocketWriteData(), AfdDisconnect(), AfdPacketSocketWriteData(), AfdStreamSocketConnect(), and LeaveIrpUntilLater().
Definition at line 703 of file main.c.
Referenced by SendComplete().
VOID SignalSocket | ( | PAFD_ACTIVE_POLL Poll | OPTIONAL, |
PIRP _Irp | OPTIONAL, | ||
PAFD_POLL_INFO | PollReq, | ||
NTSTATUS | Status | ||
) |
Definition at line 56 of file select.c.
Referenced by AfdSelect(), CleanupPendingIrp(), KillSelectsForFCB(), PollReeval(), and SelectTimeout().
Definition at line 360 of file lock.c.
Referenced by AfdAccept(), AfdBindSocket(), AfdCancelHandler(), AfdCleanupSocket(), AfdCloseSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdEnumEvents(), AfdEventSelect(), AfdGetConnectData(), AfdGetConnectOptions(), AfdGetContext(), AfdGetContextSize(), AfdGetDisconnectData(), AfdGetDisconnectOptions(), AfdGetInfo(), AfdGetPeerName(), AfdGetSockName(), AfdGetTdiHandles(), AfdListenSocket(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), AfdSetConnectData(), AfdSetConnectDataSize(), AfdSetConnectOptions(), AfdSetConnectOptionsSize(), AfdSetContext(), AfdSetDisconnectData(), AfdSetDisconnectDataSize(), AfdSetDisconnectOptions(), AfdSetDisconnectOptionsSize(), AfdSetInfo(), AfdStreamSocketConnect(), AfdWaitForListen(), DisconnectComplete(), ListenComplete(), PacketSocketRecvComplete(), PacketSocketSendComplete(), ReceiveComplete(), SatisfyAccept(), SendComplete(), and StreamSocketConnectComplete().
Definition at line 370 of file lock.c.
Referenced by AfdAccept(), AfdCancelHandler(), AfdCloseSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdPacketSocketWriteData(), AfdStreamSocketConnect(), AfdWaitForListen(), DisconnectComplete(), LeaveIrpUntilLater(), ListenComplete(), PacketSocketRecvComplete(), PacketSocketSendComplete(), ReceiveComplete(), SendComplete(), StreamSocketConnectComplete(), and UnlockAndMaybeComplete().
NTSTATUS TdiAssociateAddressFile | ( | HANDLE | AddressHandle, |
PFILE_OBJECT | ConnectionObject | ||
) |
Definition at line 391 of file tdi.c.
Referenced by WarmSocketForConnection().
NTSTATUS TdiDisassociateAddressFile | ( | PFILE_OBJECT | ConnectionObject | ) |
Definition at line 442 of file tdi.c.
Referenced by AfdCloseSocket().
NTSTATUS TdiListen | ( | PIRP * | Irp, |
PFILE_OBJECT | ConnectionObject, | ||
PTDI_CONNECTION_INFORMATION * | RequestConnectionInfo, | ||
PTDI_CONNECTION_INFORMATION * | ReturnConnectionInfo, | ||
PIO_COMPLETION_ROUTINE | CompletionRoutine, | ||
PVOID | CompletionContext | ||
) |
Definition at line 489 of file tdi.c.
Referenced by AfdListenSocket(), and ListenComplete().
NTSTATUS TdiOpenAddressFile | ( | PUNICODE_STRING | DeviceName, |
PTRANSPORT_ADDRESS | Name, | ||
ULONG | ShareType, | ||
PHANDLE | AddressHandle, | ||
PFILE_OBJECT * | AddressObject | ||
) |
Definition at line 170 of file tdi.c.
Referenced by WarmSocketForBind().
NTSTATUS TdiQueryMaxDatagramLength | ( | PFILE_OBJECT | FileObject, |
PUINT | MaxDatagramLength | ||
) |
Definition at line 226 of file tdi.c.
Referenced by MakeSocketIntoConnection(), and WarmSocketForBind().
NTSTATUS TdiReceive | ( | PIRP * | Irp, |
PFILE_OBJECT | ConnectionObject, | ||
USHORT | Flags, | ||
PCHAR | Buffer, | ||
UINT | BufferLength, | ||
PIO_COMPLETION_ROUTINE | CompletionRoutine, | ||
PVOID | CompletionContext | ||
) |
Definition at line 976 of file tdi.c.
Referenced by MakeSocketIntoConnection(), and RefillSocketBuffer().
NTSTATUS TdiReceiveDatagram | ( | PIRP * | Irp, |
PFILE_OBJECT | TransportObject, | ||
USHORT | Flags, | ||
PCHAR | Buffer, | ||
UINT | BufferLength, | ||
PTDI_CONNECTION_INFORMATION | From, | ||
PIO_COMPLETION_ROUTINE | CompletionRoutine, | ||
PVOID | CompletionContext | ||
) |
Definition at line 1058 of file tdi.c.
Referenced by PacketSocketRecvComplete(), and WarmSocketForBind().
NTSTATUS TdiSend | ( | PIRP * | Irp, |
PFILE_OBJECT | ConnectionObject, | ||
USHORT | Flags, | ||
PCHAR | Buffer, | ||
UINT | BufferLength, | ||
PIO_COMPLETION_ROUTINE | CompletionRoutine, | ||
PVOID | CompletionContext | ||
) |
Definition at line 898 of file tdi.c.
Referenced by AfdConnectedSocketWriteData(), and SendComplete().
NTSTATUS TdiSendDatagram | ( | PIRP * | Irp, |
PFILE_OBJECT | TransportObject, | ||
PCHAR | Buffer, | ||
UINT | BufferLength, | ||
PTDI_CONNECTION_INFORMATION | To, | ||
PIO_COMPLETION_ROUTINE | CompletionRoutine, | ||
PVOID | CompletionContext | ||
) |
Definition at line 1151 of file tdi.c.
Referenced by AfdConnectedSocketWriteData(), and AfdPacketSocketWriteData().
Definition at line 374 of file lock.c.
Referenced by AfdAccept(), AfdBindSocket(), AfdCancelHandler(), AfdCleanupSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdEnumEvents(), AfdEventSelect(), AfdGetConnectData(), AfdGetConnectOptions(), AfdGetContext(), AfdGetContextSize(), AfdGetDisconnectData(), AfdGetDisconnectOptions(), AfdGetInfo(), AfdGetPeerName(), AfdGetSockName(), AfdGetTdiHandles(), AfdListenSocket(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), AfdSetConnectData(), AfdSetConnectDataSize(), AfdSetConnectOptions(), AfdSetConnectOptionsSize(), AfdSetContext(), AfdSetDisconnectData(), AfdSetDisconnectDataSize(), AfdSetDisconnectOptions(), AfdSetDisconnectOptionsSize(), AfdSetInfo(), AfdStreamSocketConnect(), AfdWaitForListen(), and SatisfyAccept().
VOID UnlockBuffers | ( | PAFD_WSABUF | Buf, |
UINT | Count, | ||
BOOL | Address | ||
) |
Definition at line 289 of file lock.c.
Referenced by AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), CleanupPendingIrp(), PacketSocketRecvComplete(), PacketSocketSendComplete(), ReceiveActivity(), ReceiveComplete(), and SendComplete().
VOID UnlockHandles | ( | PAFD_HANDLE | HandleArray, |
UINT | HandleCount | ||
) |
Definition at line 348 of file lock.c.
Referenced by LockHandles(), and SignalSocket().
VOID UnlockRequest | ( | PIRP | Irp, |
PIO_STACK_LOCATION | IrpSp | ||
) |
Definition at line 180 of file lock.c.
Referenced by AfdConnectedSocketWriteData(), AfdDisconnect(), AfdPacketSocketWriteData(), DisconnectComplete(), ListenComplete(), LostSocket(), MimeProtocol_UnlockRequest(), PacketSocketRecvComplete(), PacketSocketSendComplete(), Protocol_UnlockRequest(), ProtocolEmul_UnlockRequest(), ReceiveActivity(), ReceiveComplete(), SatisfyPreAccept(), SendComplete(), SignalSocket(), StreamSocketConnectComplete(), test_binding(), test_BindToObject(), test_BindToStorage(), test_download(), test_submit(), test_URLDownloadToFile(), and UnlockAndMaybeComplete().
Definition at line 13 of file bind.c.
Referenced by AfdBindSocket(), AfdPacketSocketWriteData(), and AfdStreamSocketConnect().
Definition at line 238 of file connect.c.
Referenced by AfdListenSocket(), AfdStreamSocketConnect(), and ListenComplete().
VOID ZeroEvents | ( | PAFD_HANDLE | HandleArray, |
UINT | HandleCount | ||
) |
Definition at line 44 of file select.c.
Referenced by CleanupPendingIrp(), KillSelectsForFCB(), and SelectTimeout().
DRIVER_CANCEL AfdCancelHandler |
Definition at line 302 of file afd.h.
Referenced by AfdConnectedSocketReadData(), AfdSelect(), and QueueUserModeIrp().
IO_COMPLETION_ROUTINE PacketSocketRecvComplete |
Definition at line 310 of file afd.h.
Referenced by PacketSocketRecvComplete(), and WarmSocketForBind().
IO_COMPLETION_ROUTINE ReceiveComplete |
Definition at line 308 of file afd.h.
Referenced by MakeSocketIntoConnection(), and RefillSocketBuffer().