home *** CD-ROM | disk | FTP | other *** search
- /*
- SEARCH FOR A "SUITABLE INTERFACE" = "UP AND NOT LOOPBACK"
- */
-
- l="rexxsupport.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
- l="rxsocket.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
-
- prg=ProgramName("NOEXT")
-
- if arg()~=0 then do
- call PrintFault(118,prg)
- exit
- end
-
- res=QueryInterfaces("IN")
- if res<0 then do
- say prg": cannot query ("errno()")"
- exit
- end
- if res==0 then do
- say prg": no suitable device found"
- exit
- end
-
- do i=0 to res-1
- if in.i.family==2 & in.i.UP==1 & in.i.LOOPBACK==0 then do
- say prg":" in.i.NAME
- exit
- end
- end
-
- say prg": no suitable device found"
-
-