syslog-ng source
dnscache.c File Reference
#include "dnscache.h"
#include "messages.h"
#include "timeutils/cache.h"
#include "tls-support.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <iv.h>
#include <iv_list.h>
Include dependency graph for dnscache.c:

Classes

struct  DNSCacheKey
 
struct  DNSCacheEntry
 
struct  DNSCache
 

Macros

#define dns_cache   __slng_tls_deref(dns_cache)
 

Functions

void dns_cache_store_persistent (DNSCache *self, gint family, void *addr, const gchar *hostname)
 
void dns_cache_store_dynamic (DNSCache *self, gint family, void *addr, const gchar *hostname, gboolean positive)
 
gboolean dns_cache_lookup (DNSCache *self, gint family, void *addr, const gchar **hostname, gsize *hostname_len, gboolean *positive)
 
DNSCache * dns_cache_new (const DNSCacheOptions *options)
 
void dns_cache_free (DNSCache *self)
 
void dns_cache_options_defaults (DNSCacheOptions *options)
 
void dns_cache_options_destroy (DNSCacheOptions *options)
 
 G_LOCK_DEFINE_STATIC (unused_dns_caches)
 
gboolean dns_caching_lookup (gint family, void *addr, const gchar **hostname, gsize *hostname_len, gboolean *positive)
 
void dns_caching_store (gint family, void *addr, const gchar *hostname, gboolean positive)
 
void dns_caching_update_options (const DNSCacheOptions *new_options)
 
void dns_caching_thread_init (void)
 
void dns_caching_thread_deinit (void)
 
void dns_caching_global_init (void)
 
void dns_caching_global_deinit (void)
 

Variables

 TLS_BLOCK_START
 
 TLS_BLOCK_END
 

Macro Definition Documentation

◆ dns_cache

#define dns_cache   __slng_tls_deref(dns_cache)

Function Documentation

◆ dns_cache_free()

void dns_cache_free ( DNSCache *  self)

◆ dns_cache_lookup()

gboolean dns_cache_lookup ( DNSCache *  self,
gint  family,
void *  addr,
const gchar **  hostname,
gsize *  hostname_len,
gboolean *  positive 
)

◆ dns_cache_new()

DNSCache* dns_cache_new ( const DNSCacheOptions options)

◆ dns_cache_options_defaults()

void dns_cache_options_defaults ( DNSCacheOptions options)

◆ dns_cache_options_destroy()

void dns_cache_options_destroy ( DNSCacheOptions options)

◆ dns_cache_store_dynamic()

void dns_cache_store_dynamic ( DNSCache *  self,
gint  family,
void *  addr,
const gchar *  hostname,
gboolean  positive 
)

◆ dns_cache_store_persistent()

void dns_cache_store_persistent ( DNSCache *  self,
gint  family,
void *  addr,
const gchar *  hostname 
)

◆ dns_caching_global_deinit()

void dns_caching_global_deinit ( void  )

◆ dns_caching_global_init()

void dns_caching_global_init ( void  )

◆ dns_caching_lookup()

gboolean dns_caching_lookup ( gint  family,
void *  addr,
const gchar **  hostname,
gsize *  hostname_len,
gboolean *  positive 
)

◆ dns_caching_store()

void dns_caching_store ( gint  family,
void *  addr,
const gchar *  hostname,
gboolean  positive 
)

◆ dns_caching_thread_deinit()

void dns_caching_thread_deinit ( void  )

◆ dns_caching_thread_init()

void dns_caching_thread_init ( void  )

◆ dns_caching_update_options()

void dns_caching_update_options ( const DNSCacheOptions new_options)

◆ G_LOCK_DEFINE_STATIC()

G_LOCK_DEFINE_STATIC ( unused_dns_caches  )

Variable Documentation

◆ TLS_BLOCK_END

TLS_BLOCK_END

◆ TLS_BLOCK_START

TLS_BLOCK_START
Initial value:
{
DNSCache *dns_cache
#define dns_cache
Definition: dnscache.c:387