#include <Dhcp.h>
Public Member Functions | |
| IPAddress | getLocalIp () |
| Returns the local IP address assigned by DHCP. | |
| IPAddress | getSubnetMask () |
| Returns the subnet mask assigned by DHCP. | |
| IPAddress | getGatewayIp () |
| Returns the default gateway address assigned by DHCP. | |
| IPAddress | getDhcpServerIp () |
| Returns the address of the DHCP server. | |
| IPAddress | getDnsServerIp () |
| Returns the DNS server address assigned by DHCP. | |
| int | beginWithDHCP (uint8_t *mac, unsigned long timeout=60000, unsigned long responseTimeout=4000) |
| Starts a DHCP lease request. | |
| int | checkLease () |
| Checks the DHCP lease for a renew or rebind result. | |
| int DhcpClass::beginWithDHCP | ( | uint8_t * | mac, |
| unsigned long | timeout = 60000, |
||
| unsigned long | responseTimeout = 4000 |
||
| ) |
Starts a DHCP lease request.
Blocks until a lease is obtained or the timeout expires.
| mac | Six-byte MAC address to use. If NULL, the MAC address of the Ethernet interface is used. |
| timeout | Maximum time to wait for the lease, in milliseconds. |
| responseTimeout | Unused; kept for compatibility. |
| int DhcpClass::checkLease | ( | ) |
Checks the DHCP lease for a renew or rebind result.
Runs the Ethernet scheduler on each call. Applications normally call it through Ethernet.maintain(), which should be run regularly.
| IPAddress DhcpClass::getDhcpServerIp | ( | ) |
Returns the address of the DHCP server.
| IPAddress DhcpClass::getDnsServerIp | ( | ) |
Returns the DNS server address assigned by DHCP.
| IPAddress DhcpClass::getGatewayIp | ( | ) |
Returns the default gateway address assigned by DHCP.
| IPAddress DhcpClass::getLocalIp | ( | ) |
Returns the local IP address assigned by DHCP.
| IPAddress DhcpClass::getSubnetMask | ( | ) |
Returns the subnet mask assigned by DHCP.