dhcpv6_client.h
Go to the documentation of this file.
1 /**
2  * @file dhcpv6_client.h
3  * @brief DHCPv6 client (Dynamic Host Configuration Protocol for IPv6)
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 1.9.6
29  **/
30 
31 #ifndef _DHCPV6_CLIENT_H
32 #define _DHCPV6_CLIENT_H
33 
34 //Dependencies
35 #include "dhcpv6/dhcpv6_common.h"
36 #include "core/socket.h"
37 
38 //DHCPv6 client support
39 #ifndef DHCPV6_CLIENT_SUPPORT
40  #define DHCPV6_CLIENT_SUPPORT DISABLED
41 #elif (DHCPV6_CLIENT_SUPPORT != ENABLED && DHCPV6_CLIENT_SUPPORT != DISABLED)
42  #error DHCPV6_CLIENT_SUPPORT parameter is not valid
43 #endif
44 
45 //DHCPv6 client tick interval
46 #ifndef DHCPV6_CLIENT_TICK_INTERVAL
47  #define DHCPV6_CLIENT_TICK_INTERVAL 200
48 #elif (DHCPV6_CLIENT_TICK_INTERVAL < 10)
49  #error DHCPV6_CLIENT_TICK_INTERVAL parameter is not valid
50 #endif
51 
52 //Maximum number of IPv6 addresses in the client's IA
53 #ifndef DHCPV6_CLIENT_ADDR_LIST_SIZE
54  #define DHCPV6_CLIENT_ADDR_LIST_SIZE 2
55 #elif (DHCPV6_CLIENT_ADDR_LIST_SIZE < 1)
56  #error DHCPV6_CLIENT_ADDR_LIST_SIZE parameter is not valid
57 #endif
58 
59 //Maximum size of the client's FQDN
60 #ifndef DHCPV6_CLIENT_MAX_FQDN_SIZE
61  #define DHCPV6_CLIENT_MAX_FQDN_SIZE 16
62 #elif (DHCPV6_CLIENT_MAX_FQDN_SIZE < 1)
63  #error DHCPV6_CLIENT_MAX_FQDN_SIZE parameter is not valid
64 #endif
65 
66 //Max delay of first Solicit
67 #ifndef DHCPV6_CLIENT_SOL_MAX_DELAY
68  #define DHCPV6_CLIENT_SOL_MAX_DELAY 1000
69 #elif (DHCPV6_CLIENT_SOL_MAX_DELAY < 100)
70  #error DHCPV6_CLIENT_SOL_MAX_DELAY parameter is not valid
71 #endif
72 
73 //Initial Solicit timeout
74 #ifndef DHCPV6_CLIENT_SOL_TIMEOUT
75  #define DHCPV6_CLIENT_SOL_TIMEOUT 1000
76 #elif (DHCPV6_CLIENT_SOL_TIMEOUT < 100)
77  #error DHCPV6_CLIENT_SOL_TIMEOUT parameter is not valid
78 #endif
79 
80 //Max Solicit timeout value
81 #ifndef DHCPV6_CLIENT_SOL_MAX_RT
82  #define DHCPV6_CLIENT_SOL_MAX_RT 120000
83 #elif (DHCPV6_CLIENT_SOL_MAX_RT < 100)
84  #error DHCPV6_CLIENT_SOL_MAX_RT parameter is not valid
85 #endif
86 
87 //Initial Request timeout
88 #ifndef DHCPV6_CLIENT_REQ_TIMEOUT
89  #define DHCPV6_CLIENT_REQ_TIMEOUT 1000
90 #elif (DHCPV6_CLIENT_REQ_TIMEOUT < 100)
91  #error DHCPV6_CLIENT_REQ_TIMEOUT parameter is not valid
92 #endif
93 
94 //Max Request timeout value
95 #ifndef DHCPV6_CLIENT_REQ_MAX_RT
96  #define DHCPV6_CLIENT_REQ_MAX_RT 30000
97 #elif (DHCPV6_CLIENT_REQ_MAX_RT < 100)
98  #error DHCPV6_CLIENT_REQ_MAX_RT parameter is not valid
99 #endif
100 
101 //Max Request retry attempts
102 #ifndef DHCPV6_CLIENT_REQ_MAX_RC
103  #define DHCPV6_CLIENT_REQ_MAX_RC 10
104 #elif (DHCPV6_CLIENT_REQ_MAX_RC < 1)
105  #error DHCPV6_CLIENT_REQ_MAX_RC parameter is not valid
106 #endif
107 
108 //Max delay of first Confirm
109 #ifndef DHCPV6_CLIENT_CNF_MAX_DELAY
110  #define DHCPV6_CLIENT_CNF_MAX_DELAY 1000
111 #elif (DHCPV6_CLIENT_CNF_MAX_DELAY < 100)
112  #error DHCPV6_CLIENT_CNF_MAX_DELAY parameter is not valid
113 #endif
114 
115 //Initial Confirm timeout
116 #ifndef DHCPV6_CLIENT_CNF_TIMEOUT
117  #define DHCPV6_CLIENT_CNF_TIMEOUT 1000
118 #elif (DHCPV6_CLIENT_CNF_TIMEOUT < 100)
119  #error DHCPV6_CLIENT_CNF_TIMEOUT parameter is not valid
120 #endif
121 
122 //Max Confirm timeout
123 #ifndef DHCPV6_CLIENT_CNF_MAX_RT
124  #define DHCPV6_CLIENT_CNF_MAX_RT 4000
125 #elif (DHCPV6_CLIENT_CNF_MAX_RT < 100)
126  #error DHCPV6_CLIENT_CNF_MAX_RT parameter is not valid
127 #endif
128 
129 //Max Confirm duration
130 #ifndef DHCPV6_CLIENT_CNF_MAX_RD
131  #define DHCPV6_CLIENT_CNF_MAX_RD 10000
132 #elif (DHCPV6_CLIENT_CNF_MAX_RD < 100)
133  #error DHCPV6_CLIENT_CNF_MAX_RD parameter is not valid
134 #endif
135 
136 //Initial Renew timeout
137 #ifndef DHCPV6_CLIENT_REN_TIMEOUT
138  #define DHCPV6_CLIENT_REN_TIMEOUT 10000
139 #elif (DHCPV6_CLIENT_REN_TIMEOUT < 100)
140  #error DHCPV6_CLIENT_REN_TIMEOUT parameter is not valid
141 #endif
142 
143 //Max Renew timeout value
144 #ifndef DHCPV6_CLIENT_REN_MAX_RT
145  #define DHCPV6_CLIENT_REN_MAX_RT 600000
146 #elif (DHCPV6_CLIENT_REN_MAX_RT < 100)
147  #error DHCPV6_CLIENT_REN_MAX_RT parameter is not valid
148 #endif
149 
150 //Initial Rebind timeout
151 #ifndef DHCPV6_CLIENT_REB_TIMEOUT
152  #define DHCPV6_CLIENT_REB_TIMEOUT 10000
153 #elif (DHCPV6_CLIENT_REB_TIMEOUT < 100)
154  #error DHCPV6_CLIENT_REB_TIMEOUT parameter is not valid
155 #endif
156 
157 //Max Rebind timeout value
158 #ifndef DHCPV6_CLIENT_REB_MAX_RT
159  #define DHCPV6_CLIENT_REB_MAX_RT 600000
160 #elif (DHCPV6_CLIENT_REB_MAX_RT < 100)
161  #error DHCPV6_CLIENT_REB_MAX_RT parameter is not valid
162 #endif
163 
164 //Max delay of first Information-request
165 #ifndef DHCPV6_CLIENT_INF_MAX_DELAY
166  #define DHCPV6_CLIENT_INF_MAX_DELAY 1000
167 #elif (DHCPV6_CLIENT_INF_MAX_DELAY < 100)
168  #error DHCPV6_CLIENT_INF_MAX_DELAY parameter is not valid
169 #endif
170 
171 //Initial Information-request timeout
172 #ifndef DHCPV6_CLIENT_INF_TIMEOUT
173  #define DHCPV6_CLIENT_INF_TIMEOUT 1000
174 #elif (DHCPV6_CLIENT_INF_TIMEOUT < 100)
175  #error DHCPV6_CLIENT_INF_TIMEOUT parameter is not valid
176 #endif
177 
178 //Max Information-request timeout value
179 #ifndef DHCPV6_CLIENT_INF_MAX_RT
180  #define DHCPV6_CLIENT_INF_MAX_RT 120000
181 #elif (DHCPV6_CLIENT_INF_MAX_RT < 1000)
182  #error DHCPV6_CLIENT_INF_MAX_RT parameter is not valid
183 #endif
184 
185 //Initial Release timeout
186 #ifndef DHCPV6_CLIENT_REL_TIMEOUT
187  #define DHCPV6_CLIENT_REL_TIMEOUT 1000
188 #elif (DHCPV6_CLIENT_REL_TIMEOUT < 100)
189  #error DHCPV6_CLIENT_REL_TIMEOUT parameter is not valid
190 #endif
191 
192 //Max Release attempts
193 #ifndef DHCPV6_CLIENT_REL_MAX_RC
194  #define DHCPV6_CLIENT_REL_MAX_RC 5
195 #elif (DHCPV6_CLIENT_REL_MAX_RC < 1)
196  #error DHCPV6_CLIENT_REL_MAX_RC parameter is not valid
197 #endif
198 
199 //Initial Decline timeout
200 #ifndef DHCPV6_CLIENT_DEC_TIMEOUT
201  #define DHCPV6_CLIENT_DEC_TIMEOUT 1000
202 #elif (DHCPV6_CLIENT_DEC_TIMEOUT < 100)
203  #error DHCPV6_CLIENT_DEC_TIMEOUT parameter is not valid
204 #endif
205 
206 //Max Decline attempts
207 #ifndef DHCPV6_CLIENT_DEC_MAX_RC
208  #define DHCPV6_CLIENT_DEC_MAX_RC 5
209 #elif (DHCPV6_CLIENT_DEC_MAX_RC < 1)
210  #error DHCPV6_CLIENT_DEC_MAX_RC parameter is not valid
211 #endif
212 
213 //Initial Reconfigure timeout
214 #ifndef DHCPV6_CLIENT_REC_TIMEOUT
215  #define DHCPV6_CLIENT_REC_TIMEOUT 2000
216 #elif (DHCPV6_CLIENT_REC_TIMEOUT < 100)
217  #error DHCPV6_CLIENT_REC_TIMEOUT parameter is not valid
218 #endif
219 
220 //Max Reconfigure attempts
221 #ifndef DHCPV6_CLIENT_REC_MAX_RC
222  #define DHCPV6_CLIENT_REC_MAX_RC 8
223 #elif (DHCPV6_CLIENT_REC_MAX_RC < 1)
224  #error DHCPV6_CLIENT_REC_MAX_RC parameter is not valid
225 #endif
226 
227 //Forward declaration of Dhcpv6ClientContext structure
228 struct _Dhcpv6ClientContext;
229 #define Dhcpv6ClientContext struct _Dhcpv6ClientContext
230 
231 //C++ guard
232 #ifdef __cplusplus
233 extern "C" {
234 #endif
235 
236 
237 /**
238  * @brief DHCPv6 client FSM states
239  **/
240 
241 typedef enum
242 {
254 } Dhcpv6State;
255 
256 
257 /**
258  * @brief DHCPv6 configuration timeout callback
259  **/
260 
262  NetInterface *interface);
263 
264 
265 /**
266  * @brief Link state change callback
267  **/
268 
270  NetInterface *interface, bool_t linkState);
271 
272 
273 /**
274  * @brief FSM state change callback
275  **/
276 
278  NetInterface *interface, Dhcpv6State state);
279 
280 
281 /**
282  * @brief DHCPv6 client settings
283  **/
284 
285 typedef struct
286 {
287  NetInterface *interface; ///<Network interface to configure
288  bool_t rapidCommit; ///<Quick configuration using rapid commit
289  bool_t manualDnsConfig; ///<Force manual DNS configuration
290  systime_t timeout; ///<DHCPv6 configuration timeout
291  Dhcpv6TimeoutCallback timeoutEvent; ///<DHCPv6 configuration timeout event
292  Dhcpv6LinkChangeCallback linkChangeEvent; ///<Link state change event
293  Dhcpv6StateChangeCallback stateChangeEvent; ///<FSM state change event
295 
296 
297 /**
298  * @brief IA address entry
299  **/
300 
301 typedef struct
302 {
303  Ipv6Addr addr; ///<IPv6 address
304  uint32_t validLifetime; ///<Valid lifetime
305  uint32_t preferredLifetime; ///<Preferred lifetime
307 
308 
309 /**
310  * @brief Client's IA (Identity Association)
311  **/
312 
313 typedef struct
314 {
315  uint32_t t1; ///<T1 parameter
316  uint32_t t2; ///<T2 parameter
317  Dhcpv6ClientAddrEntry addrList[DHCPV6_CLIENT_ADDR_LIST_SIZE]; ///<Set of IPv6 addresses
319 
320 
321 /**
322  * @brief DHCPv6 client context
323  **/
324 
326 {
327  Dhcpv6ClientSettings settings; ///<DHCPv6 client settings
328  bool_t running; ///<This flag tells whether the DHCP client is running or not
329  Dhcpv6State state; ///<Current state of the FSM
330  bool_t timeoutEventDone; ///<Timeout callback function has been called
331  systime_t timestamp; ///<Timestamp to manage retransmissions
332  systime_t timeout; ///<Timeout value
333  uint_t retransmitCount; ///<Retransmission counter
334  uint8_t clientId[DHCPV6_MAX_DUID_SIZE]; ///<Client DUID
335  size_t clientIdLength; ///<Length of the client DUID
336  uint8_t clientFqdn[DHCPV6_CLIENT_MAX_FQDN_SIZE]; ///<Client's fully qualified domain name
337  size_t clientFqdnLength; ///<Length of the client's FQDN
338  uint8_t serverId[DHCPV6_MAX_DUID_SIZE]; ///<Server DUID
339  size_t serverIdLength; ///<Length of the server DUID
340  int_t serverPreference; ///<Preference value for the server
341  uint32_t transactionId; ///<Value to match requests with replies
342  systime_t configStartTime; ///<Address acquisition or renewal process start time
343  systime_t exchangeStartTime; ///<Time at which the client sent the first message
344  systime_t leaseStartTime; ///<Lease start time
345  Dhcpv6ClientIa ia; ///<Identity association
346 };
347 
348 
349 //Tick counter to handle periodic operations
351 
352 //DHCPv6 client related functions
359 
362 
374 
377 
379  const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader,
380  const NetBuffer *buffer, size_t offset, void *param);
381 
383  const Dhcpv6Message *message, size_t length);
384 
386  const Dhcpv6Message *message, size_t length);
387 
389  const Dhcpv6Option *option);
390 
392  const Dhcpv6Option *option);
393 
395  uint32_t validLifetime, uint32_t preferredLifetime);
396 
398 
400 
404 
406  Dhcpv6Option *serverIdOption);
407 
409 
411 
413  Dhcpv6State newState, systime_t delay);
414 
416 
417 //C++ guard
418 #ifdef __cplusplus
419 }
420 #endif
421 
422 #endif
uint32_t t1
T1 parameter.
systime_t configStartTime
Address acquisition or renewal process start time.
void dhcpv6ClientTick(Dhcpv6ClientContext *context)
DHCPv6 client timer handler.
void dhcpv6ClientStateRelease(Dhcpv6ClientContext *context)
RELEASE state.
uint8_t length
Definition: dtls_misc.h:149
__start_packed struct @130 Dhcpv6Option
DHCPv6 option.
uint32_t t2
T2 parameter.
bool_t rapidCommit
Quick configuration using rapid commit.
size_t serverIdLength
Length of the server DUID.
int bool_t
Definition: compiler_port.h:49
void dhcpv6ClientFlushAddrList(Dhcpv6ClientContext *context)
Flush the list of IPv6 addresses from the IA.
signed int int_t
Definition: compiler_port.h:44
Dhcpv6State dhcpv6ClientGetState(Dhcpv6ClientContext *context)
Retrieve current state.
Dhcpv6StateChangeCallback stateChangeEvent
FSM state change event.
systime_t timeout
Timeout value.
size_t clientIdLength
Length of the client DUID.
Dhcpv6ClientSettings settings
DHCPv6 client settings.
uint32_t transactionId
Value to match requests with replies.
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:88
systime_t exchangeStartTime
Time at which the client sent the first message.
@ DHCPV6_STATE_REQUEST
uint32_t preferredLifetime
Definitions common to DHCPv6 client, server and relay agent.
void dhcpv6ClientStateInit(Dhcpv6ClientContext *context)
INIT state.
@ DHCPV6_STATE_REBIND
void dhcpv6ClientStateConfirm(Dhcpv6ClientContext *context)
CONFIRM state.
@ DHCPV6_STATE_INIT
void dhcpv6ClientStateBound(Dhcpv6ClientContext *context)
BOUND state.
bool_t timeoutEventDone
Timeout callback function has been called.
#define DHCPV6_CLIENT_ADDR_LIST_SIZE
Definition: dhcpv6_client.h:54
systime_t leaseStartTime
Lease start time.
void dhcpv6ClientParseAdvertise(Dhcpv6ClientContext *context, const Dhcpv6Message *message, size_t length)
Parse Advertise message.
bool_t dhcpv6ClientCheckServerId(Dhcpv6ClientContext *context, Dhcpv6Option *serverIdOption)
Check the Server Identifier option.
uint16_t dhcpv6ClientComputeElapsedTime(Dhcpv6ClientContext *context)
Compute the time elapsed since the client sent the first message.
Ipv6Addr addr
IPv6 address.
void dhcpv6ClientStateRenew(Dhcpv6ClientContext *context)
RENEW state.
#define DHCPV6_CLIENT_MAX_FQDN_SIZE
Definition: dhcpv6_client.h:61
IP pseudo header.
Definition: ip.h:90
void(* Dhcpv6TimeoutCallback)(Dhcpv6ClientContext *context, NetInterface *interface)
DHCPv6 configuration timeout callback.
void dhcpv6ClientRemoveAddr(Dhcpv6ClientContext *context, const Ipv6Addr *addr)
Remove an IPv6 address from the IA.
systime_t dhcpv6ClientTickCounter
Definition: dhcpv6_client.c:59
bool_t manualDnsConfig
Force manual DNS configuration.
void dhcpv6ClientLinkChangeEvent(Dhcpv6ClientContext *context)
Callback function for link change event.
void(* Dhcpv6StateChangeCallback)(Dhcpv6ClientContext *context, NetInterface *interface, Dhcpv6State state)
FSM state change callback.
NetInterface * interface
Network interface to configure.
#define DHCPV6_MAX_DUID_SIZE
Definition: dhcpv6_common.h:46
uint8_t clientFqdn[DHCPV6_CLIENT_MAX_FQDN_SIZE]
Client's fully qualified domain name.
void dhcpv6ClientProcessMessage(NetInterface *interface, const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NetBuffer *buffer, size_t offset, void *param)
Process incoming DHCPv6 message.
systime_t timestamp
Timestamp to manage retransmissions.
char_t type
void dhcpv6ClientStateInitConfirm(Dhcpv6ClientContext *context)
INIT-CONFIRM state.
error_t
Error codes.
Definition: error.h:42
void dhcpv6ClientGetDefaultSettings(Dhcpv6ClientSettings *settings)
Initialize settings with default values.
Definition: dhcpv6_client.c:75
@ DHCPV6_STATE_SOLICIT
uint32_t validLifetime
Valid lifetime.
size_t clientFqdnLength
Length of the client's FQDN.
Client's IA (Identity Association)
void dhcpv6ClientStateDecline(Dhcpv6ClientContext *context)
DECLINE state.
error_t dhcpv6ClientParseIaNaOption(Dhcpv6ClientContext *context, const Dhcpv6Option *option)
Parse IA_NA option.
error_t dhcpv6ClientSendMessage(Dhcpv6ClientContext *context, Dhcpv6MessageType type)
Send Solicit message.
IA address entry.
#define NetInterface
Definition: net.h:36
Dhcpv6TimeoutCallback timeoutEvent
DHCPv6 configuration timeout event.
#define Dhcpv6ClientContext
__start_packed struct @128 Dhcpv6Message
DHCPv6 message.
DHCPv6 client settings.
uint_t retransmitCount
Retransmission counter.
__start_packed struct @179 Ipv6Addr
IPv6 network address.
__start_packed struct @122 UdpHeader
UDP header.
systime_t timeout
DHCPv6 configuration timeout.
void dhcpv6ClientStateDad(Dhcpv6ClientContext *context)
DAD state.
Dhcpv6ClientIa ia
Identity association.
Dhcpv6State
DHCPv6 client FSM states.
error_t dhcpv6ClientStop(Dhcpv6ClientContext *context)
Stop DHCPv6 client.
@ DHCPV6_STATE_BOUND
int_t serverPreference
Preference value for the server.
void dhcpv6ClientDumpConfig(Dhcpv6ClientContext *context)
Dump DHCPv6 configuration for debugging purpose.
error_t dhcpv6ClientStart(Dhcpv6ClientContext *context)
Start DHCPv6 client.
@ DHCPV6_STATE_RENEW
uint8_t serverId[DHCPV6_MAX_DUID_SIZE]
Server DUID.
void(* Dhcpv6LinkChangeCallback)(Dhcpv6ClientContext *context, NetInterface *interface, bool_t linkState)
Link state change callback.
void dhcpv6ClientParseReply(Dhcpv6ClientContext *context, const Dhcpv6Message *message, size_t length)
Parse Reply message.
Dhcpv6MessageType
DHCPv6 message types.
Definition: dhcpv6_common.h:88
@ DHCPV6_STATE_RELEASE
void dhcpv6ClientStateRequest(Dhcpv6ClientContext *context)
REQUEST state.
void dhcpv6ClientCheckTimeout(Dhcpv6ClientContext *context)
Manage DHCPv6 configuration timeout.
@ DHCPV6_STATE_DECLINE
void dhcpv6ClientAddAddr(Dhcpv6ClientContext *context, const Ipv6Addr *addr, uint32_t validLifetime, uint32_t preferredLifetime)
Add an IPv6 address to the IA.
error_t dhcpv6ClientParseIaAddrOption(Dhcpv6ClientContext *context, const Dhcpv6Option *option)
Parse IA Address option.
Dhcpv6LinkChangeCallback linkChangeEvent
Link state change event.
uint8_t message[]
Definition: chap.h:152
@ DHCPV6_STATE_CONFIRM
bool_t running
This flag tells whether the DHCP client is running or not.
Socket API.
@ DHCPV6_STATE_DAD
Dhcpv6State state
Current state of the FSM.
uint32_t preferredLifetime
Preferred lifetime.
void dhcpv6ClientStateSolicit(Dhcpv6ClientContext *context)
SOLICIT state.
uint32_t validLifetime
Ipv4Addr addr
Definition: nbns_common.h:121
void dhcpv6ClientStateRebind(Dhcpv6ClientContext *context)
REBIND state.
error_t dhcpv6ClientRelease(Dhcpv6ClientContext *context)
Release DHCPv6 lease.
error_t dhcpv6ClientInit(Dhcpv6ClientContext *context, const Dhcpv6ClientSettings *settings)
DHCPv6 client initialization.
unsigned int uint_t
Definition: compiler_port.h:45
@ DHCPV6_STATE_INIT_CONFIRM
error_t dhcpv6ClientGenerateFqdn(Dhcpv6ClientContext *context)
Generate client's fully qualified domain name.
uint32_t systime_t
Definition: compiler_port.h:46
error_t dhcpv6ClientGenerateDuid(Dhcpv6ClientContext *context)
Generate client's DUID.
uint8_t clientId[DHCPV6_MAX_DUID_SIZE]
Client DUID.
void dhcpv6ClientChangeState(Dhcpv6ClientContext *context, Dhcpv6State newState, systime_t delay)
Update DHCPv6 FSM state.
error_t dhcpv6ClientGenerateLinkLocalAddr(Dhcpv6ClientContext *context)
Generate a link-local address.
DHCPv6 client context.