dhcp.h File Reference


Data Structures

struct  dhcp_msg

Functions

PACK_STRUCT_END 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_arp_reply (struct netif *netif, struct ip_addr *addr)
void dhcp_coarse_tmr (void)
void dhcp_fine_tmr (void)

Detailed Description


Function Documentation

void dhcp_arp_reply ( struct netif netif,
struct ip_addr *  addr 
)

if enabled, check whether the offered IP address is not in use, using ARP

Match an ARP reply with the offered IP address.

Parameters:
netif the network interface on which the reply was received
addr The IP address we received a reply from

void dhcp_coarse_tmr ( void   ) 

to be called every minute

The DHCP timer that checks for lease renewal/rebind timeouts.

void dhcp_fine_tmr ( void   ) 

to be called every half second

DHCP transaction timeout handling

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_inform ( struct netif netif  ) 

inform server of our manual IP address

Inform a DHCP server of our manual configuration.

This informs DHCP servers of our fixed IP address configuration by sending an INFORM message. It does not involve DHCP address configuration, it is just here to be nice to the network.

Parameters:
netif The lwIP network interface

err_t dhcp_release ( struct netif netif  ) 

release the DHCP lease, usually called before dhcp_stop()

Release a DHCP lease.

Parameters:
netif network interface which must release its lease

err_t dhcp_renew ( struct netif netif  ) 

enforce early lease renewal (not needed normally)

Renew an existing DHCP lease at the involved DHCP server.

Parameters:
netif network interface which must renew its lease

PACK_STRUCT_END err_t dhcp_start ( struct netif netif  ) 

start DHCP configuration

Start DHCP negotiation for a network interface.

If no DHCP client instance was attached to this interface, a new client is created first. If a DHCP client instance was already present, it restarts negotiation.

Parameters:
netif The lwIP network interface
Returns:
lwIP error code
  • ERR_OK - No error
  • ERR_MEM - Out of memory

void dhcp_stop ( struct netif netif  ) 

stop DHCP configuration

Remove the DHCP client from the interface.

Parameters:
netif The network interface to stop DHCP on


Generated on Sun Mar 23 19:22:46 2008 for lwIP 1.3.0 by  doxygen 1.5.4