lwIP  2.0.2
Lightweight IP stack
dhcp.h File Reference
#include "lwip/opt.h"
#include "lwip/netif.h"
#include "lwip/udp.h"


#define dhcp_remove_struct(netif)   do { (netif)->dhcp = NULL; } while(0)


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_inform (struct netif *netif)
void dhcp_network_changed (struct netif *netif)
void dhcp_arp_reply (struct netif *netif, const ip4_addr_t *addr)
u8_t dhcp_supplied_address (const struct netif *netif)
void dhcp_coarse_tmr (void)
void dhcp_fine_tmr (void)

Detailed Description

DHCP client API

Macro Definition Documentation



period (in milliseconds) of the application calling dhcp_coarse_tmr()



period (in seconds) of the application calling dhcp_coarse_tmr()



period (in milliseconds) of the application calling dhcp_fine_tmr()

◆ dhcp_remove_struct

#define dhcp_remove_struct (   netif)    do { (netif)->dhcp = NULL; } while(0)

Remove a struct dhcp previously set to the netif using dhcp_set_struct()

Function Documentation

◆ dhcp_arp_reply()

void dhcp_arp_reply ( struct netif netif,
const ip4_addr_t addr 

Match an ARP reply with the offered IP address: check whether the offered IP address is not in use using ARP

netifthe network interface on which the reply was received
addrThe IP address we received a reply from

◆ dhcp_coarse_tmr()

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).

◆ dhcp_fine_tmr()

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.

◆ dhcp_network_changed()

void dhcp_network_changed ( 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.

◆ dhcp_supplied_address()

u8_t dhcp_supplied_address ( const struct netif netif)

check if DHCP supplied netif->ip_addr

netifthe netif to check
1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), 0 otherwise