friendev EtherDune TCP/IP library
|
EtherDune DHCP Service. More...
#include <DHCP.h>
Public Member Functions | |
DHCP () | |
bool | dhcpSetup () |
Attempts to configure the IP settings: local IP, subnet mask, gateway and DNS via DHCP. More... | |
EtherDune DHCP Service.
Implements the basics of DHCP so as to obtain and maintain an IP lease along with DNS, gateway IP and netmask. See DHCP configuration and timeouts for EtherDune config parameters that apply to DHCP.
EtherDune DHCP is a crude "straight to the point" implementation of DHCP. It does not implement a full RENEW/REBIND cycle, but rather shortcuts the whole process fully renewing the lease once the timeout expires. This simplifies the implementation saving valuable flash/code space.
In order to use DHCP in your project, instantiate an object of this class, call dhcpSetup and keep the object instance alive for as long as you want to keep the lease active.
If you do not instantiate the DHCP class in your code, it will not be compiled in, therefore not affecting your code size if unused.
bool DHCP::dhcpSetup | ( | ) |