X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Ftcp.h;h=ed517db8e1d311c85ade0c5a825ce4b077006f20;hb=720eb9f95dd3272e980095cf24ee21fb9250adb3;hp=cd6caf09dfe4c4bca970632c002796e6113ecaad;hpb=845ed09f3edef0c836200df6afbd6bfbc7b3fef6;p=tpg%2Facess2.git diff --git a/Modules/IPStack/tcp.h b/Modules/IPStack/tcp.h index cd6caf09..ed517db8 100644 --- a/Modules/IPStack/tcp.h +++ b/Modules/IPStack/tcp.h @@ -61,43 +61,46 @@ enum eTCPFlags struct sTCPListener { - struct sTCPListener *Next; - Uint16 Port; - tInterface *Interface; - tVFS_Node Node; - int NextID; - tTCPConnection *Connections; + struct sTCPListener *Next; //!< Next server in the list + Uint16 Port; //!< Listening port (0 disables the server) + tInterface *Interface; //!< Listening Interface + tVFS_Node Node; //!< Server Directory node + int NextID; //!< Name of the next connection + tSpinlock lConnections; //!< Spinlock for connections + tTCPConnection *Connections; //!< Connections (linked list) + volatile tTCPConnection *NewConnections; }; struct sTCPConnection { struct sTCPConnection *Next; - int State; - Uint16 LocalPort; - Uint16 RemotePort; - tVFS_Node Node; + int State; //!< Connection state (see ::eTCPConnectionState) + Uint16 LocalPort; //!< Local port + Uint16 RemotePort; //!< Remote port + tInterface *Interface; //!< Listening Interface + tVFS_Node Node; //!< Node - int NextSequenceSend; - int NextSequenceRcv; + int NextSequenceSend; //!< Next sequence value for outbound packets + int NextSequenceRcv; //!< Next expected sequence value for inbound - int nQueuedPackets; + int nQueuedPackets; //!< Number of packets not ACKed struct { int Sequence; void *Data; - } *QueuedPackets; + } *QueuedPackets; //!< Non-ACKed packets - int nFuturePackets; + int nFuturePackets; //!< Number of packets recieved that are out of sequence struct { int SequenceNum; void *Data; - } **FuturePackets; + } **FuturePackets; //!< Out of sequence packets - tInterface *Interface; union { tIPv4 v4; tIPv6 v6; - } RemoteIP; // Type is determined by LocalInterface->Type + } RemoteIP; //!< Remote IP Address + // Type is determined by LocalInterface->Type }; enum eTCPConnectionState