Network Component  Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
NetDHCP6: DHCP6 Client

Events generated by the Network - Dynamic Host Configuration Client for IPv6 functions. More...

Functions

__STATIC_INLINE void EvrNetDHCP6_InitClient (uint16_t if_id, uint8_t vclass)
 Event on DHCP6 client initialize (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_GetSocketFailed (void)
 Event on DHCP6 failed to allocate UDP socket (Error) More...
 
__STATIC_INLINE void EvrNetDHCP6_StartClient (uint16_t if_id, uint32_t mode)
 Event on DHCP6 client start (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_StopClient (uint16_t if_id)
 Event on DHCP6 client stop (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ClientState (uint16_t if_id, uint8_t state)
 Event on DHCP6 indication of client state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_NextState (uint16_t if_id, uint8_t state)
 Event on DHCP6 transition to next state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_NextStateDelay (uint16_t if_id, uint8_t state, uint16_t delay)
 Event on DHCP6 transition to next state with random delay (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ChangeStateLinkDown (uint16_t if_id, uint8_t state)
 Event on DHCP6 change state on link-down (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_NoAddressAvailable (uint16_t if_id, uint8_t state)
 Event on DHCP6 receive status no address available (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_StateRetransmit (uint16_t if_id, uint8_t state)
 Event on DHCP6 retransmit request in current state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_StateTimeout (uint16_t if_id, uint8_t state)
 Event on DHCP6 timeout in current state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ChangeStateOnTimeout (uint16_t if_id, uint8_t current, uint8_t next)
 Event on DHCP6 state timeout and transit to next state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_T1Expired (uint16_t if_id, uint8_t state)
 Event on DHCP6 timer T1 expired (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_T2Expired (uint16_t if_id, uint8_t state)
 Event on DHCP6 timer T2 expired (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_SendDhcpMessage (uint16_t if_id, uint8_t msg_type, uint32_t xid)
 Event on DHCP6 send message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ReceiveFrame (uint16_t if_id, uint32_t length)
 Event on DHCP6 receive frame (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_FrameTooShort (uint16_t if_id, uint32_t length, uint32_t min_length)
 Event on DHCP6 receive frame too short (Error) More...
 
__STATIC_INLINE void EvrNetDHCP6_WrongTransactionId (uint16_t if_id, uint32_t xid, uint32_t xid_valid)
 Event on DHCP6 receive wrong transaction identifier (Error) More...
 
__STATIC_INLINE void EvrNetDHCP6_MessageTypeUnknown (uint16_t if_id, uint8_t msg_type)
 Event on DHCP6 receive unknown message type (Error) More...
 
__STATIC_INLINE void EvrNetDHCP6_ShowMessage (uint16_t if_id, uint8_t msg_type, uint32_t xid)
 Event on DHCP6 display message information (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_InvalidMessageType (uint16_t if_id, uint8_t msg_type, uint8_t msg_valid)
 Event on DHCP6 receive invalid message type (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_WrongClientId (uint16_t if_id, uint8_t msg_type)
 Event on DHCP6 receive wrong client identifier (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ServerNotChosen (uint16_t if_id, uint8_t msg_type)
 Event on DHCP6 server not chosen in DISCOVER, REBIND state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_StatusCode (uint16_t if_id, uint16_t status)
 Event on DHCP6 receive option status code (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_WrongServerId (uint16_t if_id, uint8_t msg_type)
 Event on DHCP6 receive wrong server identifier (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ShowDnsServers (uint16_t if_id, const uint8_t *dns_list)
 Event on DHCP6 display DNS server addresses (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_MissingServerId (uint16_t if_id, uint8_t msg_type)
 Event on DHCP6 missing server identifier option (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_ShowIanaOffer (const void *iana_offer)
 Event on DHCP6 display IANA offer (Op) More...
 
__STATIC_INLINE void EvrNetDHCP6_OfferTimerCheckFailed (uint16_t if_id)
 Event on DHCP6 offer address timer check failed (Error) More...
 
__STATIC_INLINE void EvrNetDHCP6_UninitClient (uint16_t if_id)
 Event on DHCP6 client de-initialize (Op) More...
 

Description

Events generated by the Network - Dynamic Host Configuration Client for IPv6 functions.

The Network DHCPv6 Client functions generate events that report events in the Dynamic Host Configuration Protocol version 6 client and help in troubleshooting.

Function Documentation

◆ EvrNetDHCP6_ChangeStateLinkDown()

__STATIC_INLINE void EvrNetDHCP6_ChangeStateLinkDown ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 change state on link-down (Op)

Parameters
if_idnetwork interface identifier
statenext state

The event ChangeStateLinkDown is created when the network library displays the next state in which the DHCPv6 client will transit because the link-down is detected.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • next: next state of the DHCPv6 client.

◆ EvrNetDHCP6_ChangeStateOnTimeout()

__STATIC_INLINE void EvrNetDHCP6_ChangeStateOnTimeout ( uint16_t  if_id,
uint8_t  current,
uint8_t  next 
)

Event on DHCP6 state timeout and transit to next state (Op)

Parameters
if_idnetwork interface identifier
currentcurrent state
nextnext state

The event ChangeStateOnTimeout is created when the timeout expired and the DHCPv6 client needs to change the state.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: current state of the DHCPv6 client.
  • next: next state of the DHCPv6 client.

◆ EvrNetDHCP6_ClientState()

__STATIC_INLINE void EvrNetDHCP6_ClientState ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 indication of client state (Op)

Parameters
if_idnetwork interface identifier
statecurrent state

The event ClientState is created when the network library displays the current state of the DHCPv6 client.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: current state of the DHCPv6 client.

◆ EvrNetDHCP6_FrameTooShort()

__STATIC_INLINE void EvrNetDHCP6_FrameTooShort ( uint16_t  if_id,
uint32_t  length,
uint32_t  min_length 
)

Event on DHCP6 receive frame too short (Error)

Parameters
if_idnetwork interface identifier
lengthframe length in bytes
min_lengthminimum length of the frame

The event FrameTooShort is created when the network library receives the DHCPv6 response frame that is too short. The frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.

◆ EvrNetDHCP6_GetSocketFailed()

__STATIC_INLINE void EvrNetDHCP6_GetSocketFailed ( void  )

Event on DHCP6 failed to allocate UDP socket (Error)

The event GetSocketFailed is created when the DHCPv6 client service is initialized, that is, when the function netInitialize is executed, and the service could not assign the UDP socket. To resolve this error, you must increase the number of available UDP sockets in the UDP socket configuration.

Value in the Event Recorder shows:

  • error

◆ EvrNetDHCP6_InitClient()

__STATIC_INLINE void EvrNetDHCP6_InitClient ( uint16_t  if_id,
uint8_t  vclass 
)

Event on DHCP6 client initialize (Op)

Parameters
if_idnetwork interface identifier
vclassVendor Class option enabled

The event InitClient is created when the DHCPv6 client service is initialized, that is, when the function netInitialize is executed.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • opt: extended DHCP6 options enabled.

◆ EvrNetDHCP6_InvalidMessageType()

__STATIC_INLINE void EvrNetDHCP6_InvalidMessageType ( uint16_t  if_id,
uint8_t  msg_type,
uint8_t  msg_valid 
)

Event on DHCP6 receive invalid message type (Op)

Parameters
if_idnetwork interface identifier
msg_typereceived message type
msg_validvalid message type
Remarks
Silently discard other message types.

The event InvalidMessageType is created when the network library receives the DHCPv6 frame, but the type of message is not valid in current state. The DHCPv6 frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCPv6 message type.
  • valid: expected DHCPv6 message type.

◆ EvrNetDHCP6_MessageTypeUnknown()

__STATIC_INLINE void EvrNetDHCP6_MessageTypeUnknown ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP6 receive unknown message type (Error)

Parameters
if_idnetwork interface identifier
msg_typemessage type

The event MessageTypeUnknown is created when the network library receives the DHCPv6 frame, but the type of message is not supported. The DHCPv6 frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: unknown DHCPv6 message type.

◆ EvrNetDHCP6_MissingServerId()

__STATIC_INLINE void EvrNetDHCP6_MissingServerId ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP6 missing server identifier option (Op)

Parameters
if_idnetwork interface identifier
msg_typereceived message type
Remarks
Silently discard the message.

The event MissingServerId is created when the network library receives the DHCPv6 response frame, but the server identifier option is missing. The frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCPv6 message type.

◆ EvrNetDHCP6_NextState()

__STATIC_INLINE void EvrNetDHCP6_NextState ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 transition to next state (Op)

Parameters
if_idnetwork interface identifier
statenext state

The event NextState is created when the network library displays the next state in which the DHCPv6 client will transit.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • next: next state of the DHCPv6 client.

◆ EvrNetDHCP6_NextStateDelay()

__STATIC_INLINE void EvrNetDHCP6_NextStateDelay ( uint16_t  if_id,
uint8_t  state,
uint16_t  delay 
)

Event on DHCP6 transition to next state with random delay (Op)

Parameters
if_idnetwork interface identifier
statenext state
delaystart delay (in 100ms ticks)

The event NextStateDelay is created when the network library displays the next state in which the DHCPv6 client will transit after the expiration of the delay.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • next: next state of the DHCPv6 client.
  • delay: delay before the transition in milliseconds.

◆ EvrNetDHCP6_NoAddressAvailable()

__STATIC_INLINE void EvrNetDHCP6_NoAddressAvailable ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 receive status no address available (Op)

Parameters
if_idnetwork interface identifier
statecurrent state

The event NoAddressAvailable is created when the network library can not assign the IPv6 address, because the DHCPv6 server responded with a "No Address Available" status message.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: state of the DHCPv6 client.

◆ EvrNetDHCP6_OfferTimerCheckFailed()

__STATIC_INLINE void EvrNetDHCP6_OfferTimerCheckFailed ( uint16_t  if_id)

Event on DHCP6 offer address timer check failed (Error)

Parameters
if_idnetwork interface identifier

The event OfferTimerCheckFailed is created when the network library receives the DHCPv6 offer message, but finds inconsistency in specified timeouts. The DHCPv6 frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetDHCP6_ReceiveFrame()

__STATIC_INLINE void EvrNetDHCP6_ReceiveFrame ( uint16_t  if_id,
uint32_t  length 
)

Event on DHCP6 receive frame (Op)

Parameters
if_idnetwork interface identifier
lengthmessage length

The event ReceiveFrame is created when the network library receives the DHCPv6 frame.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • len: length of the received frame in bytes.

◆ EvrNetDHCP6_SendDhcpMessage()

__STATIC_INLINE void EvrNetDHCP6_SendDhcpMessage ( uint16_t  if_id,
uint8_t  msg_type,
uint32_t  xid 
)

Event on DHCP6 send message (Op)

Parameters
if_idnetwork interface identifier
msg_typemessage type
xidtransaction identifier

The event SendDhcpMessage is created when a network library sends a DHCPv6 message.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: type of DHCPv6 message.
  • xid: transaction identifier.

◆ EvrNetDHCP6_ServerNotChosen()

__STATIC_INLINE void EvrNetDHCP6_ServerNotChosen ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP6 server not chosen in DISCOVER, REBIND state (Op)

Parameters
if_idnetwork interface identifier
msg_typereceived message type
Remarks
Silently discard the message.

The event ServerNotChosen is created when the network library receives the DHCPv6 response frame in DISCOVER or REBIND state, but the DHCPv6 server is not selected. This happens if the server preference is lower than the preference of the already selected server, or the server identifier option is missing in the response.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCPv6 message type.

◆ EvrNetDHCP6_ShowDnsServers()

__STATIC_INLINE void EvrNetDHCP6_ShowDnsServers ( uint16_t  if_id,
const uint8_t *  dns_list 
)

Event on DHCP6 display DNS server addresses (Op)

Parameters
if_idnetwork interface identifier
dns_listpointer to DNS server address list
Remarks
Displays primary and secondary DNS server address.

The event ShowDnsServers is created when the network library wants to display the IPv6 addresses of the primary and secondary DNS server.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • pri: IPv6 address of the primary DNS server.
  • sec: IPv6 address of the secondary DNS server.

◆ EvrNetDHCP6_ShowIanaOffer()

__STATIC_INLINE void EvrNetDHCP6_ShowIanaOffer ( const void *  iana_offer)

Event on DHCP6 display IANA offer (Op)

Parameters
iana_offerpointer to IANA structure of 32 bytes
  • T1 (4 bytes)
  • T2 (4 bytes)
  • Addr (16 bytes)
  • PrefTime (4 bytes)
  • ValidTime (4 bytes)
Remarks
IANA: Identity Association for non-temporary Address

The event ShowIanaOffer is created when the network library wants to display detailed information about the IANA offer that was received. It contains the offered IPv6 address and the time limits of this address.

Value in the Event Recorder shows:

  • addr: offered IPv6 address.
  • valid: valid address lifetime in seconds.
  • prefrd: preferred address lifetime in seconds.
  • t1: renew timeout in seconds.
  • t2: rebind timeout in seconds.

◆ EvrNetDHCP6_ShowMessage()

__STATIC_INLINE void EvrNetDHCP6_ShowMessage ( uint16_t  if_id,
uint8_t  msg_type,
uint32_t  xid 
)

Event on DHCP6 display message information (Op)

Parameters
if_idnetwork interface identifier
msg_typemessage type
xidtransaction identifier
Remarks
The size of transaction identifier (XID) is 3 bytes.

The event ShowMessage is created when the network library receives the DHCPv6 message.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCPv6 message type.
  • xid: received transaction identifier.

◆ EvrNetDHCP6_StartClient()

__STATIC_INLINE void EvrNetDHCP6_StartClient ( uint16_t  if_id,
uint32_t  mode 
)

Event on DHCP6 client start (Op)

Parameters
if_idnetwork interface identifier
modeclient mode
  • 0: Stateless mode
  • 1: Stateful mode

The event StartClient is created when the DHCPv6 client service is started. This happens when the functions netInitialize or netDHCP6_Enable are executed.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • mode: client mode of operation (Stateless, Stateful).

◆ EvrNetDHCP6_StateRetransmit()

__STATIC_INLINE void EvrNetDHCP6_StateRetransmit ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 retransmit request in current state (Op)

Parameters
if_idnetwork interface identifier
statecurrent state

The event StateRetransmit is created when the network library wants to resend the DHCPv6 message. This happens if the DHCPv6 server does not respond to client request.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: current state of the DHCPv6 client.

◆ EvrNetDHCP6_StateTimeout()

__STATIC_INLINE void EvrNetDHCP6_StateTimeout ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 timeout in current state (Op)

Parameters
if_idnetwork interface identifier
statecurrent state

The event StateTimeout is created when the discover timeout has expired and at least one DHCPv6 server responds to the discover messages.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: current state of the DHCPv6 client.

◆ EvrNetDHCP6_StatusCode()

__STATIC_INLINE void EvrNetDHCP6_StatusCode ( uint16_t  if_id,
uint16_t  status 
)

Event on DHCP6 receive option status code (Op)

Parameters
if_idnetwork interface identifier
statusstatus code

The event StatusCode is created when the network library finds the status code in a DHCPv6 frame and wants to display its value.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • status: status code (Success, UnspecFail, NoAddrAvail, NoBinding, NotOnLink, UseMulticast).

◆ EvrNetDHCP6_StopClient()

__STATIC_INLINE void EvrNetDHCP6_StopClient ( uint16_t  if_id)

Event on DHCP6 client stop (Op)

Parameters
if_idnetwork interface identifier

The event StopClient is created when the DHCPv6 client service is stopped, that is when the function netDHCP6_Disable is executed.

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetDHCP6_T1Expired()

__STATIC_INLINE void EvrNetDHCP6_T1Expired ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 timer T1 expired (Op)

Parameters
if_idnetwork interface identifier
statecurrent state

The event T1Expired is created when the lease time of the assigned IPv6 address has expired and the lease must be renewed. The network library starts renewing the assigned IPv6 address.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: current state of the DHCPv6 client.

◆ EvrNetDHCP6_T2Expired()

__STATIC_INLINE void EvrNetDHCP6_T2Expired ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP6 timer T2 expired (Op)

Parameters
if_idnetwork interface identifier
statecurrent state

The event T2Expired is created when the lease time of the assigned IPv6 address has expired and the address renewal has failed. This is because the DHCPv6 server that assigned the IPv6 address is not accessible. The network library starts discovering DHCPv6 servers again.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • state: current state of the DHCPv6 client.

◆ EvrNetDHCP6_UninitClient()

__STATIC_INLINE void EvrNetDHCP6_UninitClient ( uint16_t  if_id)

Event on DHCP6 client de-initialize (Op)

Parameters
if_idnetwork interface identifier

The event UninitClient is created when the function netUninitialize is executed.

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetDHCP6_WrongClientId()

__STATIC_INLINE void EvrNetDHCP6_WrongClientId ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP6 receive wrong client identifier (Op)

Parameters
if_idnetwork interface identifier
msg_typereceived message type
Remarks
Silently discard the message.

The event WrongClientId is created when the network library receives the DHCPv6 response frame, but the received client identifier is not identical to the client identifier sent in the DHCPv6 request. The frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCPv6 message type.

◆ EvrNetDHCP6_WrongServerId()

__STATIC_INLINE void EvrNetDHCP6_WrongServerId ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP6 receive wrong server identifier (Op)

Parameters
if_idnetwork interface identifier
msg_typereceived message type
Remarks
Silently discard the message.

The event WrongServerId is created when the network library receives the DHCPv6 response frame, but the received server identifier is not identical to the server identifier sent in the DHCPv6 request. The frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCPv6 message type.

◆ EvrNetDHCP6_WrongTransactionId()

__STATIC_INLINE void EvrNetDHCP6_WrongTransactionId ( uint16_t  if_id,
uint32_t  xid,
uint32_t  xid_valid 
)

Event on DHCP6 receive wrong transaction identifier (Error)

Parameters
if_idnetwork interface identifier
xidreceived transaction identifier
xid_validvalid transaction identifier
Remarks
The size of transaction identifier (XID) is 3 bytes.

The event WrongTransactionId is created when the network library receives the DHCPv6 response frame, but the received transaction identifier (XID) is not identical to the transaction identifier of our DHCPv6 request. The frame is therefore discarded.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • xid: received transaction identifier.
  • valid: expected transaction identifier.