lib.c File Reference

#include <config.h>
#include <stddef.h>
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/msgcat.h>
#include <isc/mutex.h>
#include <isc/once.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/ecdb.h>
#include <dns/lib.h>
#include <dns/result.h>
#include <dst/dst.h>

Go to the source code of this file.

Functions

static void open_msgcat (void)
void dns_lib_initmsgcat (void)
 Initialize the DNS library's message catalog, dns_msgcat, if it has not already been initialized.
static void initialize (void)
isc_result_t dns_lib_init (void)
 A set of initialization procedure used in the DNS library. This function is provided for an application that is not aware of the underlying ISC or DNS libraries much.
void dns_lib_shutdown (void)
 Free temporary resources allocated in dns_lib_init().

Variables

LIBDNS_EXTERNAL_DATA unsigned int dns_pps = 0U
 Tuning: external query load in packets per seconds.
LIBDNS_EXTERNAL_DATA isc_msgcat_tdns_msgcat = NULL
static isc_once_t msgcat_once = ISC_ONCE_INIT
static isc_once_t init_once = ISC_ONCE_INIT
static isc_mem_tdns_g_mctx = NULL
static dns_dbimplementation_tdbimp = NULL
static isc_boolean_t initialize_done = ISC_FALSE
static isc_mutex_t reflock
static unsigned int references = 0


Detailed Description

Definition in file lib.c.


Function Documentation

static void open_msgcat ( void   )  [static]

Definition at line 61 of file lib.c.

References dns_msgcat, and isc_msgcat_open().

void dns_lib_initmsgcat ( void   ) 

Initialize the DNS library's message catalog, dns_msgcat, if it has not already been initialized.

Definition at line 66 of file lib.c.

References isc_once_do, ISC_R_SUCCESS, msgcat_once, open_msgcat(), and RUNTIME_CHECK.

Referenced by initialize().

static void initialize ( void   )  [static]

Definition at line 84 of file lib.c.

References dns_ecdb_register(), dns_ecdb_unregister(), DNS_NAME_MAXWIRE, dns_result_register(), dst_lib_destroy(), dst_lib_init(), initialize_done, ISC_FALSE, isc_hash_create(), isc_hash_destroy(), isc_mem_create(), isc_mem_detach(), isc_mutex_init, ISC_R_SUCCESS, ISC_TRUE, reflock, and REQUIRE.

isc_result_t dns_lib_init ( void   ) 

A set of initialization procedure used in the DNS library. This function is provided for an application that is not aware of the underlying ISC or DNS libraries much.

Definition at line 124 of file lib.c.

References init_once, initialize(), initialize_done, isc_once_do, ISC_R_FAILURE, ISC_R_SUCCESS, LOCK, references, reflock, and UNLOCK.

void dns_lib_shutdown ( void   ) 

Free temporary resources allocated in dns_lib_init().

Definition at line 147 of file lib.c.

References dns_ecdb_unregister(), dst_lib_destroy(), ISC_FALSE, isc_hash_destroy(), isc_mem_detach(), ISC_TRUE, LOCK, references, reflock, and UNLOCK.


Variable Documentation

LIBDNS_EXTERNAL_DATA unsigned int dns_pps = 0U

Tuning: external query load in packets per seconds.

Definition at line 45 of file lib.c.

Referenced by adjust_quantum(), dumptostreaminc(), and pps_timer_tick().

LIBDNS_EXTERNAL_DATA isc_msgcat_t* dns_msgcat = NULL

Definition at line 46 of file lib.c.

Referenced by initialize_action(), and open_msgcat().

isc_once_t msgcat_once = ISC_ONCE_INIT [static]

Definition at line 53 of file lib.c.

isc_once_t init_once = ISC_ONCE_INIT [static]

Definition at line 76 of file lib.c.

Referenced by dns_lib_init().

isc_mem_t* dns_g_mctx = NULL [static]

Definition at line 77 of file lib.c.

dns_dbimplementation_t* dbimp = NULL [static]

Definition at line 78 of file lib.c.

isc_boolean_t initialize_done = ISC_FALSE [static]

Definition at line 79 of file lib.c.

Referenced by dns_lib_init(), and initialize().

isc_mutex_t reflock [static]

Definition at line 80 of file lib.c.

Referenced by dns_lib_init(), dns_lib_shutdown(), initialize(), and ISC_LIST().

unsigned int references = 0 [static]

Definition at line 81 of file lib.c.

Referenced by dns_lib_init(), dns_lib_shutdown(), dns_tsigkeyring_detach(), dns_tsigkeyring_dumpanddetach(), and ISC_LIST().


Generated on Tue Apr 28 17:41:18 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha