#include "ipstack.h"
#include <adt.h> // tRingBuffer
#include <timers.h> // tTimer
+#include <semaphore.h> // tSemaphore
+
+#define CACHE_FUTURE_PACKETS_IN_BYTES 1 // Use a ring buffer to cache out of order packets?
typedef struct sTCPHeader tTCPHeader;
typedef struct sTCPListener tTCPListener;
tInterface *Interface; //!< Listening Interface
tVFS_Node Node; //!< Server Directory node
int NextID; //!< Name of the next connection
+ tSemaphore WaitingConnections;
tShortSpinlock lConnections; //!< Spinlock for connections
tTCPConnection *Connections; //!< Connections (linked list)
tTCPConnection *volatile NewConnections;
* \todo Convert this to a ring buffer and a bitmap of valid bytes
* \{
*/
- #if CACHE_FUTURE_PACKETS_OR_BYTES == bytes
+ #if CACHE_FUTURE_PACKETS_IN_BYTES
Uint32 HighestSequenceRcvd; //!< Highest sequence number (within window) recieved
Uint8 *FuturePacketData; //!< Future packet data (indexed by sequence number)
Uint8 *FuturePacketValidBytes; //!< Valid byte bitmap (WINDOW_SIZE/8 bytes)