home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / dns / log.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-09-17  |  3.8 KB  |  107 lines

  1. /*
  2.  * Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
  3.  * Copyright (C) 1999-2001, 2003  Internet Software Consortium.
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software for any
  6.  * purpose with or without fee is hereby granted, provided that the above
  7.  * copyright notice and this permission notice appear in all copies.
  8.  *
  9.  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  10.  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  11.  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  12.  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  13.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  14.  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15.  * PERFORMANCE OF THIS SOFTWARE.
  16.  */
  17.  
  18. /* $Id: log.h,v 1.33.18.4 2005/09/05 00:18:27 marka Exp $ */
  19.  
  20. /*! \file
  21.  * \author  Principal Authors: DCL */
  22.  
  23. #ifndef DNS_LOG_H
  24. #define DNS_LOG_H 1
  25.  
  26. #include <isc/lang.h>
  27. #include <isc/log.h>
  28.  
  29. LIBDNS_EXTERNAL_DATA extern isc_log_t *dns_lctx;
  30. LIBDNS_EXTERNAL_DATA extern isc_logcategory_t dns_categories[];
  31. LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
  32.  
  33. #define DNS_LOGCATEGORY_NOTIFY        (&dns_categories[0])
  34. #define DNS_LOGCATEGORY_DATABASE    (&dns_categories[1])
  35. #define DNS_LOGCATEGORY_SECURITY    (&dns_categories[2])
  36. /* DNS_LOGCATEGORY_CONFIG superseded by CFG_LOGCATEGORY_CONFIG */
  37. #define DNS_LOGCATEGORY_DNSSEC        (&dns_categories[4])
  38. #define DNS_LOGCATEGORY_RESOLVER    (&dns_categories[5])
  39. #define DNS_LOGCATEGORY_XFER_IN        (&dns_categories[6])
  40. #define DNS_LOGCATEGORY_XFER_OUT    (&dns_categories[7])
  41. #define DNS_LOGCATEGORY_DISPATCH    (&dns_categories[8])
  42. #define DNS_LOGCATEGORY_LAME_SERVERS    (&dns_categories[9])
  43. #define DNS_LOGCATEGORY_DELEGATION_ONLY    (&dns_categories[10])
  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_RBTDB64        (&dns_modules[2])
  51. #define DNS_LOGMODULE_RBT        (&dns_modules[3])
  52. #define DNS_LOGMODULE_RDATA        (&dns_modules[4])
  53. #define DNS_LOGMODULE_MASTER        (&dns_modules[5])
  54. #define DNS_LOGMODULE_MESSAGE        (&dns_modules[6])
  55. #define DNS_LOGMODULE_CACHE        (&dns_modules[7])
  56. #define DNS_LOGMODULE_CONFIG        (&dns_modules[8])
  57. #define DNS_LOGMODULE_RESOLVER        (&dns_modules[9])
  58. #define DNS_LOGMODULE_ZONE        (&dns_modules[10])
  59. #define DNS_LOGMODULE_JOURNAL        (&dns_modules[11])
  60. #define DNS_LOGMODULE_ADB        (&dns_modules[12])
  61. #define DNS_LOGMODULE_XFER_IN        (&dns_modules[13])
  62. #define DNS_LOGMODULE_XFER_OUT        (&dns_modules[14])
  63. #define DNS_LOGMODULE_ACL        (&dns_modules[15])
  64. #define DNS_LOGMODULE_VALIDATOR        (&dns_modules[16])
  65. #define DNS_LOGMODULE_DISPATCH        (&dns_modules[17])
  66. #define DNS_LOGMODULE_REQUEST        (&dns_modules[18])
  67. #define DNS_LOGMODULE_MASTERDUMP    (&dns_modules[19])
  68. #define DNS_LOGMODULE_TSIG        (&dns_modules[20])
  69. #define DNS_LOGMODULE_TKEY        (&dns_modules[21])
  70. #define DNS_LOGMODULE_SDB        (&dns_modules[22])
  71. #define DNS_LOGMODULE_DIFF        (&dns_modules[23])
  72. #define DNS_LOGMODULE_HINTS        (&dns_modules[24])
  73. #define DNS_LOGMODULE_ACACHE        (&dns_modules[25])
  74. #define DNS_LOGMODULE_DLZ        (&dns_modules[26])
  75.  
  76. ISC_LANG_BEGINDECLS
  77.  
  78. void
  79. dns_log_init(isc_log_t *lctx);
  80. /*%
  81.  * Make the libdns categories and modules available for use with the
  82.  * ISC logging library.
  83.  *
  84.  * Requires:
  85.  *\li    lctx is a valid logging context.
  86.  *
  87.  *\li    dns_log_init() is called only once.
  88.  *
  89.  * Ensures:
  90.  * \li    The catgories and modules defined above are available for
  91.  *     use by isc_log_usechannnel() and isc_log_write().
  92.  */
  93.  
  94. void
  95. dns_log_setcontext(isc_log_t *lctx);
  96. /*%
  97.  * Make the libdns library use the provided context for logging internal
  98.  * messages.
  99.  *
  100.  * Requires:
  101.  *\li    lctx is a valid logging context.
  102.  */
  103.  
  104. ISC_LANG_ENDDECLS
  105.  
  106. #endif /* DNS_LOG_H */
  107.