dhcpv6_client.h File Reference

DHCPv6 client (Dynamic Host Configuration Protocol for IPv6) More...

#include "dhcpv6/dhcpv6_common.h"
#include "core/socket.h"

Go to the source code of this file.

Data Structures

struct  Dhcpv6ClientSettings
 DHCPv6 client settings. More...
 
struct  Dhcpv6ClientAddrEntry
 IA address entry. More...
 
struct  Dhcpv6ClientIa
 Client's IA (Identity Association) More...
 
struct  _Dhcpv6ClientContext
 DHCPv6 client context. More...
 

Macros

#define DHCPV6_CLIENT_SUPPORT   DISABLED
 
#define DHCPV6_CLIENT_TICK_INTERVAL   200
 
#define DHCPV6_CLIENT_ADDR_LIST_SIZE   2
 
#define DHCPV6_CLIENT_MAX_FQDN_SIZE   16
 
#define DHCPV6_CLIENT_SOL_MAX_DELAY   1000
 
#define DHCPV6_CLIENT_SOL_TIMEOUT   1000
 
#define DHCPV6_CLIENT_SOL_MAX_RT   120000
 
#define DHCPV6_CLIENT_REQ_TIMEOUT   1000
 
#define DHCPV6_CLIENT_REQ_MAX_RT   30000
 
#define DHCPV6_CLIENT_REQ_MAX_RC   10
 
#define DHCPV6_CLIENT_CNF_MAX_DELAY   1000
 
#define DHCPV6_CLIENT_CNF_TIMEOUT   1000
 
#define DHCPV6_CLIENT_CNF_MAX_RT   4000
 
#define DHCPV6_CLIENT_CNF_MAX_RD   10000
 
#define DHCPV6_CLIENT_REN_TIMEOUT   10000
 
#define DHCPV6_CLIENT_REN_MAX_RT   600000
 
#define DHCPV6_CLIENT_REB_TIMEOUT   10000
 
#define DHCPV6_CLIENT_REB_MAX_RT   600000
 
#define DHCPV6_CLIENT_INF_MAX_DELAY   1000
 
#define DHCPV6_CLIENT_INF_TIMEOUT   1000
 
#define DHCPV6_CLIENT_INF_MAX_RT   120000
 
#define DHCPV6_CLIENT_REL_TIMEOUT   1000
 
#define DHCPV6_CLIENT_REL_MAX_RC   5
 
#define DHCPV6_CLIENT_DEC_TIMEOUT   1000
 
#define DHCPV6_CLIENT_DEC_MAX_RC   5
 
#define DHCPV6_CLIENT_REC_TIMEOUT   2000
 
#define DHCPV6_CLIENT_REC_MAX_RC   8
 
#define Dhcpv6ClientContext   struct _Dhcpv6ClientContext
 

Typedefs

typedef void(* Dhcpv6TimeoutCallback) (Dhcpv6ClientContext *context, NetInterface *interface)
 DHCPv6 configuration timeout callback. More...
 
typedef void(* Dhcpv6LinkChangeCallback) (Dhcpv6ClientContext *context, NetInterface *interface, bool_t linkState)
 Link state change callback. More...
 
typedef void(* Dhcpv6StateChangeCallback) (Dhcpv6ClientContext *context, NetInterface *interface, Dhcpv6State state)
 FSM state change callback. More...
 

Enumerations

enum  Dhcpv6State {
  DHCPV6_STATE_INIT = 0, DHCPV6_STATE_SOLICIT = 1, DHCPV6_STATE_REQUEST = 2, DHCPV6_STATE_INIT_CONFIRM = 3,
  DHCPV6_STATE_CONFIRM = 4, DHCPV6_STATE_DAD = 5, DHCPV6_STATE_BOUND = 6, DHCPV6_STATE_RENEW = 7,
  DHCPV6_STATE_REBIND = 8, DHCPV6_STATE_RELEASE = 9, DHCPV6_STATE_DECLINE = 10
}
 DHCPv6 client FSM states. More...
 

Functions

void dhcpv6ClientGetDefaultSettings (Dhcpv6ClientSettings *settings)
 Initialize settings with default values. More...
 
error_t dhcpv6ClientInit (Dhcpv6ClientContext *context, const Dhcpv6ClientSettings *settings)
 DHCPv6 client initialization. More...
 
error_t dhcpv6ClientStart (Dhcpv6ClientContext *context)
 Start DHCPv6 client. More...
 
error_t dhcpv6ClientStop (Dhcpv6ClientContext *context)
 Stop DHCPv6 client. More...
 
error_t dhcpv6ClientRelease (Dhcpv6ClientContext *context)
 Release DHCPv6 lease. More...
 
Dhcpv6State dhcpv6ClientGetState (Dhcpv6ClientContext *context)
 Retrieve current state. More...
 
void dhcpv6ClientTick (Dhcpv6ClientContext *context)
 DHCPv6 client timer handler. More...
 
void dhcpv6ClientLinkChangeEvent (Dhcpv6ClientContext *context)
 Callback function for link change event. More...
 
void dhcpv6ClientStateInit (Dhcpv6ClientContext *context)
 INIT state. More...
 
void dhcpv6ClientStateSolicit (Dhcpv6ClientContext *context)
 SOLICIT state. More...
 
void dhcpv6ClientStateRequest (Dhcpv6ClientContext *context)
 REQUEST state. More...
 
void dhcpv6ClientStateInitConfirm (Dhcpv6ClientContext *context)
 INIT-CONFIRM state. More...
 
void dhcpv6ClientStateConfirm (Dhcpv6ClientContext *context)
 CONFIRM state. More...
 
void dhcpv6ClientStateDad (Dhcpv6ClientContext *context)
 DAD state. More...
 
void dhcpv6ClientStateBound (Dhcpv6ClientContext *context)
 BOUND state. More...
 
void dhcpv6ClientStateRenew (Dhcpv6ClientContext *context)
 RENEW state. More...
 
void dhcpv6ClientStateRebind (Dhcpv6ClientContext *context)
 REBIND state. More...
 
void dhcpv6ClientStateRelease (Dhcpv6ClientContext *context)
 RELEASE state. More...
 
void dhcpv6ClientStateDecline (Dhcpv6ClientContext *context)
 DECLINE state. More...
 
error_t dhcpv6ClientSendMessage (Dhcpv6ClientContext *context, Dhcpv6MessageType type)
 Send Solicit message. More...
 
void dhcpv6ClientProcessMessage (NetInterface *interface, const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NetBuffer *buffer, size_t offset, void *param)
 Process incoming DHCPv6 message. More...
 
void dhcpv6ClientParseAdvertise (Dhcpv6ClientContext *context, const Dhcpv6Message *message, size_t length)
 Parse Advertise message. More...
 
void dhcpv6ClientParseReply (Dhcpv6ClientContext *context, const Dhcpv6Message *message, size_t length)
 Parse Reply message. More...
 
error_t dhcpv6ClientParseIaNaOption (Dhcpv6ClientContext *context, const Dhcpv6Option *option)
 Parse IA_NA option. More...
 
error_t dhcpv6ClientParseIaAddrOption (Dhcpv6ClientContext *context, const Dhcpv6Option *option)
 Parse IA Address option. More...
 
void dhcpv6ClientAddAddr (Dhcpv6ClientContext *context, const Ipv6Addr *addr, uint32_t validLifetime, uint32_t preferredLifetime)
 Add an IPv6 address to the IA. More...
 
void dhcpv6ClientRemoveAddr (Dhcpv6ClientContext *context, const Ipv6Addr *addr)
 Remove an IPv6 address from the IA. More...
 
void dhcpv6ClientFlushAddrList (Dhcpv6ClientContext *context)
 Flush the list of IPv6 addresses from the IA. More...
 
error_t dhcpv6ClientGenerateDuid (Dhcpv6ClientContext *context)
 Generate client's DUID. More...
 
error_t dhcpv6ClientGenerateFqdn (Dhcpv6ClientContext *context)
 Generate client's fully qualified domain name. More...
 
error_t dhcpv6ClientGenerateLinkLocalAddr (Dhcpv6ClientContext *context)
 Generate a link-local address. More...
 
bool_t dhcpv6ClientCheckServerId (Dhcpv6ClientContext *context, Dhcpv6Option *serverIdOption)
 Check the Server Identifier option. More...
 
void dhcpv6ClientCheckTimeout (Dhcpv6ClientContext *context)
 Manage DHCPv6 configuration timeout. More...
 
uint16_t dhcpv6ClientComputeElapsedTime (Dhcpv6ClientContext *context)
 Compute the time elapsed since the client sent the first message. More...
 
void dhcpv6ClientChangeState (Dhcpv6ClientContext *context, Dhcpv6State newState, systime_t delay)
 Update DHCPv6 FSM state. More...
 
void dhcpv6ClientDumpConfig (Dhcpv6ClientContext *context)
 Dump DHCPv6 configuration for debugging purpose. More...
 

Variables

systime_t dhcpv6ClientTickCounter
 

Detailed Description

DHCPv6 client (Dynamic Host Configuration Protocol for IPv6)

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.6

Definition in file dhcpv6_client.h.

Macro Definition Documentation

◆ DHCPV6_CLIENT_ADDR_LIST_SIZE

#define DHCPV6_CLIENT_ADDR_LIST_SIZE   2

Definition at line 54 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_CNF_MAX_DELAY

#define DHCPV6_CLIENT_CNF_MAX_DELAY   1000

Definition at line 110 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_CNF_MAX_RD

#define DHCPV6_CLIENT_CNF_MAX_RD   10000

Definition at line 131 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_CNF_MAX_RT

#define DHCPV6_CLIENT_CNF_MAX_RT   4000

Definition at line 124 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_CNF_TIMEOUT

#define DHCPV6_CLIENT_CNF_TIMEOUT   1000

Definition at line 117 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_DEC_MAX_RC

#define DHCPV6_CLIENT_DEC_MAX_RC   5

Definition at line 208 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_DEC_TIMEOUT

#define DHCPV6_CLIENT_DEC_TIMEOUT   1000

Definition at line 201 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_INF_MAX_DELAY

#define DHCPV6_CLIENT_INF_MAX_DELAY   1000

Definition at line 166 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_INF_MAX_RT

#define DHCPV6_CLIENT_INF_MAX_RT   120000

Definition at line 180 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_INF_TIMEOUT

#define DHCPV6_CLIENT_INF_TIMEOUT   1000

Definition at line 173 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_MAX_FQDN_SIZE

#define DHCPV6_CLIENT_MAX_FQDN_SIZE   16

Definition at line 61 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REB_MAX_RT

#define DHCPV6_CLIENT_REB_MAX_RT   600000

Definition at line 159 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REB_TIMEOUT

#define DHCPV6_CLIENT_REB_TIMEOUT   10000

Definition at line 152 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REC_MAX_RC

#define DHCPV6_CLIENT_REC_MAX_RC   8

Definition at line 222 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REC_TIMEOUT

#define DHCPV6_CLIENT_REC_TIMEOUT   2000

Definition at line 215 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REL_MAX_RC

#define DHCPV6_CLIENT_REL_MAX_RC   5

Definition at line 194 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REL_TIMEOUT

#define DHCPV6_CLIENT_REL_TIMEOUT   1000

Definition at line 187 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REN_MAX_RT

#define DHCPV6_CLIENT_REN_MAX_RT   600000

Definition at line 145 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REN_TIMEOUT

#define DHCPV6_CLIENT_REN_TIMEOUT   10000

Definition at line 138 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REQ_MAX_RC

#define DHCPV6_CLIENT_REQ_MAX_RC   10

Definition at line 103 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REQ_MAX_RT

#define DHCPV6_CLIENT_REQ_MAX_RT   30000

Definition at line 96 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_REQ_TIMEOUT

#define DHCPV6_CLIENT_REQ_TIMEOUT   1000

Definition at line 89 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_SOL_MAX_DELAY

#define DHCPV6_CLIENT_SOL_MAX_DELAY   1000

Definition at line 68 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_SOL_MAX_RT

#define DHCPV6_CLIENT_SOL_MAX_RT   120000

Definition at line 82 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_SOL_TIMEOUT

#define DHCPV6_CLIENT_SOL_TIMEOUT   1000

Definition at line 75 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_SUPPORT

#define DHCPV6_CLIENT_SUPPORT   DISABLED

Definition at line 40 of file dhcpv6_client.h.

◆ DHCPV6_CLIENT_TICK_INTERVAL

#define DHCPV6_CLIENT_TICK_INTERVAL   200

Definition at line 47 of file dhcpv6_client.h.

◆ Dhcpv6ClientContext

#define Dhcpv6ClientContext   struct _Dhcpv6ClientContext

Definition at line 229 of file dhcpv6_client.h.

Typedef Documentation

◆ Dhcpv6LinkChangeCallback

typedef void(* Dhcpv6LinkChangeCallback) (Dhcpv6ClientContext *context, NetInterface *interface, bool_t linkState)

Link state change callback.

Definition at line 269 of file dhcpv6_client.h.

◆ Dhcpv6StateChangeCallback

typedef void(* Dhcpv6StateChangeCallback) (Dhcpv6ClientContext *context, NetInterface *interface, Dhcpv6State state)

FSM state change callback.

Definition at line 277 of file dhcpv6_client.h.

◆ Dhcpv6TimeoutCallback

typedef void(* Dhcpv6TimeoutCallback) (Dhcpv6ClientContext *context, NetInterface *interface)

DHCPv6 configuration timeout callback.

Definition at line 261 of file dhcpv6_client.h.

Enumeration Type Documentation

◆ Dhcpv6State

DHCPv6 client FSM states.

Enumerator
DHCPV6_STATE_INIT 
DHCPV6_STATE_SOLICIT 
DHCPV6_STATE_REQUEST 
DHCPV6_STATE_INIT_CONFIRM 
DHCPV6_STATE_CONFIRM 
DHCPV6_STATE_DAD 
DHCPV6_STATE_BOUND 
DHCPV6_STATE_RENEW 
DHCPV6_STATE_REBIND 
DHCPV6_STATE_RELEASE 
DHCPV6_STATE_DECLINE 

Definition at line 241 of file dhcpv6_client.h.

Function Documentation

◆ dhcpv6ClientAddAddr()

void dhcpv6ClientAddAddr ( Dhcpv6ClientContext context,
const Ipv6Addr addr,
uint32_t  validLifetime,
uint32_t  preferredLifetime 
)

Add an IPv6 address to the IA.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]addrIPv6 address to be added
[in]validLifetimeValid lifetime, in seconds
[in]preferredLifetimePreferred lifetime, in seconds

Definition at line 2156 of file dhcpv6_client.c.

◆ dhcpv6ClientChangeState()

void dhcpv6ClientChangeState ( Dhcpv6ClientContext context,
Dhcpv6State  newState,
systime_t  delay 
)

Update DHCPv6 FSM state.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]newStateNew DHCPv6 state to switch to
[in]delayInitial delay

Definition at line 2506 of file dhcpv6_client.c.

◆ dhcpv6ClientCheckServerId()

bool_t dhcpv6ClientCheckServerId ( Dhcpv6ClientContext context,
Dhcpv6Option serverIdOption 
)

Check the Server Identifier option.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]serverIdOptionPointer to the Server Identifier option
Returns
TRUE if the option matches the server’s DUID, else FALSE

Definition at line 2409 of file dhcpv6_client.c.

◆ dhcpv6ClientCheckTimeout()

void dhcpv6ClientCheckTimeout ( Dhcpv6ClientContext context)

Manage DHCPv6 configuration timeout.

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 2432 of file dhcpv6_client.c.

◆ dhcpv6ClientComputeElapsedTime()

uint16_t dhcpv6ClientComputeElapsedTime ( Dhcpv6ClientContext context)

Compute the time elapsed since the client sent the first message.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
The elapsed time expressed in hundredths of a second

Definition at line 2473 of file dhcpv6_client.c.

◆ dhcpv6ClientDumpConfig()

void dhcpv6ClientDumpConfig ( Dhcpv6ClientContext context)

Dump DHCPv6 configuration for debugging purpose.

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 2572 of file dhcpv6_client.c.

◆ dhcpv6ClientFlushAddrList()

void dhcpv6ClientFlushAddrList ( Dhcpv6ClientContext context)

Flush the list of IPv6 addresses from the IA.

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 2248 of file dhcpv6_client.c.

◆ dhcpv6ClientGenerateDuid()

error_t dhcpv6ClientGenerateDuid ( Dhcpv6ClientContext context)

Generate client's DUID.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Error code

Definition at line 2283 of file dhcpv6_client.c.

◆ dhcpv6ClientGenerateFqdn()

error_t dhcpv6ClientGenerateFqdn ( Dhcpv6ClientContext context)

Generate client's fully qualified domain name.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Error code

Definition at line 2326 of file dhcpv6_client.c.

◆ dhcpv6ClientGenerateLinkLocalAddr()

error_t dhcpv6ClientGenerateLinkLocalAddr ( Dhcpv6ClientContext context)

Generate a link-local address.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Error code

Definition at line 2358 of file dhcpv6_client.c.

◆ dhcpv6ClientGetDefaultSettings()

void dhcpv6ClientGetDefaultSettings ( Dhcpv6ClientSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains DHCPv6 client settings

Definition at line 75 of file dhcpv6_client.c.

◆ dhcpv6ClientGetState()

Dhcpv6State dhcpv6ClientGetState ( Dhcpv6ClientContext context)

Retrieve current state.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Current DHCPv6 client state

Definition at line 315 of file dhcpv6_client.c.

◆ dhcpv6ClientInit()

error_t dhcpv6ClientInit ( Dhcpv6ClientContext context,
const Dhcpv6ClientSettings settings 
)

DHCPv6 client initialization.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]settingsDHCPv6 client specific settings
Returns
Error code

Definition at line 102 of file dhcpv6_client.c.

◆ dhcpv6ClientLinkChangeEvent()

void dhcpv6ClientLinkChangeEvent ( Dhcpv6ClientContext context)

Callback function for link change event.

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 436 of file dhcpv6_client.c.

◆ dhcpv6ClientParseAdvertise()

void dhcpv6ClientParseAdvertise ( Dhcpv6ClientContext context,
const Dhcpv6Message message,
size_t  length 
)

Parse Advertise message.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]messagePointer to the incoming message to parse
[in]lengthLength of the incoming message

Definition at line 1497 of file dhcpv6_client.c.

◆ dhcpv6ClientParseIaAddrOption()

error_t dhcpv6ClientParseIaAddrOption ( Dhcpv6ClientContext context,
const Dhcpv6Option option 
)

Parse IA Address option.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]optionPointer to the IA Address option to parse
Returns
Error code

Definition at line 2094 of file dhcpv6_client.c.

◆ dhcpv6ClientParseIaNaOption()

error_t dhcpv6ClientParseIaNaOption ( Dhcpv6ClientContext context,
const Dhcpv6Option option 
)

Parse IA_NA option.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]optionPointer to the IA_NA option to parse
Returns
Error code

Definition at line 1981 of file dhcpv6_client.c.

◆ dhcpv6ClientParseReply()

void dhcpv6ClientParseReply ( Dhcpv6ClientContext context,
const Dhcpv6Message message,
size_t  length 
)

Parse Reply message.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]messagePointer to the incoming message to parse
[in]lengthLength of the incoming message

Definition at line 1656 of file dhcpv6_client.c.

◆ dhcpv6ClientProcessMessage()

void dhcpv6ClientProcessMessage ( NetInterface interface,
const IpPseudoHeader pseudoHeader,
const UdpHeader udpHeader,
const NetBuffer buffer,
size_t  offset,
void *  param 
)

Process incoming DHCPv6 message.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderUDP pseudo header
[in]udpHeaderUDP header
[in]bufferMulti-part buffer containing the incoming DHCPv6 message
[in]offsetOffset to the first byte of the DHCPv6 message
[in]paramPointer to the DHCPv6 client context

Definition at line 1441 of file dhcpv6_client.c.

◆ dhcpv6ClientRelease()

error_t dhcpv6ClientRelease ( Dhcpv6ClientContext context)

Release DHCPv6 lease.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Error code

Definition at line 249 of file dhcpv6_client.c.

◆ dhcpv6ClientRemoveAddr()

void dhcpv6ClientRemoveAddr ( Dhcpv6ClientContext context,
const Ipv6Addr addr 
)

Remove an IPv6 address from the IA.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]addrIPv6 address to be removed

Definition at line 2210 of file dhcpv6_client.c.

◆ dhcpv6ClientSendMessage()

error_t dhcpv6ClientSendMessage ( Dhcpv6ClientContext context,
Dhcpv6MessageType  type 
)

Send Solicit message.

Parameters
[in]contextPointer to the DHCPv6 client context
[in]typeDHCPv6 message type
Returns
Error code

Definition at line 1244 of file dhcpv6_client.c.

◆ dhcpv6ClientStart()

error_t dhcpv6ClientStart ( Dhcpv6ClientContext context)

Start DHCPv6 client.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Error code

Definition at line 164 of file dhcpv6_client.c.

◆ dhcpv6ClientStateBound()

void dhcpv6ClientStateBound ( Dhcpv6ClientContext context)

BOUND state.

Client has a valid lease and is in its normal operating state

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 900 of file dhcpv6_client.c.

◆ dhcpv6ClientStateConfirm()

void dhcpv6ClientStateConfirm ( Dhcpv6ClientContext context)

CONFIRM state.

Whenever a client may have moved to a new link, the prefixes from the addresses assigned to the interfaces on that link may no longer be appropriate for the link to which the client is attached. In such the client must initiate a Confirm/Reply message exchange

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 761 of file dhcpv6_client.c.

◆ dhcpv6ClientStateDad()

void dhcpv6ClientStateDad ( Dhcpv6ClientContext context)

DAD state.

The client perform duplicate address detection on each of the addresses in any IAs it receives in the Reply message before using that address for traffic

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 846 of file dhcpv6_client.c.

◆ dhcpv6ClientStateDecline()

void dhcpv6ClientStateDecline ( Dhcpv6ClientContext context)

DECLINE state.

If a client detects that one or more addresses assigned to it by a server are already in use by another node, the client sends a Decline message to the server to inform it that the address is suspect

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 1183 of file dhcpv6_client.c.

◆ dhcpv6ClientStateInit()

void dhcpv6ClientStateInit ( Dhcpv6ClientContext context)

INIT state.

This is the initialization state, where a client begins the process of acquiring a lease. It also returns here when a lease ends, or when a lease negotiation fails

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 513 of file dhcpv6_client.c.

◆ dhcpv6ClientStateInitConfirm()

void dhcpv6ClientStateInitConfirm ( Dhcpv6ClientContext context)

INIT-CONFIRM state.

When a client that already has a valid lease starts up after a power-down or reboot, it starts here instead of the INIT state

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 715 of file dhcpv6_client.c.

◆ dhcpv6ClientStateRebind()

void dhcpv6ClientStateRebind ( Dhcpv6ClientContext context)

REBIND state.

The client sends a Rebind message to any available server to extend the lifetimes on the addresses assigned to the client and to update other configuration parameters. This message is sent after a client receives no response to a Renew message

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 1028 of file dhcpv6_client.c.

◆ dhcpv6ClientStateRelease()

void dhcpv6ClientStateRelease ( Dhcpv6ClientContext context)

RELEASE state.

To release one or more addresses, a client sends a Release message to the server

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 1116 of file dhcpv6_client.c.

◆ dhcpv6ClientStateRenew()

void dhcpv6ClientStateRenew ( Dhcpv6ClientContext context)

RENEW state.

The client sends a Renew message to the server that originally provided the client's addresses and configuration parameters to extend the lifetimes on the addresses assigned to the client and to update other configuration parameters

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 942 of file dhcpv6_client.c.

◆ dhcpv6ClientStateRequest()

void dhcpv6ClientStateRequest ( Dhcpv6ClientContext context)

REQUEST state.

The client uses a Request message to populate IAs with addresses and obtain other configuration information. The client includes one or more more IA options in the Request message. The server then returns addresses and other information about the IAs to the client in IA options in a Reply message

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 641 of file dhcpv6_client.c.

◆ dhcpv6ClientStateSolicit()

void dhcpv6ClientStateSolicit ( Dhcpv6ClientContext context)

SOLICIT state.

A client uses the Solicit message to discover DHCPv6 servers

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 559 of file dhcpv6_client.c.

◆ dhcpv6ClientStop()

error_t dhcpv6ClientStop ( Dhcpv6ClientContext context)

Stop DHCPv6 client.

Parameters
[in]contextPointer to the DHCPv6 client context
Returns
Error code

Definition at line 218 of file dhcpv6_client.c.

◆ dhcpv6ClientTick()

void dhcpv6ClientTick ( Dhcpv6ClientContext context)

DHCPv6 client timer handler.

This routine must be periodically called by the TCP/IP stack to manage DHCPv6 client operation

Parameters
[in]contextPointer to the DHCPv6 client context

Definition at line 341 of file dhcpv6_client.c.

Variable Documentation

◆ dhcpv6ClientTickCounter

systime_t dhcpv6ClientTickCounter

Definition at line 59 of file dhcpv6_client.c.