![]() |
|
| << Previous | Index | Next >> | |
| | |
Description
This function relinquishes a lease obtained from a DHCP server. This allows the server to re-use the IP address that was allocated to this target. After calling this function, the global variable for the IP address is set to 0, and it is not possible to call any other TCP/IP function which requires a valid IP address. Normally,
dhcp_release()would be used on networks where only a small number of IP addresses are available, but there are a large number of hosts which need sporadic network access.This function is non-blocking since it only sends one packet to the DHCP server and expects no response.
Return value
0: OK, lease was relinquished.
1: Not released, because an address is currently being acquired, or because a boot file (from the BOOTP or DHCP server) is being downloaded, or because some other network resource is in use e.g., open TCP socket. Calldhcp_release()again after the resource is freed.
-1: Not released, because DHCP was not used to obtain a lease, or no lease was acquired.Library
BOOTP.LIB
| TCP/IP Manual Vol 1 |
<<Previous | Index | Next>> | rabbit.com |