AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/addons/dhcp/nxd_dhcpv6_server.c
UINT _nxe_dhcpv6_retrieve_client_record(NX_DHCPV6_SERVER *dhcpv6_server_ptr, UINT table_index, ULONG *message_xid, NXD_ADDRESS *client_address, UINT *client_state, 
                                  ULONG *IP_lease_time_accrued, ULONG *valid_lifetime, UINT *duid_type,  UINT *duid_hardware, ULONG *physical_address_msw, 
                                  ULONG *physical_address_lsw, ULONG *duid_time, ULONG *duid_vendor_number, UCHAR *duid_vendor_private, UINT *duid_private_length)
{

UINT status;


    /* Check for invalid parameters. */
    if (table_index >= NX_DHCPV6_MAX_CLIENTS)
    {
        return NX_INVALID_PARAMETERS;
    }

    /* Check for invalid pointer input. */
    if ((dhcpv6_server_ptr == NX_NULL) || (message_xid == NX_NULL) || (client_address == NX_NULL) || (client_state == NX_NULL) ||
        (IP_lease_time_accrued == NX_NULL) || (valid_lifetime == NX_NULL) || (duid_type == NX_NULL))
    {

        return NX_PTR_ERROR;
    }


    /* Call the actual service. */
    status = _nx_dhcpv6_retrieve_client_record(dhcpv6_server_ptr, table_index, message_xid, client_address, client_state, 
                                      IP_lease_time_accrued, valid_lifetime, duid_type,  duid_hardware, physical_address_msw, 
                                      physical_address_lsw, duid_time, duid_vendor_number, duid_vendor_private, duid_private_length);

    return status;
}
/**************************************************************************/
/*                                                                        */
/*  FUNCTION                                               RELEASE        */
/*                                                                        */
/*    _nxe_dhcpv6_retrieve_client_record                  PORTABLE C      */
/*                                                           6.1          */
/*  AUTHOR                                                                */
/*                                                                        */
/*    Yuxin Zhou, Microsoft Corporation                                   */
/*                                                                        */
/*  DESCRIPTION                                                           */
/*                                                                        */
/*   This function performs error checking on the retrieve DHCPv6 Client  */
/*   record service.                                                      */
/*                                                                        */
/*  INPUT                                                                 */
/*                                                                        */
/*    dhcpv6_server_ptr                  Pointer to DHCPv6 server         */
/*    table_index                        Table index to store client data */
/*    message_xid                        Client transaction ID            */
/*    client_address                     IP address leased to client      */
/*    client_state                       Client DHCPv6 state e.g. bound   */
/*    IP_lease_time_accrued              Time expired on current IP lease */
/*    valid_lifetime                     When address becomes invalid     */
/*    duid_type                          Type of Client DUID              */
/*    duid_hardware                      DUID hardware (usually ethernet) */
/*    physical_address_msw               MSB of client mac address        */
/*    physical_address_lsw               LSB of client mac address        */
/*    duid_time                          Time for link layer time DUID    */
/*    duid_vendor_number                 Enterprise ID for Vendor DUID    */
/*    duid_vendor_private                Pointer to private ID for DUID   */
/*    duid_private_length                Vendor Duid private ID length    */
/*                                                                        */
/*  OUTPUT                                                                */
/*                                                                        */
/*    NX_SUCCESS                         Successful IP address copy       */
/*    NX_INVALID_PARAMETERS              Invalid non pointer input        */
/*                                                                        */
/*  CALLS                                                                 */
/*                                                                        */
/*    _nx_dhcpv6_retrieve_client_record  Actual retrieve client 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_client_record                  PORTABLE C
6.1
AUTHOR

Yuxin Zhou, Microsoft Corporation

DESCRIPTION

This function performs error checking on the retrieve DHCPv6 Client
record service.

INPUT

dhcpv6_server_ptr                  Pointer to DHCPv6 server
table_index                        Table index to store client data
message_xid                        Client transaction ID
client_address                     IP address leased to client
client_state                       Client DHCPv6 state e.g. bound
IP_lease_time_accrued              Time expired on current IP lease
valid_lifetime                     When address becomes invalid
duid_type                          Type of Client DUID
duid_hardware                      DUID hardware (usually ethernet)
physical_address_msw               MSB of client mac address
physical_address_lsw               LSB of client mac address
duid_time                          Time for link layer time DUID
duid_vendor_number                 Enterprise ID for Vendor DUID
duid_vendor_private                Pointer to private ID for DUID
duid_private_length                Vendor Duid private ID length

OUTPUT

NX_SUCCESS                         Successful IP address copy
NX_INVALID_PARAMETERS              Invalid non pointer input

CALLS

_nx_dhcpv6_retrieve_client_record  Actual retrieve client 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_client_record PORTABLE C 6 . 1 AUTHOR Yuxin Zhou Microsoft Corporation DESCRIPTION This function performs error checking on the retrieve DHCPv6 Client record service . INPUT dhcpv6_server_ptr Pointer to DHCPv6 server table_index Table index to store client data message_xid Client transaction ID client_address IP address leased to client client_state Client DHCPv6 state e . g . bound IP_lease_time_accrued Time expired on current IP lease valid_lifetime When address becomes invalid duid_type Type of Client DUID duid_hardware DUID hardware ( usually ethernet ) physical_address_msw MSB of client mac address physical_address_lsw LSB of client mac address duid_time Time for link layer time DUID duid_vendor_number Enterprise ID for Vendor DUID duid_vendor_private Pointer to private ID for DUID duid_private_length Vendor Duid private ID length OUTPUT NX_SUCCESS Successful IP address copy NX_INVALID_PARAMETERS Invalid non pointer input CALLS _nx_dhcpv6_retrieve_client_record Actual retrieve client 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_client_record(NX_DHCPV6_SERVER *dhcpv6_server_ptr, UINT table_index, ULONG *message_xid, NXD_ADDRESS *client_address, UINT *client_state, 
                                  ULONG *IP_lease_time_accrued, ULONG *valid_lifetime, UINT *duid_type,  UINT *duid_hardware, ULONG *physical_address_msw, 
                                  ULONG *physical_address_lsw, ULONG *duid_time, ULONG *duid_vendor_number, UCHAR *duid_vendor_private, UINT *duid_private_length)
{
UINT status;
    if (table_index >= NX_DHCPV6_MAX_CLIENTS)
    {
        return NX_INVALID_PARAMETERS;
    }
    if ((dhcpv6_server_ptr == NX_NULL) || (message_xid == NX_NULL) || (client_address == NX_NULL) || (client_state == NX_NULL) ||
        (IP_lease_time_accrued == NX_NULL) || (valid_lifetime == NX_NULL) || (duid_type == NX_NULL))
    {
        return NX_PTR_ERROR;
    }
    status = _nx_dhcpv6_retrieve_client_record(dhcpv6_server_ptr, table_index, message_xid, client_address, client_state, 
                                      IP_lease_time_accrued, valid_lifetime, duid_type,  duid_hardware, physical_address_msw, 
                                      physical_address_lsw, duid_time, duid_vendor_number, duid_vendor_private, duid_private_length);
    return status;
}
UINT _nxe_dhcpv6_retrieve_client_record ( NX_DHCPV6_SERVER * dhcpv6_server_ptr , UINT table_index , ULONG * message_xid , NXD_ADDRESS * client_address , UINT * client_state , ULONG * IP_lease_time_accrued , ULONG * valid_lifetime , UINT * duid_type , UINT * duid_hardware , ULONG * physical_address_msw , ULONG * physical_address_lsw , ULONG * duid_time , ULONG * duid_vendor_number , UCHAR * duid_vendor_private , UINT * duid_private_length ) { UINT status ; if ( table_index >= NX_DHCPV6_MAX_CLIENTS ) { return NX_INVALID_PARAMETERS ; } if ( ( dhcpv6_server_ptr == NX_NULL ) || ( message_xid == NX_NULL ) || ( client_address == NX_NULL ) || ( client_state == NX_NULL ) || ( IP_lease_time_accrued == NX_NULL ) || ( valid_lifetime == NX_NULL ) || ( duid_type == NX_NULL ) ) { return NX_PTR_ERROR ; } status = _nx_dhcpv6_retrieve_client_record ( dhcpv6_server_ptr , table_index , message_xid , client_address , client_state , IP_lease_time_accrued , valid_lifetime , duid_type , duid_hardware , physical_address_msw , physical_address_lsw , duid_time , duid_vendor_number , duid_vendor_private , duid_private_length ) ; return status ; }
FUNCTION                                               RELEASE
FUNCTION RELEASE
/* Check for invalid parameters. */ /* Check for invalid pointer input. */ /* Call the actual service. */