table of contents
libwget-dns-caching(3) | wget2 | libwget-dns-caching(3) |
NAME¶
libwget-dns-caching
SYNOPSIS¶
Data Structures¶
struct cache_entry
struct wget_dns_cache_st
Functions¶
int wget_dns_cache_init (wget_dns_cache **cache)
void wget_dns_cache_free (wget_dns_cache **cache)
struct addrinfo * wget_dns_cache_get (wget_dns_cache *cache,
const char *host, uint16_t port)
int wget_dns_cache_add (wget_dns_cache *cache, const char *host,
uint16_t port, struct addrinfo **addrinfo)
Detailed Description¶
DNS cache management functions.
Function Documentation¶
int wget_dns_cache_init (wget_dns_cache ** cache)¶
Parameters:
Returns:
Allocates and initializes a wget_dns_cache instance.
void wget_dns_cache_free (wget_dns_cache ** cache)¶
Parameters:
Free the resources allocated by wget_dns_cache_init().
struct addrinfo* wget_dns_cache_get (wget_dns_cache * cache, const char * host, uint16_t port)¶
Parameters:
host Hostname to look up
port Port to look up
Returns:
int wget_dns_cache_add (wget_dns_cache * cache, const char * host, uint16_t port, struct addrinfo ** addrinfo)¶
Parameters:
host Hostname part of the key
port Port part of the key
[in/out] addrinfo Addrinfo structure to cache, returns cached addrinfo
Returns:
This functions adds addrinfo to the given DNS cache cache.
If an entry for [host,port] already exists, addrinfo is free'd and replaced by the cached entry. Do not free addrinfo yourself - this will be done when the whole cache is freed.
Author¶
Generated automatically by Doxygen for wget2 from the source code.
Fri Sep 1 2023 | Version 2.1.0 |