#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;
typedef struct sTCPStoredPacket tTCPStoredPacket;
struct sTCPConnection
{
struct sTCPConnection *Next;
+ struct sTCPConnection *Prev;
+ struct sTCPListener *Server;
+
enum eTCPConnectionState State; //!< Connection state (see ::eTCPConnectionState)
Uint16 LocalPort; //!< Local port
Uint16 RemotePort; //!< Remote port
* \todo Convert this to a ring buffer and a bitmap of valid bytes
* \{
*/
- #if CACHE_FUTURE_PACKETS_OR_BYTES == 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)
- #else
- tShortSpinlock lFuturePackets; //!< Future packets spinlock
- tTCPStoredPacket *FuturePackets; //!< Out of sequence packets
- #endif
/**
* \}
*/