Initializing help system before first use

XPRDfindxsrvs

XPRDfindxsrvs


Purpose
Search xprmsrv servers on the local network.
Synopsis
int XPRDfindxsrvs(XPRDcontext ctx,int grp,int maxip,unsigned int *addrs);
Arguments
ctx 
XPRD context or NULL to use default settings
grp 
Group number of the request
maxip 
Maximum number of addresses to collect ( i.e. size of addrs)
addrs 
Buffer to return the IP addresses
Return value
The number of IPs stored in addrs or -1 in case of error.
Example
The following example uses this function to find a server and displays its IP address if one is found:
 struct in_addr addr;
 if(XPRDfindxsrvs(NULL,1,1,(unsigned int *)&addr)==1)
  printf("Server found at %s\n",inet_ntoa(addr));
Further information
1. This function sends a broadcast message over the local network and waits for replies from running xprmsrv servers. A given server will reply only to selected group numbers: the grp argument specifies this property.
2. The IP addresses of the hosts having replied to the request are returned via the last argument of the procedure in the form of unsigned integers (to be cast as a struct in_addr for socket functions). The maximum number of IPs is fixed by maxip that cannot be larger than the size of the provided buffer.
Related topics

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.