dns_cache_lookup
Name
dns_cache_lookup — Check to see if the results for a given query are in the DNS cache
Synopsis
#include "dns-cache.h"
| dns_cache_cachenode * **dns_cache_lookup** (
| query)
; | |
Description
Check to see if the results for a given query are in the DNS cache.
- query
-
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”.
Note
This function never blocks; it either has the answer in the cache or returns NULL.
Note
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.