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: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
DHCP (IPv4) related functions. More...
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. | |
void | dhcp_inform (struct netif *netif) |
Inform a DHCP server of our manual configuration. | |
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. | |
void | dhcp_stop (struct netif *netif) |
Remove the DHCP client from the interface. |
Detailed Description
DHCP (IPv4) related functions.
- See also:
- DHCPv4
Function Documentation
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 683 of file lwip_dhcp.c.
void dhcp_inform | ( | struct netif * | netif ) |
Inform a DHCP server of our manual configuration.
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 788 of file lwip_dhcp.c.
Release a DHCP lease.
release the DHCP lease, usually called before dhcp_stop()
- Parameters:
-
netif network interface which must release its lease
Definition at line 1261 of file lwip_dhcp.c.
Renew an existing DHCP lease at the involved DHCP server.
enforce early lease renewal (not needed normally)
- Parameters:
-
netif network interface which must renew its lease
Definition at line 1108 of file lwip_dhcp.c.
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 662 of file lwip_dhcp.c.
Start DHCP negotiation for a network interface.
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 707 of file lwip_dhcp.c.
void dhcp_stop | ( | struct netif * | netif ) |
Remove the DHCP client from the interface.
stop DHCP configuration
- Parameters:
-
netif The network interface to stop DHCP on
Definition at line 1324 of file lwip_dhcp.c.
Generated on Tue Jul 12 2022 11:03:07 by
