GCLIB_DLL_EXPORTED GReturn GCALL GAssign ( char *  ip,
char *  mac 
)

Assigns IP address over the Ethernet to a controller at a given MAC address.

Parameters:
ip The null-terminated ip address to assign. The hardware should not yet have an IP address.
mac The null-terminated MAC address of the hardware.
Returns:
The success status or error code of the function. See gclib_errors.h for possible values. The desired IP address will be pinged prior to the assigment. If the ping is returned, GAssign() will return G_GCLIB_UTILITY_IP_TAKEN.
Note:
Linux/OS X users must be root to use GAssign() and have UDP access to send on port 68.
 {.cpp}
  //example of assigning an IP address.
  GAssign("10.1.3.178", "00:50:4c:40:10:58"); //Assign 10.1.3.178 to 00:50:4c:40:10:58

Definition at line 34 of file gclibo.c.

References G_UTIL_ASSIGN, and GUtility().