Page 1 of 1

sharing my MiniTCP TCP/IP library for C...

Posted: Sat Apr 28, 2012 4:16 pm
by miker00lz
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

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Sun Apr 29, 2012 12:34 am
by Thomas
Mike,
That is seriously cool ! 8)

--Thomas

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Sun Apr 29, 2012 5:21 am
by Jezze
Holy crap. An 8088? I haven't used one of those for ages =)

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Wed May 02, 2012 1:03 am
by miker00lz
and with good reason, those things are unbelievably slow. i can't believe how far we've come in like just 30 years.

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Wed May 02, 2012 7:13 am
by Ready4Dis
Tried to download, link isn't working :).

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Wed May 02, 2012 10:52 am
by miker00lz
really? it's working for me. anybody else having a problem getting to it?

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Thu May 03, 2012 5:32 am
by Ready4Dis
Network Error


The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

A communication error occurred: "Connection refused"


That's what I click the link. Will try from home if i remember, might just be my work blocking stuff.

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Thu May 03, 2012 12:34 pm
by piranha
Works for me.

-JL

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Sat May 19, 2012 3:21 am
by miker00lz
Ready4Dis wrote:Network Error


The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

A communication error occurred: "Connection refused"


That's what I click the link. Will try from home if i remember, might just be my work blocking stuff.
out of curiosity, are you still having problems connecting to the 8088 server from your computer at work? if you are, could you give me a little basic info on your system? (like OS version, web browser, proxy software and version if you're behind one, etc)

another thing that would be good to try if you still can't connect is trying to get to http://irc.rubbermallet.org which is my regular server machine.

it's the same hostname, but this would try to use port 80 instead of port 8088. maybe your work blocks it for being a non-standard port number.

i'd just like to find out if it's a bug in my TCP stack or something unrelated. thanks! :)

Re: sharing my MiniTCP TCP/IP library for C...

Posted: Mon May 21, 2012 4:19 am
by Ready4Dis
Yes, normal link works fine. I assume my proxy server only allows certain (standard) ports.