gclib  396
Communications API for Galil controllers and PLCs
 All Data Structures Files Functions Variables Typedefs Macros Pages
GCLIB_DLL_EXPORTED GReturn GCALL GIpRequests ( GCStringOut  requests,
GSize  requests_len 

Uses GUtility(), G_UTIL_GCAPS_IPREQUEST or G_UTIL_IPREQUEST to provide a list of all Galil controllers requesting IP addresses via BOOT-P or DHCP.

requestsThe buffer to hold the list of requesting controllers. Data will be null terminated, even if the data must be truncated to do so. See below for more information.
requests_lenThe length of the requests buffer.
The success status or error code of the function. See gclib_errors.h for possible values.

GIpRequests() will block about 5 seconds while listening for requests.

If gcaps is available, the listing will come from the server via G_UTIL_GCAPS_IPREQUEST. In the abscence of the server, gclib will use G_UTIL_IPREQUEST to generate the list.

When not using gcaps, Linux/OS X users must be root to use GIpRequests() and have UDP access to bind and listen on port 67.

Each line of the returned data will be of the form model, serial_number, MAC_address, network_adaptor_name, network_adaptor_ip_address. For example:

DMC4000, 291, 00:50:4C:20:01:23, LAN,
RIO47000, 37290, 00:50:4C:28:91:AA, Static,
GIpRequests() will take up to 1 second to look for gcaps.

See x_examples.cpp for an example.

Definition at line 95 of file gclibo.c.