AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/samples/demo_netxduo_dhcpv6_client.c
VOID dhcpv6_state_change_notify(NX_DHCPV6 *dhcpv6_ptr, UINT old_state, UINT new_state)
{

    NX_PARAMETER_NOT_USED(dhcpv6_ptr);

    /* Increment state change counter. */
    state_changes++;

    /* Check if the Client attempted to request an IPv6 lease but no servers
       responded. */
    if ((old_state == NX_DHCPV6_STATE_SENDING_SOLICIT) && (new_state == NX_DHCPV6_STATE_INIT))
    {

        /* Indication that either DAD failed or IP lease expired. */
        address_not_assigned++;
    }

    /* Check if the Client has been assigned an IPv6 lease. */
    if (new_state == NX_DHCPV6_STATE_BOUND_TO_ADDRESS)
    {
        bound_addresses++;
    }

   /* Check if the Client was bound, but failed the uniqueness check 
       (Duplicate Address Detection) and was reset to the INIT state. */
    if ((old_state == NX_DHCPV6_STATE_SENDING_DECLINE) && (new_state == NX_DHCPV6_STATE_INIT))
    {

        /* Indication that DAD failed on Client IA. */
        address_failed_dad++;
    }

    /* Check if the Client was bound, attempted renew the lease but the
       IPv6 address renewal/rebinding failed. */
    if ((old_state == NX_DHCPV6_STATE_SENDING_REBIND) && (new_state == NX_DHCPV6_STATE_INIT))
    {

        /* Indication that the IP lease expired. */
        address_expired++;
    }



    /* Other checks are possible. */

}
/* This is the notification from the DHCPv6 Client task that it has changed 
   state in the DHCPv6 protocol, for example getting assigned an IPv6 lease and 
   achieving the bound state or an IPv6 lease expires and being reset to 
   the init state.   
*/
This is the notification from the DHCPv6 Client task that it has changed
state in the DHCPv6 protocol, for example getting assigned an IPv6 lease and
achieving the bound state or an IPv6 lease expires and being reset to
the init state.
This is the notification from the DHCPv6 Client task that it has changed state in the DHCPv6 protocol for example getting assigned an IPv6 lease and achieving the bound state or an IPv6 lease expires and being reset to the init state .
VOID dhcpv6_state_change_notify(NX_DHCPV6 *dhcpv6_ptr, UINT old_state, UINT new_state)
{
    NX_PARAMETER_NOT_USED(dhcpv6_ptr);
    state_changes++;
    if ((old_state == NX_DHCPV6_STATE_SENDING_SOLICIT) && (new_state == NX_DHCPV6_STATE_INIT))
    {
        address_not_assigned++;
    }
    if (new_state == NX_DHCPV6_STATE_BOUND_TO_ADDRESS)
    {
        bound_addresses++;
    }
    if ((old_state == NX_DHCPV6_STATE_SENDING_DECLINE) && (new_state == NX_DHCPV6_STATE_INIT))
    {
        address_failed_dad++;
    }
    if ((old_state == NX_DHCPV6_STATE_SENDING_REBIND) && (new_state == NX_DHCPV6_STATE_INIT))
    {
        address_expired++;
    }
}
VOID dhcpv6_state_change_notify ( NX_DHCPV6 * dhcpv6_ptr , UINT old_state , UINT new_state ) { NX_PARAMETER_NOT_USED ( dhcpv6_ptr ) ; state_changes ++ ; if ( ( old_state == NX_DHCPV6_STATE_SENDING_SOLICIT ) && ( new_state == NX_DHCPV6_STATE_INIT ) ) { address_not_assigned ++ ; } if ( new_state == NX_DHCPV6_STATE_BOUND_TO_ADDRESS ) { bound_addresses ++ ; } if ( ( old_state == NX_DHCPV6_STATE_SENDING_DECLINE ) && ( new_state == NX_DHCPV6_STATE_INIT ) ) { address_failed_dad ++ ; } if ( ( old_state == NX_DHCPV6_STATE_SENDING_REBIND ) && ( new_state == NX_DHCPV6_STATE_INIT ) ) { address_expired ++ ; } }
This is the notification from the DHCPv6 Client task that it has changed
state in the DHCPv6 protocol, for example getting assigned an IPv6 lease and
achieving the bound state or an IPv6 lease expires and being reset to
the init state.
This is the notification from the DHCPv6 Client task that it has changed state in the DHCPv6 protocol for example getting assigned an IPv6 lease and achieving the bound state or an IPv6 lease expires and being reset to the init state .
/* Increment state change counter. */ /* Check if the Client attempted to request an IPv6 lease but no servers
       responded. */ /* Indication that either DAD failed or IP lease expired. */ /* Check if the Client has been assigned an IPv6 lease. */ /* Check if the Client was bound, but failed the uniqueness check 
       (Duplicate Address Detection) and was reset to the INIT state. */ /* Indication that DAD failed on Client IA. */ /* Check if the Client was bound, attempted renew the lease but the
       IPv6 address renewal/rebinding failed. */ /* Indication that the IP lease expired. */ /* Other checks are possible. */