TCPIP_DHCPS_Disable Function

C

TCPIP_DHCPS_RES TCPIP_DHCPS_Disable(TCPIP_NET_HANDLE hNet)

Description

Disables the DHCP Server for the specified interface.

This function disables the DHCP Server for the specified interface. If it is already disabled, no action is taken.

Precondition

The DHCP Server module must be initialized.

Parameters

ParametersDescription
hNetInterface on which to disable the DHCP Server

Returns

- TCPIP_DHCPS_RES_OK - the call is successful and the DHCP server has been disabled on the selected interface

- < 0 - An error code if DHCP server could not be stopped, wrong interface, etc.

- TCPIP_DHCPS_RES_ACCESS_LOCKED - if access to the DHCP server 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

When the server is disabled, clients will still hold valid leases. The clients should eventually contact the server to renew their leases but this operation will fail if the server is disabled at that time.