X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Ftcp.h;h=6aa404f63979620e30b58da915fddc1e03c010c1;hb=58c7107eb0a5ae254c135f2eaa6263751f1ebe67;hp=223805eb2a9e15426a14d6699fc97e04dc1768f4;hpb=15eb3bb8363aa44fa0c8cfacbdc99966f5057e51;p=tpg%2Facess2.git diff --git a/Modules/IPStack/tcp.h b/Modules/IPStack/tcp.h index 223805eb..6aa404f6 100644 --- a/Modules/IPStack/tcp.h +++ b/Modules/IPStack/tcp.h @@ -6,6 +6,7 @@ #define _TCP_H_ #include "ipstack.h" +#include // tRingBuffer typedef struct sTCPHeader tTCPHeader; typedef struct sTCPListener tTCPListener; @@ -113,16 +114,18 @@ struct sTCPConnection Uint32 NextSequenceSend; //!< Next sequence value for outbound packets Uint32 NextSequenceRcv; //!< Next expected sequence value for inbound + #if 0 /** * \brief Non-ACKed packets - * \note FIFO list + * \note Ring buffer * \{ */ - tMutex lQueuedPackets; - tTCPStoredPacket *QueuedPackets; //!< Non-ACKed packets + tMutex lNonACKedPackets; + tTCPStoredPacket *SentPackets; //!< Non-acknowleged packets /** * \} */ + #endif /** * \brief Unread Packets @@ -138,10 +141,17 @@ struct sTCPConnection /** * \brief Out of sequence packets * \note Sorted list to improve times + * \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 /** * \} */