10 typedef struct sTCPHeader tTCPHeader;
11 typedef struct sTCPListener tTCPListener;
12 typedef struct sTCPConnection tTCPConnection;
18 Uint32 SequenceNumber;
19 Uint32 AcknowlegementNumber;
23 unsigned DataOffset: 4; // Size of the header in 32-bit words
24 } __attribute__ ((packed));
29 struct { // Lowest to Highest
30 unsigned FIN: 1; // Last packet
31 unsigned SYN: 1; // Synchronise Sequence Numbers
32 unsigned RST: 1; // Reset Connection
33 unsigned PSH: 1; // Push Function
34 unsigned ACK: 1; // Acknowlegement field is significant
35 unsigned URG: 1; // Urgent pointer is significant
36 unsigned ECE: 1; // ECN-Echo
37 unsigned CWR: 1; // Congestion Window Reduced
38 } __attribute__ ((packed)) Flags;
48 } __attribute__ ((packed));
64 struct sTCPListener *Next; //!< Next server in the list
65 Uint16 Port; //!< Listening port (0 disables the server)
66 tInterface *Interface; //!< Listening Interface
67 tVFS_Node Node; //!< Server Directory node
68 int NextID; //!< Name of the next connection
69 tSpinlock lConnections; //!< Spinlock for connections
70 tTCPConnection *Connections; //!< Connections (linked list)
71 tTCPConnection *volatile NewConnections;
76 struct sTCPConnection *Next;
77 int State; //!< Connection state (see ::eTCPConnectionState)
78 Uint16 LocalPort; //!< Local port
79 Uint16 RemotePort; //!< Remote port
80 tInterface *Interface; //!< Listening Interface
81 tVFS_Node Node; //!< Node
83 int NextSequenceSend; //!< Next sequence value for outbound packets
84 int NextSequenceRcv; //!< Next expected sequence value for inbound
86 int nQueuedPackets; //!< Number of packets not ACKed
90 } *QueuedPackets; //!< Non-ACKed packets
93 int nFuturePackets; //!< Number of packets recieved that are out of sequence
97 } **FuturePackets; //!< Out of sequence packets
102 } RemoteIP; //!< Remote IP Address
103 // Type is determined by LocalInterface->Type
106 enum eTCPConnectionState