Fix firefox exit. Implement a simple work queue for possibly dispatch level
[reactos.git] / reactos / drivers / net / tcpip / include / titypes.h
index f17be3f..c75586d 100644 (file)
@@ -144,28 +144,6 @@ typedef struct _DATAGRAM_SEND_REQUEST {
     ULONG Flags;                          /* Protocol specific flags */
 } DATAGRAM_SEND_REQUEST, *PDATAGRAM_SEND_REQUEST;
 
-#if 0
-#define InitializeDatagramSendRequest( \
-  _SendRequest, \
-  _RemoteAddress, \
-  _RemotePort, \
-  _Buffer, \
-  _BufferSize, \
-  _Complete, \
-  _Context, \
-  _Build, \
-  _Flags) { \
-    (_SendRequest)->RemoteAddress = (_RemoteAddress); \
-    (_SendRequest)->RemotePort = (_RemotePort); \
-    (_SendRequest)->Buffer = (_Buffer); \
-    (_SendRequest)->BufferSize = (_BufferSize); \
-    (_SendRequest)->Complete = (_Complete); \
-    (_SendRequest)->Context = (_Context); \
-    (_SendRequest)->Build = (_Build); \
-    (_SendRequest)->Flags = (_Flags); \
-  }
-#endif /* These things bug me...  They hide the member names. */
-
 /* Transport address file context structure. The FileObject->FsContext2
    field holds a pointer to this structure */
 typedef struct _ADDRESS_FILE {
@@ -174,7 +152,8 @@ typedef struct _ADDRESS_FILE {
     KSPIN_LOCK Lock;                      /* Spin lock to manipulate this structure */
     OBJECT_FREE_ROUTINE Free;             /* Routine to use to free resources for the object */
     USHORT Flags;                         /* Flags for address file (see below) */
-    PADDRESS_ENTRY ADE;                   /* Associated address entry */
+    IP_ADDRESS Address;                   /* Address of this address file */
+    USHORT Family;                        /* Address family */
     USHORT Protocol;                      /* Protocol number */
     USHORT Port;                          /* Network port (network byte order) */
     WORK_QUEUE_ITEM WorkItem;             /* Work queue item handle */
@@ -184,8 +163,9 @@ typedef struct _ADDRESS_FILE {
     LIST_ENTRY ReceiveQueue;              /* List of outstanding receive requests */
     LIST_ENTRY TransmitQueue;             /* List of outstanding transmit requests */
     struct _CONNECTION_ENDPOINT *Connection;
-                                          /* Associated connection or NULL if no
-                                             associated connection exist */
+    /* Associated connection or NULL if no associated connection exist */
+    struct _CONNECTION_ENDPOINT *Listener;
+    /* Associated listener (see transport/tcp/accept.c) */
     IP_ADDRESS AddrCache;                 /* One entry address cache (destination
                                              address of last packet transmitted) */
 
@@ -302,6 +282,7 @@ typedef struct _TCP_SEGMENT {
 
 typedef struct _TDI_BUCKET {
     LIST_ENTRY Entry;
+    struct _CONNECTION_ENDPOINT *AssociatedEndpoint;
     TDI_REQUEST Request;
 } TDI_BUCKET, *PTDI_BUCKET;
 
@@ -314,16 +295,21 @@ typedef struct _CONNECTION_ENDPOINT {
     PVOID ClientContext;        /* Pointer to client context information */
     PADDRESS_FILE AddressFile;  /* Associated address file object (NULL if none) */
     PVOID SocketContext;        /* Context for lower layer */
-    
+
     UINT State;                 /* Socket state W.R.T. oskit */
-    
+
     /* Requests */
     LIST_ENTRY ConnectRequest; /* Queued connect rqueusts */
     LIST_ENTRY ListenRequest;  /* Queued listen requests */
     LIST_ENTRY ReceiveRequest; /* Queued receive requests */
-    
-    /* Queues */
-    LIST_ENTRY ReceivedSegments;/* Segments that are received */
+
+    /* Signals */
+    LIST_ENTRY SignalList;     /* Entry in the list of sockets waiting for
+                               * notification service to the client */
+    UINT    SignalState;       /* Active signals from oskit */
+    BOOLEAN Signalled;         /* Are we a member of the signal list */
+    BOOLEAN Disconnecting;     /* Cancelling an irp .. we need to leave it 
+                               * alone for now */
 } CONNECTION_ENDPOINT, *PCONNECTION_ENDPOINT;