Jump to main content

##

# TCPIP_DHCPS_LeaseGetInfo Function

## C

    TCPIP_DHCPS_RES TCPIP_DHCPS_LeaseGetInfo(TCPIP_NET_HANDLE netH, TCPIP_DHCPS_LEASE_INFO* pLeaseInfo, uint16_t leaseIx);

## Description

Get the lease entry details for the requested lease index

## Description

This function returns a DB lease entry info for the selected index on the selected interface

## Precondition

The DHCP Server module must be initialized.

## Parameters

Parameters | Description
--- | ---
hNet | the selected interface
pLeaseInfo | address to store the lease entry details
| Could be NULL if details not needed
leaseIx | lease index

## Returns

- TCPIP_DHCPS_RES_OK - the call is successful and the pLeaseInfo has been updated, if not NULL

- < 0 - if wrong interface or DHCP server is not running on that interface, or wrong/unused index

- TCPIP_DHCPS_RES_ACCESS_LOCKED - if access to the DHCP server DB is locked by another thread and the the call can be retried. Multi-threaded access is enabled (build symbol TCPIP_DHCPS_MULTI_THREADED_ACCESS != 0)

## Remarks

None