Message-Id: <337AB86A.7260@canvaslink.com> Date: Thu, 15 May 1997 03:16:58 -0400 From: Tom Grandgent Reply-To: tgrand AT canvaslink DOT com Organization: Canvas Link, Inc. Mime-Version: 1.0 To: krystyna DOT de DOT heras AT mailbox DOT swipnet DOT se Cc: djgpp AT delorie DOT com Subject: Re: Using Windows TCP/IP with DJGPP Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk > Most people use WIN95/WIN NT to access the internet with the TCP/IP > protocol. I want to program an app with DJGPP that runs like QUAKE, that > does its stuff in DOS (using allegro) and gets information from the > internet via some strange windows bridge. > > 1) Is it possible to do this? > 2) Has anyone any thoughts about it? > 3) Has anyone had any experinece even? I have done a small bit of research about this and will gladly share what I have learned so far. Perhaps others will be able to add to this. I know of three ways for DJGPP programs to access Win95's TCP/IP protocol. -=== WSOCK: http://www.rangenet.com/markiv/wsock.html ===- One is a free C++ library called WSOCK, which may be the only way to do this without legal limitations. It apparently provides a partial Winsock environment by communicating directly with WSOCK.VXD and WSOCK.386. The bad part about this is that it's not compatible with Winsock2, which is used in NT4 and the Memphis beta (or so I've heard). Another problem is the lack of documentation. All you get are two example programs- one is a web server, which is basic but works, and the other resolves hostnames into IP addresses. However, the Resolve() function currently relies on a method called BOOTP to obtain the address of your DNS. This has not worked for me or anyone I know who has tried this, although the program reports to be able to contact the BOOTP server successfully. The fix is to manually specify your DNS address like this: BOOTP_DomainNameServer = dotaddr(205,247,201,2); I don't know of any larger applications (like games) that have successfully used WSOCK, but I would like to see some. I will probably try to use it for the game I am currently writing. -=== Mpath Winsock Tunnel: http://www.mpath.com/quake_faq.html ===- The most famous usage of Windows TCP/IP (and UDP) with DJGPP.... Quake! Quake used Mpath's Winsock Tunnel. Unfortunately I was unable to find out too much about this, and Mpath has completely ignored the two emails I sent to their developer's email address. The files used by Quake are: qlaunch.exe, genvxd.dll, and mgenvxd.vxd. mgenvxd.vxd seems to be the most interesting, containing functions such as CONFIGMG_Read_Registry_Value()... Perhaps this is how it obtains the DNS address? There are also functions like: __VCOMM_OpenComm(), __VCOMM_ReadComm(), and many many more. This wouldn't appear to do us much good- Mpath hasn't released any documentation or anything to the public. -=== TEN: http://www.ten.net/html/ten_developer.html ===- Total Entertainment Network has an SDK that allows for easy (?) porting of Windows or DOS (even DJGPP) games to work on their gaming network. However, they give you as much control as you want, so I believe that you could use their SDK to do any kind of Winsock programming. The problem is that their SDK relies on a special VXD that they wrote, which must be installed along with your game. Somehow I don't think they'd appreciate finding out that someone went and used their VXD and SDK in their own game without TEN support. The SDK is interesting anyway, and they have a good developer's site with lots of valuable information, so I recommend checking it out. All you have to do is fill out a really short form and they'll send you a password to get into the web site. I think the password is the same for everyone... You'll see. :) So anyway.. That's just about all I've found out about this topic. If anyone knows anything else, I'd really like to hear from you. Thanks, Tom Grandgent tgrand AT canvaslink DOT com Canvas Link, Inc.