Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NetDHCP6: DHCP6 Client

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

Functions

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

__STATIC_INLINE void EvrNetDHCP6_ChangeStateLinkDown ( uint8_t  state)

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

Parameters
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:

  • next: next state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_ChangeStateOnTimeout ( uint8_t  current,
uint8_t  next 
)

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

Parameters
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:

  • state: current state of the DHCPv6 client.
  • next: next state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_ClientState ( uint8_t  state)

Event on DHCP6 indication of client state (Op)

Parameters
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:

  • state: current state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on DHCP6 receive frame too short (Error)

Parameters
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:

  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.
__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.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetDHCP6_InitClient ( uint8_t  option_flags)

Event on DHCP6 client initialize (Op)

Parameters
option_flagsDHCPv6 client option flags
  • 0x01: Opt.67 Vendor Class

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:

  • opt: option flags (1= VENDOR_CLASS).
__STATIC_INLINE void EvrNetDHCP6_InvalidMessageType ( uint8_t  msg_type,
uint8_t  msg_valid 
)

Event on DHCP6 receive invalid message type (Op)

Parameters
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:

  • type: received DHCPv6 message type.
  • valid: expected DHCPv6 message type.
__STATIC_INLINE void EvrNetDHCP6_MessageTypeUnknown ( uint8_t  msg_type)

Event on DHCP6 receive unknown message type (Error)

Parameters
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:

  • type: unknown DHCPv6 message type.
__STATIC_INLINE void EvrNetDHCP6_MissingServerId ( uint8_t  msg_type)

Event on DHCP6 missing server identifier option (Op)

Parameters
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:

  • type: received DHCPv6 message type.
__STATIC_INLINE void EvrNetDHCP6_NextState ( uint8_t  state)

Event on DHCP6 transition to next state (Op)

Parameters
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:

  • next: next state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_NextStateDelay ( uint8_t  state,
uint32_t  delay 
)

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

Parameters
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:

  • next: next state of the DHCPv6 client.
  • delay: delay before the transition in milliseconds.
__STATIC_INLINE void EvrNetDHCP6_NoAddressAvailable ( uint8_t  state)

Event on DHCP6 receive status no address available (Op)

Parameters
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:

  • state: state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_OfferTimerCheckFailed ( void  )

Event on DHCP6 offer address timer check failed (Error)

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:

  • error
__STATIC_INLINE void EvrNetDHCP6_ReceiveFrame ( uint32_t  length)

Event on DHCP6 receive frame (Op)

Parameters
lengthmessage length

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

Value in the Event Recorder shows:

  • len: length of the received frame in bytes.
__STATIC_INLINE void EvrNetDHCP6_SendDhcpMessage ( uint8_t  msg_type,
uint32_t  xid 
)

Event on DHCP6 send message (Op)

Parameters
msg_typemessage type
xidtransaction identifier

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

Value in the Event Recorder shows:

  • type: type of DHCPv6 message.
  • xid: transaction identifier.
__STATIC_INLINE void EvrNetDHCP6_ServerNotChosen ( uint8_t  msg_type)

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

Parameters
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:

  • type: received DHCPv6 message type.
__STATIC_INLINE void EvrNetDHCP6_ShowDnsServers ( const uint8_t *  dns_list)

Event on DHCP6 display DNS server addresses (Op)

Parameters
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:

  • pri: IPv6 address of the primary DNS server.
  • sec: IPv6 address of the secondary DNS server.
__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.
__STATIC_INLINE void EvrNetDHCP6_ShowMessage ( uint8_t  msg_type,
uint32_t  xid 
)

Event on DHCP6 display message information (Op)

Parameters
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:

  • type: received DHCPv6 message type.
  • xid: received transaction identifier.
__STATIC_INLINE void EvrNetDHCP6_StartClient ( uint32_t  mode)

Event on DHCP6 client start (Op)

Parameters
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:

  • mode: client mode of operation (Stateless, Stateful).
__STATIC_INLINE void EvrNetDHCP6_StateRetransmit ( uint8_t  state)

Event on DHCP6 retransmit request in current state (Op)

Parameters
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:

  • state: current state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_StateTimeout ( uint8_t  state)

Event on DHCP6 timeout in current state (Op)

Parameters
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:

  • state: current state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_StatusCode ( uint16_t  status)

Event on DHCP6 receive option status code (Op)

Parameters
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:

  • status: status code (Success, UnspecFail, NoAddrAvail, NoBinding, NotOnLink, UseMulticast).
__STATIC_INLINE void EvrNetDHCP6_StopClient ( void  )

Event on DHCP6 client stop (Op)

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:

  • stop
__STATIC_INLINE void EvrNetDHCP6_T1Expired ( uint8_t  state)

Event on DHCP6 timer T1 expired (Op)

Parameters
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:

  • state: current state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_T2Expired ( uint8_t  state)

Event on DHCP6 timer T2 expired (Op)

Parameters
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:

  • state: current state of the DHCPv6 client.
__STATIC_INLINE void EvrNetDHCP6_UninitClient ( void  )

Event on DHCP6 client de-initialize (Op)

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

Value in the Event Recorder shows:

  • dhcp6
__STATIC_INLINE void EvrNetDHCP6_WrongClientId ( uint8_t  msg_type)

Event on DHCP6 receive wrong client identifier (Op)

Parameters
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:

  • type: received DHCPv6 message type.
__STATIC_INLINE void EvrNetDHCP6_WrongIaid ( uint32_t  iaid,
uint32_t  iaid_valid 
)

Event on DHCP6 receive wrong IAID (Op)

Parameters
iaidreceived IAID value
iaid_validvalid IAID value

The event WrongIaid is created when the network library receives the DHCPv6 frame, but the Identity Association Identifier (IAID) is not valid. The DHCPv6 frame is therefore discarded.

Value in the Event Recorder shows:

  • iaid: received IAID value.
  • valid: expected IAID value.
__STATIC_INLINE void EvrNetDHCP6_WrongServerId ( uint8_t  msg_type)

Event on DHCP6 receive wrong server identifier (Op)

Parameters
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:

  • type: received DHCPv6 message type.
__STATIC_INLINE void EvrNetDHCP6_WrongTransactionId ( uint32_t  xid,
uint32_t  xid_valid 
)

Event on DHCP6 receive wrong transaction identifier (Error)

Parameters
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:

  • xid: received transaction identifier.
  • valid: expected transaction identifier.