From: Richard Dawe Newsgroups: comp.os.msdos.djgpp Subject: Re: netbd.h, sockets.h, in.h and types.h don't work Date: Fri, 02 Jun 2000 19:43:20 +0100 Organization: Customer of Planet Online Lines: 83 Message-ID: <39380048.CD366DDF@bigfoot.com> References: <3936DA62 DOT 9581F9CE AT bigfoot DOT com> <3936feb4 DOT 2522956 AT news3 DOT banet DOT net> NNTP-Posting-Host: modem-54.potassium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg4.svr.pol.co.uk 959986654 8158 62.136.18.54 (2 Jun 2000 22:57:34 GMT) NNTP-Posting-Date: 2 Jun 2000 22:57:34 GMT X-Complaints-To: abuse AT theplanet DOT net X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586) X-Accept-Language: de,fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello. "Peter J. Farley III" wrote: > PMFJI here fellas Whoa, what does "PMFJI" mean? Peter M. Farley Jumps In? ;) > I ran into this myself recently with an open-source FSM (finite state > machine) application generator called libero . > I, too, got the "ntohl redefined" error (among others), and thus > discovered this problem myself. I forget - why does this error appear? I looked back at the reason this thread started and I don't see why this happened. It looked to me like the originator was using stale headers from an old version of libsocket, but that wasn't confirmed. (I just read section 8.2 of the FAQ too, BTW). BTW Eli, you refer to libsocket as "libsock" in a couple of places in the FAQ. Also there seem to be some links to my old site: http://www.geocities.com/SiliconValley/Lab/3216/ libmslot is one example. You can translate these URLs to the new location by changing the above prefix to: http://www.phekda.freeserve.co.uk/richdawe/ > But it really would be finer if the zip-picker asked if you wanted DOS > networking capabilities, Yes, there is agreement that the zip picker needs a couple of items added to it. > For those new to the networking libraries/headers, it would be nice to > see a short FAQ somewhere on what libraries are needed for what > networking application areas (i.e., do I need libnet AND WAT-TCP AND > libsocket, or just two of them, or just one? How do I choose? Are > there incompatibilities? In what order should they be installed? > Etc.) OK, here's a short FAQ, off the top of my head: . Watt-32 is for networking under pure DOS or under Windows with an NDIS packet driver installed (ndis3pkt). It does BSD sockets, plus the WATTCP API (from which it's derived). . libsocket is for networking under Windows 3.x (untested for a long time), Windows '95, possibly '98 (untested by me, reported to work/not work), Windows NT (Unix domain sockets only, no TCP/IP, untested). libsocket is a BSD sockets-only library. . libnet works on DOS, Windows '95 (Winsock 1.x only). It has its own APIs, protocols, so definitely does not do BSD sockets (*). (*) I apologise that my point of view is polarised to BSD sockets. It's what I'm used to. ;) I think Watt-32 and libsocket will clash, since they both include the same BSD socket networking headers (well, actually Watt-32 includes more). I don't know enough libnet to commet here (perhaps Damien Yerrick can help here? ;) ). I imagine it will not clash - since it has its own APIs, it would seem sensible not to make it clash with BSD sockets. So, you only need one. Now to the crunch: which one you choose? If you want BSD sockets under pure DOS, then there is no choice: Watt-32. If your programs are going to run under Windows '95, '98, then you could also consider libsocket. I'm trying to think of an advantage here over Watt-32, but I can't - hmmm, maybe: possibly smaller executables, since it's a thin layer over Windows VxDs; copious amounts of documentation; auto-configuration on Ethernets, means no fiddling with config files (although you may have to do this). This is my honest opinion, although it's pretty damning for libsocket. :( Watt-32 is probably more reliable than libsocket by a significant margin. libsocket development has been stymied by several bugs in the VxD from the Coda project and a lack of time/enthusiasm on my part (sorry about the enthusiasm bit - I think it's back now). Bye, -- Richard Dawe richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/