dns_cache_lookup — Check to see if the results for a given query are in the DNS cache
dns_cache_cachenode * **dns_cache_lookup** ( | query
); | |
Check to see if the results for a given query are in the DNS cache.
The dns cache query. A pointer to a dns_cache_query struct. For documentation of this data structure see “dns_cache_query”
This function returns a reference to a dns_cache_cachenode if present, or NULL if not present. For documentation of this data structure see “dns_cache_cachenode”.
This function never blocks; it either has the answer in the cache or returns NULL.
If the cachenode is returned, it is the caller's responsibility to release its reference by calling dns_cache_free_node when it has finished using it.
It is legal to call this function in any thread.