14#define ReferenceObject(Object) \
16 ASSERT((Object)->RefCount); \
17 InterlockedIncrement(&((Object)->RefCount)); \
24#define DereferenceObject(Object) \
26 ASSERT((Object)->RefCount); \
27 if (InterlockedDecrement(&((Object)->RefCount)) == 0) \
28 (((Object)->Free)(Object)); \
34#define LockObject(Object) do \
36 ReferenceObject(Object); \
37 KeEnterCriticalRegion(); \
38 ExAcquireResourceExclusiveLite(&(Object)->Resource, TRUE); \
44#define UnlockObject(Object) do \
46 ExReleaseResourceLite(&(Object)->Resource); \
47 KeLeaveCriticalRegion(); \
48 DereferenceObject(Object); \
51#define ASSERT_TCPIP_OBJECT_LOCKED(Object) ASSERT(ExIsResourceAcquiredExclusiveLite(&(Object)->Resource))
VOID(* OBJECT_FREE_ROUTINE)(PVOID Object)
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
BOOLEAN RegisteredReceiveDatagramHandler
struct _CONNECTION_ENDPOINT * Connection
BOOLEAN RegisteredConnectHandler
PTDI_IND_CHAINED_RECEIVE ChainedReceiveHandler
PVOID ChainedReceiveHandlerContext
BOOLEAN RegisteredChainedReceiveExpeditedHandler
PTDI_IND_DISCONNECT DisconnectHandler
PVOID ConnectHandlerContext
PTDI_IND_CHAINED_RECEIVE_DATAGRAM ChainedReceiveDatagramHandler
PVOID DisconnectHandlerContext
DATAGRAM_COMPLETION_ROUTINE Complete
PTDI_IND_ERROR ErrorHandler
PVOID ReceiveHandlerContext
PVOID ExpeditedReceiveHandlerContext
BOOLEAN RegisteredErrorHandler
PTDI_IND_CONNECT ConnectHandler
BOOLEAN RegisteredChainedReceiveHandler
BOOLEAN RegisteredReceiveHandler
PVOID ChainedReceiveDatagramHandlerContext
DATAGRAM_SEND_ROUTINE Send
PVOID ReceiveDatagramHandlerContext
BOOLEAN RegisteredDisconnectHandler
PTDI_IND_RECEIVE_DATAGRAM ReceiveDatagramHandler
PTDI_IND_RECEIVE ReceiveHandler
PVOID ErrorHandlerContext
BOOLEAN RegisteredExpeditedReceiveHandler
LARGE_INTEGER CreationTime
PTDI_IND_CHAINED_RECEIVE_EXPEDITED ChainedReceiveExpeditedHandler
struct _CONNECTION_ENDPOINT * Listener
BOOLEAN RegisteredChainedReceiveDatagramHandler
PTDI_IND_RECEIVE_EXPEDITED ExpeditedReceiveHandler
PVOID ChainedReceiveExpeditedHandlerContext
PIO_WORKITEM DisconnectWorkItem
LIST_ENTRY ConnectRequest
NTSTATUS ReceiveShutdownStatus
LIST_ENTRY ShutdownRequest
PADDRESS_FILE AddressFile
struct _CONNECTION_ENDPOINT * Next
LIST_ENTRY ReceiveRequest
DATAGRAM_COMPLETION_ROUTINE Complete
struct _ADDRESS_FILE * AddressFile
PTDI_CONNECTION_INFORMATION ReturnInfo
DATAGRAM_COMPLETION_ROUTINE UserComplete
DATAGRAM_COMPLETION_ROUTINE Complete
PNDIS_PACKET PacketToSend
DATAGRAM_COMPLETION_ROUTINE Complete
struct _CONNECTION_ENDPOINT * AssociatedEndpoint
TCP_REQUEST_QUERY_INFORMATION_EX QueryInfo
union _TRANSPORT_CONTEXT::@1032 Handle
CONNECTION_CONTEXT ConnectionContext
NTSTATUS(NTAPI * PTDI_IND_RECEIVE_EXPEDITED)(_In_opt_ PVOID TdiEventContext, _In_opt_ CONNECTION_CONTEXT ConnectionContext, _In_ ULONG ReceiveFlags, _In_ ULONG BytesIndicated, _In_ ULONG BytesAvailable, _Out_ ULONG *BytesTaken, _In_ PVOID Tsdu, _Out_opt_ PIRP *IoRequestPacket)
NTSTATUS(NTAPI * PTDI_IND_CHAINED_RECEIVE_DATAGRAM)(_In_opt_ PVOID TdiEventContext, _In_ LONG SourceAddressLength, _In_reads_bytes_(SourceAddressLength) PVOID SourceAddress, _In_ LONG OptionsLength, _In_reads_bytes_opt_(OptionsLength) PVOID Options, _In_ ULONG ReceiveDatagramFlags, _In_ ULONG ReceiveDatagramLength, _In_ ULONG StartingOffset, _In_ PMDL Tsdu, _In_ PVOID TsduDescriptor)
NTSTATUS(NTAPI * PTDI_IND_CHAINED_RECEIVE)(_In_opt_ PVOID TdiEventContext, _In_opt_ CONNECTION_CONTEXT ConnectionContext, _In_ ULONG ReceiveFlags, _In_ ULONG ReceiveLength, _In_ ULONG StartingOffset, _In_ PMDL Tsdu, _In_ PVOID TsduDescriptor)
NTSTATUS(NTAPI * PTDI_IND_ERROR)(_In_opt_ PVOID TdiEventContext, _In_ NTSTATUS Status)
NTSTATUS(NTAPI * PTDI_IND_CHAINED_RECEIVE_EXPEDITED)(_In_opt_ PVOID TdiEventContext, _In_opt_ CONNECTION_CONTEXT ConnectionContext, _In_ ULONG ReceiveFlags, _In_ ULONG ReceiveLength, _In_ ULONG StartingOffset, _In_ PMDL Tsdu, _In_ PVOID TsduDescriptor)
NTSTATUS(NTAPI * PTDI_IND_RECEIVE_DATAGRAM)(_In_opt_ PVOID TdiEventContext, _In_ LONG SourceAddressLength, _In_reads_bytes_(SourceAddressLength) PVOID SourceAddress, _In_ LONG OptionsLength, _In_reads_bytes_opt_(OptionsLength) PVOID Options, _In_ ULONG ReceiveDatagramFlags, _In_ ULONG BytesIndicated, _In_ ULONG BytesAvailable, _Out_ ULONG *BytesTaken, _In_ PVOID Tsdu, _Out_opt_ PIRP *IoRequestPacket)
NTSTATUS(NTAPI * PTDI_IND_RECEIVE)(_In_opt_ PVOID TdiEventContext, _In_opt_ CONNECTION_CONTEXT ConnectionContext, _In_ ULONG ReceiveFlags, _In_ ULONG BytesIndicated, _In_ ULONG BytesAvailable, _Out_ ULONG *BytesTaken, _In_ PVOID Tsdu, _Out_opt_ PIRP *IoRequestPacket)
NTSTATUS(NTAPI * PTDI_IND_CONNECT)(_In_opt_ PVOID TdiEventContext, _In_ LONG RemoteAddressLength, _In_reads_bytes_(RemoteAddressLength) PVOID RemoteAddress, _In_ LONG UserDataLength, _In_reads_bytes_opt_(UserDataLength) PVOID UserData, _In_ LONG OptionsLength, _In_reads_bytes_opt_(OptionsLength) PVOID Options, _Out_ CONNECTION_CONTEXT *ConnectionContext, _Out_ PIRP *AcceptIrp)
NTSTATUS(NTAPI * PTDI_IND_DISCONNECT)(_In_opt_ PVOID TdiEventContext, _In_opt_ CONNECTION_CONTEXT ConnectionContext, _In_ LONG DisconnectDataLength, _In_reads_bytes_opt_(DisconnectDataLength) PVOID DisconnectData, _In_ LONG DisconnectInformationLength, _In_reads_bytes_opt_(DisconnectInformationLength) PVOID DisconnectInformation, _In_ ULONG DisconnectFlags)
struct _DATAGRAM_SEND_REQUEST * PDATAGRAM_SEND_REQUEST
struct _TCP_RECEIVE_REQUEST * PTCP_RECEIVE_REQUEST
struct _DATAGRAM_SEND_REQUEST DATAGRAM_SEND_REQUEST
struct _TCP_RECEIVE_REQUEST TCP_RECEIVE_REQUEST
struct _TRANSPORT_CONTEXT * PTRANSPORT_CONTEXT
struct _CONTROL_CHANNEL CONTROL_CHANNEL
struct _AF_SEARCH AF_SEARCH
DATAGRAM_COMPLETION_ROUTINE PDATAGRAM_COMPLETION_ROUTINE
NTSTATUS(* DATAGRAM_BUILD_ROUTINE)(PVOID Context, PIP_ADDRESS LocalAddress, USHORT LocalPort, PIP_PACKET *IPPacket)
struct _TI_QUERY_CONTEXT TI_QUERY_CONTEXT
struct _TRANSPORT_CONTEXT TRANSPORT_CONTEXT
struct _TCP_SEGMENT * PTCP_SEGMENT
struct _CONNECTION_ENDPOINT CONNECTION_ENDPOINT
struct _TCP_SEGMENT TCP_SEGMENT
NTSTATUS(* DATAGRAM_SEND_ROUTINE)(struct _ADDRESS_FILE *AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR Buffer, ULONG DataSize, PULONG DataUsed)
struct _DATAGRAM_RECEIVE_REQUEST DATAGRAM_RECEIVE_REQUEST
struct _CONTROL_CHANNEL * PCONTROL_CHANNEL
struct _CONNECTION_ENDPOINT * PCONNECTION_ENDPOINT
struct _ADDRESS_FILE * PADDRESS_FILE
struct _DATAGRAM_RECEIVE_REQUEST * PDATAGRAM_RECEIVE_REQUEST
struct _TDI_BUCKET TDI_BUCKET
struct _TDI_BUCKET * PTDI_BUCKET
struct _TI_QUERY_CONTEXT * PTI_QUERY_CONTEXT
struct _ADDRESS_FILE ADDRESS_FILE
enum CONNECTION_STATE * PCONNECTION_STATE
VOID(* DATAGRAM_COMPLETION_ROUTINE)(PVOID Context, NDIS_STATUS Status, ULONG Count)
struct _AF_SEARCH * PAF_SEARCH
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress