Deprecated fork of old network stack source from github. Please use official library instead: https://mbed.org/users/mbed_official/code/EthernetInterface/
dhcp.h File Reference
Go to the source code of this file.
Data Structures | |
struct | dhcp_msg |
minimum set of fields of any DHCP message More... | |
Functions | |
PACK_STRUCT_END void | dhcp_set_struct (struct netif *netif, struct dhcp *dhcp) |
Set a statically allocated struct dhcp to work with. | |
void | dhcp_cleanup (struct netif *netif) |
Removes a struct dhcp from a netif. | |
err_t | dhcp_start (struct netif *netif) |
start DHCP configuration | |
err_t | dhcp_renew (struct netif *netif) |
enforce early lease renewal (not needed normally) | |
err_t | dhcp_release (struct netif *netif) |
release the DHCP lease, usually called before dhcp_stop() | |
void | dhcp_stop (struct netif *netif) |
stop DHCP configuration | |
void | dhcp_inform (struct netif *netif) |
inform server of our manual IP address | |
void | dhcp_network_changed (struct netif *netif) |
Handle a possible change in the network configuration. | |
void | dhcp_arp_reply (struct netif *netif, ip_addr_t *addr) |
if enabled, check whether the offered IP address is not in use, using ARP | |
void | dhcp_coarse_tmr (void) |
to be called every minute | |
void | dhcp_fine_tmr (void) |
to be called every half second |
Detailed Description
Definition in file dhcp.h.
Function Documentation
void dhcp_arp_reply | ( | struct netif * | netif, |
ip_addr_t * | addr | ||
) |
if enabled, check whether the offered IP address is not in use, using ARP
if enabled, check whether the offered IP address is not in use, using ARP
- Parameters:
-
netif the network interface on which the reply was received addr The IP address we received a reply from
void dhcp_cleanup | ( | struct netif * | netif ) |
Removes a struct dhcp from a netif.
ATTENTION: Only use this when not using dhcp_set_struct() to allocate the struct dhcp since the memory is passed back to the heap.
- Parameters:
-
netif the netif from which to remove the struct dhcp
void dhcp_fine_tmr | ( | void | ) |
void dhcp_inform | ( | struct netif * | netif ) |
inform server of our manual IP address
inform server of our manual IP address
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
void dhcp_network_changed | ( | struct netif * | netif ) |
err_t dhcp_release | ( | struct netif * | netif ) |
release the DHCP lease, usually called before dhcp_stop()
release the DHCP lease, usually called before dhcp_stop()
- Parameters:
-
netif network interface which must release its lease
err_t dhcp_renew | ( | struct netif * | netif ) |
PACK_STRUCT_END void dhcp_set_struct | ( | struct netif * | netif, |
struct dhcp * | dhcp | ||
) |
err_t dhcp_start | ( | struct netif * | netif ) |
start DHCP configuration
start DHCP configuration
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
Generated on Tue Jul 12 2022 23:10:20 by 1.7.2