/* define if the compiler supports __builtin_unreachable(). */
#undef HAVE_BUILTIN_UNREACHABLE
-/* Define to 1 if you have the `catgets' function. */
-#undef HAVE_CATGETS
-
/* Define to 1 if you have the `chroot' function. */
#undef HAVE_CHROOT
/* define on Solaris to get sigwait() to work using pthreads semantics */
/* #undef _POSIX_PTHREAD_SEMANTICS */
-/* define if catgets() is available */
-/* #undef HAVE_CATGETS */
-
/* define if you need to #define _XPG4_2 before including sys/socket.h */
/* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
-#
-# NLS
-#
-for ac_func in catgets
-do :
- ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
-if test "x$ac_cv_func_catgets" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_CATGETS 1
-_ACEOF
-
-fi
-done
-
-
#
# -lxnet buys us one big porting headache... standards, gotta love 'em.
#
# elsewhere if there's a good reason for doing so.
#
-ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/unittest.sh fuzz/Makefile"
+ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/unittest.sh fuzz/Makefile"
#
"lib/isc/include/pk11/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/pk11/Makefile" ;;
"lib/isc/include/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/pkcs11/Makefile" ;;
"lib/isc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/tests/Makefile" ;;
- "lib/isc/nls/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/nls/Makefile" ;;
"lib/isc/unix/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/Makefile" ;;
"lib/isc/unix/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/Makefile" ;;
"lib/isc/unix/include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/isc/Makefile" ;;
AC_SUBST(MKDEPCFLAGS)
AC_SUBST(MKDEPPROG)
-#
-# NLS
-#
-AC_CHECK_FUNCS([catgets])
-
#
# -lxnet buys us one big porting headache... standards, gotta love 'em.
#
lib/isc/include/pk11/Makefile
lib/isc/include/pkcs11/Makefile
lib/isc/tests/Makefile
- lib/isc/nls/Makefile
lib/isc/unix/Makefile
lib/isc/unix/include/Makefile
lib/isc/unix/include/isc/Makefile
#include <isc/log.h>
#include <isc/lib.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/msgcat.h>
#include <isc/region.h>
#include <isc/result.h>
#include <isc/types.h>
return ISC_R_FAILURE; /* database path must be given */
if (db_create((DB **)dbdata, NULL, 0) != 0) {
- /*
- * XXX Should use dns_msgcat et al
- * but seems to be unavailable.
- */
- isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL, isc_msgcat,
- ISC_MSGSET_GENERAL, ISC_MSG_FATALERROR,
- "db_create");
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
+ "db_create");
return ISC_R_FAILURE;
}
if (isc_file_exists(*argv) != true) {
- isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL, isc_msgcat,
- ISC_MSGSET_GENERAL, ISC_MSG_FATALERROR,
- "isc_file_exists: %s", *argv);
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
+ "isc_file_exists: %s", *argv);
return ISC_R_FAILURE;
}
if ((ret = (*(DB **)dbdata)->open(*(DB **)dbdata, *argv, NULL, DB_HASH,
DB_RDONLY, 0)) != 0) {
- isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
- isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FATALERROR, "DB->open: %s",
- db_strerror(ret));
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
+ "DB->open: %s",
+ db_strerror(ret));
return ISC_R_FAILURE;
}
return ISC_R_SUCCESS;
#endif /* DNS_CLIENTINFO_VERSION */
if ((ret = ((DB *)dbdata)->cursor((DB *)dbdata, NULL, &c, 0)) != 0) {
- isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "DB->cursor: %s",
- db_strerror(ret));
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+ "DB->cursor: %s",
+ db_strerror(ret));
return ISC_R_FAILURE;
}
rdata = type + strlen(type) + 1;
if (dns_sdb_putrr(l, type, ttl, rdata) != ISC_R_SUCCESS) {
- isc_log_iwrite(dns_lctx,
- DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "dns_sdb_putrr");
+ isc_log_write(dns_lctx,
+ DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+ "dns_sdb_putrr");
return ISC_R_FAILURE;
}
ret = c->c_get(c, &key, &data, DB_NEXT_DUP);
UNUSED(zone);
if ((ret = ((DB *)dbdata)->cursor((DB *)dbdata, NULL, &c, 0)) != 0) {
- isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "DB->cursor: %s",
- db_strerror(ret));
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+ "DB->cursor: %s",
+ db_strerror(ret));
return ISC_R_FAILURE;
}
if (dns_sdb_putnamedrr(n, key.data, type, ttl, rdata) !=
ISC_R_SUCCESS) {
- isc_log_iwrite(dns_lctx,
- DNS_LOGCATEGORY_DATABASE,
- DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "dns_sdb_putnamedrr");
+ isc_log_write(dns_lctx,
+ DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+ "dns_sdb_putnamedrr");
return ISC_R_FAILURE;
}
# Alphabetically
DSTOBJS = @DST_EXTRA_OBJS@ \
- dst_api.@O@ dst_lib.@O@ dst_parse.@O@ dst_result.@O@ \
+ dst_api.@O@ dst_parse.@O@ dst_result.@O@ \
gssapi_link.@O@ gssapictx.@O@ hmac_link.@O@ \
openssl_link.@O@ openssldh_link.@O@ \
opensslecdsa_link.@O@ openssleddsa_link.@O@ opensslrsa_link.@O@ \
${PORTDNSOBJS} @GEOIPLINKOBJS@
DSTSRCS = @DST_EXTRA_SRCS@ @PKCS11LINKSRCS@ \
- dst_api.c dst_lib.c dst_parse.c \
+ dst_api.c dst_parse.c \
dst_result.c gssapi_link.c gssapictx.c hmac_link.c \
openssl_link.c openssldh_link.c \
opensslecdsa_link.c openssleddsa_link.c opensslrsa_link.c \
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/once.h>
-#include <isc/msgcat.h>
-#include <isc/util.h>
-
-#include <dst/lib.h>
-
-/***
- *** Globals
- ***/
-
-LIBDNS_EXTERNAL_DATA isc_msgcat_t * dst_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t msgcat_once = ISC_ONCE_INIT;
-
-
-/***
- *** Functions
- ***/
-
-static void
-open_msgcat(void) {
- isc_msgcat_open("libdst.cat", &dst_msgcat);
-}
-
-void
-dst_lib_initmsgcat(void) {
-
- /*
- * Initialize the DST library's message catalog, dst_msgcat, if it
- * has not already been initialized.
- */
-
- RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
#include <isc/util.h>
#include <dst/result.h>
-#include <dst/lib.h>
static const char *text[DST_R_NRESULTS] = {
"algorithm is unsupported", /*%< 0 */
isc_result_t result;
result = isc_result_register(ISC_RESULTCLASS_DST, DST_R_NRESULTS,
- text, dst_msgcat, DST_RESULT_RESULTSET);
+ text, DST_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_register() failed: %u", result);
result = isc_result_registerids(ISC_RESULTCLASS_DST, DST_R_NRESULTS,
- ids, dst_msgcat, DST_RESULT_RESULTSET);
+ ids, DST_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_registerids() failed: %u", result);
static void
initialize(void) {
- dst_lib_initmsgcat();
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
}
* Tuning: external query load in packets per seconds.
*/
LIBDNS_EXTERNAL_DATA extern unsigned int dns_pps;
-LIBDNS_EXTERNAL_DATA extern isc_msgcat_t *dns_msgcat;
-
-void
-dns_lib_initmsgcat(void);
-/*%<
- * Initialize the DNS library's message catalog, dns_msgcat, if it
- * has not already been initialized.
- */
isc_result_t
dns_lib_init(void);
VERSION=@BIND9_VERSION@
-HEADERS = dst.h gssapi.h lib.h result.h
+HEADERS = dst.h gssapi.h result.h
SUBDIRS =
TARGETS =
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef DST_LIB_H
-#define DST_LIB_H 1
-
-/*! \file dst/lib.h */
-
-#include <isc/types.h>
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-LIBDNS_EXTERNAL_DATA extern isc_msgcat_t *dst_msgcat;
-
-void
-dst_lib_initmsgcat(void);
-/*
- * Initialize the DST library's message catalog, dst_msgcat, if it
- * has not already been initialized.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* DST_LIB_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>
***/
LIBDNS_EXTERNAL_DATA unsigned int dns_pps = 0U;
-LIBDNS_EXTERNAL_DATA isc_msgcat_t * dns_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t msgcat_once = ISC_ONCE_INIT;
/***
*** Functions
***/
-static void
-open_msgcat(void) {
- isc_msgcat_open("libdns.cat", &dns_msgcat);
-}
-
-void
-dns_lib_initmsgcat(void) {
-
- /*
- * Initialize the DNS library's message catalog, dns_msgcat, if it
- * has not already been initialized.
- */
-
- RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
-
static isc_once_t init_once = ISC_ONCE_INIT;
static isc_mem_t *dns_g_mctx = NULL;
static dns_dbimplementation_t *dbimp = NULL;
isc_result_t result;
result = isc_result_register(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS,
- text, dns_msgcat, DNS_RESULT_RESULTSET);
+ text, DNS_RESULT_RESULTSET);
if (result == ISC_R_SUCCESS)
result = isc_result_register(ISC_RESULTCLASS_DNSRCODE,
DNS_R_NRCODERESULTS,
- rcode_text, dns_msgcat,
+ rcode_text,
DNS_RESULT_RCODERESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_register() failed: %u", result);
result = isc_result_registerids(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS,
- ids, dns_msgcat, DNS_RESULT_RESULTSET);
+ ids, DNS_RESULT_RESULTSET);
if (result == ISC_R_SUCCESS)
result = isc_result_registerids(ISC_RESULTCLASS_DNSRCODE,
DNS_R_NRCODERESULTS,
- rcode_ids, dns_msgcat,
+ rcode_ids,
DNS_RESULT_RCODERESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
static void
initialize(void) {
- dns_lib_initmsgcat();
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
}
#include <isc/result.h>
#include <isc/serial.h>
#include <isc/stdtime.h>
-#include <isc/msgcat.h>
#include <isc/string.h>
#include <isc/util.h>
dns_keytable_nextkeynode
dns_keytable_totext
dns_lib_init
-dns_lib_initmsgcat
dns_lib_shutdown
dns_loadctx_attach
dns_loadctx_cancel
dst_key_unsettime
dst_lib_destroy
dst_lib_init
-dst_lib_initmsgcat
dst_region_computeid
dst_region_computerid
dst_result_register
dns_pps DATA
dns_master_style_full DATA
-dns_msgcat DATA
dns_tsig_hmacmd5_name DATA
dns_zone_mkey_day DATA
dns_zone_mkey_hour DATA
dns_zone_mkey_month DATA
-dst_msgcat DATA
@END NOLONGER
<ClCompile Include="..\dst_api.c">
<Filter>Dst Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\dst_lib.c">
- <Filter>Dst Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\dst_parse.c">
<Filter>Dst Source Files</Filter>
</ClCompile>
<ClInclude Include="..\include\dst\gssapi.h">
<Filter>Dst Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\include\dst\lib.h">
- <Filter>Dst Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\include\dst\result.h">
<Filter>Dst Header Files</Filter>
</ClInclude>
<ClCompile Include="..\dnssec.c" />
<ClCompile Include="..\ds.c" />
<ClCompile Include="..\dst_api.c" />
- <ClCompile Include="..\dst_lib.c" />
<ClCompile Include="..\dst_parse.c" />
<ClCompile Include="..\dst_result.c" />
<ClCompile Include="..\dyndb.c" />
<ClInclude Include="..\include\dns\zt.h" />
<ClInclude Include="..\include\dst\dst.h" />
<ClInclude Include="..\include\dst\gssapi.h" />
- <ClInclude Include="..\include\dst\lib.h" />
<ClInclude Include="..\include\dst\result.h" />
<ClInclude Include="..\rbtdb.h" />
<ClInclude Include="..\rdatalist_p.h" />
unix/stdio.@O@ unix/stdtime.@O@ \
unix/syslog.@O@ unix/time.@O@
-NLSOBJS = nls/msgcat.@O@
-
THREADOBJS = pthreads/condition.@O@ pthreads/mutex.@O@ pthreads/thread.@O@
WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/errno.@O@ \
serial.@O@ sockaddr.@O@ stats.@O@ \
string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
tm.@O@ timer.@O@ version.@O@ \
- ${UNIXOBJS} ${NLSOBJS} ${THREADOBJS}
+ ${UNIXOBJS} ${THREADOBJS}
SYMTBLOBJS = backtrace-emptytbl.@O@
# Alphabetically
# Attempt to disable parallel processing.
.NOTPARALLEL:
.NO_PARALLEL:
-SUBDIRS = include unix nls pthreads
+SUBDIRS = include unix pthreads
TARGETS = timestamp
TESTDIRS = @UNITTESTS@
#include <isc/assertions.h>
#include <isc/backtrace.h>
-#include <isc/msgs.h>
#include <isc/print.h>
#include <isc/result.h>
isc_result_t result;
result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
- if (result == ISC_R_SUCCESS && nframes > 0)
- logsuffix = ", back trace";
+ if (result == ISC_R_SUCCESS && nframes > 0) {
+ logsuffix = ", back trace";
+ }
+
+ fprintf(stderr, "%s:%d: %s(%s) failed%s\n",
+ file, line, isc_assertion_typetotext(type), cond, logsuffix);
- fprintf(stderr, "%s:%d: %s(%s) %s%s\n",
- file, line, isc_assertion_typetotext(type), cond,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"), logsuffix);
if (result == ISC_R_SUCCESS) {
for (i = 0; i < nframes; i++) {
unsigned long offset;
#include <isc/commandline.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
isc_commandline_index++;
if (isc_commandline_errprint && *options != ':')
- fprintf(stderr, "%s: %s -- %c\n",
+ fprintf(stderr, "%s: illegal option -- %c\n",
isc_commandline_progname,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_COMMANDLINE,
- ISC_MSG_ILLEGALOPT,
- "illegal option"),
isc_commandline_option);
return (BADOPT);
return (BADARG);
if (isc_commandline_errprint)
- fprintf(stderr, "%s: %s -- %c\n",
+ fprintf(stderr, "%s: option requires an argument -- %c\n",
isc_commandline_progname,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_COMMANDLINE,
- ISC_MSG_OPTNEEDARG,
- "option requires "
- "an argument"),
isc_commandline_option);
return (BADOPT);
#include <stdlib.h>
#include <isc/error.h>
-#include <isc/msgs.h>
#include <isc/print.h>
/*% Default unexpected callback. */
void
isc_error_runtimecheck(const char *file, int line, const char *expression) {
- isc_error_fatal(file, line, "RUNTIME_CHECK(%s) %s", expression,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ isc_error_fatal(file, line, "RUNTIME_CHECK(%s) failed", expression);
}
static void
default_fatal_callback(const char *file, int line, const char *format,
va_list args)
{
- fprintf(stderr, "%s:%d: %s: ", file, line,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FATALERROR, "fatal error"));
+ fprintf(stderr, "%s:%d: fatal error: ", file, line);
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
fflush(stderr);
hash.h heap.h hex.h hmac.h ht.h httpd.h \
interfaceiter.h iterated_hash.h \
json.h lang.h lex.h lfsr.h lib.h likely.h list.h log.h \
- magic.h md.h mem.h meminfo.h msgcat.h msgs.h mutexblock.h \
+ magic.h md.h mem.h meminfo.h mutexblock.h \
netaddr.h netscope.h nonce.h os.h parseint.h \
pool.h portset.h print.h queue.h quota.h \
radix.h random.h ratelimiter.h refcount.h regex.h \
ISC_LANG_BEGINDECLS
-LIBISC_EXTERNAL_DATA extern isc_msgcat_t *isc_msgcat;
-
-void
-isc_lib_initmsgcat(void);
-/*!<
- * \brief Initialize the ISC library's message catalog, isc_msgcat, if it
- * has not already been initialized.
- */
-
void
isc_lib_register(void);
/*!<
* Write a message to the log channels.
*
* Notes:
- *\li Log messages containing natural language text should be logged with
- * isc_log_iwrite() to allow for localization.
- *
*\li lctx can be NULL; this is allowed so that programs which use
* libraries that use the ISC logging system are not required to
* also use it.
ISC_FORMAT_PRINTF(5, 0);
-/*%
- * These are four internationalized versions of the isc_log_[v]write[1]
- * functions.
- *
- * The only difference is that they take arguments for a message
- * catalog, message set, and message number, all immediately preceding the
- * format argument. The format argument becomes the default text, a la
- * isc_msgcat_get. If the message catalog is NULL, no lookup is attempted
- * for a message -- which makes the message set and message number irrelevant,
- * and the non-internationalized call should have probably been used instead.
- *
- * Yes, that means there are now *eight* interfaces to logging a message.
- * Sheesh. Make the madness stop!
- */
-/*@{*/
-void
-isc_log_iwrite(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *format, ...)
-ISC_FORMAT_PRINTF(8, 9);
-
-void
-isc_log_ivwrite(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *format, va_list args)
-ISC_FORMAT_PRINTF(8, 0);
-
-void
-isc_log_iwrite1(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *format, ...)
-ISC_FORMAT_PRINTF(8, 9);
-
-void
-isc_log_ivwrite1(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *format, va_list args)
-ISC_FORMAT_PRINTF(8, 0);
-/*@}*/
-
void
isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
/*%<
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef ISC_MSGCAT_H
-#define ISC_MSGCAT_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/msgcat.h
- * \brief The ISC Message Catalog
- * aids internationalization of applications by allowing
- * messages to be retrieved from locale-specific files instead of
- * hardwiring them into the application. This allows translations of
- * messages appropriate to the locale to be supplied without recompiling
- * the application.
- *
- * Notes:
- *\li It's very important that message catalogs work, even if only the
- * default_text can be used.
- *
- * MP:
- *\li The caller must ensure appropriate synchronization of
- * isc_msgcat_open() and isc_msgcat_close(). isc_msgcat_get()
- * ensures appropriate synchronization.
- *
- * Reliability:
- *\li No anticipated impact.
- *
- * Resources:
- *\li TBS
- *
- * \li Security:
- * No anticipated impact.
- *
- * \li Standards:
- * None.
- */
-
-/*****
- ***** Imports
- *****/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/*****
- ***** Methods
- *****/
-
-void
-isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp);
-/*%<
- * Open a message catalog.
- *
- * Notes:
- *
- *\li If memory cannot be allocated or other failures occur, *msgcatp
- * will be set to NULL. If a NULL msgcat is given to isc_msgcat_get(),
- * the default_text will be returned, ensuring that some message text
- * will be available, no matter what's going wrong.
- *
- * Requires:
- *
- *\li 'name' is a valid string.
- *
- *\li msgcatp != NULL && *msgcatp == NULL
- */
-
-void
-isc_msgcat_close(isc_msgcat_t **msgcatp);
-/*%<
- * Close a message catalog.
- *
- * Notes:
- *
- *\li Any string pointers returned by prior calls to isc_msgcat_get() are
- * invalid after isc_msgcat_close() has been called and must not be
- * used.
- *
- * Requires:
- *
- *\li *msgcatp is a valid message catalog or is NULL.
- *
- * Ensures:
- *
- *\li All resources associated with the message catalog are released.
- *
- *\li *msgcatp == NULL
- */
-
-const char *
-isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
- const char *default_text);
-/*%<
- * Get message 'message' from message set 'set' in 'msgcat'. If it
- * is not available, use 'default_text'.
- *
- * Requires:
- *
- *\li 'msgcat' is a valid message catalog or is NULL.
- *
- *\li set > 0
- *
- *\li message > 0
- *
- *\li 'default_text' is a valid string.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_MSGCAT_H */
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef ISC_MSGS_H
-#define ISC_MSGS_H 1
-
-/*! \file isc/msgs.h */
-
-#include <isc/lib.h> /* Provide isc_msgcat global variable. */
-#include <isc/msgcat.h> /* Provide isc_msgcat_*() functions. */
-
-/*@{*/
-/*!
- * \brief Message sets, named per source file, excepting "GENERAL".
- *
- * IMPORTANT: The original list is alphabetical, but any new sets must
- * be added to the end.
- */
-#define ISC_MSGSET_GENERAL 1
-/* ISC_RESULT_RESULTSET 2 */ /* XXX */
-/* ISC_RESULT_UNAVAILABLESET 3 */ /* XXX */
-#define ISC_MSGSET_APP 4
-#define ISC_MSGSET_COMMANDLINE 5
-#define ISC_MSGSET_ENTROPY 6
-#define ISC_MSGSET_IFITERIOCTL 7
-#define ISC_MSGSET_IFITERSYSCTL 8
-#define ISC_MSGSET_LEX 9
-#define ISC_MSGSET_LOG 10
-#define ISC_MSGSET_MEM 11
-#define ISC_MSGSET_NETADDR 12
-#define ISC_MSGSET_PRINT 13
-#define ISC_MSGSET_RESULT 14
-#define ISC_MSGSET_RWLOCK 15
-#define ISC_MSGSET_SOCKADDR 16
-#define ISC_MSGSET_SOCKET 17
-#define ISC_MSGSET_TASK 18
-#define ISC_MSGSET_TIMER 19
-#define ISC_MSGSET_UTIL 20
-#define ISC_MSGSET_IFITERGETIFADDRS 21
-/*@}*/
-
-/*@{*/
-/*!
- * Message numbers
- * are only required to be unique per message set,
- * but are unique throughout the entire catalog to not be as confusing when
- * debugging.
- *
- * The initial numbering was done by multiply by 100 the set number the
- * message appears in then adding the incremental message number.
- */
-#define ISC_MSG_FAILED 101 /*%< "failed" */
-#define ISC_MSG_SUCCEEDED 102 /*%< Compatible with "failed" */
-#define ISC_MSG_SUCCESS 103 /*%< More usual way to say "success" */
-#define ISC_MSG_STARTING 104 /*%< As in "daemon: starting" */
-#define ISC_MSG_STOPING 105 /*%< As in "daemon: stopping" */
-#define ISC_MSG_ENTERING 106 /*%< As in "some_subr: entering" */
-#define ISC_MSG_EXITING 107 /*%< As in "some_subr: exiting" */
-#define ISC_MSG_CALLING 108 /*%< As in "calling some_subr()" */
-#define ISC_MSG_RETURNED 109 /*%< As in "some_subr: returned <foo>" */
-#define ISC_MSG_FATALERROR 110 /*%< "fatal error" */
-#define ISC_MSG_SHUTTINGDOWN 111 /*%< "shutting down" */
-#define ISC_MSG_RUNNING 112 /*%< "running" */
-#define ISC_MSG_WAIT 113 /*%< "wait" */
-#define ISC_MSG_WAITUNTIL 114 /*%< "waituntil" */
-
-#define ISC_MSG_SIGNALSETUP 201 /*%< "handle_signal() %d setup: %s" */
-
-#define ISC_MSG_ILLEGALOPT 301 /*%< "illegal option" */
-#define ISC_MSG_OPTNEEDARG 302 /*%< "option requires an argument" */
-
-#define ISC_MSG_ENTROPYSTATS 401 /*%< "Entropy pool %p: refcnt %u ..." */
-
-#define ISC_MSG_MAKESCANSOCKET 501 /*%< "making interface scan socket: %s" */
-#define ISC_MSG_GETIFCONFIG 502 /*%< "get interface configuration: %s" */
-#define ISC_MSG_BUFFERMAX 503 /*%< "... maximum buffer size exceeded" */
-#define ISC_MSG_GETDESTADDR 504 /*%< "%s: getting destination address: %s" */
-#define ISC_MSG_GETNETMASK 505 /*%< "%s: getting netmask: %s" */
-
-#define ISC_MSG_GETIFLISTSIZE 601 /*%< "getting interface list size: ..." */
-#define ISC_MSG_GETIFLIST 602 /*%< "getting interface list: ..." */
-#define ISC_MSG_UNEXPECTEDTYPE 603 /*%< "... unexpected ... message type" */
-
-#define ISC_MSG_UNEXPECTEDSTATE 701 /*%< "Unexpected state %d" */
-
-#define ISC_MSG_BADTIME 801 /*%< "Bad 00 99:99:99.999 " */
-#define ISC_MSG_LEVEL 802 /*%< "level %d: " */
-
-#define ISC_MSG_ADDTRACE 901 /*%< "add %p size %u " */
-#define ISC_MSG_DELTRACE 902 /*%< "del %p size %u " */
-#define ISC_MSG_POOLSTATS 903 /*%< "[Pool statistics]\n" */
-#define ISC_MSG_POOLNAME 904 /*%< "name" */
-#define ISC_MSG_POOLSIZE 905 /*%< "size" */
-#define ISC_MSG_POOLMAXALLOC 906 /*%< "maxalloc" */
-#define ISC_MSG_POOLALLOCATED 907 /*%< "allocated" */
-#define ISC_MSG_POOLFREECOUNT 908 /*%< "freecount" */
-#define ISC_MSG_POOLFREEMAX 909 /*%< "freemax" */
-#define ISC_MSG_POOLFILLCOUNT 910 /*%< "fillcount" */
-#define ISC_MSG_POOLGETS 911 /*%< "gets" */
-#define ISC_MSG_DUMPALLOC 912 /*%< "DUMP OF ALL OUTSTANDING MEMORY ..." */
-#define ISC_MSG_NONE 913 /*%< "\tNone.\n" */
-#define ISC_MSG_PTRFILELINE 914 /*%< "\tptr %p file %s line %u\n" */
-
-#define ISC_MSG_UNKNOWNADDR 1001 /*%< "<unknown address, family %u>" */
-
-#define ISC_MSG_NOLONGDBL 1104 /*%< "long doubles are not supported" */
-
-#define ISC_MSG_PRINTLOCK 1201 /*%< "rwlock %p thread %lu ..." */
-#define ISC_MSG_READ 1202 /*%< "read" */
-#define ISC_MSG_WRITE 1203 /*%< "write" */
-#define ISC_MSG_READING 1204 /*%< "reading" */
-#define ISC_MSG_WRITING 1205 /*%< "writing" */
-#define ISC_MSG_PRELOCK 1206 /*%< "prelock" */
-#define ISC_MSG_POSTLOCK 1207 /*%< "postlock" */
-#define ISC_MSG_PREUNLOCK 1208 /*%< "preunlock" */
-#define ISC_MSG_POSTUNLOCK 1209 /*%< "postunlock" */
-#define ISC_MSG_PRINTLOCK2 1210 /*%< "rwlock %p thread %lu ..." w/ atomic */
-
-#define ISC_MSG_UNKNOWNFAMILY 1301 /*%< "unknown address family: %d" */
-
-#define ISC_MSG_WRITEFAILED 1401 /*%< "write() failed during watcher ..." */
-#define ISC_MSG_READFAILED 1402 /*%< "read() failed during watcher ... " */
-#define ISC_MSG_PROCESSCMSG 1403 /*%< "processing cmsg %p" */
-#define ISC_MSG_IFRECEIVED 1404 /*%< "interface received on ifindex %u" */
-#define ISC_MSG_SENDTODATA 1405 /*%< "sendto pktinfo data, ifindex %u" */
-#define ISC_MSG_DOIORECV 1406 /*%< "doio_recv: recvmsg(%d) %d bytes ..." */
-#define ISC_MSG_PKTRECV 1407 /*%< "packet received correctly" */
-#define ISC_MSG_DESTROYING 1408 /*%< "destroying" */
-#define ISC_MSG_CREATED 1409 /*%< "created" */
-#define ISC_MSG_ACCEPTLOCK 1410 /*%< "internal_accept called, locked ..." */
-#define ISC_MSG_ACCEPTEDCXN 1411 /*%< "accepted connection, new socket %p" */
-#define ISC_MSG_INTERNALRECV 1412 /*%< "internal_recv: task %p got event %p" */
-#define ISC_MSG_INTERNALSEND 1413 /*%< "internal_send: task %p got event %p" */
-#define ISC_MSG_WATCHERMSG 1414 /*%< "watcher got message %d" */
-#define ISC_MSG_SOCKETSREMAIN 1415 /*%< "sockets exist" */
-#define ISC_MSG_PKTINFOPROVIDED 1416 /*%< "pktinfo structure provided, ..." */
-#define ISC_MSG_BOUND 1417 /*%< "bound" */
-#define ISC_MSG_ACCEPTRETURNED 1418 /*%< accept() returned %d/%s */
-#define ISC_MSG_TOOMANYFDS 1419 /*%< %s: too many open file descriptors */
-#define ISC_MSG_ZEROPORT 1420 /*%< dropping source port zero packet */
-#define ISC_MSG_FILTER 1421 /*%< setsockopt(SO_ACCEPTFILTER): %s */
-
-#define ISC_MSG_TOOMANYHANDLES 1422 /*%< %s: too many open WSA event handles: %s */
-#define ISC_MSG_POKED 1423 /*%< "poked flags: %d" */
-
-#define ISC_MSG_AWAKE 1502 /*%< "awake" */
-#define ISC_MSG_WORKING 1503 /*%< "working" */
-#define ISC_MSG_EXECUTE 1504 /*%< "execute action" */
-#define ISC_MSG_EMPTY 1505 /*%< "empty" */
-#define ISC_MSG_DONE 1506 /*%< "done" */
-#define ISC_MSG_QUANTUM 1507 /*%< "quantum" */
-
-#define ISC_MSG_SCHEDULE 1601 /*%< "schedule" */
-#define ISC_MSG_SIGNALSCHED 1602 /*%< "signal (schedule)" */
-#define ISC_MSG_SIGNALDESCHED 1603 /*%< "signal (deschedule)" */
-#define ISC_MSG_SIGNALDESTROY 1604 /*%< "signal (destroy)" */
-#define ISC_MSG_IDLERESCHED 1605 /*%< "idle reschedule" */
-#define ISC_MSG_EVENTNOTALLOC 1606 /*%< "couldn't allocate event" */
-#define ISC_MSG_SCHEDFAIL 1607 /*%< "couldn't schedule timer: %u" */
-#define ISC_MSG_POSTING 1608 /*%< "posting" */
-#define ISC_MSG_WAKEUP 1609 /*%< "wakeup" */
-
-#define ISC_MSG_LOCK 1701 /*%< "LOCK" */
-#define ISC_MSG_LOCKING 1702 /*%< "LOCKING" */
-#define ISC_MSG_LOCKED 1703 /*%< "LOCKED" */
-#define ISC_MSG_UNLOCKED 1704 /*%< "UNLOCKED" */
-#define ISC_MSG_RWLOCK 1705 /*%< "RWLOCK" */
-#define ISC_MSG_RWLOCKED 1706 /*%< "RWLOCKED" */
-#define ISC_MSG_RWUNLOCK 1707 /*%< "RWUNLOCK" */
-#define ISC_MSG_BROADCAST 1708 /*%< "BROADCAST" */
-#define ISC_MSG_SIGNAL 1709 /*%< "SIGNAL" */
-#define ISC_MSG_UTILWAIT 1710 /*%< "WAIT" */
-#define ISC_MSG_WAITED 1711 /*%< "WAITED" */
-
-#define ISC_MSG_GETIFADDRS 1801 /*%< "getting interface addresses: ..." */
-
-/*@}*/
-
-#endif /* ISC_MSGS_H */
isc_result_t
isc_result_register(unsigned int base, unsigned int nresults,
- const char **text, isc_msgcat_t *msgcat, int set);
+ const char **text, int set);
isc_result_t
isc_result_registerids(unsigned int base, unsigned int nresults,
- const char **ids, isc_msgcat_t *msgcat, int set);
+ const char **ids, int set);
ISC_LANG_ENDDECLS
typedef struct isc_logmodule isc_logmodule_t; /*%< Log Module */
typedef struct isc_mem isc_mem_t; /*%< Memory */
typedef struct isc_mempool isc_mempool_t; /*%< Memory Pool */
-typedef struct isc_msgcat isc_msgcat_t; /*%< Message Catalog */
typedef struct isc_netaddr isc_netaddr_t; /*%< Net Address */
typedef struct isc_portset isc_portset_t; /*%< Port Set */
typedef struct isc_quota isc_quota_t; /*%< Quota */
#ifdef ISC_UTIL_TRACEON
#define ISC_UTIL_TRACE(a) a
#include <stdio.h> /* Required for fprintf/stderr when tracing. */
-#include <isc/msgs.h> /* Required for isc_msgcat when tracing. */
#else
#define ISC_UTIL_TRACE(a)
#endif
#include <isc/result.h> /* Contractual promise. */
#define LOCK(lp) do { \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_LOCKING, "LOCKING"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "LOCKING %p %s %d\n", \
(lp), __FILE__, __LINE__)); \
RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_LOCKED, "LOCKED"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "LOCKED %p %s %d\n", \
(lp), __FILE__, __LINE__)); \
} while (0)
#define UNLOCK(lp) do { \
RUNTIME_CHECK(isc_mutex_unlock((lp)) == ISC_R_SUCCESS); \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_UNLOCKED, "UNLOCKED"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "UNLOCKED %p %s %d\n", \
(lp), __FILE__, __LINE__)); \
} while (0)
#define BROADCAST(cvp) do { \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_BROADCAST, "BROADCAST"),\
+ ISC_UTIL_TRACE(fprintf(stderr, "BROADCAST %p %s %d\n", \
(cvp), __FILE__, __LINE__)); \
RUNTIME_CHECK(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS); \
} while (0)
#define SIGNAL(cvp) do { \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_SIGNAL, "SIGNAL"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "SIGNAL %p %s %d\n", \
(cvp), __FILE__, __LINE__)); \
RUNTIME_CHECK(isc_condition_signal((cvp)) == ISC_R_SUCCESS); \
} while (0)
#define WAIT(cvp, lp) do { \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_UTILWAIT, "WAIT"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "WAIT %p LOCK %p %s %d\n", \
(cvp), \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_LOCK, "LOCK"), \
(lp), __FILE__, __LINE__)); \
RUNTIME_CHECK(isc_condition_wait((cvp), (lp)) == ISC_R_SUCCESS); \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %p %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_WAITED, "WAITED"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "WAITED %p LOCKED %p %s %d\n", \
(cvp), \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_LOCKED, "LOCKED"), \
(lp), __FILE__, __LINE__)); \
} while (0)
isc_condition_waituntil((cvp), (lp), (tp))
#define RWLOCK(lp, t) do { \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_RWLOCK, "RWLOCK"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "RWLOCK %p, %d %s %d\n", \
(lp), (t), __FILE__, __LINE__)); \
RUNTIME_CHECK(isc_rwlock_lock((lp), (t)) == ISC_R_SUCCESS); \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_RWLOCKED, "RWLOCKED"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "RWLOCKED %p, %d %s %d\n", \
(lp), (t), __FILE__, __LINE__)); \
} while (0)
#define RWUNLOCK(lp, t) do { \
- ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
- ISC_MSG_RWUNLOCK, "RWUNLOCK"), \
+ ISC_UTIL_TRACE(fprintf(stderr, "RWUNLOCK %p, %d %s %d\n", \
(lp), (t), __FILE__, __LINE__)); \
RUNTIME_CHECK(isc_rwlock_unlock((lp), (t)) == ISC_R_SUCCESS); \
} while (0)
ISC_LANG_BEGINDECLS
-LIBISC_EXTERNAL_DATA extern isc_msgcat_t *pk11_msgcat;
-
-void
-pk11_initmsgcat(void);
-
const char *
pk11_result_totext(isc_result_t);
#include <isc/file.h>
#include <isc/lex.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/parseint.h>
#include <isc/print.h>
#include <isc/stdio.h>
break;
default:
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_LEX,
- ISC_MSG_UNEXPECTEDSTATE,
- "Unexpected state %d"),
+ "Unexpected state %d",
state);
- /* Does not return. */
+ ISC_UNREACHABLE();
}
} while (!done);
#include <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <openssl/evp.h>
-
-#include <isc/app.h>
+#include <isc/bind9.h>
#include <isc/lib.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/once.h>
-#include <isc/print.h>
-#include <isc/socket.h>
-#include <isc/task.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-/***
- *** Globals
- ***/
-
-LIBISC_EXTERNAL_DATA isc_msgcat_t * isc_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t msgcat_once = ISC_ONCE_INIT;
/***
*** Functions
***/
-static void
-open_msgcat(void) {
- isc_msgcat_open("libisc.cat", &isc_msgcat);
-}
-
-void
-isc_lib_initmsgcat(void) {
- isc_result_t result;
-
- /*!
- * Initialize the ISC library's message catalog, isc_msgcat, if it
- * has not already been initialized.
- */
-
- result = isc_once_do(&msgcat_once, open_msgcat);
- if (result != ISC_R_SUCCESS) {
- /*
- * Normally we'd use RUNTIME_CHECK() or FATAL_ERROR(), but
- * we can't do that here, since they might call us!
- * (Note that the catalog might be open anyway, so we might
- * as well try to provide an internationalized message.)
- */
- fprintf(stderr, "%s:%d: %s: isc_once_do() %s.\n",
- __FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FATALERROR, "fatal error"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- abort();
- }
-}
-
void
isc_lib_register(void) {
isc_bind9 = false;
#include <isc/log.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/print.h>
#include <isc/stat.h>
#include <isc/stdio.h>
static void
isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level, bool write_once,
- isc_msgcat_t *msgcat, int msgset, int msg,
const char *format, va_list args)
- ISC_FORMAT_PRINTF(9, 0);
+ ISC_FORMAT_PRINTF(6, 0);
/*@{*/
/*!
va_start(args, format);
isc_log_doit(lctx, category, module, level, false,
- NULL, 0, 0, format, args);
+ format, args);
va_end(args);
}
* Contract checking is done in isc_log_doit().
*/
isc_log_doit(lctx, category, module, level, false,
- NULL, 0, 0, format, args);
+ format, args);
}
void
va_start(args, format);
isc_log_doit(lctx, category, module, level, true,
- NULL, 0, 0, format, args);
+ format, args);
va_end(args);
}
* Contract checking is done in isc_log_doit().
*/
isc_log_doit(lctx, category, module, level, true,
- NULL, 0, 0, format, args);
-}
-
-void
-isc_log_iwrite(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int msg,
- const char *format, ...)
-{
- va_list args;
-
- /*
- * Contract checking is done in isc_log_doit().
- */
-
- va_start(args, format);
- isc_log_doit(lctx, category, module, level, false,
- msgcat, msgset, msg, format, args);
- va_end(args);
-}
-
-void
-isc_log_ivwrite(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int msg,
- const char *format, va_list args)
-{
- /*
- * Contract checking is done in isc_log_doit().
- */
- isc_log_doit(lctx, category, module, level, false,
- msgcat, msgset, msg, format, args);
-}
-
-void
-isc_log_iwrite1(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int msg,
- const char *format, ...)
-{
- va_list args;
-
- /*
- * Contract checking is done in isc_log_doit().
- */
-
- va_start(args, format);
- isc_log_doit(lctx, category, module, level, true,
- msgcat, msgset, msg, format, args);
- va_end(args);
-}
-
-void
-isc_log_ivwrite1(isc_log_t *lctx, isc_logcategory_t *category,
- isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int msg,
- const char *format, va_list args)
-{
- /*
- * Contract checking is done in isc_log_doit().
- */
- isc_log_doit(lctx, category, module, level, true,
- msgcat, msgset, msg, format, args);
+ format, args);
}
void
static void
isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level, bool write_once,
- isc_msgcat_t *msgcat, int msgset, int msg,
const char *format, va_list args)
{
int syslog_level;
char local_time[64];
char iso8601z_string[64];
char iso8601l_string[64];
- char level_string[24];
- const char *iformat;
+ char level_string[24] = { 0 };
struct stat statbuf;
bool matched = false;
bool printtime, iso8601, utc, printtag, printcolon;
if (! isc_log_wouldlog(lctx, level))
return;
- if (msgcat != NULL)
- iformat = isc_msgcat_get(msgcat, msgset, msg, format);
- else
- iformat = format;
-
local_time[0] = '\0';
iso8601l_string[0] = '\0';
iso8601z_string[0] = '\0';
- level_string[0] = '\0';
LOCK(&lctx->lock);
if ((channel->flags & ISC_LOG_PRINTLEVEL) != 0 &&
level_string[0] == '\0') {
- if (level < ISC_LOG_CRITICAL)
+ if (level < ISC_LOG_CRITICAL) {
snprintf(level_string, sizeof(level_string),
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_LOG,
- ISC_MSG_LEVEL,
- "level %d: "),
- level);
- else if (level > ISC_LOG_DYNAMIC)
+ "level %d: ", level);
+ } else if (level > ISC_LOG_DYNAMIC) {
snprintf(level_string, sizeof(level_string),
"%s %d: ", log_level_strings[0],
level);
- else
+ } else {
snprintf(level_string, sizeof(level_string),
"%s: ", log_level_strings[-level]);
+ }
}
/*
*/
if (lctx->buffer[0] == '\0') {
(void)vsnprintf(lctx->buffer, sizeof(lctx->buffer),
- iformat, args);
+ format, args);
/*
* Check for duplicates.
#include <isc/json.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/once.h>
#include <isc/print.h>
uint32_t hash;
uint32_t idx;
- if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
- fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_ADDTRACE,
- "add %p size %u "
- "file %s line %u mctx %p\n"),
+ if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0) {
+ fprintf(stderr, "add %p size %zu file %s line %u mctx %p\n",
ptr, size, file, line, mctx);
+ }
if (mctx->debuglist == NULL)
return;
uint32_t hash;
uint32_t idx;
- if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
- fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_DELTRACE,
- "del %p size %u "
- "file %s line %u mctx %p\n"),
+ if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0) {
+ fprintf(stderr, "del %p size %zu file %s line %u mctx %p\n",
ptr, size, file, line, mctx);
+ }
if (mctx->debuglist == NULL)
return;
if (mctx->debuglist != NULL) {
debuglink_t *dl;
unsigned int i;
- const char *format;
bool found;
- fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_DUMPALLOC,
- "Dump of all outstanding "
- "memory allocations:\n"));
+ fputs("Dump of all outstanding memory allocations:\n", out);
found = false;
- format = isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_PTRFILELINE,
- "\tptr %p size %u file %s line %u\n");
for (i = 0; i < DEBUG_TABLE_COUNT; i++) {
dl = ISC_LIST_HEAD(mctx->debuglist[i]);
- if (dl != NULL)
+ if (dl != NULL) {
found = true;
+ }
while (dl != NULL) {
- if (dl->ptr != NULL)
- fprintf(out, format,
+ if (dl->ptr != NULL) {
+ fprintf(out,
+ "\tptr %p size %zu file %s line %u\n",
dl->ptr, dl->size,
dl->file, dl->line);
+ }
dl = ISC_LIST_NEXT(dl, link);
}
}
- if (!found)
- fputs(isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_NONE, "\tNone.\n"), out);
+ if (!found) {
+ fputs("\tNone.\n", out);
+ }
}
}
#endif
*/
pool = ISC_LIST_HEAD(ctx->pools);
if (pool != NULL) {
- fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLSTATS,
- "[Pool statistics]\n"));
+ fputs("[Pool statistics]\n", out);
fprintf(out, "%15s %10s %10s %10s %10s %10s %10s %10s %1s\n",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLNAME, "name"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLSIZE, "size"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLMAXALLOC, "maxalloc"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLALLOCATED, "allocated"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLFREECOUNT, "freecount"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLFREEMAX, "freemax"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLFILLCOUNT, "fillcount"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLGETS, "gets"),
- "L");
+ "name", "size", "maxalloc", "allocated", "freecount",
+ "freemax", "fillcount", "gets", "L");
}
while (pool != NULL) {
fprintf(out, "%15s %10lu %10u %10u %10u %10u %10u %10u %s\n",
#include <inttypes.h>
#include <isc/buffer.h>
-#include <isc/msgs.h>
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/print.h>
if (result != ISC_R_SUCCESS) {
snprintf(array, size,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_NETADDR,
- ISC_MSG_UNKNOWNADDR,
- "<unknown address, family %u>"),
+ "<unknown address, family %u>",
na->family);
array[size - 1] = '\0';
}
+++ /dev/null
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-top_srcdir = @top_srcdir@
-
-CINCLUDES = -I../unix/include \
- -I${srcdir}/../unix/include \
- -I../include \
- -I${srcdir}/../include
-
-CDEFINES =
-CWARNINGS =
-
-OBJS = msgcat.@O@
-
-SRCS = msgcat.c
-
-SUBDIRS =
-TARGETS = ${OBJS}
-
-@BIND9_MAKE_RULES@
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-/*! \file msgcat.c */
-
-#include <config.h>
-
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <isc/magic.h>
-#include <isc/msgcat.h>
-#include <isc/util.h>
-
-#ifdef HAVE_CATGETS
-#include <nl_types.h> /* Required for nl_catd. */
-#endif
-
-/*
- * Implementation Notes:
- *
- * We use malloc() and free() instead of isc_mem_get() and isc_mem_put()
- * because we don't want to require a memory context to be specified
- * in order to use a message catalog.
- */
-
-struct isc_msgcat {
- unsigned int magic;
-#ifdef HAVE_CATGETS
- nl_catd catalog;
-#endif
-};
-
-#define MSGCAT_MAGIC ISC_MAGIC('M', 'C', 'a', 't')
-#define VALID_MSGCAT(m) ISC_MAGIC_VALID(m, MSGCAT_MAGIC)
-
-void
-isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp) {
- isc_msgcat_t *msgcat;
-
- /*
- * Open a message catalog.
- */
-
- REQUIRE(name != NULL);
- REQUIRE(msgcatp != NULL && *msgcatp == NULL);
-
- msgcat = malloc(sizeof(*msgcat));
- if (msgcat == NULL) {
- *msgcatp = NULL;
- return;
- }
-
-#ifdef HAVE_CATGETS
- /*
- * We don't check if catopen() fails because we don't care.
- * If it does fail, then when we call catgets(), it will use
- * the default string.
- */
- msgcat->catalog = catopen(name, 0);
-#endif
- msgcat->magic = MSGCAT_MAGIC;
-
- *msgcatp = msgcat;
-}
-
-void
-isc_msgcat_close(isc_msgcat_t **msgcatp) {
- isc_msgcat_t *msgcat;
-
- /*
- * Close a message catalog.
- */
-
- REQUIRE(msgcatp != NULL);
- msgcat = *msgcatp;
- REQUIRE(VALID_MSGCAT(msgcat) || msgcat == NULL);
-
- if (msgcat != NULL) {
-#ifdef HAVE_CATGETS
- if (msgcat->catalog != (nl_catd)(-1))
- (void)catclose(msgcat->catalog);
-#endif
- msgcat->magic = 0;
- free(msgcat);
- }
-
- *msgcatp = NULL;
-}
-
-const char *
-isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
- const char *default_text)
-{
- /*
- * Get message 'message' from message set 'set' in 'msgcat'. If it
- * is not available, use 'default'.
- */
-
- REQUIRE(VALID_MSGCAT(msgcat) || msgcat == NULL);
- REQUIRE(set > 0);
- REQUIRE(message > 0);
- REQUIRE(default_text != NULL);
-
-#ifdef HAVE_CATGETS
- if (msgcat == NULL)
- return (default_text);
- return (catgets(msgcat->catalog, set, message, default_text));
-#else
- return (default_text);
-#endif
-}
#include <stddef.h>
#include <isc/once.h>
-#include <isc/msgcat.h>
#include <isc/util.h>
#include <pk11/result.h>
-LIBISC_EXTERNAL_DATA isc_msgcat_t * pk11_msgcat = NULL;
-
-static isc_once_t msgcat_once = ISC_ONCE_INIT;
-
static const char *text[PK11_R_NRESULTS] = {
"PKCS#11 initialization failed", /*%< 0 */
"no PKCS#11 provider", /*%< 1 */
static isc_once_t once = ISC_ONCE_INIT;
-static void
-open_msgcat(void) {
- isc_msgcat_open("libpk11.cat", &pk11_msgcat);
-}
-
-void
-pk11_initmsgcat(void) {
-
- /*
- * Initialize the PKCS#11 support's message catalog,
- * pk11_msgcat, if it has not already been initialized.
- */
-
- RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
-
static void
initialize_action(void) {
isc_result_t result;
result = isc_result_register(ISC_RESULTCLASS_PK11, PK11_R_NRESULTS,
- text, pk11_msgcat, PK11_RESULT_RESULTSET);
+ text, PK11_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_register() failed: %u", result);
}
result = isc_result_registerids(ISC_RESULTCLASS_PK11, PK11_R_NRESULTS,
- ids, pk11_msgcat,
- PK11_RESULT_RESULTSET);
+ ids, PK11_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_registerids() failed: %u", result);
static void
initialize(void) {
- pk11_initmsgcat();
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
}
#include <errno.h>
#include <isc/condition.h>
-#include <isc/msgs.h>
#include <isc/strerr.h>
#include <isc/string.h>
#include <isc/time.h>
strerror_r(presult, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "pthread_cond_timedwait() %s %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_RETURNED, "returned"),
+ "pthread_cond_timedwait() returned %s",
strbuf);
return (ISC_R_UNEXPECTED);
}
#include <stdlib.h>
#include <isc/lib.h>
-#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/once.h>
#include <isc/resultclass.h>
unsigned int base;
unsigned int last;
const char ** text;
- isc_msgcat_t * msgcat;
int set;
ISC_LINK(struct resulttable) link;
} resulttable;
static isc_result_t
register_table(resulttable_list_t *tables, unsigned int base,
unsigned int nresults, const char **text,
- isc_msgcat_t *msgcat, int set)
+ int set)
{
resulttable *table;
table->base = base;
table->last = base + nresults - 1;
table->text = text;
- table->msgcat = msgcat;
table->set = set;
ISC_LINK_INIT(table, link);
result = register_table(&description_tables,
ISC_RESULTCLASS_ISC, ISC_R_NRESULTS,
- description, isc_msgcat, ISC_RESULT_RESULTSET);
- if (result != ISC_R_SUCCESS)
+ description, ISC_RESULT_RESULTSET);
+ if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "register_table() %s: %u",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "register_table() failed: %u",
result);
+ }
result = register_table(&identifier_tables,
ISC_RESULTCLASS_ISC, ISC_R_NRESULTS,
- identifier, isc_msgcat, ISC_RESULT_RESULTSET);
- if (result != ISC_R_SUCCESS)
+ identifier, ISC_RESULT_RESULTSET);
+ if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "register_table() %s: %u",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "register_table() failed: %u",
result);
+ }
}
static void
initialize(void) {
- isc_lib_initmsgcat();
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
}
static const char *
isc_result_tomany_helper(resulttable_list_t *tables, isc_result_t result) {
resulttable *table;
- const char *text, *default_text;
+ const char *text;
int index;
initialize();
table = ISC_LIST_NEXT(table, link)) {
if (result >= table->base && result <= table->last) {
index = (int)(result - table->base);
- default_text = table->text[index];
- /*
- * Note: we use 'index + 1' as the message number
- * instead of index because isc_msgcat_get() requires
- * the message number to be > 0.
- */
- text = isc_msgcat_get(table->msgcat, table->set,
- index + 1, default_text);
+ text = table->text[index];
break;
}
}
- if (text == NULL)
- text = isc_msgcat_get(isc_msgcat, ISC_RESULT_UNAVAILABLESET,
- 1, "(result code text not available)");
+ if (text == NULL) {
+ text = "(result code text not available)";
+ }
UNLOCK(&lock);
isc_result_t
isc_result_register(unsigned int base, unsigned int nresults,
- const char **text, isc_msgcat_t *msgcat, int set)
+ const char **text, int set)
{
initialize();
return (register_table(&description_tables, base, nresults, text,
- msgcat, set));
+ set));
}
isc_result_t
isc_result_registerids(unsigned int base, unsigned int nresults,
- const char **ids, isc_msgcat_t *msgcat, int set)
+ const char **ids, int set)
{
initialize();
return (register_table(&identifier_tables, base, nresults, ids,
- msgcat, set));
+ set));
}
#include <isc/atomic.h>
#include <isc/magic.h>
-#include <isc/msgs.h>
#include <isc/platform.h>
#include <isc/print.h>
#include <isc/rwlock.h>
static void
print_lock(const char *operation, isc_rwlock_t *rwl, isc_rwlocktype_t type) {
fprintf(stderr,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRINTLOCK2,
- "rwlock %p thread %lu %s(%s): "
- "write_requests=%u, write_completions=%u, "
- "cnt_and_flag=0x%x, readers_waiting=%u, "
- "write_granted=%u, write_quota=%u\n"),
+ "rwlock %p thread %lu %s(%s): "
+ "write_requests=%u, write_completions=%u, "
+ "cnt_and_flag=0x%x, readers_waiting=%u, "
+ "write_granted=%u, write_quota=%u\n",
rwl, isc_thread_self(), operation,
- (type == isc_rwlocktype_read ?
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_READ, "read") :
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_WRITE, "write")),
+ (type == isc_rwlocktype_read ? "read" : "write"),
atomic_load_explicit(&rwl->write_requests, memory_order_relaxed),
atomic_load_explicit(&rwl->write_completions, memory_order_relaxed),
atomic_load_explicit(&rwl->cnt_and_flag, memory_order_relaxed),
REQUIRE(VALID_RWLOCK(rwl));
#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRELOCK, "prelock"), rwl, type);
+ print_lock("prelock", rwl, type);
#endif
if (type == isc_rwlocktype_read) {
}
#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTLOCK, "postlock"), rwl, type);
+ print_lock("postlock", rwl, type);
#endif
return (ISC_R_SUCCESS);
REQUIRE(VALID_RWLOCK(rwl));
#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRELOCK, "prelock"), rwl, type);
+ print_lock("prelock", rwl, type);
#endif
if (type == isc_rwlocktype_read) {
}
#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTLOCK, "postlock"), rwl, type);
+ print_lock("postlock", rwl, type);
#endif
return (ISC_R_SUCCESS);
REQUIRE(VALID_RWLOCK(rwl));
#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PREUNLOCK, "preunlock"), rwl, type);
+ print_lock("preunlock", rwl, type);
#endif
if (type == isc_rwlocktype_read) {
}
#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTUNLOCK, "postunlock"),
+ print_lock("postunlock",
rwl, type);
#endif
#include <isc/buffer.h>
#include <isc/hash.h>
-#include <isc/msgs.h>
#include <isc/netaddr.h>
#include <isc/print.h>
#include <isc/region.h>
* The message is the same as in netaddr.c.
*/
snprintf(array, size,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_NETADDR,
- ISC_MSG_UNKNOWNADDR,
- "<unknown address, family %u>"),
+ "<unknown address, family %u>",
sa->type.sa.sa_family);
array[size - 1] = '\0';
}
break;
default:
UNEXPECTED_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_SOCKADDR,
- ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
- (int)sockaddr->type.sa.sa_family);
+ "unknown address family: %d",
+ (int)sockaddr->type.sa.sa_family);
s = (const unsigned char *)&sockaddr->type;
length = sockaddr->length;
p = 0;
return (PF_INET6);
default:
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
- ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
+ "unknown address family: %d",
(int)sockaddr->type.sa.sa_family);
}
#endif
break;
default:
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
- ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
+ "unknown address family: %d",
(int)sockaddr->type.sa.sa_family);
}
}
break;
default:
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
- ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
+ "unknown address family: %d",
(int)sockaddr->type.sa.sa_family);
}
#include <isc/json.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/once.h>
#include <isc/platform.h>
#include <isc/print.h>
XTRACE("task_shutdown");
if (! TASK_SHUTTINGDOWN(task)) {
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_SHUTTINGDOWN, "shutting down"));
+ XTRACE("shutting down");
task->flags |= TASK_F_SHUTTINGDOWN;
if (task->state == task_state_idle) {
INSIST(EMPTY(task->events));
!manager->exclusive_requested) &&
!FINISHED(manager))
{
- XTHREADTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_WAIT, "wait"));
- XTHREADTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_WAIT,
- manager->pause_requested
- ? "paused" : "notpaused"));
- XTHREADTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_WAIT,
- manager->exclusive_requested
- ? "excreq" : "notexcreq"));
+ XTHREADTRACE("wait");
+ XTHREADTRACE(manager->pause_requested
+ ? "paused"
+ : "notpaused");
+ XTHREADTRACE(manager->exclusive_requested
+ ? "excreq"
+ : "notexcreq");
WAIT(&manager->queues[threadid].work_available,
&manager->queues[threadid].lock);
- XTHREADTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TASK,
- ISC_MSG_AWAKE, "awake"));
+ XTHREADTRACE("awake");
}
- XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TASK,
- ISC_MSG_WORKING, "working"));
+ XTHREADTRACE("working");
if (manager->pause_requested || manager->exclusive_requested) {
UNLOCK(&manager->queues[threadid].lock);
- XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TASK,
- ISC_MSG_WORKING, "halting"));
+ XTHREADTRACE("halting");
/*
* Switching to exclusive mode is done as a
LOCK(&task->lock);
INSIST(task->state == task_state_ready);
task->state = task_state_running;
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_RUNNING, "running"));
+ XTRACE("running");
XTRACE(task->name);
TIME_NOW(&task->tnow);
task->now = isc_time_seconds(&task->tnow);
/*
* Execute the event action.
*/
- XTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TASK,
- ISC_MSG_EXECUTE,
- "execute action"));
+ XTRACE("execute action");
XTRACE(task->name);
if (event->ev_action != NULL) {
UNLOCK(&task->lock);
* Nothing else to do for this task
* right now.
*/
- XTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TASK,
- ISC_MSG_EMPTY,
- "empty"));
+ XTRACE("empty");
if (task->references == 0 &&
TASK_SHUTTINGDOWN(task)) {
/*
* The task is done.
*/
- XTRACE(isc_msgcat_get(
- isc_msgcat,
- ISC_MSGSET_TASK,
- ISC_MSG_DONE,
- "done"));
+ XTRACE("done");
finished = true;
task->state = task_state_done;
} else
* dispatching at least one event,
* so the minimum quantum is one.
*/
- XTRACE(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TASK,
- ISC_MSG_QUANTUM,
- "quantum"));
+ XTRACE("quantum");
task->state = task_state_ready;
requeue = true;
done = true;
int threadid = tq->threadid;
isc_thread_setaffinity(threadid);
- XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_STARTING, "starting"));
+ XTHREADTRACE("starting");
dispatch(manager, threadid);
- XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_EXITING, "exiting"));
+ XTHREADTRACE("exiting");
#ifdef OPENSSL_LEAKS
ERR_remove_state(0);
#include <isc/log.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/once.h>
#include <isc/platform.h>
#include <isc/print.h>
manager->nscheduled++;
}
- XTRACETIMER(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SCHEDULE, "schedule"), timer, due);
+ XTRACETIMER("schedule", timer, due);
/*
* If this timer is at the head of the queue, we need to ensure
*/
if (timer->index == 1 && signal_ok) {
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SIGNALSCHED,
- "signal (schedule)"));
+ XTRACE("signal (schedule)");
SIGNAL(&manager->wakeup);
}
INSIST(manager->nscheduled > 0);
manager->nscheduled--;
if (need_wakeup) {
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SIGNALDESCHED,
- "signal (deschedule)"));
+ XTRACE("signal (deschedule)");
SIGNAL(&manager->wakeup);
}
}
* Idle timer has been touched;
* reschedule.
*/
- XTRACEID(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_IDLERESCHED,
- "idle reschedule"),
- timer);
+ XTRACEID("idle reschedule", timer);
post_event = false;
need_schedule = true;
}
}
if (post_event) {
- XTRACEID(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_POSTING,
- "posting"), timer);
+ XTRACEID("posting", timer);
/*
* XXX We could preallocate this event.
*/
ISC_EVENT_PTR(&event));
} else
UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_EVENTNOTALLOC,
- "couldn't "
- "allocate event"));
+ "couldn't allocate event");
}
timer->index = 0;
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"%s: %u",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_SCHEDFAIL,
- "couldn't schedule "
- "timer"),
+ "couldn't schedule timer",
result);
}
} else {
while (!manager->done) {
TIME_NOW(&now);
- XTRACETIME(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_RUNNING,
- "running"), now);
+ XTRACETIME("running", now);
dispatch(manager, &now);
if (manager->nscheduled > 0) {
- XTRACETIME2(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_WAITUNTIL,
- "waituntil"),
- manager->due, now);
+ XTRACETIME2("waituntil", manager->due, now);
result = WAITUNTIL(&manager->wakeup, &manager->lock, &manager->due);
INSIST(result == ISC_R_SUCCESS ||
result == ISC_R_TIMEDOUT);
} else {
- XTRACETIME(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_WAIT, "wait"), now);
+ XTRACETIME("wait", now);
WAIT(&manager->wakeup, &manager->lock);
}
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_WAKEUP, "wakeup"));
+ XTRACE("wakeup");
}
UNLOCK(&manager->lock);
isc_mutex_destroy(&manager->lock);
isc_heap_destroy(&manager->heap);
isc_mem_put(mctx, manager, sizeof(*manager));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_create() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
+ "isc_thread_create() failed");
return (ISC_R_UNEXPECTED);
}
isc_thread_setname(manager->thread, "isc-timer");
REQUIRE(EMPTY(manager->timers));
manager->done = true;
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SIGNALDESTROY, "signal (destroy)"));
+ XTRACE("signal (destroy)");
SIGNAL(&manager->wakeup);
UNLOCK(&manager->lock);
* Wait for thread to exit.
*/
if (isc_thread_join(manager->thread, NULL) != ISC_R_SUCCESS)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_join() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
+ "isc_thread_join() failed");
/*
* Clean up.
#include <isc/app.h>
#include <isc/condition.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/event.h>
#include <isc/platform.h>
sigaction(sig, &sa, NULL) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_APP,
- ISC_MSG_SIGNALSETUP,
- "handle_signal() %d setup: %s"),
+ "handle_signal() %d setup: %s",
sig, strbuf);
return (ISC_R_UNEXPECTED);
}
if (getifaddrs(&iter->ifaddrs) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_IFITERGETIFADDRS,
- ISC_MSG_GETIFADDRS,
- "getting interface "
- "addresses: getifaddrs: %s"),
+ "getting interface addresses: getifaddrs: %s",
strbuf);
result = ISC_R_UNEXPECTED;
goto failure;
#include <isc/log.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/net.h>
#include <isc/print.h>
#include <isc/result.h>
#include <fcntl.h>
#include <isc/log.h>
-#include <isc/msgs.h>
#include <isc/net.h>
#include <isc/netdb.h>
#include <isc/once.h>
default:
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
return (ISC_R_UNEXPECTED);
}
if (s == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
ipv6only_result = ISC_R_UNEXPECTED;
return;
if (s == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
ipv6only_result = ISC_R_UNEXPECTED;
return;
if (s == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
ipv6pktinfo_result = ISC_R_UNEXPECTED;
return;
if (sendmsg(s, &msg, 0) < 0) {
int debug = ISC_LOG_DEBUG(10);
const char *typestr;
- const char *msgstr;
switch (errno) {
#ifdef ENOPROTOOPT
case ENOPROTOOPT:
"sendmsg: %s", strbuf);
} else {
typestr = (type == IP_TOS) ? "IP_TOS" : "IPV6_TCLASS";
- msgstr = isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed");
UNEXPECTED_ERROR(__FILE__, __LINE__, "probing "
- "sendmsg() with %s=%02x %s: %s",
- typestr, dscp, msgstr, strbuf);
+ "sendmsg() with %s=%02x failed: %s",
+ typestr, dscp, strbuf);
}
return (false);
}
#include <isc/list.h>
#include <isc/log.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/net.h>
#include <isc/once.h>
static void
socket_log(isc__socket_t *sock, const isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
+ const char *fmt, ...) ISC_FORMAT_PRINTF(6, 7);
static void
socket_log(isc__socket_t *sock, const isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
const char *fmt, ...)
{
char msgbuf[2048];
va_end(ap);
if (address == NULL) {
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p: %s", sock, msgbuf);
+ isc_log_write(isc_lctx, category, module, level,
+ "socket %p: %s", sock, msgbuf);
} else {
isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p %s: %s", sock, peerbuf, msgbuf);
+ isc_log_write(isc_lctx, category, module, level,
+ "socket %p %s: %s", sock, peerbuf, msgbuf);
}
}
if (cc < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_WRITEFAILED,
- "write() failed "
- "during watcher poke: %s"),
+ "write() failed during watcher poke: %s",
strbuf);
}
strerror_r(errno, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_READFAILED,
- "read() failed "
- "during watcher poke: %s"),
+ "read() failed during watcher poke: %s",
strbuf);
}
INSIST(cc == sizeof(buf));
cmsgp = CMSG_FIRSTHDR(msg);
while (cmsgp != NULL) {
socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PROCESSCMSG,
"processing cmsg %p", cmsgp);
if (cmsgp->cmsg_level == IPPROTO_IPV6
sizeof(struct in6_pktinfo));
dev->attributes |= ISC_SOCKEVENTATTR_PKTINFO;
socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_IFRECEIVED,
"interface received on ifindex %u",
dev->pktinfo.ipi6_ifindex);
if (IN6_IS_ADDR_MULTICAST(&pktinfop->ipi6_addr))
struct in6_pktinfo *pktinfop;
socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_SENDTODATA,
"sendto pktinfo data, ifindex %u",
dev->pktinfo.ipi6_ifindex);
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IP_TOS, %.02x)"
- " %s: %s",
+ " failed: %s",
sock->fd, dscp >> 2,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
strbuf);
} else
sock->dscp = dscp;
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_TCLASS, "
- "%.02x) %s: %s",
+ "%.02x) failed: %s",
sock->fd, dscp >> 2,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
strbuf);
} else
sock->dscp = dscp;
if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
strerror_r(recv_errno, strbuf, sizeof(strbuf));
socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DOIORECV,
"doio_recv: recvmsg(%d) %d bytes, err %d/%s",
sock->fd, cc, recv_errno, strbuf);
}
if (isc_sockaddr_getport(&dev->address) == 0) {
if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
socket_log(sock, &dev->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_ZEROPORT,
"dropping source port zero packet");
}
return (DOIO_SOFT);
}
socket_log(sock, &dev->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PKTRECV,
"packet received correctly");
/*
inc_stats(sock->manager->stats,
sock->statsindex[STATID_SENDFAIL]);
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "doio_send: send() %s 0",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_RETURNED, "returned"));
+ "doio_send: send() returned 0");
}
/*
isc__socketmgr_t *manager = sock->manager;
isc__socketthread_t *thread;
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DESTROYING, "destroying");
+ socket_log(sock, NULL, CREATION, "destroying");
INSIST(ISC_LIST_EMPTY(sock->connect_list));
INSIST(ISC_LIST_EMPTY(sock->accept_list));
if (sock->fd >= (int)manager->maxsocks) {
(void)close(sock->fd);
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "socket: file descriptor exceeds limit (%d/%u)",
- sock->fd, manager->maxsocks);
+ isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ "socket: file descriptor exceeds limit (%d/%u)",
+ sock->fd, manager->maxsocks);
inc_stats(manager->stats, sock->statsindex[STATID_OPENFAIL]);
return (ISC_R_NORESOURCES);
}
case EMFILE:
case ENFILE:
strerror_r(errno, strbuf, sizeof(strbuf));
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "%s: %s", err, strbuf);
+ isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ "%s: %s", err, strbuf);
/* fallthrough */
case ENOBUFS:
inc_stats(manager->stats,
default:
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "%s() %s: %s", err,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "%s() failed: %s", err,
strbuf);
inc_stats(manager->stats,
sock->statsindex[STATID_OPENFAIL]);
(void *)&on, sizeof(on)) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_BSDCOMPAT) %s: %s",
+ "setsockopt(%d, SO_BSDCOMPAT) failed: %s",
sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
strbuf);
/* Press on... */
}
(void *)&on, sizeof(on)) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_NOSIGPIPE) %s: %s",
+ "setsockopt(%d, SO_NOSIGPIPE) failed: %s",
sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
strbuf);
/* Press on... */
}
&& errno != ENOPROTOOPT) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_TIMESTAMP) %s: %s",
+ "setsockopt(%d, SO_TIMESTAMP) failed: %s",
sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
strbuf);
/* Press on... */
}
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_RECVPKTINFO) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "failed: %s", sock->fd,
strbuf);
}
#else
(void *)&on, sizeof(on)) < 0)) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_PKTINFO) %s: %s",
+ "setsockopt(%d, IPV6_PKTINFO) failed: %s",
sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
strbuf);
}
#endif /* IPV6_RECVPKTINFO */
(void *)&rcvbuf, sizeof(rcvbuf)) == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_RCVBUF, %d) %s: %s",
+ "setsockopt(%d, SO_RCVBUF, %d) failed: %s",
sock->fd, rcvbuf,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
strbuf);
}
}
(void *)&sndbuf, sizeof(sndbuf)) == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_SNDBUF, %d) %s: %s",
+ "setsockopt(%d, SO_SNDBUF, %d) failed: %s",
sock->fd, sndbuf,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
strbuf);
}
}
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_RECVTCLASS) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "failed: %s", sock->fd,
strbuf);
}
#endif
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IP_RECVTOS) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "failed: %s", sock->fd,
strbuf);
}
#endif
#endif
UNLOCK(&manager->lock);
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_CREATED, dup_socket != NULL ? "dupped" : "created");
+ socket_log(sock, NULL, CREATION,
+ dup_socket != NULL ? "dupped" : "created");
return (ISC_R_SUCCESS);
}
LOCK(&sock->lock);
socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
"internal_accept called, locked socket");
manager = sock->manager;
switch (errno) {
case ENFILE:
case EMFILE:
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "%s: too many open file descriptors",
- err);
+ isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ "%s: too many open file descriptors",
+ err);
goto soft_error;
case ENOBUFS:
}
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_accept: %s() %s: %s", err,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "internal_accept: %s() failed: %s", err,
strbuf);
fd = -1;
result = ISC_R_UNEXPECTED;
(void)close(fd);
goto soft_error;
} else if (fd >= (int)manager->maxsocks) {
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "accept: "
- "file descriptor exceeds limit (%d/%u)",
- fd, manager->maxsocks);
+ isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ "accept: file descriptor exceeds limit (%d/%u)",
+ fd, manager->maxsocks);
(void)close(fd);
goto soft_error;
}
#endif
socket_log(sock, &NEWCONNSOCK(dev)->peer_address, CREATION,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
"accepted connection, new socket %p",
dev->newsocket);
}
socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
"internal_recv: event %p -> task %p", dev, dev->ev_sender);
/*
if (dev == NULL) {
goto finish;
}
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
- "internal_send: event %p -> task %p",
+ socket_log(sock, NULL, EVENT,
+ "internal_send: event %p -> task %p",
dev, dev->ev_sender);
/*
select_readmsg(thread, &fd, &msg);
thread_log(thread, IOEVENT,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_WATCHERMSG,
- "watcher got message %d "
- "for socket %d"), msg, fd);
+ "watcher got message %d for socket %d", msg, fd);
/*
* Nothing to read?
if (cc < 0 && !SOFT_ERROR(errno)) {
strerror_r(errno, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- "%s %s: %s", fnname,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"), strbuf);
+ "%s failed: %s", fnname, strbuf);
}
#if defined(USE_DEVPOLL) && defined(ISC_SOCKET_USE_POLLWATCH)
#endif
}
- thread_log(thread, TRACE, "%s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_EXITING, "watcher exiting"));
+ thread_log(thread, TRACE, "watcher exiting");
return ((isc_threadresult_t)0);
}
if (pipe(thread->pipe_fds) != 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "pipe() %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "pipe() failed: %s",
strbuf);
return (ISC_R_UNEXPECTED);
}
result = isc__errno2result(errno);
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "kqueue %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "kqueue failed: %s",
strbuf);
isc_mem_put(thread->manager->mctx, thread->events,
sizeof(struct kevent) * thread->nevents);
result = isc__errno2result(errno);
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "epoll_create %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "epoll_create failed: %s",
strbuf);
return (result);
result = isc__errno2result(errno);
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "open(/dev/poll) %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ "open(/dev/poll) failed: %s",
strbuf);
isc_mem_put(thread->manager->mctx, thread->events,
sizeof(struct pollfd) * thread->nevents);
result = unwatch_fd(thread, thread->pipe_fds[0], SELECT_POKE_READ);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "epoll_ctl(DEL) %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ "epoll_ctl(DEL) failed");
}
#ifdef USE_KQUEUE
close(thread->kqueue_fd);
* Wait for all sockets to be destroyed.
*/
while (!ISC_LIST_EMPTY(manager->socklist)) {
- manager_log(manager, CREATION, "%s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_SOCKETSREMAIN,
- "sockets exist"));
+ manager_log(manager, CREATION, "sockets exist");
WAIT(&manager->shutdown_ok, &manager->lock);
}
result = isc_thread_join(manager->threads[i].thread, NULL);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_join() %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"));
+ "isc_thread_join() failed");
}
cleanup_thread(manager->mctx, &manager->threads[i]);
}
SELECT_POKE_READ);
}
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(sock, NULL, EVENT,
"socket_recv: event %p -> task %p",
dev, ntask);
if (!isc_sockaddr_issitelocal(&dev->address) &&
!isc_sockaddr_islinklocal(&dev->address)) {
- socket_log(sock, NULL, TRACE, isc_msgcat,
- ISC_MSGSET_SOCKET, ISC_MSG_PKTINFOPROVIDED,
- "pktinfo structure provided, ifindex %u "
- "(set to 0)", pktinfo->ipi6_ifindex);
+ socket_log(sock, NULL, TRACE,
+ "pktinfo structure provided, ifindex %u (set to 0)",
+ pktinfo->ipi6_ifindex);
/*
* Set the pktinfo index to 0 here, to let the
sock->fd,
SELECT_POKE_WRITE);
}
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(sock, NULL, EVENT,
"socket_send: event %p -> task %p",
dev, ntask);
(void *)&on, sizeof(on)) < 0)
{
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d) %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ "setsockopt(%d) failed", sock->fd);
}
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT,
(void *)&on, sizeof(on)) < 0)
{
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d) %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ "setsockopt(%d) failed", sock->fd);
}
/* Press on... */
}
}
}
- socket_log(sock, sockaddr, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "bound");
+ socket_log(sock, sockaddr, TRACE, "bound");
sock->bound = 1;
UNLOCK(&sock->lock);
if (setsockopt(sock->fd, SOL_SOCKET, SO_ACCEPTFILTER,
&afa, sizeof(afa)) == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FILTER, "setsockopt(SO_ACCEPTFILTER): %s",
- strbuf);
+ socket_log(sock, NULL, CREATION,
+ "setsockopt(SO_ACCEPTFILTER): %s", strbuf);
return (ISC_R_FAILURE);
}
return (ISC_R_SUCCESS);
char strbuf[ISC_STRERRORSIZE];
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_V6ONLY) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
+ "setsockopt(%d, IPV6_V6ONLY) failed: %s",
+ sock->fd, strbuf);
}
}
#endif
char strbuf[ISC_STRERRORSIZE];
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IP_TOS, %.02x) "
- "%s: %s", sock->fd, value >> 2,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "setsockopt(%d, IP_TOS, %.02x) failed: %s",
+ sock->fd, value >> 2,
strbuf);
}
}
char strbuf[ISC_STRERRORSIZE];
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_TCLASS, %.02x) "
- "%s: %s", sock->fd, dscp >> 2,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
+ "setsockopt(%d, IPV6_TCLASS, %.02x) failed: %s",
+ sock->fd, dscp >> 2, strbuf);
}
}
#endif
#include <isc/app.h>
#include <isc/condition.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/event.h>
#include <isc/platform.h>
isc_lfsr_generate32
isc_lfsr_init
isc_lfsr_skip
-isc_lib_initmsgcat
isc_lib_register
isc_log_categorybyname
isc_log_closefilelogs
isc_log_getdebuglevel
isc_log_getduplicateinterval
isc_log_gettag
-isc_log_ivwrite
-isc_log_ivwrite1
-isc_log_iwrite
-isc_log_iwrite1
isc_log_modulebyname
isc_log_opensyslog
isc_log_registercategories
isc_mempool_setfreemax
isc_mempool_setmaxalloc
isc_mempool_setname
-isc_msgcat_close
-isc_msgcat_get
-isc_msgcat_open
isc_mutexblock_destroy
isc_mutexblock_init
isc_net_disableipv4
pk11_get_load_error_message
pk11_get_session
pk11_initialize
-pk11_initmsgcat
pk11_mem_get
pk11_mem_put
pk11_numbits
isc_dscp_check_value DATA
isc_hashctx DATA
isc_mem_debugging DATA
-isc_msgcat DATA
@IF PKCS11
-pk11_msgcat DATA
pk11_verbose_init DATA
@END PKCS11
@END NOLONGER
<ClInclude Include="..\include\isc\meminfo.h">
<Filter>Win32 Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\include\isc\msgcat.h">
- <Filter>Library Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\include\isc\msgs.h">
- <Filter>Library Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\include\isc\mutexblock.h">
<Filter>Library Header Files</Filter>
</ClInclude>
<ClCompile Include="..\mem.c">
<Filter>Library Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\nls\msgcat.c">
- <Filter>Library Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\mutexblock.c">
<Filter>Library Source Files</Filter>
</ClCompile>
<ClInclude Include="..\include\isc\md.h" />
<ClInclude Include="..\include\isc\mem.h" />
<ClInclude Include="..\include\isc\meminfo.h" />
- <ClInclude Include="..\include\isc\msgcat.h" />
- <ClInclude Include="..\include\isc\msgs.h" />
<ClInclude Include="..\include\isc\mutexblock.h" />
<ClInclude Include="..\include\isc\netaddr.h" />
<ClInclude Include="..\include\isc\netscope.h" />
<ClCompile Include="..\netaddr.c" />
<ClCompile Include="..\netscope.c" />
<ClCompile Include="..\nonce.c" />
- <ClCompile Include="..\nls\msgcat.c" />
<ClCompile Include="..\openssl_shim.c" />
<ClCompile Include="..\parseint.c" />
<ClCompile Include="..\pool.c" />
#include <unistd.h>
#include <isc/log.h>
-#include <isc/msgs.h>
#include <isc/net.h>
#include <isc/once.h>
#include <isc/strerr.h>
default:
strerror_r(errval, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
return (ISC_R_UNEXPECTED);
}
if (s == INVALID_SOCKET) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
ipv6only_result = ISC_R_UNEXPECTED;
return;
if (s == INVALID_SOCKET) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
ipv6only_result = ISC_R_UNEXPECTED;
return;
if (s == INVALID_SOCKET) {
strerror_r(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
ipv6pktinfo_result = ISC_R_UNEXPECTED;
return;
#include <isc/list.h>
#include <isc/log.h>
#include <isc/mem.h>
-#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/net.h>
#include <isc/once.h>
static void
socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
const char *fmt, ...) ISC_FORMAT_PRINTF(10, 11);
/* This function will add an entry to the I/O completion port
errval = GetLastError();
strerror_r(errval, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "Can't request service thread to exit: %s"),
- strbuf);
+ "Can't request service thread to exit: %s",
+ strbuf);
}
}
}
errval = GetLastError();
strerror_r(errval, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "Can't create IOCP thread: %s"),
+ "Can't create IOCP thread: %s",
strbuf);
}
}
errval = GetLastError();
strerror_r(errval, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "HeapCreate() failed during "
- "initialization: %s"),
+ "HeapCreate() failed during initialization: %s",
strbuf);
}
errval = GetLastError();
strerror_r(errval, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "CreateIoCompletionPort() failed "
- "during initialization: %s"),
+ "CreateIoCompletionPort() failed during initialization: %s",
strbuf);
}
if (hiocp == NULL) {
DWORD errval = GetLastError();
strerror_r(errval, strbuf, sizeof(strbuf));
- isc_log_iwrite(isc_lctx,
- ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYHANDLES,
- "iocompletionport_update: failed to open"
- " io completion port: %s",
- strbuf);
+ isc_log_write(isc_lctx,
+ ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ "iocompletionport_update: failed to open io completion port: %s",
+ strbuf);
/* XXXMLG temporary hack to make failures detected.
* This function should return errors to the caller, not
* exit here.
*/
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "CreateIoCompletionPort() failed "
- "during initialization: %s"),
- strbuf);
+ "CreateIoCompletionPort() failed during initialization: %s",
+ strbuf);
}
InterlockedIncrement(&sock->manager->iocp_total);
if (err != 0) {
char strbuf[ISC_STRERRORSIZE];
strerror_r(err, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__, "WSAStartup() %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
+ FATAL_ERROR(__FILE__, __LINE__, "WSAStartup() failed: %s",
strbuf);
}
/*
}
socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DOIORECV,
"queue_io_request: fd %d result %d error %d",
sock->fd, Result, Error);
static void
socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
const char *fmt, ...)
{
char msgbuf[2048];
va_end(ap);
if (address == NULL) {
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p line %d: %s", sock, lineno, msgbuf);
+ isc_log_write(isc_lctx, category, module, level,
+ "socket %p line %d: %s", sock, lineno, msgbuf);
} else {
isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p line %d %s: %s", sock, lineno,
- peerbuf, msgbuf);
+ isc_log_write(isc_lctx, category, module, level,
+ "socket %p line %d %s: %s", sock, lineno,
+ peerbuf, msgbuf);
}
}
return (ISC_R_SUCCESS);
else {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "WSAIoctl(SIO_UDP_CONNRESET, oldBehaviour) %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ "WSAIoctl(SIO_UDP_CONNRESET, oldBehaviour) failed");
return (ISC_R_UNEXPECTED);
}
}
RUNTIME_CHECK(lpo->buf != NULL);
socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "alloc_buffer %p %d", lpo->buf, write_count);
+ "alloc_buffer %p %d", lpo->buf, write_count);
memmove(lpo->buf,(dev->region.base + dev->n), write_count);
lpo->buflen = (unsigned int)write_count;
if (isc_sockaddr_getport(&dev->address) == 0) {
if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
socket_log(__LINE__, sock, &dev->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_ZEROPORT,
"dropping source port zero packet");
}
sock->recvbuf.remaining = 0;
if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
strerror_r(*send_errno, strbuf, sizeof(strbuf));
socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_INTERNALSEND,
- "startio_send: internal_sendmsg(%d) %d "
- "bytes, err %d/%s",
+ "startio_send: internal_sendmsg(%d) %d bytes, err %d/%s",
sock->fd, *nbytes, *send_errno, strbuf);
}
status = DOIO_HARD;
*/
isc_mutex_init(&sock->lock);
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"allocated");
sock->magic = SOCKET_MAGIC;
}
if (crash) {
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DESTROYING, "SOCKET INCONSISTENT: %s",
- crash_reason);
+ socket_log(__LINE__, sock, NULL, CREATION,
+ "SOCKET INCONSISTENT: %s", crash_reason);
sock_dump(sock);
INSIST(crash == false);
}
* Seems we can free the socket after all.
*/
manager = sock->manager;
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat,
- ISC_MSGSET_SOCKET, ISC_MSG_DESTROYING,
+ socket_log(__LINE__, sock, NULL, CREATION,
"freeing socket line %d fd %d lock %p semaphore %p",
lineno, sock->fd, &sock->lock, sock->lock.LockSemaphore);
result = connection_reset_fix(sock->fd);
if (result != ISC_R_SUCCESS) {
socket_log(__LINE__, sock,
- NULL, EVENT, NULL, 0, 0,
+ NULL, EVENT,
"closed %d %d %d "
"con_reset_fix_failed",
sock->pending_recv,
default:
strerror_r(socket_errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
+ "socket() failed: %s",
strbuf);
return (ISC_R_UNEXPECTED);
}
result = make_nonblock(sock->fd);
if (result != ISC_R_SUCCESS) {
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"closed %d %d %d make_nonblock_failed",
sock->pending_recv, sock->pending_send,
sock->references);
(char *)&on, sizeof(on)) < 0)) {
strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_RECVPKTINFO) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
+ "setsockopt(%d, IPV6_RECVPKTINFO) failed: %s",
+ sock->fd, strbuf);
}
#else
/* 2292 */
strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_PKTINFO) %s: %s",
- sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
+ sock->fd, strbuf);
}
#endif /* IPV6_RECVPKTINFO */
#endif /* defined(USE_CMSG) */
InterlockedIncrement(&manager->totalSockets);
UNLOCK(&manager->lock);
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat,
- ISC_MSGSET_SOCKET, ISC_MSG_CREATED,
+ socket_log(__LINE__, sock, NULL, CREATION,
"created %u type %u", sock->fd, type);
return (ISC_R_SUCCESS);
REQUIRE(sock->references > 0);
sock->references--;
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"detach_socket %d %d %d",
sock->pending_recv, sock->pending_send,
sock->references);
CONSISTENT(sock);
socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
"internal_accept called");
INSIST(sock->listener);
nsock->pf = adev->address.type.sa.sa_family;
socket_log(__LINE__, nsock, &nsock->address, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
"internal_accept parent %p", sock);
result = make_nonblock(adev->newsocket->fd);
UNLOCK(&nsock->manager->lock);
socket_log(__LINE__, sock, &nsock->address, CREATION,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
"accepted_connection new_socket %p fd %d",
nsock, nsock->fd);
result = ISC_R_SUCCESS;
sock->connected = 1;
socket_log(__LINE__, sock, &sock->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
"internal_connect: success");
}
CONSISTENT(sock);
socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
"internal_recv: %d bytes received", nbytes);
/*
CONSISTENT(sock);
socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALSEND,
"internal_send: task got socket event %p", dev);
if (lpo->buf != NULL) {
socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "free_buffer %p", lpo->buf);
+ "free_buffer %p", lpo->buf);
HeapFree(hHeapHandle, 0, lpo->buf);
lpo->buf = NULL;
errval = GetLastError();
strerror_r(errval, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "Can't set thread priority: %s"),
- strbuf);
+ "Can't set thread priority: %s",
+ strbuf);
}
/*
sock->pending_send--;
if (senddone_is_active(sock, lpo->dev)) {
lpo->dev->result = isc_result;
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"canceled_send");
send_senddone_event(sock, &lpo->dev);
}
INSIST(sock->pending_iocp > 0);
INSIST(sock->pending_accept > 0);
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "Accept: errstatus=%d isc_result=%d", errstatus, isc_result);
+ socket_log(__LINE__, sock, NULL, EVENT,
+ "Accept: errstatus=%d isc_result=%d",
+ errstatus, isc_result);
if (acceptdone_is_active(sock, lpo->adev)) {
if (restart_accept(sock, lpo) == ISC_R_SUCCESS) {
} else {
errstatus = GetLastError();
isc_result = isc__errno2result(errstatus);
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"restart_accept() failed: errstatus=%d isc_result=%d",
errstatus, isc_result);
}
lpo->adev->newsocket->references--;
free_socket(&lpo->adev->newsocket, __LINE__);
lpo->adev->result = isc_result;
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"canceled_accept");
send_acceptdone_event(sock, &lpo->adev);
}
INSIST(sock->pending_connect == 1);
sock->pending_connect = 0;
if (connectdone_is_active(sock, lpo->cdev)) {
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"canceled_connect");
send_connectdone_abort(sock, isc_result);
}
/*
* Exit Completion Port Thread
*/
- manager_log(manager, TRACE,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_EXITING, "SocketIoThread exiting"));
+ manager_log(manager, TRACE, "SocketIoThread exiting");
return ((isc_threadresult_t)0);
}
* Wait for all sockets to be destroyed.
*/
while (!ISC_LIST_EMPTY(manager->socklist)) {
- manager_log(manager, CREATION,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_SOCKETSREMAIN,
- "sockets exist"));
+ manager_log(manager, CREATION, "sockets exist");
WAIT(&manager->shutdown_ok, &manager->lock);
}
if (isc_thread_join((isc_thread_t) manager->hIOCPThreads[i],
NULL) != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_join() for Completion Port %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ "isc_thread_join() for Completion Port failed");
}
/*
* Clean up.
INSIST(!ISC_LINK_LINKED(dev, ev_link));
ISC_LIST_ENQUEUE(sock->recv_list, dev, ev_link);
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"queue_receive_event: event %p -> task %p",
dev, ntask);
}
set_dev_address(address, sock, dev);
if (pktinfo != NULL) {
- socket_log(__LINE__, sock, NULL, TRACE, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_PKTINFOPROVIDED,
+ socket_log(__LINE__, sock, NULL, TRACE,
"pktinfo structure provided, ifindex %u (set to 0)",
pktinfo->ipi6_ifindex);
INSIST(!ISC_LINK_LINKED(dev, ev_link));
ISC_LIST_ENQUEUE(sock->send_list, dev, ev_link);
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ socket_log(__LINE__, sock, NULL, EVENT,
"socket_send: event %p -> task %p",
dev, ntask);
if ((options & ISC_SOCKET_REUSEADDRESS) != 0 &&
isc_sockaddr_getport(sockaddr) != (in_port_t)0 &&
setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
- sizeof(on)) < 0) {
+ sizeof(on)) < 0)
+ {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d) %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ "setsockopt(%d) failed", sock->fd);
/* Press on... */
}
if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
}
}
- socket_log(__LINE__, sock, sockaddr, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "bound");
+ socket_log(__LINE__, sock, sockaddr, TRACE, "bound");
sock->bound = 1;
UNLOCK(&sock->lock);
}
#endif
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "listening");
+ socket_log(__LINE__, sock, NULL, TRACE, "listening");
sock->listener = 1;
_set_state(sock, SOCK_LISTEN);
iocompletionport_update(nsock);
socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND,
"accepting for nsock %p fd %d", nsock, nsock->fd);
/*
# Alphabetically
OBJS = alist.@O@ base64.@O@ cc.@O@ ccmsg.@O@ \
- lib.@O@ \
result.@O@ sexpr.@O@ symtab.@O@ version.@O@
# Alphabetically
SRCS = alist.c base64.c cc.c ccmsg.c \
- lib.c \
result.c sexpr.c symtab.c version.c
# machine generated. The latter are handled specially in the
# install target below.
#
-HEADERS = alist.h base64.h cc.h ccmsg.h events.h lib.h result.h \
+HEADERS = alist.h base64.h cc.h ccmsg.h events.h result.h \
sexpr.h symtab.h symtype.h types.h util.h version.h
SUBDIRS =
TARGETS =
+++ /dev/null
-/*
- * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Portions Copyright (C) 2001 Nominum, Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#ifndef ISCCC_LIB_H
-#define ISCCC_LIB_H 1
-
-/*! \file isccc/lib.h */
-
-#include <isc/types.h>
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-LIBISCCC_EXTERNAL_DATA extern isc_msgcat_t *isccc_msgcat;
-
-void
-isccc_lib_initmsgcat(void);
-/*%
- * Initialize the ISCCC library's message catalog, isccc_msgcat, if it
- * has not already been initialized.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISCCC_LIB_H */
+++ /dev/null
-/*
- * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Portions Copyright (C) 2001 Nominum, Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/once.h>
-#include <isc/msgcat.h>
-#include <isc/util.h>
-
-#include <isccc/lib.h>
-
-/***
- *** Globals
- ***/
-
-LIBISCCC_EXTERNAL_DATA isc_msgcat_t * isccc_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t msgcat_once = ISC_ONCE_INIT;
-
-
-/***
- *** Functions
- ***/
-
-static void
-open_msgcat(void) {
- isc_msgcat_open("libisccc.cat", &isccc_msgcat);
-}
-
-void
-isccc_lib_initmsgcat(void) {
-
- /*
- * Initialize the DNS library's message catalog, isccc_msgcat, if it
- * has not already been initialized.
- */
-
- RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
#include <isc/util.h>
#include <isccc/result.h>
-#include <isccc/lib.h>
static const char *text[ISCCC_R_NRESULTS] = {
"unknown version", /* 1 */
isc_result_t result;
result = isc_result_register(ISC_RESULTCLASS_ISCCC, ISCCC_R_NRESULTS,
- text, isccc_msgcat,
- ISCCC_RESULT_RESULTSET);
+ text, ISCCC_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_register() failed: %u", result);
result = isc_result_registerids(ISC_RESULTCLASS_ISCCC, ISCCC_R_NRESULTS,
- ids, isccc_msgcat,
- ISCCC_RESULT_RESULTSET);
+ ids, ISCCC_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_registerids() failed: %u", result);
static void
initialize(void) {
- isccc_lib_initmsgcat();
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
}
#include <isc/result.h>
#include <isc/util.h>
-#include <isccc/lib.h>
#include <isccc/result.h>
/*
isccc_ccmsg_readmessage
isccc_ccmsg_cancelread
isccc_ccmsg_invalidate
-isccc_lib_initmsgcat
isccc_result_totext
isccc_result_register
isccc_sexpr_cons
isccc_symtab_define
isccc_symtab_undefine
isccc_symtab_foreach
-
-; Exported Data
-
-;isccc_msgcat
<ClCompile Include="..\ccmsg.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\lib.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\result.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClInclude Include="..\include\isccc\events.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\include\isccc\lib.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\include\isccc\result.h">
<Filter>Header Files</Filter>
</ClInclude>
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
<ClCompile Include="..\base64.c" />
<ClCompile Include="..\cc.c" />
<ClCompile Include="..\ccmsg.c" />
- <ClCompile Include="..\lib.c" />
<ClCompile Include="..\result.c" />
<ClCompile Include="..\sexpr.c" />
<ClCompile Include="..\symtab.c" />
<ClInclude Include="..\include\isccc\cc.h" />
<ClInclude Include="..\include\isccc\ccmsg.h" />
<ClInclude Include="..\include\isccc\events.h" />
- <ClInclude Include="..\include\isccc\lib.h" />
<ClInclude Include="..\include\isccc\result.h" />
<ClInclude Include="..\include\isccc\sexpr.h" />
<ClInclude Include="..\include\isccc\symtab.h" />
* information regarding copyright ownership.
*/
-#ifndef NS_LIB_H
-#define NS_LIB_H 1
+#pragma once
/*! \file include/ns/lib.h */
ISC_LANG_BEGINDECLS
LIBNS_EXTERNAL_DATA extern unsigned int ns_pps;
-LIBNS_EXTERNAL_DATA extern isc_msgcat_t *ns_msgcat;
isc_result_t
ns_lib_init(void);
*/
ISC_LANG_ENDDECLS
-
-#endif /* NS_LIB_H */
#include <stddef.h>
#include <isc/mem.h>
-#include <isc/msgcat.h>
#include <isc/mutex.h>
#include <isc/once.h>
#include <isc/util.h>
./lib/dns/ds.c C 2002,2003,2004,2005,2006,2007,2010,2012,2014,2016,2018,2019
./lib/dns/dst_api.c C.NAI 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
./lib/dns/dst_internal.h C.NAI 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2016,2017,2018,2019
-./lib/dns/dst_lib.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019
./lib/dns/dst_openssl.h C 2002,2004,2005,2007,2008,2009,2011,2012,2015,2016,2018,2019
./lib/dns/dst_parse.c C.NAI 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
./lib/dns/dst_parse.h C.NAI 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2012,2014,2016,2017,2018,2019
./lib/dns/include/dns/zt.h C 1999,2000,2001,2002,2004,2005,2006,2007,2011,2016,2017,2018,2019
./lib/dns/include/dst/dst.h C 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
./lib/dns/include/dst/gssapi.h C 2000,2001,2004,2005,2006,2007,2009,2010,2011,2013,2016,2017,2018,2019
-./lib/dns/include/dst/lib.h C 1999,2000,2001,2004,2005,2006,2007,2016,2018,2019
./lib/dns/include/dst/result.h C 1999,2000,2001,2004,2005,2006,2007,2008,2012,2014,2016,2018,2019
./lib/dns/ipkeylist.c C 2016,2018,2019
./lib/dns/iptable.c C 2007,2008,2009,2013,2014,2016,2017,2018,2019
./lib/isc/include/isc/md.h C 2018,2019
./lib/isc/include/isc/mem.h C 1997,1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2015,2016,2017,2018,2019
./lib/isc/include/isc/meminfo.h C 2015,2016,2018,2019
-./lib/isc/include/isc/msgcat.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019
-./lib/isc/include/isc/msgs.h C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2016,2017,2018,2019
./lib/isc/include/isc/mutexblock.h C 1999,2000,2001,2004,2005,2006,2007,2016,2018,2019
./lib/isc/include/isc/netaddr.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2009,2015,2016,2017,2018,2019
./lib/isc/include/isc/netscope.h C 2002,2004,2005,2006,2007,2009,2016,2018,2019
./lib/isc/mutexblock.c C 1999,2000,2001,2004,2005,2007,2011,2012,2016,2018,2019
./lib/isc/netaddr.c C 1999,2000,2001,2002,2004,2005,2007,2010,2011,2012,2014,2015,2016,2017,2018,2019
./lib/isc/netscope.c C 2002,2004,2005,2006,2007,2016,2018,2019
-./lib/isc/nls/msgcat.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019
./lib/isc/nonce.c C 2018,2019
./lib/isc/openssl_shim.c C 2018,2019
./lib/isc/openssl_shim.h C 2018,2019
./lib/isccc/include/isccc/cc.h C.NOM 2001,2004,2005,2006,2007,2013,2014,2016,2018,2019
./lib/isccc/include/isccc/ccmsg.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019
./lib/isccc/include/isccc/events.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019
-./lib/isccc/include/isccc/lib.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019
./lib/isccc/include/isccc/result.h C.NOM 2001,2003,2004,2005,2006,2007,2016,2018,2019
./lib/isccc/include/isccc/sexpr.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019
./lib/isccc/include/isccc/symtab.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019
./lib/isccc/include/isccc/types.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019
./lib/isccc/include/isccc/util.h C.NOM 2001,2004,2005,2006,2007,2014,2016,2018,2019
./lib/isccc/include/isccc/version.h C 2001,2004,2005,2006,2007,2016,2018,2019
-./lib/isccc/lib.c C.NOM 2001,2004,2005,2007,2016,2018,2019
./lib/isccc/result.c C.NOM 2001,2003,2004,2005,2007,2015,2016,2018,2019
./lib/isccc/sexpr.c C.NOM 2001,2004,2005,2007,2014,2015,2016,2018,2019
./lib/isccc/symtab.c C.NOM 2001,2004,2005,2007,2016,2018,2019