Packet driver TCP/IP stack
Packet driver TCP/IP stack
Hi is there any way to use TCP/IP in DOS FreeBASIC? I've heard that there is some TCP/IP stack supporting packet driver for DJGP or what the name of DOS GCC is.
Late EDIT : kicked, see below for newer and better post
Last edited by DOS386 on Feb 17, 2009 11:34, edited 1 time in total.
Yeah, I think the WATTCP library is available for DJGPP and would then work with FreeBASIC - I haven't looked into it in depth yet, but I will certainly do so sometime in the future.
There's a bunch of open-source/free packet drivers available here that should work with WATTCP: http://crynwr.com/
There's a bunch of open-source/free packet drivers available here that should work with WATTCP: http://crynwr.com/
Last edited by DrV on Mar 12, 2006 1:39, edited 1 time in total.
DOS programs can hook into Crynwr packet drivers fairly easily which allows raw packets to be pulled from and put to ethernet. I've done it with DOS PowerBasic / FirstBasic and a small bit of MASM because I couldn't get the call-back on packet arrival to work properly, so I guess FB can do the same, and probably easier.
-
- Posts: 85
- Joined: Jun 18, 2006 19:48
i actually just recently developed a full set of routines for TCP/IP in DOS. my code interfaces with wattcp. it was made in and designed for quickbasic 4.5, but it should work fine in freebasic. it requires the CALL INTERRUPT function to work, but i have been told there's a freebasic library that allows that but i have not tried it myself.
download my routines here:
http://rubbermallet.org/qb
download my routines here:
http://rubbermallet.org/qb
Hi there!
I see that the last update is dating 2006... Does anybody has a positive experience using network under FreeBASIC (DOS)?
I asked about Watt32 in another thread, but maybe there's any other way to do network stuff in DOS today (what about Mike's library? Any chance to make it working in FreeBASIC?)
I see that the last update is dating 2006... Does anybody has a positive experience using network under FreeBASIC (DOS)?
I asked about Watt32 in another thread, but maybe there's any other way to do network stuff in DOS today (what about Mike's library? Any chance to make it working in FreeBASIC?)
Hi is there any way to use TCP/IP in DOS FreeBASIC? I've heard that there is some TCP/IP stack supporting packet driver for
As a user, YES. Arachne and DOSLYNX browsers and WGET downloader (with some hacks) do work. No external stuff is required except a packet driver. So YES, there is TCP/IP in DOS ... and FreeBASIC should not be a problem considering that it can use DGJPP libs and DOSLYNX and WGET use DGJPP as well.Fox wrote:Does anybody has a positive experience using network under Fr
However, I have no idea how it's done :-( Also, what are you tying to do ? I have no idea what a "simple" example could do ...
Indeed some specs and drivers ... 20 years old :-DThere's a bunch of open-source/free packet drivers available here that should work with WATTCP: http://crynwr.com/
Yes, of course - I do know that there are networking possibilities under DOS. I am using myself DOSLynx from time to time, as well as I am copying stuff to my DOS computer using SCP2DOS. ;-)DOS386 wrote:As a user, YES. Arachne and DOSLYNX browsers and WGET downloader (with some hacks) do work.
Ahh, too bad then :-(However, I have no idea how it's done :-( Also, what are you tying to do ? I have no idea what a "simple" example could do ...
In fact, I was wondering about writing a DOS gopher client in FreeBASIC, but so far I didn't succeeded to let FreeBASIC send anything via the network, so I guess my project won't happen ever...
Digging with some QuickBasic code, I was able to establish some TCP connections to a server, but I got no results using FreeBASIC.
Hey there :-)
I'm still looking after any way to use network with FBC/DOS...
I found recently a program called "TCPPORT.EXE" (shipped with Watt32). It seems that this program may be used as a mean way to do network inside a third-party program. From what I understood, TCPPORT.EXE is emulating a serial port, to which my program would have to bind somehow...
An example call would be:
tcpport 192.168.0.10 80 myprogram.exe
There's some talk about using "software interrupt 14 instead of hardware serial port". I have no idea what it could mean :-)
As far as I know, FreeBASIC may open hardware serial ports using OPEN COM, but is there any way of opening a "software int 14" serial port instead?
Sorry for that lame post, I know that I have very little idea of what I am talking about :-/
I'm still looking after any way to use network with FBC/DOS...
I found recently a program called "TCPPORT.EXE" (shipped with Watt32). It seems that this program may be used as a mean way to do network inside a third-party program. From what I understood, TCPPORT.EXE is emulating a serial port, to which my program would have to bind somehow...
An example call would be:
tcpport 192.168.0.10 80 myprogram.exe
There's some talk about using "software interrupt 14 instead of hardware serial port". I have no idea what it could mean :-)
As far as I know, FreeBASIC may open hardware serial ports using OPEN COM, but is there any way of opening a "software int 14" serial port instead?
Sorry for that lame post, I know that I have very little idea of what I am talking about :-/
The system BIOS provides a Serial Communications Service through Interrupt 14h, and I’m guessing that TCPPORT is hooking this interrupt so it can intercept the calls from your program. For this to work your program would need to use the BIOS service to interface with TCPPORT as it would interface with a serial port. For FBDOS, the “COM” interface may ultimately call the BIOS service, or not, I can only guess. The DOS functions should use the BIOS service, or you can do it through Interrupt 14h. For this you can probably get most of the information you need from Ralf Brown’s Interrupt list.
An HTML version is here:
http://www.ctyme.com/rbrown.htm
And the download version here:
http://www-2.cs.cmu.edu/~ralf/files.html
And BTW, you should expect the data transfer rate to be relatively slow, because the BIOS service transfers only one character per interrupt.
An HTML version is here:
http://www.ctyme.com/rbrown.htm
And the download version here:
http://www-2.cs.cmu.edu/~ralf/files.html
And BTW, you should expect the data transfer rate to be relatively slow, because the BIOS service transfers only one character per interrupt.
FB seems NOT to use INT $14 (see libfb-v0.20.0b-src.zip\src\rtlib\dos\libfb_io_serial.c), for the reason discussed in the past - only 1 byte per call, unusably slow. So OPEN COM will NOT see your hack and continue "talking" to the real serial port :-(MichaelW wrote:The system BIOS provides a Serial Communications Service through Interrupt 14h, and I’m guessing that TCPPORT is hooking this interrupt so it can intercept the calls from your program. For this to work your program would need to use the BIOS service to interface with TCPPORT as it would interface with a serial port. For FBDOS, the “COM” interface may ultimately call the BIOS service, or not
Ahh, too bad...DOS386 wrote:FB seems NOT to use INT $14 (see libfb-v0.20.0b-src.zip\src\rtlib\dos\libfb_io_serial.c), for the reason discussed in the past - only 1 byte per call, unusably slow. So OPEN COM will NOT see your hack and continue "talking" to the real serial port :-(
I lost my hope again :-(
Hi!Dinosaur wrote:Fox, can you give us more detail on what you are trying to do with a Network from within your Dos program ?
Well... To tell you the full truth, I would love to write a Gopher client for DOS. Unfortunately, I'm stuck with the network layer :(
What I would like to achieve, is one of the following things:
- Using some network calls in my program (something like "OpenStreamSocket(192.168.0.10, port 70)")
or
- Use an external program to do network stuff (something like OPEN PIPE "telnet 192.168.0.10 70" FOR RANDOM AS #1)
or
- Use any other magic to get a stream access to network things (like OPEN "COM9" FOR RANDOM AS #4, where COM9 would be a hacked socket)
Besides that, I need a way to do some DNS resolvings, too. Or _at least_ a way to initiate UDP "streams" (then I would write the DNS support by myself).
So far, I had no success at all using any kind of network things on FB/DOS... But I still keep hoping that someone will sort it out and post some clues there :-)
Dinosaur, what has been your experience in that matter?