TCPIP_DNS_Disable Function
C
bool TCPIP_DNS_Disable(
TCPIP_NET_HANDLE hNet,
bool clearCache
);
Description
This function disables the DNS Client for the specified interface.
Preconditions
The DNS module must be initialized.
Parameters
Parameters | Description |
---|---|
hNet | Interface to disable the DNS Client. |
clearCache | If true, all the existent name entries will be cleared from the cache. |
Returns
True - If successful.
False - If unsuccessful.
Remarks
When the DNS client is disabled on a requested interface the previously solved names will still be part of the cache and will expire when their timeout occurs. If the TTL for a name sent by the DNS server was ignored and another default/arbitrary value was used, then the entry will stay cached until that timeout occurs (i.e. timeout not specified by the DNS server). To avoid this, you can clear the cache by setting the clearCache parameter to true.
If the disabled interface matches the strict interface set by TCPIP_DNS_Enable this function will set the strict interface to 0.
If the disabled interface matches the preferred interface set by TCPIP_DNS_Enable this function will set the preferred interface to 0.