lwIP 2.1.3 Lightweight IP stack

Functions
DHCPv6
APIs » "raw" APIs » IP » IPv6

## Functions
void | dhcp6_set_struct (struct netif *netif, struct dhcp6 *dhcp6)
void | dhcp6_cleanup (struct netif *netif)
err_t | dhcp6_enable_stateful (struct netif *netif)
err_t | dhcp6_enable_stateless (struct netif *netif)
void | dhcp6_disable (struct netif *netif)

## 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

## ◆ dhcp6_cleanup()

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

## ◆ dhcp6_disable()

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.

## ◆ dhcp6_enable_stateful()

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.

A struct dhcp6 will be allocated for this netif if not set via dhcp6_set_struct before.

## ◆ dhcp6_enable_stateless()

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.

A struct dhcp6 will be allocated for this netif if not set via dhcp6_set_struct before.

## ◆ dhcp6_set_struct()

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