TCPIP_DHCPS_Configure Function

C

TCPIP_DHCPS_RES TCPIP_DHCPS_Configure(const TCPIP_DHCPS_INTERFACE_CONFIG* pIfConfig, uint16_t nConfigs);

Description

Configure the DHCP server on multiple interfaces

This function is used to configure the DHCP server at run time for the selected interfaces

Precondition

The DHCP Server module should have been initialized.

Parameters

ParametersDescription
pIfConfigpointer to an array of configuration parameters
nConfigsnumber of configurations in the pIfConfig array

Returns

- TCPIP_DHCPS_RES_OK - if the interfaces were properly configured

- < 0 - if wrong interface or allocation failed, etc.

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

Remarks

The DHCP server for the selected interfaces will be completely reconfigured by this call. All the information about the existing leases will be lost.

Preferrably the call should be done with the DHCP server disabled.

The call will attempt to lock access to the DHCP server DB. During this time, the server will not reply to clients and any received packets are ignored.