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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
dhcp.h File Reference
DHCP client API. More...
Go to the source code of this file.
Functions | |
| 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 negotiation for a network interface. | |
| err_t | dhcp_renew (struct netif *netif) |
| Renew an existing DHCP lease at the involved DHCP server. | |
| err_t | dhcp_release (struct netif *netif) |
| This function calls dhcp_release_and_stop() internally. | |
| void | dhcp_stop (struct netif *netif) |
| This function calls dhcp_release_and_stop() internally. | |
| void | dhcp_release_and_stop (struct netif *netif) |
| Release a DHCP lease and stop DHCP statemachine (and AUTOIP if LWIP_DHCP_AUTOIP_COOP). | |
| void | dhcp_inform (struct netif *netif) |
| Inform a DHCP server of our manual configuration. | |
| 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) |
| Match an ARP reply with the offered IP address: 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) |
| The DHCP timer that checks for lease renewal/rebind timeouts. | |
| void | dhcp_fine_tmr (void) |
| DHCP transaction timeout handling (this function must be called every 500ms, see DHCP_FINE_TIMER_MSECS). | |
| 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 | ||
| ) |
Match an ARP reply with the offered IP address: 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 903 of file lwip_dhcp.c.
| 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).
Definition at line 430 of file lwip_dhcp.c.
| 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.
Definition at line 468 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 858 of file lwip_dhcp.c.
| void dhcp_set_ntp_servers | ( | u8_t | num, |
| const ip4_addr_t * | server | ||
| ) |
This function must exist, in other to add offered NTP servers to the NTP (or SNTP) engine.
See LWIP_DHCP_MAX_NTP_SERVERS
This function must exist, in other to add offered NTP servers to the NTP (or SNTP) engine.
- Parameters:
-
num the index of the NTP server to set must be < SNTP_MAX_SERVERS server IP address of the NTP server to set
Definition at line 800 of file lwip_sntp.c.
| 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 1980 of file lwip_dhcp.c.
Generated on Tue Jul 12 2022 13:55:06 by
1.7.2