🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
2 messages
2 total messages Started by Joe Herman Tue, 19 Mar 1991 22:05
How do I detect an active TCP/IP (IBM) under OS/2?
#2469
Author: Joe Herman
Date: Tue, 19 Mar 1991 22:05
19 lines
1206 bytes
Hello, I have a program running under OS/2 that would like to take advantage
of TCP/IP if it's installed on the machine.  Unfortunatly, I can not think
of a good way for the program to detect the presense of TCP/IP.

At first, I thought this could be done by checking the return code
from the socket() (or sock_init()) call.  However, if inet is not
functioning the call to socket() causes the program to exit.  Since
the program can still function without TCP/IP, this is not a desired
behavior.

Does anyone know of a method to detect the presense of TCP/IP under OS/2?

			Thanks,
			Joe Herman
			U. of Maryland

dzoey@terminus.umd.edu
-- 
"Everything is wonderful until you know something about it."
Re: How do I detect an active TCP/IP (IBM) under OS/2?
#2483
Author: Wim Bonner
Date: Sun, 24 Mar 1991 09:15
23 lines
1580 bytes
In article <8281@umd5.umd.edu> dzoey@terminus.umd.edu (Joe Herman) writes:
>from the socket() (or sock_init()) call.  However, if inet is not
>functioning the call to socket() causes the program to exit.  Since
>the program can still function without TCP/IP, this is not a desired
>behavior.

Is the socket call in a DLL?  If so you may be running into a similar problem
I've had with my network programming in that all of the LANMAN calls are 
actually located in DLLs, and so the first call kills the program.  The solution
that was suggested to me, was to try to demand load the call and if that was 
successful, assume the network was loaded and make the call.  If you cannot 
demand load the call, the DLLs are not available, so don't make any network 
calls.

Unfortunately, I'm not at my own computer right now, so I can't post the 
suggested code.  I'll try to remember to put it up tomorrow when I can get to my
computer.

Wim.
-- 
|  wbonner@yoda.eecs.wsu.edu  |
| 27313853@wsuvm1.csc.wsu.edu |
|  72561.3135@CompuServe.com  |
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads