X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Ftcp.h;h=dc7a0ffc5e3a41b0f5b56ae91d0f25bdbd06eb19;hb=9122d035c4337d33bf0cc2212eeade4e42a367a2;hp=6aa404f63979620e30b58da915fddc1e03c010c1;hpb=51ab5f489bc356940c95cc936fd0508e8f07ea97;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/tcp.h b/KernelLand/Modules/IPStack/tcp.h index 6aa404f6..dc7a0ffc 100644 --- a/KernelLand/Modules/IPStack/tcp.h +++ b/KernelLand/Modules/IPStack/tcp.h @@ -7,6 +7,10 @@ #include "ipstack.h" #include // tRingBuffer +#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; @@ -68,6 +72,7 @@ struct sTCPListener 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; @@ -113,7 +118,11 @@ struct sTCPConnection Uint32 NextSequenceSend; //!< Next sequence value for outbound packets Uint32 NextSequenceRcv; //!< Next expected sequence value for inbound - + + // Deferred ACK handling + Uint32 LastACKSequence; + tTimer *DeferredACKTimer; + #if 0 /** * \brief Non-ACKed packets @@ -144,7 +153,7 @@ struct sTCPConnection * \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)