TCP/IP Lean: Web Servers for Embedded Systems, Second Edition

The objective of TCP is simple: to create a reliable connection between two points on the network, such that data can flow bidirectionally in a timely fashion.
The concepts in TCP are simple. There is a sequence space, within which the data transfer fits with its start and end markers. A state machine keeps both participants in step and defines the negotiations between them to open and close the connections. Port numbers identify the logical endpoints of the connection, the service that is required, or the application that is to handle the data.
Implementing TCP is difficult. So much is expected of it, that it takes an inordinately large amount of design effort and an even greater amount of testing.
In this chapter, I have worked through the concepts of TCP and implemented enough of the protocol for the purposes at hand. I have created a Telnet application, which not only provides a simple emulation of the standard utility but also has a server capability, so it can be used as a basis for further TCP client or server development.
| ether3c.c | 3C509 Ethernet card driver |
| etherne.c | NE2000 Ethernet card driver |
| ip.c | Low-level TCP/IP functions |
| net.c | Network interface functions |
| netutil .c | Network utility functions |
| pktd.c | Packet driver (BC only) |
| serpc.c or serwin.c | Serial drivers (BC or VC) |
| tcp.c | TCP functions |
| telnet.c | Telnet utility |
| dosdef.h | MS-DOS definitions (BC only) |
| ether.h | Ethernet definitions |
| ip.h | TCP/IP definitions |
| net.h | Network driver definitions |
| netutil.h | Utility function and general frame definitions |
| serpc.h | Serial... |