All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

DHCPv6 client implementation More...

Detailed Description

DHCPv6 client implementation

Topics

 DHCPv6 compile configurations
 
 
 gnrc_dhcpv6_client: Basic DHCPv6 client implementation in GNRC
 
 
 gnrc_dhcpv6_client_6lbr: Basic client for GNRC 6LoWPAN BRs
 
 
 gnrc_dhcpv6_client_simple_pd: DHCPv6 client for
 simple prefix delegation
 

Files

file  client.h
 DHCPv6 client definitions.
 

Data Structures

struct  dhcpv6_duid_l2_t
 DUID based on link-layer address plus time. More...
 

Macros

#define DHCPV6_CLIENT_DUID_LEN   (sizeof(dhcpv6_duid_l2_t) + 8U)
 Static length of the DUID.
 
#define DHCPV6_CLIENT_BUFLEN   (256)
 default length for send and receive buffer
 

Functions

int dhcpv6_client_req_ia_na (unsigned netif)
 Configures the client to request non-temporary addresses for a network interface from a server.
 

DHCPv6 unique identifier (DUID) definitions

See also
RFC 8415, section 11
void dhcpv6_client_auto_init (void)
 Auto-initializes the client in its own thread.
 
void dhcpv6_client_init (event_queue_t *event_queue, uint16_t netif)
 Initializes the client.
 
void dhcpv6_client_start (void)
 Let the server start listening.
 

Configuration functions

int dhcpv6_client_req_ia_pd (unsigned netif, unsigned pfx_len)
 Configures the client to request prefix delegation for a network interface from a server.
 

Auto-initialization parameters

#define DHCPV6_CLIENT_STACK_SIZE   (THREAD_STACKSIZE_DEFAULT)
 stack size
 
#define DHCPV6_CLIENT_PRIORITY   (THREAD_PRIORITY_MAIN - 2)
 priority
 

Macro Definition Documentation

◆ DHCPV6_CLIENT_BUFLEN

#define DHCPV6_CLIENT_BUFLEN   (256)

default length for send and receive buffer

Definition at line 49 of file client.h.

◆ DHCPV6_CLIENT_DUID_LEN

#define DHCPV6_CLIENT_DUID_LEN   (sizeof(dhcpv6_duid_l2_t) + 8U)

Static length of the DUID.

Definition at line 48 of file client.h.

◆ DHCPV6_CLIENT_PRIORITY

#define DHCPV6_CLIENT_PRIORITY   (THREAD_PRIORITY_MAIN - 2)

priority

Definition at line 41 of file client.h.

◆ DHCPV6_CLIENT_STACK_SIZE

#define DHCPV6_CLIENT_STACK_SIZE   (THREAD_STACKSIZE_DEFAULT)

stack size

Definition at line 37 of file client.h.

Function Documentation

◆ dhcpv6_client_auto_init()

void dhcpv6_client_auto_init ( void )

Auto-initializes the client in its own thread.

Note
Only available with (and called by) the dhcpv6_client_auto_init module.

◆ dhcpv6_client_init()

void dhcpv6_client_init ( event_queue_t * event_queue,
uint16_t netif )

Initializes the client.

Precondition
event_queue->waiter != NULL
Parameters
[in]event_queueEvent queue to use with the client. Needs to be initialized in the handler thread.
[in]netifThe network interface the client should listen on. SOCK_ADDR_ANY_NETIF for any interface

◆ dhcpv6_client_req_ia_na()

int dhcpv6_client_req_ia_na ( unsigned netif)

Configures the client to request non-temporary addresses for a network interface from a server.

Note
For multi-hop WPAN meshes a DHCPv6 relay (which is not implemented in RIOT yet) is required, as DHCPv6 only acts in link scope.
Parameters
[in]netifThe interface to request non-temporaty addresses for.
Return values
0on success
-ENOMEMwhen there is no lease entry available anymore
-ENOTSUPwhen module dhcpv6_client_ia_na is not being used

◆ dhcpv6_client_req_ia_pd()

int dhcpv6_client_req_ia_pd ( unsigned netif,
unsigned pfx_len )

Configures the client to request prefix delegation for a network interface from a server.

Precondition
Module dhcpv6_client_ia_pd is compiled in.
pfx_len <= 128

Without module dhcpv6_client_ia_pd and NDEBUG set this function is a NOP. Without module dhcpv6_client_ia_pd and NDEBUG unset this function will abort the running code on a failed assertion.

Parameters
[in]netifThe interface to request the prefix delegation for.
[in]pfx_lenThe desired length of the prefix (note that the server might not consider this request). Must be <= 128
Return values
0on success
-ENOMEMwhen there is no lease entry available anymore
-ENOTSUPwhen module dhcpv6_client_ia_pd is not being used

◆ dhcpv6_client_start()

void dhcpv6_client_start ( void )

Let the server start listening.

Precondition
dhcpv6_client_init() was called (i.e. the internal event queue of he client was set).

This needs to be called after all desired [configuration functions] (net_dhcpv6_client_conf) and dhcpv6_client_init() were called.