161 "Proto %d, sizeof(CONNECTION_ENDPOINT) = %d\n",
331 (
"Connecting to address %x:%x\n",
386 if (AllocatedPort == (
UINT) -1)
388 DbgPrint(
"ERR: No more ports available.\n");
569 (*BytesReceived) = 0;
676 &AddressIP->
Address[0].Address[0].sin_port));
682 &AddressIP->
Address[0].Address[0].sin_port));
687 AddressIP->
Address[0].Address[0].in_addr = ipaddr.addr;
690 sizeof(AddressIP->
Address[0].Address[0].sin_zero));
711 for(
i = 0;
i < 5;
i++ )
713 for(
Entry = ListHead[
i]->Flink;
NTSTATUS AddrBuildAddress(PTRANSPORT_ADDRESS TdiAddress, PIP_ADDRESS Address, PUSHORT Port)
BOOLEAN AddrIsUnspecified(PIP_ADDRESS Address)
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
#define TI_DbgPrint(_t_, _x_)
VOID IPRegisterProtocol(UINT ProtocolNumber, IP_PROTOCOL_HANDLER Handler)
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
VOID DeallocatePort(PPORT_SET PortSet, ULONG Port)
BOOLEAN AllocatePort(PPORT_SET PortSet, ULONG Port)
VOID PortsShutdown(PPORT_SET PortSet)
NTSTATUS PortsStartup(PPORT_SET PortSet, UINT StartingPort, UINT PortsToManage)
ULONG AllocatePortFromRange(PPORT_SET PortSet, ULONG Lowest, ULONG Highest)
PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination(PIP_ADDRESS Destination)
PDEVICE_OBJECT TCPDeviceObject
void LibTCPGetSocketStatus(PTCP_PCB pcb, PULONG State)
void LibTCPSetNoDelay(PTCP_PCB pcb, BOOLEAN Set)
err_t LibTCPGetPeerName(PTCP_PCB pcb, ip_addr_t *const ipaddr, u16_t *const port)
err_t LibTCPShutdown(PCONNECTION_ENDPOINT Connection, const int shut_rx, const int shut_tx)
struct tcp_pcb * LibTCPSocket(void *arg)
err_t LibTCPConnect(PCONNECTION_ENDPOINT Connection, ip_addr_t *const ipaddr, const u16_t port)
NTSTATUS TCPTranslateError(const err_t err)
err_t LibTCPBind(PCONNECTION_ENDPOINT Connection, ip4_addr_t *const ipaddr, const u16_t port)
NTSTATUS LibTCPGetDataFromConnectionQueue(PCONNECTION_ENDPOINT Connection, PUCHAR RecvBuffer, UINT RecvLen, UINT *Received)
err_t LibTCPClose(PCONNECTION_ENDPOINT Connection, const int safe, const int callback)
err_t LibTCPSend(PCONNECTION_ENDPOINT Connection, void *const dataptr, const u16_t len, ULONG *sent, const int safe)
err_t LibTCPGetHostName(PTCP_PCB pcb, ip_addr_t *const ipaddr, u16_t *const port)
NTSTATUS TCPGetSocketStatus(PCONNECTION_ENDPOINT Connection, PULONG State)
NTSTATUS TCPGetSockAddress(PCONNECTION_ENDPOINT Connection, PTRANSPORT_ADDRESS Address, BOOLEAN GetRemote)
static IO_WORKITEM_ROUTINE DisconnectWorker
VOID ConnectionFree(PVOID Object)
LONG TCP_IPIdentification
VOID TCPReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
NTSTATUS TCPSocket(PCONNECTION_ENDPOINT Connection, UINT Family, UINT Type, UINT Proto)
NTSTATUS TCPShutdown(VOID)
static BOOLEAN TCPInitialized
NTSTATUS TCPDisconnect(PCONNECTION_ENDPOINT Connection, UINT Flags, PLARGE_INTEGER Timeout, PTDI_CONNECTION_INFORMATION ConnInfo, PTDI_CONNECTION_INFORMATION ReturnInfo, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
VOID TCPFreePort(const UINT Port)
NTSTATUS TCPSendData(PCONNECTION_ENDPOINT Connection, PCHAR BufferData, ULONG SendLength, PULONG BytesSent, ULONG Flags, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
NPAGED_LOOKASIDE_LIST TdiBucketLookasideList
NTSTATUS TCPConnect(PCONNECTION_ENDPOINT Connection, PTDI_CONNECTION_INFORMATION ConnInfo, PTDI_CONNECTION_INFORMATION ReturnInfo, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint(PVOID ClientContext)
UINT TCPAllocatePort(const UINT HintPort)
BOOLEAN TCPRemoveIRP(PCONNECTION_ENDPOINT Endpoint, PIRP Irp)
NTSTATUS TCPReceiveData(PCONNECTION_ENDPOINT Connection, PNDIS_BUFFER Buffer, ULONG ReceiveLength, PULONG BytesReceived, ULONG ReceiveFlags, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
NTSTATUS TCPStartup(VOID)
NTSTATUS TCPSetNoDelay(PCONNECTION_ENDPOINT Connection, BOOLEAN Set)
VOID NTAPI DisconnectTimeoutDpc(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
NTSTATUS TCPClose(PCONNECTION_ENDPOINT Connection)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define ExDeleteResourceLite(res)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
LIST_ENTRY ConnectionEndpointListHead
KSPIN_LOCK ConnectionEndpointListLock
pRequest Complete(RequestStatus)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID FlushShutdownQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
VOID CompleteBucket(PCONNECTION_ENDPOINT Connection, PTDI_BUCKET Bucket, const BOOLEAN Synchronous)
VOID FlushReceiveQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
VOID(* PTCP_COMPLETION_ROUTINE)(PVOID Context, NTSTATUS Status, ULONG Count)
VOID FlushAllQueues(PCONNECTION_ENDPOINT Connection, NTSTATUS Status)
VOID FlushSendQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size)
void LibIPInitialize(void)
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
#define ExFreePoolWithTag(_P, _T)
#define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length)
#define _Use_decl_annotations_
#define STATUS_NETWORK_UNREACHABLE
#define STATUS_ADDRESS_ALREADY_EXISTS
#define STATUS_FILE_CLOSED
#define STATUS_REMOTE_DISCONNECT
#define STATUS_INVALID_CONNECTION
#define STATUS_UNEXPECTED_NETWORK_ERROR
#define STATUS_LOCAL_DISCONNECT
#define STATUS_TOO_MANY_ADDRESSES
#define STATUS_BUFFER_TOO_SMALL
#define _Unreferenced_parameter_
base of all file and directory entries
union IP_ADDRESS::@1016 Address
IPv4_RAW_ADDRESS IPv4Address
PIO_WORKITEM DisconnectWorkItem
LIST_ENTRY ConnectRequest
LIST_ENTRY ShutdownRequest
PADDRESS_FILE AddressFile
LIST_ENTRY ReceiveRequest
struct _TA_ADDRESS_IP::_AddrIp Address[1]
PVOID RequestNotifyObject
#define TDI_DISCONNECT_RELEASE
struct _TA_ADDRESS_IP * PTA_IP_ADDRESS
#define TDI_ADDRESS_LENGTH_IP
#define TDI_DISCONNECT_ABORT
#define TDI_ADDRESS_TYPE_IP
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define UnlockObject(Object)
#define ReferenceObject(Object)
#define LockObject(Object)
#define DereferenceObject(Object)
struct _CONNECTION_ENDPOINT * PCONNECTION_ENDPOINT
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
_Must_inspect_result_ _In_ ULONG Flags
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID DeferredContext
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2