I'm still working on my TCP/IP for small PC clones. It's been a while since I posted an update, so here is what it looks like.
The code supports the following:
Still to do:
The code runs on any IBM clone with a packet driver. It has tested with a generic 386-40 with an NE2000 card, an IBM PCjr with a WD8003 card, an IBM XT with a 3Com 3C503 and an IBM XT with an Intel EtherExpress 8/16.
Even though I'm adding features and required support, performance is still very good. The last round of changes show the 386-40 receiving a file from another machine at 451KB/sec, which includes the overhead of buffering and writing to disk. The same code on an XT with the original 10MB hard drive runs at about 25KB/sec, and the PCjr is in the same range. After the faster memcpy code goes in it will be far faster.
Right now there are two apps:
Both apps are under 50KB in size, and the total memory requirement is well under 128K including the packet driver.
I've been working on this for almost a year now. A year ago I couldn't get the packet driver to send a byte on the Ethernet. This has been the most difficult home programming project that I have ever attempted.
The ultimate goal is a telnet BBS running on some vintage hardware (PCjr?) that will use this. The code is stable enough were I could start thinking about BBS features, but I really want to polish the TCP/IP code first to make sure that it doesn't cause me hard-to-debug problems later.
The code supports the following:
- Connecting to another machine ("active" connect)
- "Listen" support for accepting incoming connections ("passive" connect)
- Multiple open socket connections
- MTU size setting for different network types/topologies
- User defined receive buffer .. used for getting max performance
- Correct TCP 'window size' advertising; helps with flow control
- A good tracing and logging facility
Still to do:
- Better TCP 'reset connection' support
- I need to revamp the UDP support - it's been ignored for months
- DNS requests over UDP
- Performance work - I need to put in a high performance memcpy routine.
The code runs on any IBM clone with a packet driver. It has tested with a generic 386-40 with an NE2000 card, an IBM PCjr with a WD8003 card, an IBM XT with a 3Com 3C503 and an IBM XT with an Intel EtherExpress 8/16.
Even though I'm adding features and required support, performance is still very good. The last round of changes show the 386-40 receiving a file from another machine at 451KB/sec, which includes the overhead of buffering and writing to disk. The same code on an XT with the original 10MB hard drive runs at about 25KB/sec, and the PCjr is in the same range. After the faster memcpy code goes in it will be far faster.
Right now there are two apps:
- NetCat: a version of the Linux utility. Lets you send and receive data that you pipe in/redirect from stdin and stdout. I've been using this for my file transfer tests.
- A simple 'echo server' which just sends back whatever you send it. This handles up to 5 incoming connections simulataneously and it is used to test the listen support.
Both apps are under 50KB in size, and the total memory requirement is well under 128K including the packet driver.
I've been working on this for almost a year now. A year ago I couldn't get the packet driver to send a byte on the Ethernet. This has been the most difficult home programming project that I have ever attempted.
The ultimate goal is a telnet BBS running on some vintage hardware (PCjr?) that will use this. The code is stable enough were I could start thinking about BBS features, but I really want to polish the TCP/IP code first to make sure that it doesn't cause me hard-to-debug problems later.