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
DHCPv6 client: IPv6 address autoconfiguration as per RFC 3315 (stateful DHCPv6) and RFC 3736 (stateless DHCPv6). More...
Functions | |
void | dhcp6_set_struct (struct netif *netif, struct dhcp6 *dhcp6) |
Set a statically allocated struct dhcp6 to work with. | |
void | dhcp6_cleanup (struct netif *netif) |
Removes a struct dhcp6 from a netif. | |
err_t | dhcp6_enable_stateful (struct netif *netif) |
Enable stateful DHCPv6 on this netif Requests are sent on receipt of an RA message with the ND6_RA_FLAG_MANAGED_ADDR_CONFIG flag set. | |
err_t | dhcp6_enable_stateless (struct netif *netif) |
Enable stateless DHCPv6 on this netif Requests are sent on receipt of an RA message with the ND6_RA_FLAG_OTHER_CONFIG flag set. | |
void | dhcp6_disable (struct netif *netif) |
Disable stateful or stateless DHCPv6 on this netif Requests are sent on receipt of an RA message with the ND6_RA_FLAG_OTHER_CONFIG flag set. |
Detailed Description
DHCPv6 client: IPv6 address autoconfiguration as per RFC 3315 (stateful DHCPv6) and RFC 3736 (stateless DHCPv6).
For now, only stateless DHCPv6 is implemented!
TODO:
- enable/disable API to not always start when RA is received
- stateful DHCPv6 (for now, only stateless DHCPv6 for DNS and NTP servers works)
- create Client Identifier?
- only start requests if a valid local address is available on the netif
- only start information requests if required (not for every RA)
dhcp6_enable_stateful() enables stateful DHCPv6 for a netif (stateless disabled)
dhcp6_enable_stateless() enables stateless DHCPv6 for a netif (stateful disabled)
dhcp6_disable() disable DHCPv6 for a netif
When enabled, requests are only issued after receipt of RA with the corresponding bits set.
Function Documentation
void dhcp6_cleanup | ( | struct netif * | netif ) |
Removes a struct dhcp6 from a netif.
ATTENTION: Only use this when not using dhcp6_set_struct() to allocate the struct dhcp6 since the memory is passed back to the heap.
- Parameters:
-
netif the netif from which to remove the struct dhcp
Definition at line 206 of file lwip_dhcp6.c.
void dhcp6_disable | ( | struct netif * | netif ) |
Disable stateful or stateless DHCPv6 on this netif Requests are sent on receipt of an RA message with the ND6_RA_FLAG_OTHER_CONFIG flag set.
Definition at line 346 of file lwip_dhcp6.c.
Enable stateful DHCPv6 on this netif Requests are sent on receipt of an RA message with the ND6_RA_FLAG_MANAGED_ADDR_CONFIG flag set.
A struct dhcp6 will be allocated for this netif if not set via dhcp6_set_struct before.
Definition at line 299 of file lwip_dhcp6.c.
Enable stateless DHCPv6 on this netif Requests are sent on receipt of an RA message with the ND6_RA_FLAG_OTHER_CONFIG flag set.
A struct dhcp6 will be allocated for this netif if not set via dhcp6_set_struct before.
Definition at line 316 of file lwip_dhcp6.c.
void dhcp6_set_struct | ( | struct netif * | netif, |
struct dhcp6 * | dhcp6 | ||
) |
Set a statically allocated struct dhcp6 to work with.
Using this prevents dhcp6_start to allocate it using mem_malloc.
- Parameters:
-
netif the netif for which to set the struct dhcp dhcp6 (uninitialised) dhcp6 struct allocated by the application
Definition at line 185 of file lwip_dhcp6.c.
Generated on Tue Jul 12 2022 13:55:22 by
