X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Ftcp.h;h=43828f185231e125b7b45904835333030243c0fa;hb=7c63df053c650f4331949b5c1d8f64588fe98620;hp=42682ac72cb38ff78e9c9a2ac976b82893edc40a;hpb=083c31409b9f25c96807ab8fef8ac79e8fe4cf9e;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/tcp.h b/KernelLand/Modules/IPStack/tcp.h index 42682ac7..43828f18 100644 --- a/KernelLand/Modules/IPStack/tcp.h +++ b/KernelLand/Modules/IPStack/tcp.h @@ -10,6 +10,8 @@ #include // tTimer #include // 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; @@ -108,6 +110,9 @@ enum eTCPConnectionState 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 @@ -151,14 +156,9 @@ struct sTCPConnection * \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 /** * \} */