27#define TCPOPT_END_OF_LIST 0x0
28#define TCPOPT_NO_OPERATION 0x1
29#define TCPOPT_MAX_SEG_SIZE 0x2
31#define TCPOPTLEN_MAX_SEG_SIZE 0x4
34#define TCP_DATA_OFFSET(DataOffset)(((DataOffset) & 0xF0) >> (4-2))
62#define TCP_MIN_RETRANSMISSION_TIMEOUT 1*1000
65#define TCP_MAX_RETRANSMISSION_TIMEOUT 1*60*1000
68#define TCP_ALPHA_RETRANSMISSION_TIMEOUT(x)(((x)*8)/10)
71#define TCP_BETA_RETRANSMISSION_TIMEOUT(x)(((x)*16)/10)
89#define SRF_URG TCP_URG
90#define SRF_ACK TCP_ACK
91#define SRF_PSH TCP_PSH
92#define SRF_RST TCP_RST
93#define SRF_SYN TCP_SYN
94#define SRF_FIN TCP_FIN
124 ULONG SegmentLength);
pRequest Complete(RequestStatus)
BOOLEAN TCPRemoveIRP(PCONNECTION_ENDPOINT Connection, PIRP Irp)
NTSTATUS TCPGetSocketStatus(PCONNECTION_ENDPOINT Connection, PULONG State)
VOID TCPFreeSegment(PTCP_SEGMENT Segment)
VOID FlushConnectQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
LONG TCP_IPIdentification
NTSTATUS TCPSendData(PCONNECTION_ENDPOINT Connection, PCHAR Buffer, ULONG DataSize, PULONG DataUsed, ULONG Flags, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
BOOLEAN TCPAbortListenForSocket(PCONNECTION_ENDPOINT Listener, PCONNECTION_ENDPOINT Connection)
VOID TCPUpdateInterfaceIPInformation(PIP_INTERFACE IF)
void LibTCPDumpPcb(PVOID SocketContext)
VOID TCPUpdateInterfaceLinkStatus(PIP_INTERFACE IF)
VOID TCPAddSegment(PCONNECTION_ENDPOINT Connection, PTCP_SEGMENT Segment, PULONG Acknowledged)
NTSTATUS TCPSocket(PCONNECTION_ENDPOINT Connection, UINT Family, UINT Type, UINT Proto)
NTSTATUS TCPCheckPeerForAccept(PVOID Context, PTDI_REQUEST_KERNEL Request)
VOID FlushShutdownQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
VOID FlushListenQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
NTSTATUS TCPShutdown(VOID)
NTSTATUS TCPListen(PCONNECTION_ENDPOINT Connection, UINT Backlog)
VOID HandleSignalledConnection(PCONNECTION_ENDPOINT Connection)
VOID CompleteBucket(PCONNECTION_ENDPOINT Connection, PTDI_BUCKET Bucket, const BOOLEAN Synchronous)
NTSTATUS TCPAccept(PTDI_REQUEST Request, PCONNECTION_ENDPOINT Listener, PCONNECTION_ENDPOINT Connection, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
NTSTATUS TCPTranslateError(const INT8 err)
VOID FlushReceiveQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
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)
struct _CLIENT_DATA CLIENT_DATA
NTSTATUS TCPConnect(PCONNECTION_ENDPOINT Connection, PTDI_CONNECTION_INFORMATION ConnInfo, PTDI_CONNECTION_INFORMATION ReturnInfo, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
struct _CLIENT_DATA * PCLIENT_DATA
VOID(* PTCP_COMPLETION_ROUTINE)(PVOID Context, NTSTATUS Status, ULONG Count)
PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint(PVOID ClientContext)
UINT TCPAllocatePort(const UINT HintPort)
NTSTATUS TCPReceiveData(PCONNECTION_ENDPOINT Connection, PNDIS_BUFFER Buffer, ULONG ReceiveLength, PULONG BytesReceived, ULONG ReceiveFlags, PTCP_COMPLETION_ROUTINE Complete, PVOID Context)
NTSTATUS TCPGetSockAddress(PCONNECTION_ENDPOINT Connection, PTRANSPORT_ADDRESS TransportAddress, BOOLEAN RemoteAddress)
struct _SLEEPING_THREAD SLEEPING_THREAD
NTSTATUS TCPStartup(VOID)
NTSTATUS TCPSetNoDelay(PCONNECTION_ENDPOINT Connection, BOOLEAN Set)
struct TCPv4_PSEUDO_HEADER * PTCPv4_PSEUDO_HEADER
VOID TCPFreeConnectionEndpoint(PCONNECTION_ENDPOINT Connection)
VOID FlushAllQueues(PCONNECTION_ENDPOINT Connection, NTSTATUS Status)
struct _SLEEPING_THREAD * PSLEEPING_THREAD
PTCP_SEGMENT TCPCreateSegment(PIP_PACKET IPPacket, PTCPv4_HEADER TCPHeader, ULONG SegmentLength)
NTSTATUS TCPClose(PCONNECTION_ENDPOINT Connection)
struct TCPv4_HEADER * PTCPv4_HEADER
VOID FlushSendQueue(PCONNECTION_ENDPOINT Connection, const NTSTATUS Status)
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID SocketContext
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
_Must_inspect_result_ _In_ ULONG Flags