sharing my MiniTCP TCP/IP library for C...
Posted: Sat Apr 28, 2012 4:16 pm
i've been working on writing my own lightweight TCP/IP library in C for a while, which i was planning to use in my OS as well as some plain old DOS apps. my OS is 16-bit, so this code is designed for the same but it shouldn't take a lot of work to make it work as the TCP stack in a 32-bit OS. you would just have to tweak a little bit of the inline assembly, get rid of a few instances of "far" on some functions and a couple structures, and write replacements for the static void far interrupt callback and void pkt_send functions. those are the two that deal with packet drivers.
you can download the code in this link below. this web server you can get it from is actually a 4.77 MHz 8088. it's an original IBM 5150 PC, and the httpd software i wrote myself. it actually uses my MiniTCP library. so, you can see that it works and is light enough to work on the slowest PC ever made.
http://irc.rubbermallet.org:8088/index.htm
here is the preliminary PDF reference manual for the library functions: http://rubbermallet.org/MiniTCP_program ... erence.pdf
it's written for Borland Turbo C++ and TASM. Borland released TC++ 1.01 and TASM as public domain some years ago, so if you need it here is all you need in a ZIP:
http://rubbermallet.org/tcpp101.zip
i wouldn't be surprised if there are some bugs, and if you use it and run into problems please let me know. for what it's worth, i've run the httpd program on that computer for 2 and 3 weeks at a time before, it never stopped working. that even included about an hour of some jackass trying to LOIC it. it kept working.
if you need some help, just post here and i'll help.
P.S. here's a couple screenshots of the "rawterm" example program connecting to a telnet BBS:
http://rubbermallet.org/minitcp-bbs1.png
http://rubbermallet.org/minitcp-bbs2.png
you can download the code in this link below. this web server you can get it from is actually a 4.77 MHz 8088. it's an original IBM 5150 PC, and the httpd software i wrote myself. it actually uses my MiniTCP library. so, you can see that it works and is light enough to work on the slowest PC ever made.
http://irc.rubbermallet.org:8088/index.htm
here is the preliminary PDF reference manual for the library functions: http://rubbermallet.org/MiniTCP_program ... erence.pdf
it's written for Borland Turbo C++ and TASM. Borland released TC++ 1.01 and TASM as public domain some years ago, so if you need it here is all you need in a ZIP:
http://rubbermallet.org/tcpp101.zip
i wouldn't be surprised if there are some bugs, and if you use it and run into problems please let me know. for what it's worth, i've run the httpd program on that computer for 2 and 3 weeks at a time before, it never stopped working. that even included about an hour of some jackass trying to LOIC it. it kept working.
if you need some help, just post here and i'll help.
P.S. here's a couple screenshots of the "rawterm" example program connecting to a telnet BBS:
http://rubbermallet.org/minitcp-bbs1.png
http://rubbermallet.org/minitcp-bbs2.png