| gclib 329 Communications API for Galil controllers and PLCs |

All Data Structures Files Functions Variables Typedefs Macros Pages

GReturn GCALL GIpRequests | ( | GCStringOut | requests,
|  | GSize | requests_len
| ) |  |

Provides a list of all Galil controllers requesting IP addresses via BOOT-P or DHCP.

Parameters

  requests | The buffer to hold the list of requesting controllers. Data will be null terminated, even if the data must be truncated to do so.
  requests_len | The length of the requests buffer.

Returns
  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.

Note
  Linux/OS X users must be root to use GIpRequests() and have UDP access to bind and listen on port 67.

//example of listening for controllers needing IP addresses
GIpRequests(listen_buf, sizeof(listen_buf));
cout << listen_buf << '\n';

Each line of the returned data will be of the form model, serial_number, mac.

1 DMC4000, 291, 00:50:4c:20:01:23
2 DMC30000, 4184, 00:50:4c:40:10:58

Definition at line 44 of file gclibo.c.

References G_UTIL_IPREQUEST, and GUtility().