mTCP DOS Logo

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

Current version: February 8, 2010

Introduction

In the early days of personal computing the computer was a solitary machine that rarely connected to other computers. If you had an advanced setup you had a modem and you might be able to use your machine as a 'dumb' terminal to an information service or a larger shared machine, like a Unix machine at a university. File transfer between machines was usually done by doing the 'floppy shuffle', where you carried a floppy disk from one machine to the other machine. File transfer could also be done from machine to machine using a modem, but it was slow and error prone. (A 2400 bps modem could transmit 240 bytes per second, assuming you had a perfect telephone line.)

Today we take it for granted that machines are connected to each other. The machines connect to each other using TCP/IP over local area networks, DSL, cable modems, wireless Ethernet, cellular data networks, and even the occasional modem connection. It is basically assumed that machines are network connected - it would be hard to use a computer for any length of time without a connection.

Any machine today has the ability to be networked. But that wasn't always the case. It wasn't until the mid 1990s when we started getting operating systems for personal computers where TCP/IP was supported by the operating system. And earlier hardware from the first generations of personal computers (8088 and 80286 class) just doesn't have a lot of memory or CPU power to handle the full TCP/IP network stack. Getting a machine like an original IBM PC 5150, an IBM AT, a PCjr, or anything of that vintage onto a TCP/IP network is a challenge. Yet these machines can benefit from network connectivity, the same way new machines do.

In 2005 after playing with some TCP/IP solutions for old DOS machines I decided that I didn't like any of them, and I wanted to write my own TCP/IP for DOS. Some of my requirements were:
Today, some three years later, I am finally at the point where I can share the applications with others who are also interested in networking their old personal computers.

What is it?

mTCP is a TCP/IP stack for old personal computers written using Borland Turbo C++ 3.0 for DOS and a sprinkling of x86 assembler. It is designed to work with an Ethernet card and a packet driver. Basic features include:
On top of this foundation are the applications. The applications are what make all of this compelling. At the moment there is a DHCP client, IRC client, FTP client, Telnet client and the Netcat utility.

Some of the more advanced features of mTCP 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 reassembly 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:
At the moment when you download mTCP you get a zip file with seven applications:
All of these applications will run well on the oldest, slowest PC you can find. I routinely use them on a 1983 IBM PCjr because nothing beats the fun of putting a 25+ year old machine on the Internet.

I am constantly working on more features, applications and performance improvements. I am not distributing source code yet because this is a work in progress.

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 at the moment, but could be if there was a reason.  There is experimental support for SLIP and CSLIP using a packet driver that emulated Ethernet (eg: SLIPPR and CSLIPPR).

Downloads

Get the current set of mTCP applications for DOS here! mTCP_2010-02-08.zip

The zip file includes all of the current applications and TXT files explaining how to set them up and use them.

Interested in seeing the source code that lets you talk directly to a packet driver? I've taken the lowest layer of my code and packaged it with a sample application that shows you how to interface a C program with the software interrupt mechanism used by packet drivers. Check it out here: mTCP_tcpacket.html

I am interested in hearing about your experiences with the mTCP 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 News

I received very good feedback from Ulrich Hansen, a FreeDOS user - mTCP works well under FreeDOS. FreeDOS was on my todo list, so this was very helpful. The FreeDOS project can be found at http://www.freedos.org/ and the networking FreeDOS Wiki pages can be found at http://sourceforge.net/apps/mediawiki/freedos/index.php?title=Networking_FreeDOS .

Recent changes



Created July 29th, 2008, Last updated February 8th, 2010

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