X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Ftcp.h;h=dc7a0ffc5e3a41b0f5b56ae91d0f25bdbd06eb19;hb=6a0792d4e8f886c590e008f8c3fea32ed7382410;hp=2247b90110f2ec8fcbf96bda96c3e1c616a9aabe;hpb=29707ccdcce3383cc8ae264b644643714418b03f;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/tcp.h b/KernelLand/Modules/IPStack/tcp.h index 2247b901..dc7a0ffc 100644 --- a/KernelLand/Modules/IPStack/tcp.h +++ b/KernelLand/Modules/IPStack/tcp.h @@ -8,6 +8,9 @@ #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; @@ -69,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; @@ -149,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)