NDIS_STATUS Status,
ULONG Count);
+typedef DATAGRAM_COMPLETION_ROUTINE PDATAGRAM_COMPLETION_ROUTINE;
+
typedef struct _DATAGRAM_RECEIVE_REQUEST {
- LIST_ENTRY ListEntry; /* Entry on list */
+ LIST_ENTRY ListEntry; /* Entry on list */
IP_ADDRESS RemoteAddress; /* Remote address we receive from (NULL means any) */
- USHORT RemotePort; /* Remote port we receive from (0 means any) */
- PTDI_CONNECTION_INFORMATION ReturnInfo; /* Return information */
- PCHAR Buffer; /* Pointer to receive buffer */
- ULONG BufferSize; /* Size of Buffer */
- DATAGRAM_COMPLETION_ROUTINE Complete; /* Completion routine */
- PVOID Context; /* Pointer to context information */
+ USHORT RemotePort; /* Remote port we receive from (0 means any) */
+ PTDI_CONNECTION_INFORMATION ReturnInfo;/* Return information */
+ PCHAR Buffer; /* Pointer to receive buffer */
+ ULONG BufferSize; /* Size of Buffer */
+ DATAGRAM_COMPLETION_ROUTINE Complete; /* Completion routine */
+ PVOID Context; /* Pointer to context information */
+ DATAGRAM_COMPLETION_ROUTINE UserComplete; /* Completion routine */
+ PVOID UserContext; /* Pointer to context information */
} DATAGRAM_RECEIVE_REQUEST, *PDATAGRAM_RECEIVE_REQUEST;
/* Datagram build routine prototype */
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 {
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 */
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 */
- PIP_ADDRESS AddrCache; /* One entry address cache (destination
+ /* 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) */
/* The following members are used to control event notification */
typedef struct _TDI_BUCKET {
LIST_ENTRY Entry;
+ struct _CONNECTION_ENDPOINT *AssociatedEndpoint;
TDI_REQUEST Request;
} TDI_BUCKET, *PTDI_BUCKET;
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;