Fix firefox exit. Implement a simple work queue for possibly dispatch level
[reactos.git] / reactos / drivers / net / tcpip / include / tcp.h
index 08a0e4c..56c7216 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef __TCP_H
 #define __TCP_H
 
-typedef VOID 
+typedef VOID
 (*PTCP_COMPLETION_ROUTINE)( PVOID Context, NTSTATUS Status, ULONG Count );
 
 /* TCPv4 header structure */
@@ -38,6 +38,9 @@ typedef struct TCPv4_HEADER {
 
 #define TCPOPTLEN_MAX_SEG_SIZE  0x4
 
+#define TCP_CANCEL_DISCONNECT 0
+#define TCP_CANCEL_CLOSE      1
+
 /* Data offset; 32-bit words (leftmost 4 bits); convert to bytes */
 #define TCP_DATA_OFFSET(DataOffset)(((DataOffset) & 0xF0) >> (4-2))
 
@@ -57,6 +60,13 @@ typedef struct _SLEEPING_THREAD {
     KEVENT Event;
 } SLEEPING_THREAD, *PSLEEPING_THREAD;
 
+typedef struct _CANCEL_REQUEST {
+    LIST_ENTRY Entry;
+    PVOID Context;
+    PIRP  Irp;
+    UINT  Flags, Type;
+} CANCEL_REQUEST, *PCANCEL_REQUEST;
+
 /* Retransmission timeout constants */
 
 /* Lower bound for retransmission timeout in TCP timer ticks */
@@ -105,7 +115,7 @@ NTSTATUS TCPAccept
 PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext );
 VOID TCPFreeConnectionEndpoint( PCONNECTION_ENDPOINT Connection );
 
-NTSTATUS TCPSocket( PCONNECTION_ENDPOINT Connection, 
+NTSTATUS TCPSocket( PCONNECTION_ENDPOINT Connection,
                    UINT Family, UINT Type, UINT Proto );
 
 PTCP_SEGMENT TCPCreateSegment(
@@ -137,7 +147,7 @@ NTSTATUS TCPDisconnect(
   PVOID Context);
 
 NTSTATUS TCPReceiveData(
-  PCONNECTION_ENDPOINT Connection,    
+  PCONNECTION_ENDPOINT Connection,
   PNDIS_BUFFER Buffer,
   ULONG ReceiveLength,
   PULONG BytesReceived,
@@ -156,6 +166,8 @@ NTSTATUS TCPClose( PCONNECTION_ENDPOINT Connection );
 
 PVOID TCPPrepareInterface( PIP_INTERFACE IF );
 
+VOID TCPDisposeInterfaceData( PVOID Data );
+
 NTSTATUS TCPTranslateError( int OskitError );
 
 VOID TCPTimeout();
@@ -164,10 +176,17 @@ UINT TCPAllocatePort( UINT HintPort );
 
 VOID TCPFreePort( UINT Port );
 
+NTSTATUS TCPGetPeerAddress
+( PCONNECTION_ENDPOINT Connection,
+  PTRANSPORT_ADDRESS TransportAddress );
+
 NTSTATUS TCPStartup(
   VOID);
 
 NTSTATUS TCPShutdown(
   VOID);
 
+void TCPMarkForDisconnect( 
+  PCONNECTION_ENDPOINT Connection, BOOLEAN Marked );
+
 #endif /* __TCP_H */