December 15, 2022
Xinu sources for TCP/IP - overview of TCP
First of all, some important statistics.
- BSD TCP code -- 15,191 lines
- Xinu TCP code -- 5400 lines
So, the BSD code is 3 times as voluminous as the Xinu code.
Why should this be? I cannot give just one definite answer.
One thing that certainly contributes is that the BSD code was
designed to support multiple protocols, particularly in the
socket layer and that adds bulk to the code, even in spite of
my efforts to prune out things that are unnecessary.
A high level view of TCP
From an implementation neutral point of view, what does the
TCP protocol need to respond to? What makes it tick?
- Arriving packets.
- Timer events (fast and slow).
- User requests.
User requests can be categorized as follows:
- Make arrangements to respond as a server
- Respond to connections to such a server
- Make connections (as a client) to a remote server
- Receive (read) data from a connection
- Send (write) data to a connection
That is it, ignoring calls to tune parameters and
possible interactions with the ICMP protocol.
This provides a list of starting points to study any
TCP implementation, and it is my intention to use this
list to guide a study of the Xinu TCP code.
Have any comments? Questions?
Drop me a line!
Kyu / [email protected]