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
lwip_dhcp6.c File Reference
Go to the source code of this file.
Enumerations | |
enum | dhcp6_option_idx |
Option handling: options are parsed in dhcp6_parse_reply and saved in an array where other functions can load them from. More... | |
Functions | |
static err_t | dhcp6_inc_pcb_refcount (void) |
Ensure DHCP PCB is allocated and bound. | |
static void | dhcp6_dec_pcb_refcount (void) |
Free DHCP PCB if the last netif stops using it. | |
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. | |
static struct pbuf * | dhcp6_create_msg (struct netif *netif, struct dhcp6 *dhcp6, u8_t message_type, u16_t opt_len_alloc, u16_t *options_out_len) |
Create a DHCPv6 request, fill in common headers. | |
void | dhcp6_nd6_ra_trigger (struct netif *netif, u8_t managed_addr_config, u8_t other_config) |
This function is called from nd6 module when an RA messsage is received It triggers DHCPv6 requests (if enabled). | |
static err_t | dhcp6_parse_reply (struct pbuf *p, struct dhcp6 *dhcp6) |
Parse the DHCPv6 message and extract the DHCPv6 options. | |
static void | dhcp6_timeout (struct netif *netif, struct dhcp6 *dhcp6) |
A DHCPv6 request has timed out. | |
void | dhcp6_tmr (void) |
DHCPv6 timeout handling (this function must be called every 500ms, see DHCP6_TIMER_MSECS). | |
Variables | |
struct dhcp6_option_info | dhcp6_rx_options [DHCP6_OPTION_IDX_MAX] |
Holds the decoded option info, only valid while in dhcp6_recv. |
Detailed Description
Definition in file lwip_dhcp6.c.
Enumeration Type Documentation
enum dhcp6_option_idx |
Option handling: options are parsed in dhcp6_parse_reply and saved in an array where other functions can load them from.
This might be moved into the struct dhcp6 (not necessarily since lwIP is single-threaded and the array is only used while in recv callback).
Definition at line 96 of file lwip_dhcp6.c.
Function Documentation
static struct pbuf* dhcp6_create_msg | ( | struct netif * | netif, |
struct dhcp6 * | dhcp6, | ||
u8_t | message_type, | ||
u16_t | opt_len_alloc, | ||
u16_t * | options_out_len | ||
) | [static, read] |
Create a DHCPv6 request, fill in common headers.
- Parameters:
-
netif the netif under DHCPv6 control dhcp6 dhcp6 control struct message_type message type of the request opt_len_alloc option length to allocate options_out_len option length on exit
- Returns:
- a pbuf for the message
Definition at line 377 of file lwip_dhcp6.c.
static void dhcp6_dec_pcb_refcount | ( | void | ) | [static] |
Free DHCP PCB if the last netif stops using it.
Definition at line 165 of file lwip_dhcp6.c.
static err_t dhcp6_inc_pcb_refcount | ( | void | ) | [static] |
Ensure DHCP PCB is allocated and bound.
Definition at line 139 of file lwip_dhcp6.c.
void dhcp6_nd6_ra_trigger | ( | struct netif * | netif, |
u8_t | managed_addr_config, | ||
u8_t | other_config | ||
) |
This function is called from nd6 module when an RA messsage is received It triggers DHCPv6 requests (if enabled).
Definition at line 577 of file lwip_dhcp6.c.
Parse the DHCPv6 message and extract the DHCPv6 options.
Extract the DHCPv6 options (offset + length) so that we can later easily check for them or extract the contents.
Definition at line 608 of file lwip_dhcp6.c.
static void dhcp6_timeout | ( | struct netif * | netif, |
struct dhcp6 * | dhcp6 | ||
) | [static] |
A DHCPv6 request has timed out.
The timer that was started with the DHCPv6 request has timed out, indicating no response was received in time.
Definition at line 766 of file lwip_dhcp6.c.
void dhcp6_tmr | ( | void | ) |
DHCPv6 timeout handling (this function must be called every 500ms, see DHCP6_TIMER_MSECS).
A DHCPv6 server is expected to respond within a short period of time. This timer checks whether an outstanding DHCPv6 request is timed out.
Definition at line 790 of file lwip_dhcp6.c.
Variable Documentation
struct dhcp6_option_info dhcp6_rx_options[DHCP6_OPTION_IDX_MAX] |
Holds the decoded option info, only valid while in dhcp6_recv.
Definition at line 116 of file lwip_dhcp6.c.
Generated on Tue Jul 12 2022 13:55:13 by
