Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
dhcp.h File Reference
DHCP client API. More...
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, const ip4_addr_t *addr) |
if enabled, check whether the offered IP address is not in use, using ARP | |
u8_t | dhcp_supplied_address (const struct netif *netif) |
check if DHCP supplied netif->ip_addr | |
void | dhcp_coarse_tmr (void) |
to be called every minute | |
void | dhcp_fine_tmr (void) |
to be called every half second | |
void | dhcp_set_ntp_servers (u8_t num_ntp_servers, const ip4_addr_t *ntp_server_addrs) |
This function must exist, in other to add offered NTP servers to the NTP (or SNTP) engine. |
Detailed Description
DHCP client API.
Definition in file dhcp.h.
Function Documentation
void dhcp_arp_reply | ( | struct netif * | netif, |
const ip4_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
Definition at line 871 of file lwip_dhcp.c.
void dhcp_coarse_tmr | ( | void | ) |
to be called every minute
Definition at line 401 of file lwip_dhcp.c.
void dhcp_fine_tmr | ( | void | ) |
to be called every half second
to be called every half second
A DHCP server is expected to respond within a short period of time. This timer checks whether an outstanding DHCP request is timed out.
Definition at line 440 of file lwip_dhcp.c.
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.
Definition at line 830 of file lwip_dhcp.c.
void dhcp_set_ntp_servers | ( | u8_t | num_ntp_servers, |
const ip4_addr_t * | ntp_server_addrs | ||
) |
This function must exist, in other to add offered NTP servers to the NTP (or SNTP) engine.
See LWIP_DHCP_MAX_NTP_SERVERS
u8_t dhcp_supplied_address | ( | const struct netif * | netif ) |
check if DHCP supplied netif->ip_addr
- Parameters:
-
netif the netif to check
- Returns:
- 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), 0 otherwise
Definition at line 1913 of file lwip_dhcp.c.
Generated on Tue Jul 12 2022 18:19:36 by
