From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: TCP with DJGPP? Date: 22 Apr 1998 21:31:13 GMT Organization: Oxford University, England Lines: 49 Message-ID: <6hlnj1$o50$1@news.ox.ac.uk> References: <353E5477 DOT E15931FB AT usa DOT net> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 22 Apr 1998 20:38:48 GMT in comp.os.msdos.djgpp Paul Derbyshire wrote: : I recallsomeone making a TCP stack for DJGPP apps, but I don't have the URL : handy, what was it again? Note: as I recall it was Win32-independent. TCPLIB? WatTCP? I'm not sure, I haven't used these; DJ Delorie used TCPLIB to make a port to DOS of Lynx IIRC. : There is also a separate one that allows DJGPP apps to use a VXD to send and : receive TCP packets while in Win 95 and while W95 was connected to the : network/Internet. What was its URL? There are several to do this. The first was Dan Hedlund's WSOCK library, which is C++. Indrek Mandre has released a similar library, libsocket, which is plain C, which provides BSD socket routines. I haven't used Indrek's library though. I made a very small library, which was a C version of Dan's library. It only implements a subset of the Winsock functions, which are fairly BSD-like. I believe TCPLIB, WatTCP, libsocket and WSOCK are all linked from DJ Delorie's external djgpp links page: http://www.delorie.com/djgpp/dl/elsewhere.html This page is a good place to look for programs if you've forgotten where they are. SET's links page is an even better place, but I can never remember where that is. There's a link to it from Allegro's links page. Dan's library has a small bug that causes a bad memory write; you might want to patch this if you use his library. In the function to call the VxD (located in wsock.c I think) there's a block of inline assembler containing the command: andl %%eax, 0x0000ffff Change that command to: andl $0x0000ffff, %%eax I don't know whether Indrek's library has the same problem. (Note: TCP is streamed; you don't send and receive packets directly.) -- george DOT foot AT merton DOT oxford DOT ac DOT uk [sb91salaPlbP2la+PlbP]sb91salaPlbP2la+PlbP