The latest development version of this page may be more current than this released 3.7.0 version.

DHCPv6

Overview

The Dynamic Host Configuration Protocol (DHCP) for IPv6 is a network management protocol used on IPv6 based networks. A DHCPv6 server dynamically assigns an IPv6 address and other network configuration parameters to each device on a network so they can communicate with other IP networks. See this DHCPv6 Wikipedia article for a detailed overview of how DHCPv6 works.

Note that Zephyr only supports DHCPv6 client functionality.

API Reference

group dhcpv6

DHCPv6.

Functions

void net_dhcpv6_start(struct net_if *iface, struct net_dhcpv6_params *params)

Start DHCPv6 client on an iface.

Start DHCPv6 client on a given interface. DHCPv6 client will start negotiation for IPv6 address and/or prefix, depending on the configuration. Once the negotiation is complete, IPv6 address/prefix details will be added to the interface.

Parameters:
  • iface – A valid pointer to a network interface

  • params – DHCPv6 client configuration parameters.

void net_dhcpv6_stop(struct net_if *iface)

Stop DHCPv6 client on an iface.

Stop DHCPv6 client on a given interface. DHCPv6 client will remove all configuration obtained from a DHCP server from the interface and stop any further negotiation with the server.

Parameters:
  • iface – A valid pointer to a network interface

void net_dhcpv6_restart(struct net_if *iface)

Restart DHCPv6 client on an iface.

Restart DHCPv6 client on a given interface. DHCPv6 client will restart the state machine without any of the initial delays.

Parameters:
  • iface – A valid pointer to a network interface

struct net_dhcpv6_params
#include <dhcpv6.h>

DHCPv6 client configuration parameters.

Public Members

bool request_addr

Request IPv6 address.

bool request_prefix

Request IPv6 prefix.