nkjnm
Dependencies: MAX44000 nexpaq_mdk
Fork of LED_Demo by
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 libraries/net/lwip/lwip/include/lwip/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
Definition at line 799 of file lwip_dhcp.c.
| 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
Definition at line 602 of file lwip_dhcp.c.
| void dhcp_coarse_tmr | ( | void | ) |
to be called every minute
Definition at line 333 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 365 of file lwip_dhcp.c.
| 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
Definition at line 708 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 762 of file lwip_dhcp.c.
| 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
Definition at line 1178 of file lwip_dhcp.c.
| err_t dhcp_renew | ( | struct netif * | netif ) |
enforce early lease renewal (not needed normally)
enforce early lease renewal (not needed normally)
- Parameters:
-
netif network interface which must renew its lease
Definition at line 1013 of file lwip_dhcp.c.
| PACK_STRUCT_END void dhcp_set_struct | ( | struct netif * | netif, |
| struct dhcp * | dhcp | ||
| ) |
Set a statically allocated struct dhcp to work with.
Using this prevents dhcp_start to allocate it using mem_malloc.
- Parameters:
-
netif the netif for which to set the struct dhcp dhcp (uninitialised) dhcp struct allocated by the application
Definition at line 583 of file lwip_dhcp.c.
| 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
Definition at line 625 of file lwip_dhcp.c.
| void dhcp_stop | ( | struct netif * | netif ) |
stop DHCP configuration
stop DHCP configuration
- Parameters:
-
netif The network interface to stop DHCP on
Definition at line 1230 of file lwip_dhcp.c.
Generated on Tue Jul 12 2022 17:03:58 by
1.7.2
