mTCP DOS Logo

A nice little TCP/IP stack for IBM PCs, XTs PCjrs, and newer machines

Current version: (September 6th 2008)



Quick Links:

Downloads (near page bottom)     Configuring mTCP
IRCjr (A DOS IRC client     Netcat (nc) for DOS


Introduction

A stand-alone machine might be useful, but a networked one opens a lot of doors. I have always wanted to write my own TCP/IP for old DOS machines and in late 2005 I finally started working on it.

mTCP is a TCP/IP stack for old machines written using Turbo C++ 3.0 for DOS and a sprinkling of x86 assembler. It is designed to work with an Ethernet card and packet driver. Basic features include:
Other TCP/IP stacks for DOS already exist and I experimented with them before deciding to write my own. I wrote my own because I wanted the source code to be available in case I needed to add features or fix bugs, I wanted to make my own space and performance tradeoffs, I did not want to deal with bad or incomplete documentation and I wanted the bragging rights of doing something nutty like this.

Some of the more advanced features are:
I have tried to adhere to the TCP/IP specifications as closely as possible, but not everything is possible in such a small machine. There are a few features missing. Some I will be adding as options as time goes on. IP packet fragmentation and reassembl is a good example - you can do a lot without having this feature implemented, and it can be quite a resource hog. For now, we are doing without it.

Structure/Packaging

mTCP is a library that is statically linked with the application code. Put another way, any application that you write will include a copy of the mTCP code in it. This is very similar to the way WATTCP and the TCP/IP code in NCSA Telnet is packaged. The other common way to package TCP/IP is as a memory resident DOS TSR. Here are the pros and cons:

Applications

And I'm constantly working on more features and applications.

Requirements

The applications should work on any DOS PC with an Ethernet adapter and a packet driver.  My personal testing includes:
As long as you have an Ethernet adapter (card or parallel port device) with a packet driver, it should work.

Token Ring, SLIP, CSLIP and other network types are not supported but could be if there was a reason. SLIP and CLIP via a packet driver than can emulate Ethernet (eg: SLIPPR or CSLIPPR) will be supported shortly. (My code is dependent upon ARP replies being received. I will be adding some code to get around this limitation.)

Configuring mTCP Applications

Configuring applications based on mTCP is fairly easy - there is an environment variable and a text file. If you choose to use DHCP most of the configuration is done automatically.

See the page "mTCP Configuration" for a detailed description.

Downloads and Support

Get the current set of mTCP applications (IRCjr, DHCP client and Netcat) here!

mTCP_2008-09-06.zip
tcpacket.zip - Sample code for using a packet driver with Turbo C++ 3.0

I am interested in hearing about your experiences with the mTCP based applications and any comments you have. Please email me at mbbrutman@yahoo.com. You can also start a thread on http://www.brutman.com/forums (Mike's PCjr Page) in the 'Programming' area.

Recent changes



Created July 29th, 2008, Last updated September 6th, 2008

(C)opyright Michael B. Brutman, mbbrutman@yahoo.com