117 DbgPrint(
"----------- TCP/IP Active Object Dump -------------\n");
126 DbgPrint(
"Address File (%s, %d, %d) @ 0x%p | Ref count: %d | Sharers: %d\n",
134 DbgPrint(
"\tAssociated endpoints: ");
148 CurrentEntry = CurrentEntry->
Flink;
170 DbgPrint(
"\tRequest lists: Connect: %s | Recv: %s | Send: %s | Shutdown: %s | Listen: %s\n",
181 CurrentEntry = CurrentEntry->
Flink;
186 DbgPrint(
"---------------------------------------------------\n");
215 CurrentEntry = CurrentEntry->
Flink;
252 CurrentEntry = SearchContext->
Next;
268 if ((Current->
Port == SearchContext->
Port) &&
275 CurrentEntry = CurrentEntry->
Flink;
280 SearchContext->
Next = CurrentEntry->
Flink;
412 if ((Shared !=
FALSE) && (
Address->Address[0].Address[0].sin_port != 0))
415 if (AddrFile !=
NULL)
417 Request->Handle.AddressHandle = AddrFile;
473 if (
Address->Address[0].Address[0].sin_port)
479 if (AllocatedPort == (
UINT)-1)
484 AddrFile->
Port = AllocatedPort;
495 if (AllocatedPort == (
UINT)-1)
500 AddrFile->
Port = AllocatedPort;
517 if ((
Address->Address[0].Address[0].sin_port &&
518 AllocatedPort !=
Address->Address[0].Address[0].sin_port) ||
519 AllocatedPort == (
UINT)-1)
524 AddrFile->
Port = AllocatedPort;
528 Address->Address[0].Address[0].sin_port));
570 Request->Handle.AddressHandle = AddrFile;
653 Request->Handle.ConnectionContext = Connection;
674 Connection =
Request->Handle.ConnectionContext;
703 if (!ControlChannel) {
724 Request->Handle.ControlChannel = ControlChannel;
PIP_INTERFACE AddrLocateInterface(PIP_ADDRESS MatchAddress)
BOOLEAN AddrIsUnspecified(PIP_ADDRESS Address)
BOOLEAN AddrIsEqual(PIP_ADDRESS Address1, PIP_ADDRESS Address2)
#define InterlockedIncrement
#define InterlockedDecrement
#define NT_SUCCESS(StatCode)
#define TI_DbgPrint(_t_, _x_)
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
PCHAR A2S(PIP_ADDRESS Address)
#define RemoveEntryList(Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define KeQuerySystemTime(t)
#define ExDeleteResourceLite(res)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
BOOLEAN AddrIsBroadcastMatch(PIP_ADDRESS UnicastAddress, PIP_ADDRESS BroadcastAddress)
PADDRESS_FILE AddrSearchFirst(PIP_ADDRESS Address, USHORT Port, USHORT Protocol, PAF_SEARCH SearchContext)
KSPIN_LOCK AddressFileListLock
PADDRESS_FILE AddrFindShared(PIP_ADDRESS BindAddress, USHORT Port, USHORT Protocol)
NTSTATUS FileOpenAddress(PTDI_REQUEST Request, PTA_IP_ADDRESS Address, USHORT Protocol, BOOLEAN Shared, PVOID Options)
VOID LogActiveObjects(VOID)
PADDRESS_FILE AddrSearchNext(PAF_SEARCH SearchContext)
NTSTATUS FileCloseConnection(PTDI_REQUEST Request)
LIST_ENTRY ConnectionEndpointListHead
LIST_ENTRY AddressFileListHead
NTSTATUS FileCloseAddress(PTDI_REQUEST Request)
NTSTATUS FileOpenControlChannel(PTDI_REQUEST Request)
KSPIN_LOCK ConnectionEndpointListLock
NTSTATUS FileOpenConnection(PTDI_REQUEST Request, PVOID ClientContext)
VOID AddrFileFree(PVOID Object)
NTSTATUS FileCloseControlChannel(PTDI_REQUEST Request)
VOID ControlChannelFree(PVOID Object)
BOOLEAN AddrReceiveMatch(PIP_ADDRESS LocalAddress, PIP_ADDRESS RemoteAddress)
NTSTATUS ICMPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR BufferData, ULONG DataSize, PULONG DataUsed)
void LibTCPDumpPcb(PVOID SocketContext)
NTSTATUS TCPSocket(PCONNECTION_ENDPOINT Connection, UINT Family, UINT Type, UINT Proto)
VOID TCPFreePort(const UINT Port)
PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint(PVOID ClientContext)
UINT TCPAllocatePort(const UINT HintPort)
NTSTATUS TCPClose(PCONNECTION_ENDPOINT Connection)
VOID UDPFreePort(UINT Port)
NTSTATUS UDPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR BufferData, ULONG DataSize, PULONG DataUsed)
UINT UDPAllocatePort(UINT HintPort)
#define EXCEPTION_EXECUTE_HANDLER
VOID RemoveEntityByContext(PVOID Context)
VOID AddEntity(ULONG EntityType, PVOID Context, ULONG Flags)
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
#define ExFreePoolWithTag(_P, _T)
BOOL SendRequest(PCHAR pInBuffer, ULONG InBufferLength, PCHAR pOutBuffer, PULONG pOutBufferLength)
HANDLE NTAPI PsGetCurrentProcessId(VOID)
PVOID NTAPI PsGetCurrentThreadTeb(VOID)
#define STATUS_INVALID_ADDRESS
#define STATUS_ADDRESS_ALREADY_EXISTS
#define _SEH2_EXCEPT(...)
NTSTATUS RawIPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR Buffer, ULONG DataSize, PULONG DataUsed)
union IP_ADDRESS::@1015 Address
IPv4_RAW_ADDRESS IPv4Address
struct _CONNECTION_ENDPOINT * Connection
DATAGRAM_SEND_ROUTINE Send
LARGE_INTEGER CreationTime
struct _CONNECTION_ENDPOINT * Listener
LIST_ENTRY ConnectRequest
NTSTATUS ReceiveShutdownStatus
LIST_ENTRY ShutdownRequest
struct _CONNECTION_ENDPOINT * Next
LIST_ENTRY ReceiveRequest
DATAGRAM_COMPLETION_ROUTINE Complete
struct _LIST_ENTRY * Flink
#define ForEachInterface(n)
#define UnlockObject(Object)
#define ReferenceObject(Object)
#define LockObject(Object)
#define DereferenceObject(Object)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql