lwIP 2.2.0
Lightweight IP stack
|
Macros | |
#define | DHCP_COARSE_TIMER_SECS 60 |
#define | DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL) |
#define | DHCP_FINE_TIMER_MSECS 500 |
#define | dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL) |
Typedefs | |
typedef u16_t | dhcp_timeout_t |
Functions | |
void | dhcp_set_struct (struct netif *netif, struct dhcp *dhcp) |
void | dhcp_cleanup (struct netif *netif) |
err_t | dhcp_start (struct netif *netif) |
err_t | dhcp_renew (struct netif *netif) |
err_t | dhcp_release (struct netif *netif) |
void | dhcp_stop (struct netif *netif) |
void | dhcp_release_and_stop (struct netif *netif) |
void | dhcp_inform (struct netif *netif) |
void | dhcp_network_changed_link_up (struct netif *netif) |
u8_t | dhcp_supplied_address (const struct netif *netif) |
void | dhcp_coarse_tmr (void) |
void | dhcp_fine_tmr (void) |
DHCP client API
#define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL) |
period (in milliseconds) of the application calling dhcp_coarse_tmr()
#define DHCP_COARSE_TIMER_SECS 60 |
period (in seconds) of the application calling dhcp_coarse_tmr()
#define DHCP_FINE_TIMER_MSECS 500 |
period (in milliseconds) of the application calling dhcp_fine_tmr()
#define dhcp_remove_struct | ( | netif | ) | netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL) |
Remove a struct dhcp previously set to the netif using dhcp_set_struct()
typedef u16_t dhcp_timeout_t |
Define DHCP_TIMEOUT_SIZE_T in opt.h if you want use a different integer than u16_t. Especially useful if DHCP_COARSE_TIMER_SECS is in smaller units, so timeouts easily reach UINT16_MAX and more
void dhcp_coarse_tmr | ( | void | ) |
The DHCP timer that checks for lease renewal/rebind timeouts. Must be called once a minute (see DHCP_COARSE_TIMER_SECS).
void dhcp_fine_tmr | ( | void | ) |
DHCP transaction timeout handling (this function must be called every 500ms, see DHCP_FINE_TIMER_MSECS).
A DHCP server is expected to respond within a short period of time. This timer checks whether an outstanding DHCP request is timed out.
void dhcp_network_changed_link_up | ( | struct netif * | netif | ) |
Handle a possible change in the network configuration.
This enters the REBOOTING state to verify that the currently bound address is still valid.