◆ CEthernet_recover_module()

int CEthernet_recover_module ( ceth_device device)

Use this function to recover a device not on your subnet. This function is designed to re-enable DHCP on a device that has been removed from your subnet by a SetIPAddress command. Since you can no longer send commands to a device that is no longer on your subnet, it is helpful to be able to re-enable DHCP so that you may once again. NOTE: This function requires use of the MAC address and is therefore a privileged (RAW Socket) function. You may alternatively hard code the device's MAC address into the ceth_device struct provided to this function.

Parameters
[in]*devicePointer to the device you would like to recover.
Returns
int Error code.
Return values
0Success.
-1No device specified.
-2MAC address unknown.
-3DHCP is already enabled.
-4Failed to find the device. Recovery failed.

References ceth_addr_info::c, ceth_device::dhcp_enabled, ceth_device::gateway, ceth_ip_addr::i, ceth_device::ip_address, ceth_device::mac_address, ceth_device::name, and ceth_device::net_mask.

Referenced by CCEthernet::recover_module().

 
 
Generated on Tue Sep 19 2017.