TCPIP_DNSS_EntryAdd Function
C
TCPIP_DNSS_RESULT TCPIP_DNSS_EntryAdd(
const char* name,
IP_ADDRESS_TYPE type,
IP_MULTI_ADDRESS* pAdd,
uint32_t entryTimeout
);
Description
This function is used to add a IPv4 or IPv6 entry. Every time this is used to add either one IPv4 or IPv6 address with respect to the DNS hostname, there will be an expire time for a Host entry. "entryTimeout" parameter is used as the timeout value for this specific entry.
Preconditions
The DNS server must be initialized.
Parameters
Parameters | Description |
---|---|
name | Hostname. |
type | IP_ADDRESS_TYPE_IPV4 or IP_ADDRESS_TYPE_IPV6. |
pAdd | IPv4 or IPv6 address. |
entryTimeout | Time-out value for the entry. |
Returns
TCPIP_DNSS_RES_OK - If entry remove is successful.
TCPIP_DNSS_RES_NO_ENTRY - If Hostname is NULL value and Invalid IP type.
TCPIP_DNSS_RES_MEMORY_FAIL - No Memory is present for IPv4 or IPv6 address type.
TCPIP_DNSS_RES_CACHE_FULL - If there is no space for the new entry.
Remarks
When the DNS server entryTimeout value is 0,it specifies that the entry is a permanent entry. user can remove this entry by using TCPIP_DNSS_CacheEntryRemove(). TTL time for this entry will be the value of TCPIP_DNSS_PERMANENT_ENTRY_TTL_TIME.