"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/dns/include/dns/log.h" (4 Sep 2020, 4029 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "log.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 /*! \file dns/log.h
   13  */
   14 
   15 #ifndef DNS_LOG_H
   16 #define DNS_LOG_H 1
   17 
   18 #include <isc/lang.h>
   19 #include <isc/log.h>
   20 
   21 LIBDNS_EXTERNAL_DATA extern isc_log_t *       dns_lctx;
   22 LIBDNS_EXTERNAL_DATA extern isc_logcategory_t dns_categories[];
   23 LIBDNS_EXTERNAL_DATA extern isc_logmodule_t   dns_modules[];
   24 
   25 #define DNS_LOGCATEGORY_NOTIFY   (&dns_categories[0])
   26 #define DNS_LOGCATEGORY_DATABASE (&dns_categories[1])
   27 #define DNS_LOGCATEGORY_SECURITY (&dns_categories[2])
   28 /* DNS_LOGCATEGORY_CONFIG superseded by CFG_LOGCATEGORY_CONFIG */
   29 #define DNS_LOGCATEGORY_DNSSEC      (&dns_categories[4])
   30 #define DNS_LOGCATEGORY_RESOLVER    (&dns_categories[5])
   31 #define DNS_LOGCATEGORY_XFER_IN     (&dns_categories[6])
   32 #define DNS_LOGCATEGORY_XFER_OUT    (&dns_categories[7])
   33 #define DNS_LOGCATEGORY_DISPATCH    (&dns_categories[8])
   34 #define DNS_LOGCATEGORY_LAME_SERVERS    (&dns_categories[9])
   35 #define DNS_LOGCATEGORY_DELEGATION_ONLY (&dns_categories[10])
   36 #define DNS_LOGCATEGORY_EDNS_DISABLED   (&dns_categories[11])
   37 #define DNS_LOGCATEGORY_RPZ     (&dns_categories[12])
   38 #define DNS_LOGCATEGORY_RRL     (&dns_categories[13])
   39 #define DNS_LOGCATEGORY_CNAME       (&dns_categories[14])
   40 #define DNS_LOGCATEGORY_SPILL       (&dns_categories[15])
   41 #define DNS_LOGCATEGORY_DNSTAP      (&dns_categories[16])
   42 #define DNS_LOGCATEGORY_ZONELOAD    (&dns_categories[17])
   43 #define DNS_LOGCATEGORY_NSID        (&dns_categories[18])
   44 
   45 /* Backwards compatibility. */
   46 #define DNS_LOGCATEGORY_GENERAL ISC_LOGCATEGORY_GENERAL
   47 
   48 #define DNS_LOGMODULE_DB     (&dns_modules[0])
   49 #define DNS_LOGMODULE_RBTDB  (&dns_modules[1])
   50 #define DNS_LOGMODULE_RBT    (&dns_modules[2])
   51 #define DNS_LOGMODULE_RDATA  (&dns_modules[3])
   52 #define DNS_LOGMODULE_MASTER     (&dns_modules[4])
   53 #define DNS_LOGMODULE_MESSAGE    (&dns_modules[5])
   54 #define DNS_LOGMODULE_CACHE  (&dns_modules[6])
   55 #define DNS_LOGMODULE_CONFIG     (&dns_modules[7])
   56 #define DNS_LOGMODULE_RESOLVER   (&dns_modules[8])
   57 #define DNS_LOGMODULE_ZONE   (&dns_modules[9])
   58 #define DNS_LOGMODULE_JOURNAL    (&dns_modules[10])
   59 #define DNS_LOGMODULE_ADB    (&dns_modules[11])
   60 #define DNS_LOGMODULE_XFER_IN    (&dns_modules[12])
   61 #define DNS_LOGMODULE_XFER_OUT   (&dns_modules[13])
   62 #define DNS_LOGMODULE_ACL    (&dns_modules[14])
   63 #define DNS_LOGMODULE_VALIDATOR  (&dns_modules[15])
   64 #define DNS_LOGMODULE_DISPATCH   (&dns_modules[16])
   65 #define DNS_LOGMODULE_REQUEST    (&dns_modules[17])
   66 #define DNS_LOGMODULE_MASTERDUMP (&dns_modules[18])
   67 #define DNS_LOGMODULE_TSIG   (&dns_modules[19])
   68 #define DNS_LOGMODULE_TKEY   (&dns_modules[20])
   69 #define DNS_LOGMODULE_SDB    (&dns_modules[21])
   70 #define DNS_LOGMODULE_DIFF   (&dns_modules[22])
   71 #define DNS_LOGMODULE_HINTS  (&dns_modules[23])
   72 #define DNS_LOGMODULE_UNUSED1    (&dns_modules[24])
   73 #define DNS_LOGMODULE_DLZ    (&dns_modules[25])
   74 #define DNS_LOGMODULE_DNSSEC     (&dns_modules[26])
   75 #define DNS_LOGMODULE_CRYPTO     (&dns_modules[27])
   76 #define DNS_LOGMODULE_PACKETS    (&dns_modules[28])
   77 #define DNS_LOGMODULE_NTA    (&dns_modules[29])
   78 #define DNS_LOGMODULE_DYNDB  (&dns_modules[30])
   79 #define DNS_LOGMODULE_DNSTAP     (&dns_modules[31])
   80 #define DNS_LOGMODULE_SSU    (&dns_modules[32])
   81 
   82 ISC_LANG_BEGINDECLS
   83 
   84 void
   85 dns_log_init(isc_log_t *lctx);
   86 /*%
   87  * Make the libdns categories and modules available for use with the
   88  * ISC logging library.
   89  *
   90  * Requires:
   91  *\li   lctx is a valid logging context.
   92  *
   93  *\li   dns_log_init() is called only once.
   94  *
   95  * Ensures:
   96  * \li  The categories and modules defined above are available for
   97  *  use by isc_log_usechannnel() and isc_log_write().
   98  */
   99 
  100 void
  101 dns_log_setcontext(isc_log_t *lctx);
  102 /*%
  103  * Make the libdns library use the provided context for logging internal
  104  * messages.
  105  *
  106  * Requires:
  107  *\li   lctx is a valid logging context.
  108  */
  109 
  110 ISC_LANG_ENDDECLS
  111 
  112 #endif /* DNS_LOG_H */