0.9b (c) 1995 Peter Childs
The function performs a "NCB.FIND.NAME" and finds one or more LAN addresses from a specified NetBIOS name.
Syntax
MyRc = NetGetInfo(NETFINDADDRESS, addressList, NetbiosName, type2Find)
Parameters
The parameters specified are:
addressList The REXX variable receiving the result. The variable is divided into:
o addressList.count
The count of LAN addresses found
o addressList.i.address
The adapter address of the adapter having the searched NetBIOS name registered. The variable i has a value from 1 to addressList.count
o addressList.i.route The routing information from the machine issuing the call to the adapter found. The variable i has a value from 1 to addressList.count
NetBiosName The NetBIOS name to find
type2Find The type of the NetBIOS name to find. OS/2 LAN Requester and OS/2 LAN Server encodes the NetBIOS names used in different formats. The following name type vaules can be used:
Value What to find ----- ------------ 0 A NetBIOS name 1 A LAN Server/Requester 3.0 Message name or Userid 2 A LAN Server/Requester 3.0 Computer name 3 LAN Server/Requester 3.0 domain group name
Notes
The information obtained is formatted for Token-Ring networks.
If the return code has a value, it is either a return code from a call to the NetBIOS submit interface or a NetBIOS Network Control Block return code.
There is no guarantee that all nodes will respond within the NetBIOS interface timeout values specified on the executing workstation.
Example
/* Get adapter addresses of current connected workstations */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETFINDADDRESS = 410 NetbiosName = 'FSC' type2Find = 3 myRc = NetGetInfo(NETFINDADDRESS, addressList, NetbiosName, type2Find) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say 'Count: ' addressList.count do i=1 to addressList.count say addressList.i.address say addressList.i.route say end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Count: 2 10005AF78491 -none- 4000100C1240 S504 B1 S50B B1 S501
Inf-HTML End Run - Successful