AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/addons/dhcp/nxd_dhcpv6_server.c
UINT _nxe_dhcpv6_retrieve_ip_address_lease(NX_DHCPV6_SERVER *dhcpv6_server_ptr, UINT table_index, NXD_ADDRESS *lease_IP_address, 
                                       ULONG *T1, ULONG *T2, ULONG *valid_lifetime, ULONG *preferred_lifetime)
{

UINT status;


    /* Check for invalid pointer input. */
    if ((dhcpv6_server_ptr == NX_NULL) || (lease_IP_address == NX_NULL) || (T1 == NX_NULL) ||
        (T2 == NX_NULL) || (valid_lifetime == NX_NULL) || (preferred_lifetime == NX_NULL))
    {

        return NX_PTR_ERROR;
    }

    status = _nx_dhcpv6_retrieve_ip_address_lease(dhcpv6_server_ptr, table_index, lease_IP_address, 
                                       T1, T2, valid_lifetime, preferred_lifetime);

    return status;
}
/**************************************************************************/
/*                                                                        */
/*  FUNCTION                                               RELEASE        */
/*                                                                        */
/*    _nxe_dhcpv6_retrieve_ip_address_lease               PORTABLE C      */
/*                                                           6.1          */
/*  AUTHOR                                                                */
/*                                                                        */
/*    Yuxin Zhou, Microsoft Corporation                                   */
/*                                                                        */
/*  DESCRIPTION                                                           */
/*                                                                        */
/*   This function performs error checking for the actual retrieve lease  */
/*   service.                                                             */
/*                                                                        */
/*   This is intended to satisfy the DHCPv6 protocol requirement that a   */
/*   DHPCv6 Server be able to store and retrieve lease data from          */
/*   nonvolatile memory e..g between reboots.                             */
/*                                                                        */
/*  INPUT                                                                 */
/*                                                                        */
/*    dhcpv6_server_ptr                  Pointer to DHCPv6 server         */
/*    table_index                        Table index to obtain data       */
/*    lease_IP_address                   Lease IP address                 */
/*    T1                                 T1 lifetime (when to renew)      */
/*    T2                                 T2 lifetime (when to rebind)     */
/*    preferred_lifetime                 When address becomes deprecated  */
/*    valid_lifetime                     When address becomes invalid     */
/*                                                                        */
/*  OUTPUT                                                                */
/*                                                                        */
/*    NX_SUCCESS                         Successful IP address copy       */
/*    NX_PTR_ERROR                      Invalid pointer input             */
/*                                                                        */
/*  CALLS                                                                 */
/*                                                                        */
/*    _nx_dhcpv6_retrieve_ip_address_lease                                */
/*                                       Actual retrieve data service     */
/*                                                                        */
/*  CALLED BY                                                             */
/*                                                                        */
/*    Application code                                                    */
/*                                                                        */
/*  RELEASE HISTORY                                                       */
/*                                                                        */
/*    DATE              NAME                      DESCRIPTION             */
/*                                                                        */
/*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
/*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
/*                                            resulting in version 6.1    */
/*                                                                        */
/**************************************************************************/
FUNCTION                                               RELEASE

_nxe_dhcpv6_retrieve_ip_address_lease               PORTABLE C
6.1
AUTHOR

Yuxin Zhou, Microsoft Corporation

DESCRIPTION

This function performs error checking for the actual retrieve lease
service.

This is intended to satisfy the DHCPv6 protocol requirement that a
DHPCv6 Server be able to store and retrieve lease data from
nonvolatile memory e..g between reboots.

INPUT

dhcpv6_server_ptr                  Pointer to DHCPv6 server
table_index                        Table index to obtain data
lease_IP_address                   Lease IP address
T1                                 T1 lifetime (when to renew)
T2                                 T2 lifetime (when to rebind)
preferred_lifetime                 When address becomes deprecated
valid_lifetime                     When address becomes invalid

OUTPUT

NX_SUCCESS                         Successful IP address copy
NX_PTR_ERROR                      Invalid pointer input

CALLS

_nx_dhcpv6_retrieve_ip_address_lease
Actual retrieve data service

CALLED BY

Application code

RELEASE HISTORY

DATE              NAME                      DESCRIPTION

05-19-2020     Yuxin Zhou               Initial Version 6.0
09-30-2020     Yuxin Zhou               Modified comment(s),
resulting in version 6.1
FUNCTION RELEASE _nxe_dhcpv6_retrieve_ip_address_lease PORTABLE C 6 . 1 AUTHOR Yuxin Zhou Microsoft Corporation DESCRIPTION This function performs error checking for the actual retrieve lease service . This is intended to satisfy the DHCPv6 protocol requirement that a DHPCv6 Server be able to store and retrieve lease data from nonvolatile memory e .. g between reboots . INPUT dhcpv6_server_ptr Pointer to DHCPv6 server table_index Table index to obtain data lease_IP_address Lease IP address T1 T1 lifetime ( when to renew ) T2 T2 lifetime ( when to rebind ) preferred_lifetime When address becomes deprecated valid_lifetime When address becomes invalid OUTPUT NX_SUCCESS Successful IP address copy NX_PTR_ERROR Invalid pointer input CALLS _nx_dhcpv6_retrieve_ip_address_lease Actual retrieve data service CALLED BY Application code RELEASE HISTORY DATE NAME DESCRIPTION 05 - 19 - 2020 Yuxin Zhou Initial Version 6 . 0 09 - 30 - 2020 Yuxin Zhou Modified comment ( s ) resulting in version 6 . 1
UINT _nxe_dhcpv6_retrieve_ip_address_lease(NX_DHCPV6_SERVER *dhcpv6_server_ptr, UINT table_index, NXD_ADDRESS *lease_IP_address, 
                                       ULONG *T1, ULONG *T2, ULONG *valid_lifetime, ULONG *preferred_lifetime)
{
UINT status;
    if ((dhcpv6_server_ptr == NX_NULL) || (lease_IP_address == NX_NULL) || (T1 == NX_NULL) ||
        (T2 == NX_NULL) || (valid_lifetime == NX_NULL) || (preferred_lifetime == NX_NULL))
    {
        return NX_PTR_ERROR;
    }
    status = _nx_dhcpv6_retrieve_ip_address_lease(dhcpv6_server_ptr, table_index, lease_IP_address, 
                                       T1, T2, valid_lifetime, preferred_lifetime);
    return status;
}
UINT _nxe_dhcpv6_retrieve_ip_address_lease ( NX_DHCPV6_SERVER * dhcpv6_server_ptr , UINT table_index , NXD_ADDRESS * lease_IP_address , ULONG * T1 , ULONG * T2 , ULONG * valid_lifetime , ULONG * preferred_lifetime ) { UINT status ; if ( ( dhcpv6_server_ptr == NX_NULL ) || ( lease_IP_address == NX_NULL ) || ( T1 == NX_NULL ) || ( T2 == NX_NULL ) || ( valid_lifetime == NX_NULL ) || ( preferred_lifetime == NX_NULL ) ) { return NX_PTR_ERROR ; } status = _nx_dhcpv6_retrieve_ip_address_lease ( dhcpv6_server_ptr , table_index , lease_IP_address , T1 , T2 , valid_lifetime , preferred_lifetime ) ; return status ; }
FUNCTION                                               RELEASE
FUNCTION RELEASE
/* Check for invalid pointer input. */