Rtos API example
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) |
Release a DHCP lease (usually called before dhcp_stop). | |
void | dhcp_stop (struct netif *netif) |
Remove the DHCP client from the interface. | |
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 887 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 409 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 449 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 844 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:
-
numdns the index of the NTP server to set must be < SNTP_MAX_SERVERS dnsserver IP address of the NTP server to set
Definition at line 659 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 1941 of file lwip_dhcp.c.
Generated on Sun Jul 17 2022 08:25:34 by 1.7.2