Man page - libwget-dns-caching(3)
Packages contains this manual
- libwget-console(3)
- libwget-utils(3)
- libwget-error(3)
- libwget-hash(3)
- libwget-net(3)
- libwget-stringmap(3)
- libwget-xml(3)
- libwget-dns(3)
- libwget-robots(3)
- libwget-base64(3)
- libwget-io(3)
- libwget-parse_sitemap(3)
- libwget-dns-caching(3)
- libwget-printf(3)
- libwget-bitmap(3)
- libwget-vector(3)
- libwget-ip(3)
- libwget-hashmap(3)
- libwget-mem(3)
- libwget-thread(3)
- libwget-parse_atom(3)
- libwget-xalloc(3)
- libwget-random(3)
- libwget-list(3)
apt-get install wget2-dev
Manual
libwget-dns-caching
NAMESYNOPSIS
Data Structures
Functions
Detailed Description
Function Documentation
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_tport, struct addrinfo ** addrinfo)
Author
NAME
libwget-dns-caching - 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
cache Pointer to return newly allocated and initialized wget_dns_cache instance
Returns
WGET_E_SUCCESS if OK, WGET_E_MEMORY if out-of-memory or WGET_E_INVALID if the mutex initialization failed.
Allocates and initializes a wget_dns_cache instance.
void wget_dns_cache_free (wget_dns_cache ** cache)
Parameters
[in/out] cache Pointer to wget_dns_cache instance that will be freed and NULLified.
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
cache
A
wget_dns_cache
instance, created by
wget_dns_cache_init()
.
host
Hostname to look up
port
Port to look up
Returns
The cached addrinfo structure or NULL if not found
int wget_dns_cache_add (wget_dns_cache * cache, const char * host, uint16_tport, struct addrinfo ** addrinfo)
Parameters
cache
A
wget_dns_cache
instance, created by
wget_dns_cache_init()
.
host
Hostname part of the key
port
Port part of the key
[in/out]
addrinfo Addrinfo structure to cache, returns
cached addrinfo
Returns
WGET_E_SUCCESS on success, else a WGET_E_* error value
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.