2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 18:19:42 +00:00

pullup fixed from 9.3

This commit is contained in:
Mark Andrews 2004-03-16 05:52:24 +00:00
parent 1fa26403d7
commit 28b863e609
38 changed files with 1714 additions and 1454 deletions

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.185 2004/03/05 04:57:30 marka Exp $ */
/* $Id: dig.c,v 1.186 2004/03/16 05:52:13 marka Exp $ */
#include <config.h>
#include <stdlib.h>
@ -1031,7 +1031,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
goto invalid_option;
switch (cmd) {
case 'b':
hash = index(value, '#');
hash = strchr(value, '#');
if (hash != NULL) {
srcport = (in_port_t) parse_uint(hash + 1,
"port number", MAXPORT);

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.46 2004/03/10 02:19:52 marka Exp $ */
/* $Id: config.c,v 1.47 2004/03/16 05:52:14 marka Exp $ */
#include <config.h>
@ -124,8 +124,9 @@ options {\n\
check-names slave warn;\n\
check-names response ignore;\n\
dnssec-enable no; /* Make yes for 9.4. */ \n\
\n\
/* zone */\n\
"
" /* zone */\n\
allow-query {any;};\n\
allow-transfer {any;};\n\
notify yes;\n\
@ -153,8 +154,9 @@ options {\n\
max-journal-size unlimited;\n\
ixfr-from-differences false;\n\
};\n\
\n\
#\n\
"
"#\n\
# Zones in the \"_bind\" view are NOT counted is the count of zones.\n\
#\n\
view \"_bind\" chaos {\n\

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.c,v 1.135 2004/03/05 04:57:48 marka Exp $ */
/* $Id: main.c,v 1.136 2004/03/16 05:52:14 marka Exp $ */
#include <config.h>
@ -216,9 +216,9 @@ library_unexpected_error(const char *file, int line, const char *format,
static void
lwresd_usage(void) {
fprintf(stderr,
"usage: lwresd [-c conffile | -C resolvconffile] "
"[-d debuglevel] [-f|-g]\n"
" [-n number_of_cpus] [-p port]"
"usage: lwresd [-4|-6] [-c conffile | -C resolvconffile] "
"[-d debuglevel]\n"
" [-f|-g] [-n number_of_cpus] [-p port] "
"[-P listen-port] [-s]\n"
" [-t chrootdir] [-u username] [-i pidfile]\n"
" [-m {usage|trace|record}]\n");
@ -231,7 +231,7 @@ usage(void) {
return;
}
fprintf(stderr,
"usage: named [-c conffile] [-d debuglevel] "
"usage: named [-4|-6] [-c conffile] [-d debuglevel] "
"[-f|-g] [-n number_of_cpus]\n"
" [-p port] [-s] [-t chrootdir] [-u username]\n"
" [-m {usage|trace|record}]\n");

View File

@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: rbt_test.txt,v 1.14 2004/03/05 04:58:39 marka Exp $
# $Id: rbt_test.txt,v 1.15 2004/03/16 05:52:14 marka Exp $
add a.vix.com
add b.vix.com

View File

@ -0,0 +1,27 @@
; Copyright (C) 2000-2002 Internet Software Consortium.
;
; Permission to use, copy, modify, and 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 INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM 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.
; $Id: dlv.db.in,v 1.2 2004/03/16 05:52:15 marka Exp $
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
2000042407 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns2
ns2 A 10.53.0.2

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: BINDInstallDlg.cpp,v 1.14 2004/03/09 04:25:06 marka Exp $ */
/* $Id: BINDInstallDlg.cpp,v 1.15 2004/03/16 05:52:15 marka Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
@ -73,14 +73,14 @@
static char THIS_FILE[] = __FILE__;
#endif
typedef struct _exception
typedef struct _xexception
{
_exception(UINT string, ...);
_xexception(UINT string, ...);
CString resString;
} Exception;
_exception::_exception(UINT string, ...)
_xexception::_xexception(UINT string, ...)
{
CString format;
va_list va;
@ -323,14 +323,14 @@ void CBINDInstallDlg::OnUninstall() {
if (CheckBINDService())
StopBINDService();
HANDLE hSCManager = OpenSCManager(NULL, NULL,
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL,
SC_MANAGER_ALL_ACCESS);
if (!hSCManager) {
MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage());
return;
}
HANDLE hService = OpenService(hSCManager, BIND_SERVICE_NAME,
SC_HANDLE hService = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS);
if (!hService && GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST){
MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage());
@ -717,8 +717,8 @@ CBINDInstallDlg::ValidateServiceAccount() {
void
CBINDInstallDlg::RegisterService() {
HANDLE hSCManager;
HANDLE hService;
SC_HANDLE hSCManager;
SC_HANDLE hService;
CString StartName = ".\\" + m_accountName;
/*
@ -772,8 +772,8 @@ CBINDInstallDlg::RegisterService() {
void
CBINDInstallDlg::UpdateService() {
HANDLE hSCManager;
HANDLE hService;
SC_HANDLE hSCManager;
SC_HANDLE hService;
CString StartName = ".\\" + m_accountName;
SetCurrent(IDS_OPEN_SCM);
@ -823,8 +823,8 @@ CBINDInstallDlg::UpdateService() {
void CBINDInstallDlg::UnregisterService(BOOL uninstall) {
BOOL rc = FALSE;
HANDLE hSCManager;
HANDLE hService;
SC_HANDLE hSCManager;
SC_HANDLE hService;
while(1) {
SetCurrent(IDS_OPEN_SCM);
@ -1014,12 +1014,12 @@ void CBINDInstallDlg::StopBINDService() {
SetCurrent(IDS_STOP_SERVICE);
HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager) {
MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage());
}
HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS);
if (!hBINDSvc) {
MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage());
@ -1034,12 +1034,12 @@ void CBINDInstallDlg::StopBINDService() {
void CBINDInstallDlg::StartBINDService() {
SetCurrent(IDS_START_SERVICE);
HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager) {
MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage());
}
HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS);
if (!hBINDSvc) {
MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage());
@ -1053,9 +1053,9 @@ void CBINDInstallDlg::StartBINDService() {
BOOL CBINDInstallDlg::CheckBINDService() {
SERVICE_STATUS svcStatus;
HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (hSCManager) {
HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS);
if (hBINDSvc) {
BOOL rc = ControlService(hBINDSvc,

View File

@ -1,3 +1,4 @@
configure.lineno
port_before.h
port_after.h
config.log
@ -10,4 +11,4 @@ config.cache
config.status
timestamp
libtool
configure.lineno
autom4te.cache

View File

@ -86,7 +86,7 @@
/*
* @(#)netdb.h 8.1 (Berkeley) 6/2/93
* $Id: netdb.h,v 1.14 2004/03/09 06:29:53 marka Exp $
* $Id: netdb.h,v 1.15 2004/03/16 05:52:16 marka Exp $
*/
#ifndef _NETDB_H_
@ -390,7 +390,14 @@ const char *gai_strerror __P((int));
struct hostent *getipnodebyname __P((const char *, int, int, int *));
struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
void freehostent __P((struct hostent *));
#ifdef __GLIBC__
int getnetgrent __P((/* const */ char **, /* const */ char **,
/* const */ char **));
void setnetgrent __P((const char *));
void endnetgrent __P((void));
int innetgr __P((const char *, const char *, const char *,
const char *));
#endif
#ifdef _REENTRANT
#if defined(__hpux) || defined(__osf__) || defined(_AIX)
@ -410,7 +417,7 @@ int endhostent_r __P((struct hostent_data *));
void endhostent_r __P((struct hostent_data *));
#endif
#ifdef __hpux
#if defined(__hpux) || defined(__osf__)
int getnetbyaddr_r __P((int, int,
struct netent *, struct netent_data *));
#else
@ -452,38 +459,75 @@ void endservent_r __P((struct servent_data *));
#endif
#else
/* defined(sun) || defined(bsdi) */
#ifdef __GLIBC__
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
char *, size_t, struct hostent **, int *));
int gethostbyname_r __P((const char *, struct hostent *,
char *, size_t, struct hostent **, int *));
int gethostent_r __P((struct hostent *, char *, size_t,
struct hostent **, int *));
#else
struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *,
char *, int, int *));
struct hostent *gethostbyname_r __P((const char *, struct hostent *,
char *, int, int *));
struct hostent *gethostent_r __P((struct hostent *, char *, int, int *));
#endif
void sethostent_r __P((int));
void endhostent_r __P((void));
#ifdef __GLIBC__
int getnetbyname_r __P((const char *, struct netent *,
char *, size_t, struct netent **, int*));
int getnetbyaddr_r __P((unsigned long int, int, struct netent *,
char *, size_t, struct netent **, int*));
int getnetent_r __P((struct netent *, char *, size_t, struct netent **, int*));
#else
struct netent *getnetbyname_r __P((const char *, struct netent *,
char *, int));
struct netent *getnetbyaddr_r __P((long, int, struct netent *,
char *, int));
struct netent *getnetent_r __P((struct netent *, char *, int));
#endif
void setnetent_r __P((int));
void endnetent_r __P((void));
#ifdef __GLIBC__
int getprotobyname_r __P((const char *, struct protoent *, char *,
size_t, struct protoent **));
int getprotobynumber_r __P((int, struct protoent *, char *, size_t,
struct protoent **));
int getprotoent_r __P((struct protoent *, char *, size_t, struct protoent **));
#else
struct protoent *getprotobyname_r __P((const char *,
struct protoent *, char *, int));
struct protoent *getprotobynumber_r __P((int,
struct protoent *, char *, int));
struct protoent *getprotoent_r __P((struct protoent *, char *, int));
#endif
void setprotoent_r __P((int));
void endprotoent_r __P((void));
#ifdef __GLIBC__
int getservbyname_r __P((const char *name, const char *,
struct servent *, char *, size_t, struct servent **));
int getservbyport_r __P((int port, const char *,
struct servent *, char *, size_t, struct servent **));
int getservent_r __P((struct servent *, char *, size_t, struct servent **));
#else
struct servent *getservbyname_r __P((const char *name, const char *,
struct servent *, char *, int));
struct servent *getservbyport_r __P((int port, const char *,
struct servent *, char *, int));
struct servent *getservent_r __P((struct servent *, char *, int));
#endif
void setservent_r __P((int));
void endservent_r __P((void));
#ifdef __GLIBC__
int getnetgrent_r __P((char **, char **, char **, char *, size_t));
#endif
#endif
#endif
__END_DECLS

View File

@ -1,5 +1,6 @@
#ifndef netgroup_h
#define netgroup_h
#ifndef __GLIBC__
/*
* The standard is crazy. These values "belong" to getnetgrent() and
@ -15,5 +16,5 @@ void setnetgrent __P((const char *));
void endnetgrent __P((void));
int innetgr __P((const char *, const char *, const char *, const char *));
#endif
#endif

View File

@ -1,21 +1,2 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and 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 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.
*/
/* $Id: paths.h,v 1.4 2004/03/16 05:22:24 marka Exp $ */
#define _PATH_DEVNULL "/dev/null"

View File

@ -1,14 +0,0 @@
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and 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 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.

View File

@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.143 2004/03/05 05:09:17 marka Exp $
# $Id: Makefile.in,v 1.144 2004/03/16 05:52:18 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@ -54,7 +54,8 @@ DNSOBJS = acl.@O@ adb.@O@ byaddr.@O@ \
lib.@O@ log.@O@ lookup.@O@ \
master.@O@ masterdump.@O@ message.@O@ \
name.@O@ ncache.@O@ nsec.@O@ order.@O@ peer.@O@ portlist.@O@ \
rbt.@O@ rbtdb.@O@ rbtdb64.@O@ rdata.@O@ rdatalist.@O@ \
rbt.@O@ rbtdb.@O@ rbtdb64.@O@ rcode.@O@ rdata.@O@ \
rdatalist.@O@ \
rdataset.@O@ rdatasetiter.@O@ rdataslab.@O@ request.@O@ \
resolver.@O@ result.@O@ rootns.@O@ sdb.@O@ soa.@O@ ssu.@O@ \
stats.@O@ tcpmsg.@O@ time.@O@ timer.@O@ tkey.@O@ \
@ -71,7 +72,8 @@ SRCS = acl.c adb.c byaddr.c \
lib.c log.c lookup.c \
master.c masterdump.c message.c \
name.c ncache.c nsec.c order.c peer.c portlist.c \
rbt.c rbtdb.c rbtdb64.c rdata.c rdatalist.c \
rbt.c rbtdb.c rbtdb64.c rcode.c rdata.c \
rdatalist.c \
rdataset.c rdatasetiter.c rdataslab.c request.c \
resolver.c result.c rootns.c sdb.c soa.c ssu.c \
stats.c tcpmsg.c time.c timer.c tkey.c \

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: gen.c,v 1.72 2004/03/05 05:09:20 marka Exp $ */
/* $Id: gen.c,v 1.73 2004/03/16 05:52:18 marka Exp $ */
#include <config.h>
@ -96,20 +96,20 @@
const char copyright[] =
"/*\n"
" * Copyright (C) 1998%s Internet Software Consortium.\n"
" * Copyright (C) 2004%s Internet Systems Consortium, Inc. (\"ISC\")\n"
" * Copyright (C) 1998-2003 Internet Software Consortium.\n"
" *\n"
" * Permission to use, copy, modify, and distribute this software for any\n"
" * purpose with or without fee is hereby granted, provided that the above\n"
" * copyright notice and this permission notice appear in all copies.\n"
" *\n"
" * THE SOFTWARE IS PROVIDED \"AS IS\" AND INTERNET SOFTWARE CONSORTIUM\n"
" * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL\n"
" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL\n"
" * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,\n"
" * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING\n"
" * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,\n"
" * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION\n"
" * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
" * THE SOFTWARE IS PROVIDED \"AS IS\" AND ISC DISCLAIMS ALL WARRANTIES WITH\n"
" * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n"
" * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,\n"
" * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n"
" * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n"
" * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n"
" * PERFORMANCE OF THIS SOFTWARE.\n"
" */\n"
"\n"
"/***************\n"
@ -585,7 +585,7 @@ main(int argc, char **argv) {
sd(0, "", buf, filetype);
if (time(&now) != -1) {
if ((tm = localtime(&now)) != NULL && tm->tm_year > 98)
if ((tm = localtime(&now)) != NULL && tm->tm_year > 104)
sprintf(year, "-%d", tm->tm_year + 1900);
else
year[0] = 0;
@ -667,31 +667,6 @@ main(int argc, char **argv) {
insert_into_typenames(254, "maila", METAQUESTIONONLY);
insert_into_typenames(255, "any", METAQUESTIONONLY);
fprintf(stdout, "\ntypedef struct {\n");
fprintf(stdout, "\tconst char *name;\n");
fprintf(stdout, "\tunsigned int flags;\n");
fprintf(stdout, "} typeattr_t;\n");
fprintf(stdout, "static typeattr_t typeattr[] = {\n");
for (i = 0; i <= maxtype; i++) {
ttn = find_typename(i);
if (ttn == NULL) {
const char *attrs;
if (i >= 128 && i < 255)
attrs = "DNS_RDATATYPEATTR_UNKNOWN | "
"DNS_RDATATYPEATTR_META";
else
attrs = "DNS_RDATATYPEATTR_UNKNOWN";
fprintf(stdout, "\t{ \"TYPE%d\", %s}%s\n",
i, attrs, PRINT_COMMA(i));
} else {
fprintf(stdout, "\t{ \"%s\", %s }%s\n",
upper(ttn->typename),
upper(ttn->attr),
PRINT_COMMA(i));
}
}
fprintf(stdout, "};\n");
/*
* Spit out a quick and dirty hash function. Here,
* we walk through the list of type names, and calculate
@ -707,7 +682,7 @@ main(int argc, char **argv) {
fprintf(stdout, "\t\tif (sizeof(_s) - 1 == _n && \\\n"
"\t\t strncasecmp(_s,(_tn),"
"(sizeof(_s) - 1)) == 0) { \\\n");
fprintf(stdout, "\t\t\tif ((typeattr[_d].flags & "
fprintf(stdout, "\t\t\tif ((dns_rdatatype_attributes(_d) & "
"DNS_RDATATYPEATTR_RESERVED) != 0) \\\n");
fprintf(stdout, "\t\t\t\treturn (ISC_R_NOTIMPLEMENTED); \\\n");
fprintf(stdout, "\t\t\t*(_tp) = _d; \\\n");
@ -752,6 +727,29 @@ main(int argc, char **argv) {
}
fprintf(stdout, "\t}\n");
fprintf(stdout, "#define RDATATYPE_ATTRIBUTE_SW \\\n");
fprintf(stdout, "\tswitch (type) { \\\n");
for (i = 0; i <= maxtype; i++) {
ttn = find_typename(i);
if (ttn == NULL)
continue;
fprintf(stdout, "\tcase %u: return (%s); \\\n",
i, upper(ttn->attr));
}
fprintf(stdout, "\t}\n");
fprintf(stdout, "#define RDATATYPE_TOTEXT_SW \\\n");
fprintf(stdout, "\tswitch (type) { \\\n");
for (i = 0; i <= maxtype; i++) {
ttn = find_typename(i);
if (ttn == NULL)
continue;
fprintf(stdout, "\tcase %u: return "
"(str_totext(\"%s\", target)); \\\n",
i, upper(ttn->typename));
}
fprintf(stdout, "\t}\n");
fputs("#endif /* DNS_CODE_H */\n", stdout);
} else if (type_enum) {
char *s;

473
lib/dns/rcode.c Normal file
View File

@ -0,0 +1,473 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and 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 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.
*/
/* $Id: rcode.c,v 1.2 2004/03/16 05:52:18 marka Exp $ */
#include <config.h>
#include <ctype.h>
#include <isc/buffer.h>
#include <isc/parseint.h>
#include <isc/print.h>
#include <isc/region.h>
#include <isc/result.h>
#include <isc/stdio.h>
#include <isc/stdlib.h>
#include <isc/string.h>
#include <isc/types.h>
#include <isc/util.h>
#include <dns/cert.h>
#include <dns/keyflags.h>
#include <dns/keyvalues.h>
#include <dns/rcode.h>
#include <dns/rdataclass.h>
#include <dns/result.h>
#include <dns/secalg.h>
#include <dns/secproto.h>
#define RETERR(x) \
do { \
isc_result_t _r = (x); \
if (_r != ISC_R_SUCCESS) \
return (_r); \
} while (0)
#define NUMBERSIZE sizeof("037777777777") /* 2^32-1 octal + NUL */
#define RCODENAMES \
/* standard rcodes */ \
{ dns_rcode_noerror, "NOERROR", 0}, \
{ dns_rcode_formerr, "FORMERR", 0}, \
{ dns_rcode_servfail, "SERVFAIL", 0}, \
{ dns_rcode_nxdomain, "NXDOMAIN", 0}, \
{ dns_rcode_notimp, "NOTIMP", 0}, \
{ dns_rcode_refused, "REFUSED", 0}, \
{ dns_rcode_yxdomain, "YXDOMAIN", 0}, \
{ dns_rcode_yxrrset, "YXRRSET", 0}, \
{ dns_rcode_nxrrset, "NXRRSET", 0}, \
{ dns_rcode_notauth, "NOTAUTH", 0}, \
{ dns_rcode_notzone, "NOTZONE", 0},
#define ERCODENAMES \
/* extended rcodes */ \
{ dns_rcode_badvers, "BADVERS", 0}, \
{ 0, NULL, 0 }
#define TSIGRCODENAMES \
/* extended rcodes */ \
{ dns_tsigerror_badsig, "BADSIG", 0}, \
{ dns_tsigerror_badkey, "BADKEY", 0}, \
{ dns_tsigerror_badtime, "BADTIME", 0}, \
{ dns_tsigerror_badmode, "BADMODE", 0}, \
{ dns_tsigerror_badname, "BADNAME", 0}, \
{ dns_tsigerror_badalg, "BADALG", 0}, \
{ 0, NULL, 0 }
/* RFC2538 section 2.1 */
#define CERTNAMES \
{ 1, "PKIX", 0}, \
{ 2, "SPKI", 0}, \
{ 3, "PGP", 0}, \
{ 253, "URI", 0}, \
{ 254, "OID", 0}, \
{ 0, NULL, 0}
/* RFC2535 section 7, RFC3110 */
#define SECALGNAMES \
{ DNS_KEYALG_RSAMD5, "RSAMD5", 0 }, \
{ DNS_KEYALG_RSAMD5, "RSA", 0 }, \
{ DNS_KEYALG_DH, "DH", 0 }, \
{ DNS_KEYALG_DSA, "DSA", 0 }, \
{ DNS_KEYALG_ECC, "ECC", 0 }, \
{ DNS_KEYALG_RSASHA1, "RSASHA1", 0 }, \
{ DNS_KEYALG_INDIRECT, "INDIRECT", 0 }, \
{ DNS_KEYALG_PRIVATEDNS, "PRIVATEDNS", 0 }, \
{ DNS_KEYALG_PRIVATEOID, "PRIVATEOID", 0 }, \
{ 0, NULL, 0}
/* RFC2535 section 7.1 */
#define SECPROTONAMES \
{ 0, "NONE", 0 }, \
{ 1, "TLS", 0 }, \
{ 2, "EMAIL", 0 }, \
{ 3, "DNSSEC", 0 }, \
{ 4, "IPSEC", 0 }, \
{ 255, "ALL", 0 }, \
{ 0, NULL, 0}
struct tbl {
unsigned int value;
const char *name;
int flags;
};
static struct tbl rcodes[] = { RCODENAMES ERCODENAMES };
static struct tbl tsigrcodes[] = { RCODENAMES TSIGRCODENAMES };
static struct tbl certs[] = { CERTNAMES };
static struct tbl secalgs[] = { SECALGNAMES };
static struct tbl secprotos[] = { SECPROTONAMES };
static struct keyflag {
const char *name;
unsigned int value;
unsigned int mask;
} keyflags[] = {
{ "NOCONF", 0x4000, 0xC000 },
{ "NOAUTH", 0x8000, 0xC000 },
{ "NOKEY", 0xC000, 0xC000 },
{ "FLAG2", 0x2000, 0x2000 },
{ "EXTEND", 0x1000, 0x1000 },
{ "FLAG4", 0x0800, 0x0800 },
{ "FLAG5", 0x0400, 0x0400 },
{ "USER", 0x0000, 0x0300 },
{ "ZONE", 0x0100, 0x0300 },
{ "HOST", 0x0200, 0x0300 },
{ "NTYP3", 0x0300, 0x0300 },
{ "FLAG8", 0x0080, 0x0080 },
{ "FLAG9", 0x0040, 0x0040 },
{ "FLAG10", 0x0020, 0x0020 },
{ "FLAG11", 0x0010, 0x0010 },
{ "SIG0", 0x0000, 0x000F },
{ "SIG1", 0x0001, 0x000F },
{ "SIG2", 0x0002, 0x000F },
{ "SIG3", 0x0003, 0x000F },
{ "SIG4", 0x0004, 0x000F },
{ "SIG5", 0x0005, 0x000F },
{ "SIG6", 0x0006, 0x000F },
{ "SIG7", 0x0007, 0x000F },
{ "SIG8", 0x0008, 0x000F },
{ "SIG9", 0x0009, 0x000F },
{ "SIG10", 0x000A, 0x000F },
{ "SIG11", 0x000B, 0x000F },
{ "SIG12", 0x000C, 0x000F },
{ "SIG13", 0x000D, 0x000F },
{ "SIG14", 0x000E, 0x000F },
{ "SIG15", 0x000F, 0x000F },
{ "KSK", DNS_KEYFLAG_KSK, DNS_KEYFLAG_KSK },
{ NULL, 0, 0 }
};
static isc_result_t
str_totext(const char *source, isc_buffer_t *target) {
unsigned int l;
isc_region_t region;
isc_buffer_availableregion(target, &region);
l = strlen(source);
if (l > region.length)
return (ISC_R_NOSPACE);
memcpy(region.base, source, l);
isc_buffer_add(target, l);
return (ISC_R_SUCCESS);
}
static isc_result_t
maybe_numeric(unsigned int *valuep, isc_textregion_t *source,
unsigned int max, isc_boolean_t hex_allowed)
{
isc_result_t result;
isc_uint32_t n;
char buffer[NUMBERSIZE];
if (! isdigit(source->base[0] & 0xff) ||
source->length > NUMBERSIZE - 1)
return (ISC_R_BADNUMBER);
/*
* We have a potential number. Try to parse it with
* isc_parse_uint32(). isc_parse_uint32() requires
* null termination, so we must make a copy.
*/
strncpy(buffer, source->base, NUMBERSIZE);
INSIST(buffer[source->length] == '\0');
result = isc_parse_uint32(&n, buffer, 10);
if (result == ISC_R_BADNUMBER && hex_allowed)
result = isc_parse_uint32(&n, buffer, 16);
if (result != ISC_R_SUCCESS)
return (result);
if (n > max)
return (ISC_R_RANGE);
*valuep = n;
return (ISC_R_SUCCESS);
}
static isc_result_t
dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source,
struct tbl *table, unsigned int max)
{
isc_result_t result;
int i;
result = maybe_numeric(valuep, source, max, ISC_FALSE);
if (result != ISC_R_BADNUMBER)
return (result);
for (i = 0; table[i].name != NULL; i++) {
unsigned int n;
n = strlen(table[i].name);
if (n == source->length &&
strncasecmp(source->base, table[i].name, n) == 0) {
*valuep = table[i].value;
return (ISC_R_SUCCESS);
}
}
return (DNS_R_UNKNOWN);
}
static isc_result_t
dns_mnemonic_totext(unsigned int value, isc_buffer_t *target,
struct tbl *table)
{
int i = 0;
char buf[sizeof("4294967296")];
while (table[i].name != NULL) {
if (table[i].value == value) {
return (str_totext(table[i].name, target));
}
i++;
}
snprintf(buf, sizeof(buf), "%u", value);
return (str_totext(buf, target));
}
isc_result_t
dns_rcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, rcodes, 0xffff));
*rcodep = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_rcode_totext(dns_rcode_t rcode, isc_buffer_t *target) {
return (dns_mnemonic_totext(rcode, target, rcodes));
}
isc_result_t
dns_tsigrcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, tsigrcodes, 0xffff));
*rcodep = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target) {
return (dns_mnemonic_totext(rcode, target, tsigrcodes));
}
isc_result_t
dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, certs, 0xffff));
*certp = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_cert_totext(dns_cert_t cert, isc_buffer_t *target) {
return (dns_mnemonic_totext(cert, target, certs));
}
isc_result_t
dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, secalgs, 0xff));
*secalgp = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target) {
return (dns_mnemonic_totext(secalg, target, secalgs));
}
isc_result_t
dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, secprotos, 0xff));
*secprotop = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_secproto_totext(dns_secproto_t secproto, isc_buffer_t *target) {
return (dns_mnemonic_totext(secproto, target, secprotos));
}
isc_result_t
dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source)
{
isc_result_t result;
char *text, *end;
unsigned int value, mask;
result = maybe_numeric(&value, source, 0xffff, ISC_TRUE);
if (result == ISC_R_SUCCESS) {
*flagsp = value;
return (ISC_R_SUCCESS);
}
if (result != ISC_R_BADNUMBER)
return (result);
text = source->base;
end = source->base + source->length;
value = mask = 0;
while (text < end) {
struct keyflag *p;
unsigned int len;
char *delim = memchr(text, '|', end - text);
if (delim != NULL)
len = delim - text;
else
len = end - text;
for (p = keyflags; p->name != NULL; p++) {
if (strncasecmp(p->name, text, len) == 0)
break;
}
if (p->name == NULL)
return (DNS_R_UNKNOWNFLAG);
value |= p->value;
#ifdef notyet
if ((mask & p->mask) != 0)
warn("overlapping key flags");
#endif
mask |= p->mask;
text += len;
if (delim != NULL)
text++; /* Skip "|" */
}
*flagsp = value;
return (ISC_R_SUCCESS);
}
/*
* This uses lots of hard coded values, but how often do we actually
* add classes?
*/
isc_result_t
dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) {
#define COMPARE(string, rdclass) \
if (((sizeof(string) - 1) == source->length) \
&& (strncasecmp(source->base, string, source->length) == 0)) { \
*classp = rdclass; \
return (ISC_R_SUCCESS); \
}
switch (tolower((unsigned char)source->base[0])) {
case 'a':
COMPARE("any", dns_rdataclass_any);
break;
case 'c':
/*
* RFC1035 says the mnemonic for the CHAOS class is CH,
* but historical BIND practice is to call it CHAOS.
* We will accept both forms, but only generate CH.
*/
COMPARE("ch", dns_rdataclass_chaos);
COMPARE("chaos", dns_rdataclass_chaos);
if (source->length > 5 &&
source->length < (5 + sizeof("65000")) &&
strncasecmp("class", source->base, 5) == 0) {
char buf[sizeof("65000")];
char *endp;
unsigned int val;
strncpy(buf, source->base + 5, source->length - 5);
buf[source->length - 5] = '\0';
val = strtoul(buf, &endp, 10);
if (*endp == '\0' && val <= 0xffff) {
*classp = (dns_rdataclass_t)val;
return (ISC_R_SUCCESS);
}
}
break;
case 'h':
COMPARE("hs", dns_rdataclass_hs);
COMPARE("hesiod", dns_rdataclass_hs);
break;
case 'i':
COMPARE("in", dns_rdataclass_in);
break;
case 'n':
COMPARE("none", dns_rdataclass_none);
break;
case 'r':
COMPARE("reserved0", dns_rdataclass_reserved0);
break;
}
#undef COMPARE
return (DNS_R_UNKNOWN);
}
isc_result_t
dns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target) {
char buf[sizeof("CLASS65535")];
switch (rdclass) {
case dns_rdataclass_any:
return (str_totext("ANY", target));
case dns_rdataclass_chaos:
return (str_totext("CH", target));
case dns_rdataclass_hs:
return (str_totext("HS", target));
case dns_rdataclass_in:
return (str_totext("IN", target));
case dns_rdataclass_none:
return (str_totext("NONE", target));
case dns_rdataclass_reserved0:
return (str_totext("RESERVED0", target));
default:
snprintf(buf, sizeof(buf), "CLASS%u", rdclass);
return (str_totext(buf, target));
}
}
void
dns_rdataclass_format(dns_rdataclass_t rdclass,
char *array, unsigned int size)
{
isc_result_t result;
isc_buffer_t buf;
isc_buffer_init(&buf, array, size);
result = dns_rdataclass_totext(rdclass, &buf);
/*
* Null terminate.
*/
if (result == ISC_R_SUCCESS) {
if (isc_buffer_availablelength(&buf) >= 1)
isc_buffer_putuint8(&buf, 0);
else
result = ISC_R_NOSPACE;
}
if (result != ISC_R_SUCCESS) {
snprintf(array, size, "<unknown>");
array[size - 1] = '\0';
}
}

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.183 2004/03/05 05:09:23 marka Exp $ */
/* $Id: rdata.c,v 1.184 2004/03/16 05:52:18 marka Exp $ */
#include <config.h>
#include <ctype.h>
@ -33,6 +33,7 @@
#include <dns/callbacks.h>
#include <dns/cert.h>
#include <dns/compress.h>
#include <dns/enumtype.h>
#include <dns/keyflags.h>
#include <dns/keyvalues.h>
#include <dns/rcode.h>
@ -244,122 +245,6 @@ static const char decdigits[] = "0123456789";
#define META 0x0001
#define RESERVED 0x0002
#define RCODENAMES \
/* standard rcodes */ \
{ dns_rcode_noerror, "NOERROR", 0}, \
{ dns_rcode_formerr, "FORMERR", 0}, \
{ dns_rcode_servfail, "SERVFAIL", 0}, \
{ dns_rcode_nxdomain, "NXDOMAIN", 0}, \
{ dns_rcode_notimp, "NOTIMP", 0}, \
{ dns_rcode_refused, "REFUSED", 0}, \
{ dns_rcode_yxdomain, "YXDOMAIN", 0}, \
{ dns_rcode_yxrrset, "YXRRSET", 0}, \
{ dns_rcode_nxrrset, "NXRRSET", 0}, \
{ dns_rcode_notauth, "NOTAUTH", 0}, \
{ dns_rcode_notzone, "NOTZONE", 0},
#define ERCODENAMES \
/* extended rcodes */ \
{ dns_rcode_badvers, "BADVERS", 0}, \
{ 0, NULL, 0 }
#define TSIGRCODENAMES \
/* extended rcodes */ \
{ dns_tsigerror_badsig, "BADSIG", 0}, \
{ dns_tsigerror_badkey, "BADKEY", 0}, \
{ dns_tsigerror_badtime, "BADTIME", 0}, \
{ dns_tsigerror_badmode, "BADMODE", 0}, \
{ dns_tsigerror_badname, "BADNAME", 0}, \
{ dns_tsigerror_badalg, "BADALG", 0}, \
{ 0, NULL, 0 }
/* RFC2538 section 2.1 */
#define CERTNAMES \
{ 1, "PKIX", 0}, \
{ 2, "SPKI", 0}, \
{ 3, "PGP", 0}, \
{ 253, "URI", 0}, \
{ 254, "OID", 0}, \
{ 0, NULL, 0}
/* RFC2535 section 7, RFC3110 */
#define SECALGNAMES \
{ DNS_KEYALG_RSAMD5, "RSAMD5", 0 }, \
{ DNS_KEYALG_RSAMD5, "RSA", 0 }, \
{ DNS_KEYALG_DH, "DH", 0 }, \
{ DNS_KEYALG_DSA, "DSA", 0 }, \
{ DNS_KEYALG_ECC, "ECC", 0 }, \
{ DNS_KEYALG_RSASHA1, "RSASHA1", 0 }, \
{ DNS_KEYALG_INDIRECT, "INDIRECT", 0 }, \
{ DNS_KEYALG_PRIVATEDNS, "PRIVATEDNS", 0 }, \
{ DNS_KEYALG_PRIVATEOID, "PRIVATEOID", 0 }, \
{ 0, NULL, 0}
/* RFC2535 section 7.1 */
#define SECPROTONAMES \
{ 0, "NONE", 0 }, \
{ 1, "TLS", 0 }, \
{ 2, "EMAIL", 0 }, \
{ 3, "DNSSEC", 0 }, \
{ 4, "IPSEC", 0 }, \
{ 255, "ALL", 0 }, \
{ 0, NULL, 0}
struct tbl {
unsigned int value;
const char *name;
int flags;
};
static struct tbl rcodes[] = { RCODENAMES ERCODENAMES };
static struct tbl tsigrcodes[] = { RCODENAMES TSIGRCODENAMES };
static struct tbl certs[] = { CERTNAMES };
static struct tbl secalgs[] = { SECALGNAMES };
static struct tbl secprotos[] = { SECPROTONAMES };
static struct keyflag {
const char *name;
unsigned int value;
unsigned int mask;
} keyflags[] = {
{ "NOCONF", 0x4000, 0xC000 },
{ "NOAUTH", 0x8000, 0xC000 },
{ "NOKEY", 0xC000, 0xC000 },
{ "FLAG2", 0x2000, 0x2000 },
{ "EXTEND", 0x1000, 0x1000 },
{ "FLAG4", 0x0800, 0x0800 },
{ "FLAG5", 0x0400, 0x0400 },
{ "USER", 0x0000, 0x0300 },
{ "ZONE", 0x0100, 0x0300 },
{ "HOST", 0x0200, 0x0300 },
{ "NTYP3", 0x0300, 0x0300 },
{ "FLAG8", 0x0080, 0x0080 },
{ "FLAG9", 0x0040, 0x0040 },
{ "FLAG10", 0x0020, 0x0020 },
{ "FLAG11", 0x0010, 0x0010 },
{ "SIG0", 0x0000, 0x000F },
{ "SIG1", 0x0001, 0x000F },
{ "SIG2", 0x0002, 0x000F },
{ "SIG3", 0x0003, 0x000F },
{ "SIG4", 0x0004, 0x000F },
{ "SIG5", 0x0005, 0x000F },
{ "SIG6", 0x0006, 0x000F },
{ "SIG7", 0x0007, 0x000F },
{ "SIG8", 0x0008, 0x000F },
{ "SIG9", 0x0009, 0x000F },
{ "SIG10", 0x000A, 0x000F },
{ "SIG11", 0x000B, 0x000F },
{ "SIG12", 0x000C, 0x000F },
{ "SIG13", 0x000D, 0x000F },
{ "SIG14", 0x000E, 0x000F },
{ "SIG15", 0x000F, 0x000F },
{ "KSK", DNS_KEYFLAG_KSK, DNS_KEYFLAG_KSK },
{ NULL, 0, 0 }
};
/***
*** Initialization
***/
@ -987,199 +872,12 @@ dns_rdata_checknames(dns_rdata_t *rdata, dns_name_t *owner, dns_name_t *bad)
unsigned int
dns_rdatatype_attributes(dns_rdatatype_t type)
{
if (type < (sizeof(typeattr)/sizeof(typeattr[0])))
return (typeattr[type].flags);
RDATATYPE_ATTRIBUTE_SW
if (type >= (dns_rdatatype_t)128 && type < (dns_rdatatype_t)255)
return (DNS_RDATATYPEATTR_UNKNOWN | DNS_RDATATYPEATTR_META);
return (DNS_RDATATYPEATTR_UNKNOWN);
}
#define NUMBERSIZE sizeof("037777777777") /* 2^32-1 octal + NUL */
/*
* If 'source' contains a decimal number no larger than 'max',
* store it at '*value' and return ISC_R_SUCCESS. If out of
* range return ISC_R_RANGE; if not a number, return
* ISC_R_BADNUMBER.
*/
static isc_result_t
maybe_numeric(unsigned int *valuep, isc_textregion_t *source,
unsigned int max, isc_boolean_t hex_allowed)
{
isc_result_t result;
isc_uint32_t n;
char buffer[NUMBERSIZE];
if (! isdigit(source->base[0] & 0xff) ||
source->length > NUMBERSIZE - 1)
return (ISC_R_BADNUMBER);
/*
* We have a potential number. Try to parse it with
* isc_parse_uint32(). isc_parse_uint32() requires
* null termination, so we must make a copy.
*/
strncpy(buffer, source->base, NUMBERSIZE);
INSIST(buffer[source->length] == '\0');
result = isc_parse_uint32(&n, buffer, 10);
if (result == ISC_R_BADNUMBER && hex_allowed)
result = isc_parse_uint32(&n, buffer, 16);
if (result != ISC_R_SUCCESS)
return (result);
if (n > max)
return (ISC_R_RANGE);
*valuep = n;
return (ISC_R_SUCCESS);
}
static isc_result_t
dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source,
struct tbl *table, unsigned int max)
{
isc_result_t result;
int i;
result = maybe_numeric(valuep, source, max, ISC_FALSE);
if (result != ISC_R_BADNUMBER)
return (result);
for (i = 0; table[i].name != NULL; i++) {
unsigned int n;
n = strlen(table[i].name);
if (n == source->length &&
strncasecmp(source->base, table[i].name, n) == 0) {
*valuep = table[i].value;
return (ISC_R_SUCCESS);
}
}
return (DNS_R_UNKNOWN);
}
static isc_result_t
dns_mnemonic_totext(unsigned int value, isc_buffer_t *target,
struct tbl *table)
{
int i = 0;
char buf[sizeof("4294967296")];
while (table[i].name != NULL) {
if (table[i].value == value) {
return (str_totext(table[i].name, target));
}
i++;
}
snprintf(buf, sizeof(buf), "%u", value);
return (str_totext(buf, target));
}
/*
* This uses lots of hard coded values, but how often do we actually
* add classes?
*/
isc_result_t
dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) {
#define COMPARE(string, rdclass) \
if (((sizeof(string) - 1) == source->length) \
&& (strncasecmp(source->base, string, source->length) == 0)) { \
*classp = rdclass; \
return (ISC_R_SUCCESS); \
}
switch (tolower((unsigned char)source->base[0])) {
case 'a':
COMPARE("any", dns_rdataclass_any);
break;
case 'c':
/*
* RFC1035 says the mnemonic for the CHAOS class is CH,
* but historical BIND practice is to call it CHAOS.
* We will accept both forms, but only generate CH.
*/
COMPARE("ch", dns_rdataclass_chaos);
COMPARE("chaos", dns_rdataclass_chaos);
if (source->length > 5 &&
source->length < (5 + sizeof("65000")) &&
strncasecmp("class", source->base, 5) == 0) {
char buf[sizeof("65000")];
char *endp;
unsigned int val;
strncpy(buf, source->base + 5, source->length - 5);
buf[source->length - 5] = '\0';
val = strtoul(buf, &endp, 10);
if (*endp == '\0' && val <= 0xffff) {
*classp = (dns_rdataclass_t)val;
return (ISC_R_SUCCESS);
}
}
break;
case 'h':
COMPARE("hs", dns_rdataclass_hs);
COMPARE("hesiod", dns_rdataclass_hs);
break;
case 'i':
COMPARE("in", dns_rdataclass_in);
break;
case 'n':
COMPARE("none", dns_rdataclass_none);
break;
case 'r':
COMPARE("reserved0", dns_rdataclass_reserved0);
break;
}
#undef COMPARE
return (DNS_R_UNKNOWN);
}
isc_result_t
dns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target) {
char buf[sizeof("CLASS65535")];
switch (rdclass) {
case dns_rdataclass_any:
return (str_totext("ANY", target));
case dns_rdataclass_chaos:
return (str_totext("CH", target));
case dns_rdataclass_hs:
return (str_totext("HS", target));
case dns_rdataclass_in:
return (str_totext("IN", target));
case dns_rdataclass_none:
return (str_totext("NONE", target));
case dns_rdataclass_reserved0:
return (str_totext("RESERVED0", target));
default:
snprintf(buf, sizeof(buf), "CLASS%u", rdclass);
return (str_totext(buf, target));
}
}
void
dns_rdataclass_format(dns_rdataclass_t rdclass,
char *array, unsigned int size)
{
isc_result_t result;
isc_buffer_t buf;
isc_buffer_init(&buf, array, size);
result = dns_rdataclass_totext(rdclass, &buf);
/*
* Null terminate.
*/
if (result == ISC_R_SUCCESS) {
if (isc_buffer_availablelength(&buf) >= 1)
isc_buffer_putuint8(&buf, 0);
else
result = ISC_R_NOSPACE;
}
if (result != ISC_R_SUCCESS) {
snprintf(array, size, "<unknown>");
array[size - 1] = '\0';
}
}
isc_result_t
dns_rdatatype_fromtext(dns_rdatatype_t *typep, isc_textregion_t *source) {
unsigned int hash;
@ -1225,8 +923,7 @@ isc_result_t
dns_rdatatype_totext(dns_rdatatype_t type, isc_buffer_t *target) {
char buf[sizeof("TYPE65535")];
if (type < (sizeof(typeattr)/sizeof(typeattr[0])))
return (str_totext(typeattr[type].name, target));
RDATATYPE_TOTEXT_SW
snprintf(buf, sizeof(buf), "TYPE%u", type);
return (str_totext(buf, target));
}
@ -1255,121 +952,6 @@ dns_rdatatype_format(dns_rdatatype_t rdtype,
}
}
/* XXXRTH Should we use a hash table here? */
isc_result_t
dns_rcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, rcodes, 0xffff));
*rcodep = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_rcode_totext(dns_rcode_t rcode, isc_buffer_t *target) {
return (dns_mnemonic_totext(rcode, target, rcodes));
}
isc_result_t
dns_tsigrcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, tsigrcodes, 0xffff));
*rcodep = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target) {
return (dns_mnemonic_totext(rcode, target, tsigrcodes));
}
isc_result_t
dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, certs, 0xffff));
*certp = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_cert_totext(dns_cert_t cert, isc_buffer_t *target) {
return (dns_mnemonic_totext(cert, target, certs));
}
isc_result_t
dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, secalgs, 0xff));
*secalgp = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target) {
return (dns_mnemonic_totext(secalg, target, secalgs));
}
isc_result_t
dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source) {
unsigned int value;
RETERR(dns_mnemonic_fromtext(&value, source, secprotos, 0xff));
*secprotop = value;
return (ISC_R_SUCCESS);
}
isc_result_t
dns_secproto_totext(dns_secproto_t secproto, isc_buffer_t *target) {
return (dns_mnemonic_totext(secproto, target, secprotos));
}
isc_result_t
dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source)
{
isc_result_t result;
char *text, *end;
unsigned int value, mask;
result = maybe_numeric(&value, source, 0xffff, ISC_TRUE);
if (result == ISC_R_SUCCESS) {
*flagsp = value;
return (ISC_R_SUCCESS);
}
if (result != ISC_R_BADNUMBER)
return (result);
text = source->base;
end = source->base + source->length;
value = mask = 0;
while (text < end) {
struct keyflag *p;
unsigned int len;
char *delim = memchr(text, '|', end - text);
if (delim != NULL)
len = delim - text;
else
len = end - text;
for (p = keyflags; p->name != NULL; p++) {
if (strncasecmp(p->name, text, len) == 0)
break;
}
if (p->name == NULL)
return (DNS_R_UNKNOWNFLAG);
value |= p->value;
#ifdef notyet
if ((mask & p->mask) != 0)
warn("overlapping key flags");
#endif
mask |= p->mask;
text += len;
if (delim != NULL)
text++; /* Skip "|" */
}
*flagsp = value;
return (ISC_R_SUCCESS);
}
/*
* Private function.
*/

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.283 2004/03/05 05:09:24 marka Exp $ */
/* $Id: resolver.c,v 1.284 2004/03/16 05:52:19 marka Exp $ */
#include <config.h>
@ -6272,7 +6272,7 @@ dns_resolver_disable_algorithm(dns_resolver_t *resolver, dns_name_t *name,
RWUNLOCK(&resolver->alglock, isc_rwlocktype_write);
#endif
return (result);
};
}
isc_boolean_t
dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
@ -6307,4 +6307,4 @@ dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
if (found)
return (ISC_FALSE);
return (dst_algorithm_supported(alg));
};
}

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.c,v 1.25 2004/03/05 05:09:25 marka Exp $ */
/* $Id: time.c,v 1.26 2004/03/16 05:52:19 marka Exp $ */
#include <config.h>
@ -165,7 +165,7 @@ dns_time32_fromtext(const char *source, isc_uint32_t *target) {
result = dns_time64_fromtext(source, &value64);
if (result != ISC_R_SUCCESS)
return (result);
*target = value64;
*target = (isc_uint32_t)value64;
return (ISC_R_SUCCESS);
}

View File

@ -3,11 +3,6 @@ LIBRARY libdns
; Exported Functions
EXPORTS
dns_a6_init
dns_a6_reset
dns_a6_invalidate
dns_a6_copy
dns_a6_foreach
dns_acl_create
dns_acl_appendelement
dns_acl_any
@ -275,9 +270,6 @@ dns_message_setsortorder
dns_message_rendersection
dns_message_settimeadjust
dns_message_gettimeadjust
dns_label_type
dns_label_countbits
dns_label_getbit
dns_name_init
dns_name_reset
dns_name_invalidate
@ -285,7 +277,6 @@ dns_name_setbuffer
dns_name_hasbuffer
dns_name_isabsolute
dns_name_iswildcard
dns_name_requiresedns
dns_name_hash
dns_name_fullcompare
dns_name_compare
@ -293,7 +284,6 @@ dns_name_equal
dns_name_rdatacompare
dns_name_issubdomain
dns_name_matcheswildcard
dns_name_depth
dns_name_countlabels
dns_name_getlabel
dns_name_getlabelsequence
@ -308,7 +298,6 @@ dns_name_tofilenametext
dns_name_downcase
dns_name_concatenate
dns_name_split
dns_name_splitatdepth
dns_name_dup
dns_name_dupwithoffsets
dns_name_free
@ -738,3 +727,26 @@ dns_zone_getupdatedisabled
dns_zone_getkeydirectory
dns_zone_setkeydirectory
dns_dnssec_findzonekeys2
dns_zone_fulldumptostream
dns_request_createvia3
dns_zone_setaltxfrsource4
dns_zone_setaltxfrsource6
dns_zone_checknames
dns_zonemgr_resumexfrs
dns_portlist_add
dns_resolver_getudpsize
dns_acl_elementmatch
dns_rdata_checkowner
dns_rdataset_getnoqname
dns_portlist_detach
dns_dispatchmgr_setblackportlist
dns_portlist_create
dns_view_excludedelegationonly
dns_view_setrootdelonly
dns_resolver_reset_algorithms
dns_resolver_setudpsize
dns_peer_settransfersource
dns_resolver_disable_algorithm
dns_resolver_addalternate
dns_view_adddelegationonly

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "libdns_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6g/inc32/openssl/include" /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6g/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6k/inc32/openssl/include" /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6k/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /YX /FD /c
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../isc/win32/Release/libisc.lib ../../../../openssl-0.9.6g/out32dll/libeay32.lib /nologo /dll /machine:I386 /out:"../../../Build/Release/libdns.dll"
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../isc/win32/Release/libisc.lib ../../../../openssl-0.9.6k/out32dll/libeay32.lib /nologo /dll /machine:I386 /out:"../../../Build/Release/libdns.dll"
!ELSEIF "$(CFG)" == "libdns - Win32 Debug"
@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "libdns_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6g/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /FR /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6k/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /FR /YX /FD /GZ /c
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@ -81,7 +81,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../isc/win32/debug/libisc.lib ../../../../openssl-0.9.6g/out32dll/libeay32.lib /nologo /dll /map /debug /machine:I386 /out:"../../../Build/Debug/libdns.dll" /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../isc/win32/debug/libisc.lib ../../../../openssl-0.9.6k/out32dll/libeay32.lib /nologo /dll /map /debug /machine:I386 /out:"../../../Build/Debug/libdns.dll" /pdbtype:sept
!ENDIF
@ -98,10 +98,6 @@ LINK32=link.exe
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\include\dns\a6.h
# End Source File
# Begin Source File
SOURCE=..\include\dns\acl.h
# End Source File
# Begin Source File
@ -246,6 +242,10 @@ SOURCE=..\include\dns\peer.h
# End Source File
# Begin Source File
SOURCE=..\include\dns\portlist.h
# End Source File
# Begin Source File
SOURCE=..\include\dns\rbt.h
# End Source File
# Begin Source File
@ -398,10 +398,6 @@ SOURCE=..\include\dns\zt.h
# PROP Default_Filter "c"
# Begin Source File
SOURCE=..\a6.c
# End Source File
# Begin Source File
SOURCE=..\acl.c
# End Source File
# Begin Source File
@ -523,6 +519,10 @@ SOURCE=..\peer.c
# End Source File
# Begin Source File
SOURCE=..\portlist.c
# End Source File
# Begin Source File
SOURCE=..\rbt.c
# End Source File
# Begin Source File
@ -535,6 +535,10 @@ SOURCE=..\rbtdb64.c
# End Source File
# Begin Source File
SOURCE=..\rcode.c
# End Source File
# Begin Source File
SOURCE=..\rdata.c
# End Source File
# Begin Source File

View File

@ -45,7 +45,6 @@ CLEAN :"libisc - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\a6.obj"
-@erase "$(INTDIR)\acl.obj"
-@erase "$(INTDIR)\adb.obj"
-@erase "$(INTDIR)\byaddr.obj"
@ -86,9 +85,11 @@ CLEAN :
-@erase "$(INTDIR)\opensslrsa_link.obj"
-@erase "$(INTDIR)\order.obj"
-@erase "$(INTDIR)\peer.obj"
-@erase "$(INTDIR)\portlist.obj"
-@erase "$(INTDIR)\rbt.obj"
-@erase "$(INTDIR)\rbtdb.obj"
-@erase "$(INTDIR)\rbtdb64.obj"
-@erase "$(INTDIR)\rcode.obj"
-@erase "$(INTDIR)\rdata.obj"
-@erase "$(INTDIR)\rdatalist.obj"
-@erase "$(INTDIR)\rdataset.obj"
@ -124,7 +125,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6g/inc32/openssl/include" /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6g/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6k/inc32/openssl/include" /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6k/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@ -164,11 +165,10 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\libdns.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../isc/win32/Release/libisc.lib ../../../../openssl-0.9.6g/out32dll/libeay32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libdns.pdb" /machine:I386 /def:".\libdns.def" /out:"../../../Build/Release/libdns.dll" /implib:"$(OUTDIR)\libdns.lib"
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../isc/win32/Release/libisc.lib ../../../../openssl-0.9.6k/out32dll/libeay32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libdns.pdb" /machine:I386 /def:".\libdns.def" /out:"../../../Build/Release/libdns.dll" /implib:"$(OUTDIR)\libdns.lib"
DEF_FILE= \
".\libdns.def"
LINK32_OBJS= \
"$(INTDIR)\a6.obj" \
"$(INTDIR)\acl.obj" \
"$(INTDIR)\adb.obj" \
"$(INTDIR)\byaddr.obj" \
@ -197,9 +197,11 @@ LINK32_OBJS= \
"$(INTDIR)\nsec.obj" \
"$(INTDIR)\order.obj" \
"$(INTDIR)\peer.obj" \
"$(INTDIR)\portlist.obj" \
"$(INTDIR)\rbt.obj" \
"$(INTDIR)\rbtdb.obj" \
"$(INTDIR)\rbtdb64.obj" \
"$(INTDIR)\rcode.obj" \
"$(INTDIR)\rdata.obj" \
"$(INTDIR)\rdatalist.obj" \
"$(INTDIR)\rdataset.obj" \
@ -268,8 +270,6 @@ CLEAN :"libisc - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\a6.obj"
-@erase "$(INTDIR)\a6.sbr"
-@erase "$(INTDIR)\acl.obj"
-@erase "$(INTDIR)\acl.sbr"
-@erase "$(INTDIR)\adb.obj"
@ -350,12 +350,16 @@ CLEAN :
-@erase "$(INTDIR)\order.sbr"
-@erase "$(INTDIR)\peer.obj"
-@erase "$(INTDIR)\peer.sbr"
-@erase "$(INTDIR)\portlist.obj"
-@erase "$(INTDIR)\portlist.sbr"
-@erase "$(INTDIR)\rbt.obj"
-@erase "$(INTDIR)\rbt.sbr"
-@erase "$(INTDIR)\rbtdb.obj"
-@erase "$(INTDIR)\rbtdb.sbr"
-@erase "$(INTDIR)\rbtdb64.obj"
-@erase "$(INTDIR)\rbtdb64.sbr"
-@erase "$(INTDIR)\rcode.obj"
-@erase "$(INTDIR)\rcode.sbr"
-@erase "$(INTDIR)\rdata.obj"
-@erase "$(INTDIR)\rdata.sbr"
-@erase "$(INTDIR)\rdatalist.obj"
@ -422,7 +426,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6g/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6k/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@ -460,7 +464,6 @@ RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libdns.bsc"
BSC32_SBRS= \
"$(INTDIR)\a6.sbr" \
"$(INTDIR)\acl.sbr" \
"$(INTDIR)\adb.sbr" \
"$(INTDIR)\byaddr.sbr" \
@ -489,9 +492,11 @@ BSC32_SBRS= \
"$(INTDIR)\nsec.sbr" \
"$(INTDIR)\order.sbr" \
"$(INTDIR)\peer.sbr" \
"$(INTDIR)\portlist.sbr" \
"$(INTDIR)\rbt.sbr" \
"$(INTDIR)\rbtdb.sbr" \
"$(INTDIR)\rbtdb64.sbr" \
"$(INTDIR)\rcode.sbr" \
"$(INTDIR)\rdata.sbr" \
"$(INTDIR)\rdatalist.sbr" \
"$(INTDIR)\rdataset.sbr" \
@ -537,11 +542,10 @@ BSC32_SBRS= \
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../isc/win32/debug/libisc.lib ../../../../openssl-0.9.6g/out32dll/libeay32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libdns.pdb" /map:"$(INTDIR)\libdns.map" /debug /machine:I386 /def:".\libdns.def" /out:"../../../Build/Debug/libdns.dll" /implib:"$(OUTDIR)\libdns.lib" /pdbtype:sept
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../isc/win32/debug/libisc.lib ../../../../openssl-0.9.6k/out32dll/libeay32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libdns.pdb" /map:"$(INTDIR)\libdns.map" /debug /machine:I386 /def:".\libdns.def" /out:"../../../Build/Debug/libdns.dll" /implib:"$(OUTDIR)\libdns.lib" /pdbtype:sept
DEF_FILE= \
".\libdns.def"
LINK32_OBJS= \
"$(INTDIR)\a6.obj" \
"$(INTDIR)\acl.obj" \
"$(INTDIR)\adb.obj" \
"$(INTDIR)\byaddr.obj" \
@ -570,9 +574,11 @@ LINK32_OBJS= \
"$(INTDIR)\nsec.obj" \
"$(INTDIR)\order.obj" \
"$(INTDIR)\peer.obj" \
"$(INTDIR)\portlist.obj" \
"$(INTDIR)\rbt.obj" \
"$(INTDIR)\rbtdb.obj" \
"$(INTDIR)\rbtdb64.obj" \
"$(INTDIR)\rcode.obj" \
"$(INTDIR)\rdata.obj" \
"$(INTDIR)\rdatalist.obj" \
"$(INTDIR)\rdataset.obj" \
@ -631,24 +637,6 @@ LINK32_OBJS= \
!IF "$(CFG)" == "libdns - Win32 Release" || "$(CFG)" == "libdns - Win32 Debug"
SOURCE=..\a6.c
!IF "$(CFG)" == "libdns - Win32 Release"
"$(INTDIR)\a6.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "libdns - Win32 Debug"
"$(INTDIR)\a6.obj" "$(INTDIR)\a6.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\acl.c
!IF "$(CFG)" == "libdns - Win32 Release"
@ -833,7 +821,7 @@ SOURCE=..\dispatch.c
!IF "$(CFG)" == "libdns - Win32 Release"
CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6g/inc32/openssl/include" /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6g/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6k/inc32/openssl/include" /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6k/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
"$(INTDIR)\dispatch.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) @<<
@ -843,7 +831,7 @@ CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "../../../../../openssl-0.9.6g/inc32/ope
!ELSEIF "$(CFG)" == "libdns - Win32 Debug"
CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6g/inc32" /I "../sec/dst/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../isc/win32" /I "../../isc/win32/include" /I "../../isc/include" /I "../../dns/sec/dst/include" /I "../../../../openssl-0.9.6k/inc32" /I "../sec/dst/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "USE_MD5" /D "OPENSSL" /D "DST_USE_PRIVATE_OPENSSL" /D "LIBDNS_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libdns.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
"$(INTDIR)\dispatch.obj" "$(INTDIR)\dispatch.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) @<<
@ -1155,6 +1143,25 @@ SOURCE=..\peer.c
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\portlist.c
!IF "$(CFG)" == "libdns - Win32 Release"
"$(INTDIR)\portlist.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "libdns - Win32 Debug"
"$(INTDIR)\portlist.obj" "$(INTDIR)\portlist.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\rbt.c
@ -1209,6 +1216,24 @@ SOURCE=..\rbtdb64.c
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\rcode.c
!IF "$(CFG)" == "libdns - Win32 Release"
"$(INTDIR)\rcode.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "libdns - Win32 Debug"
"$(INTDIR)\rcode.obj" "$(INTDIR)\rcode.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\rdata.c

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.c,v 1.83 2004/03/05 05:10:46 marka Exp $ */
/* $Id: log.c,v 1.84 2004/03/16 05:52:20 marka Exp $ */
/* Principal Authors: DCL */
@ -27,7 +27,6 @@
#include <time.h>
#include <sys/types.h> /* dev_t FreeBSD 2.1 */
#include <sys/stat.h>
#include <isc/dir.h>
#include <isc/file.h>
@ -36,6 +35,7 @@
#include <isc/mem.h>
#include <isc/msgs.h>
#include <isc/print.h>
#include <isc/stat.h>
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/time.h>

View File

@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
"$Id: netscope.c,v 1.6 2004/03/05 05:10:47 marka Exp $";
"$Id: netscope.c,v 1.7 2004/03/16 05:52:20 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <isc/string.h>
@ -28,7 +28,9 @@ static char rcsid[] =
isc_result_t
isc_netscope_pton(int af, char *scopename, void *addr, isc_uint32_t *zoneid) {
char *ep;
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
unsigned int ifid;
#endif
struct in6_addr *in6;
isc_uint32_t zone;
isc_uint64_t llz;

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.70 2004/03/05 05:11:44 marka Exp $ */
/* $Id: entropy.c,v 1.71 2004/03/16 05:52:21 marka Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@ -189,7 +189,7 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
/*FALLTHROUGH*/
case isc_usocketsource_reading:
if (sz_to_recv != 0) {
if (sz_to_recv != 0U) {
n = recv(fd, buf, sz_to_recv, 0);
if (n < 0) {
if (errno == EWOULDBLOCK ||

View File

@ -0,0 +1,53 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and 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 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.
*/
/* $Id: stat.h,v 1.2 2004/03/16 05:52:21 marka Exp $ */
#ifndef ISC_STAT_H
#define ISC_STAT_H 1
/*****
***** Module Info
*****/
/*
* Portable netdb.h support.
*
* This module is responsible for defining S_IS??? macros.
*
* MP:
* No impact.
*
* Reliability:
* No anticipated impact.
*
* Resources:
* N/A.
*
* Security:
* No anticipated impact.
*
*/
/***
*** Imports.
***/
#include <sys/types.h>
#include <sys/stat.h>
#endif /* ISC_STAT_H */

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ipv6.h,v 1.11 2004/03/05 05:12:05 marka Exp $ */
/* $Id: ipv6.h,v 1.12 2004/03/16 05:52:23 marka Exp $ */
#ifndef ISC_IPV6_H
#define ISC_IPV6_H 1
@ -43,35 +43,39 @@
* RFC 2553.
*/
#define s6_addr8 s6_addr
#define in6_addr in_addr6
#ifndef IN6ADDR_ANY_INIT
#define IN6ADDR_ANY_INIT {{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}
#endif
#ifndef IN6ADDR_LOOPBACK_INIT
#define IN6ADDR_LOOPBACK_INIT {{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}
#endif
LIBISC_EXTERNAL_DATA extern const struct in_addr6 in6addr_any;
LIBISC_EXTERNAL_DATA extern const struct in_addr6 in6addr_loopback;
LIBISC_EXTERNAL_DATA extern const struct in6_addr isc_in6addr_any;
LIBISC_EXTERNAL_DATA extern const struct in6_addr isc_in6addr_loopback;
/*
* Unspecified
*/
#ifndef IN6_IS_ADDR_UNSPECIFIED
#define IN6_IS_ADDR_UNSPECIFIED(a) \
*((u_long *)((a)->s6_addr) ) == 0 && \
*((u_long *)((a)->s6_addr) + 1) == 0 && \
*((u_long *)((a)->s6_addr) + 2) == 0 && \
*((u_long *)((a)->s6_addr) + 3) == 0 \
)
#endif
/*
* Loopback
*/
#ifndef IN6_IS_ADDR_LOOPBACK
#define IN6_IS_ADDR_LOOPBACK(a) (\
*((u_long *)((a)->s6_addr) ) == 0 && \
*((u_long *)((a)->s6_addr) + 1) == 0 && \
*((u_long *)((a)->s6_addr) + 2) == 0 && \
*((u_long *)((a)->s6_addr) + 3) == htonl(1) \
)
#endif
/*
* IPv4 compatible
@ -96,16 +100,21 @@ LIBISC_EXTERNAL_DATA extern const struct in_addr6 in6addr_loopback;
* Multicast
*/
#define IN6_IS_ADDR_MULTICAST(a) \
((a)->s6_addr8[0] == 0xffU)
((a)->s6_addr[0] == 0xffU)
/*
* Unicast link / site local.
*/
#ifndef IN6_IS_ADDR_LINKLOCAL
#define IN6_IS_ADDR_LINKLOCAL(a) (\
(*((u_long *)((a)->s6_addr) ) == 0xfe) && \
((*((u_long *)((a)->s6_addr) + 1) & 0xc0) == 0x80))
#endif
#ifndef IN6_IS_ADDR_SITELOCAL
#define IN6_IS_ADDR_SITELOCAL(a) (\
(*((u_long *)((a)->s6_addr) ) == 0xfe) && \
((*((u_long *)((a)->s6_addr) + 1) & 0xc0) == 0xc0))
#endif
#endif /* ISC_IPV6_H */

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: offset.h,v 1.3 2004/03/05 05:12:05 marka Exp $ */
/* $Id: offset.h,v 1.4 2004/03/16 05:52:23 marka Exp $ */
#ifndef ISC_OFFSET_H
#define ISC_OFFSET_H 1
@ -26,7 +26,7 @@
#include <limits.h> /* Required for CHAR_BIT. */
#include <sys/types.h>
typedef off_t isc_offset_t;
typedef _off_t isc_offset_t;
/*
* POSIX says "Additionally, blkcnt_t and off_t are extended signed integral

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h,v 1.8 2004/03/05 05:12:05 marka Exp $ */
/* $Id: platform.h,v 1.9 2004/03/16 05:52:23 marka Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
@ -31,6 +31,7 @@
***/
#define ISC_PLATFORM_HAVEIPV6
#define ISC_PLATFORM_HAVEIN6PKTINFO
#define ISC_PLATFORM_NEEDPORTT
#undef MSG_TRUNC
#define ISC_PLATFORM_NEEDNTOP
@ -40,6 +41,7 @@
#define ISC_PLATFORM_QUADFORMAT "I64"
#define ISC_PLATFORM_NEEDSTRSEP
#define ISC_PLATFORM_NEEDSTRLCPY
/*
* Used to control how extern data is linked; needed for Win32 platforms.

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.h,v 1.26 2004/03/05 05:12:06 marka Exp $ */
/* $Id: time.h,v 1.27 2004/03/16 05:52:23 marka Exp $ */
#ifndef ISC_TIME_H
#define ISC_TIME_H 1
@ -243,6 +243,8 @@ isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len);
* 'buf' points to an array of at least len chars
*
*/
isc_uint32_t
isc_time_seconds(const isc_time_t *t);
ISC_LANG_ENDDECLS

View File

@ -15,15 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ipv6.c,v 1.5 2004/03/05 05:11:57 marka Exp $ */
#define off_t _off_t
/* $Id: ipv6.c,v 1.6 2004/03/16 05:52:22 marka Exp $ */
#include <isc/net.h>
#include <isc/platform.h>
LIBISC_EXTERNAL_DATA const struct in6_addr in6addr_any =
LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_any =
IN6ADDR_ANY_INIT;
LIBISC_EXTERNAL_DATA const struct in6_addr in6addr_loopback =
LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_loopback =
IN6ADDR_LOOPBACK_INIT;

View File

@ -218,6 +218,8 @@ isc_netaddr_any
isc_netaddr_any6
isc_netaddr_ismulticast
isc_netaddr_fromv4mapped
isc_netaddr_setzone
isc_netscope_pton
isc_ntpaths_init
isc_ntpaths_get
isc_ondestroy_init
@ -421,6 +423,14 @@ isc_win32os_versioncheck
isc_socket_ipv6only
isc_region_compare
isc_socket_filter
isc_string_strlcpy
isc_rwlock_tryupgrade
isc_rwlock_downgrade
isc_sockaddr_isexperimental
isc_net_disableipv4
isc_net_disableipv6
isc_task_getcurrenttime
isc_net_probe_ipv6only
; Exported Data

View File

@ -161,6 +161,10 @@ SOURCE=.\socket.c
# End Source File
# Begin Source File
SOURCE=.\strerror.c
# End Source File
# Begin Source File
SOURCE=.\stdio.c
# End Source File
# Begin Source File
@ -169,10 +173,6 @@ SOURCE=.\stdtime.c
# End Source File
# Begin Source File
SOURCE=.\strerror.c
# End Source File
# Begin Source File
SOURCE=.\syslog.c
# End Source File
# Begin Source File
@ -187,10 +187,6 @@ SOURCE=.\time.c
SOURCE=.\version.c
# End Source File
# Begin Source File
SOURCE=.\win32os.c
# End Source File
# End Group
# Begin Group "Header Files"
@ -305,7 +301,7 @@ SOURCE=..\include\isc\interfaceiter.h
# End Source File
# Begin Source File
SOURCE=.\include\isc\ipv6.h
SOURCE=..\include\isc\ipv6.h
# End Source File
# Begin Source File
@ -373,6 +369,10 @@ SOURCE=..\include\isc\netaddr.h
# End Source File
# Begin Source File
SOURCE=..\include\isc\netscope.h
# End Source File
# Begin Source File
SOURCE=.\include\isc\netdb.h
# End Source File
# Begin Source File
@ -393,11 +393,11 @@ SOURCE=..\include\isc\ondestroy.h
# End Source File
# Begin Source File
SOURCE=..\include\isc\os.h
SOURCE=..\include\isc\parseint.h
# End Source File
# Begin Source File
SOURCE=..\include\isc\parseint.h
SOURCE=..\include\isc\os.h
# End Source File
# Begin Source File
@ -465,11 +465,11 @@ SOURCE=..\include\isc\stdio.h
# End Source File
# Begin Source File
SOURCE=.\include\isc\stdtime.h
SOURCE=..\include\isc\strerror.h
# End Source File
# Begin Source File
SOURCE=.\include\isc\strerror.h
SOURCE=.\include\isc\stdtime.h
# End Source File
# Begin Source File
@ -509,6 +509,10 @@ SOURCE=..\include\isc\timer.h
# End Source File
# Begin Source File
SOURCE=.\include\isc\win32os.h
# End Source File
# Begin Source File
SOURCE=..\include\isc\types.h
# End Source File
# Begin Source File
@ -523,10 +527,6 @@ SOURCE=..\include\isc\util.h
SOURCE=..\..\..\versions.h
# End Source File
# Begin Source File
SOURCE=.\include\isc\win32os.h
# End Source File
# End Group
# Begin Group "Resource Files"
@ -633,6 +633,10 @@ SOURCE=..\netaddr.c
# End Source File
# Begin Source File
SOURCE=..\netscope.c
# End Source File
# Begin Source File
SOURCE=..\ondestroy.c
# End Source File
# Begin Source File
@ -695,6 +699,10 @@ SOURCE=..\taskpool.c
SOURCE=..\timer.c
# End Source File
# Begin Source File
SOURCE=.\win32os.c
# End Source File
# End Group
# Begin Source File

View File

@ -74,6 +74,7 @@ CLEAN :
-@erase "$(INTDIR)\mutexblock.obj"
-@erase "$(INTDIR)\net.obj"
-@erase "$(INTDIR)\netaddr.obj"
-@erase "$(INTDIR)\netscope.obj"
-@erase "$(INTDIR)\ntpaths.obj"
-@erase "$(INTDIR)\once.obj"
-@erase "$(INTDIR)\ondestroy.obj"
@ -171,6 +172,7 @@ LINK32_OBJS= \
"$(INTDIR)\msgcat.obj" \
"$(INTDIR)\mutexblock.obj" \
"$(INTDIR)\netaddr.obj" \
"$(INTDIR)\netscope.obj" \
"$(INTDIR)\ondestroy.obj" \
"$(INTDIR)\quota.obj" \
"$(INTDIR)\random.obj" \
@ -277,6 +279,8 @@ CLEAN :
-@erase "$(INTDIR)\net.sbr"
-@erase "$(INTDIR)\netaddr.obj"
-@erase "$(INTDIR)\netaddr.sbr"
-@erase "$(INTDIR)\netscope.obj"
-@erase "$(INTDIR)\netscope.sbr"
-@erase "$(INTDIR)\ntpaths.obj"
-@erase "$(INTDIR)\ntpaths.sbr"
-@erase "$(INTDIR)\once.obj"
@ -402,6 +406,7 @@ BSC32_SBRS= \
"$(INTDIR)\msgcat.sbr" \
"$(INTDIR)\mutexblock.sbr" \
"$(INTDIR)\netaddr.sbr" \
"$(INTDIR)\netscope.sbr" \
"$(INTDIR)\ondestroy.sbr" \
"$(INTDIR)\quota.sbr" \
"$(INTDIR)\random.sbr" \
@ -478,6 +483,7 @@ LINK32_OBJS= \
"$(INTDIR)\msgcat.obj" \
"$(INTDIR)\mutexblock.obj" \
"$(INTDIR)\netaddr.obj" \
"$(INTDIR)\netscope.obj" \
"$(INTDIR)\ondestroy.obj" \
"$(INTDIR)\quota.obj" \
"$(INTDIR)\random.obj" \
@ -1373,6 +1379,24 @@ SOURCE=..\netaddr.c
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\netscope.c
!IF "$(CFG)" == "libisc - Win32 Release"
"$(INTDIR)\netscope.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
"$(INTDIR)\netscope.obj" "$(INTDIR)\netscope.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\ondestroy.c

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: net.c,v 1.8 2004/03/05 05:11:57 marka Exp $ */
/* $Id: net.c,v 1.9 2004/03/16 05:52:22 marka Exp $ */
#include <config.h>
@ -140,14 +140,14 @@ isc_net_probeipv4(void) {
return (ipv4_result);
}
#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef WANT_IPV6
isc_result_t
isc_net_probeipv6(void) {
initialize();
return (ipv6_result);
}
#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef WANT_IPV6
static void
try_ipv6only(void) {
#ifdef IPV6_V6ONLY

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.c,v 1.37 2004/03/05 05:11:59 marka Exp $ */
/* $Id: time.c,v 1.38 2004/03/16 05:52:22 marka Exp $ */
#include <config.h>
@ -200,6 +200,19 @@ isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) {
return (i3);
}
isc_uint32_t
isc_time_seconds(const isc_time_t *t) {
SYSTEMTIME st;
/*
* Convert the time to a SYSTEMTIME structure and the grab the
* milliseconds
*/
FileTimeToSystemTime(&t->absolute, &st);
return ((isc_uint32_t)(st.wMilliseconds / 1000));
}
isc_uint32_t
isc_time_nanoseconds(const isc_time_t *t) {
SYSTEMTIME st;

View File

@ -1,19 +1,19 @@
echo off
rem
rem Copyright (C) 2001-2 Internet Software Consortium.
rem Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
rem Copyright (C) 2001-2002 Internet Software Consortium.
rem
rem Permission to use, copy, modify, and distribute this software for any
rem purpose with or without fee is hereby granted, provided that the above
rem copyright notice and this permission notice appear in all copies.
rem
rem THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
rem DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
rem IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
rem INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
rem FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
rem NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
rem WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
rem THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
rem REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
rem AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
rem LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
rem OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
rem PERFORMANCE OF THIS SOFTWARE.
rem BuildAll.bat
rem This script sets up the files necessary ready to build BIND 9
@ -25,7 +25,7 @@ rem OpenSSL is a prerequisite for building and running this release of
rem BIND 9. You must fetch the OpenSSL sources yourself from
rem http://www.OpenSSL.org/ and compile it yourself. The code must reside
rem at the same level as the bind 9.2.0 source tree and it's top-level
rem directory be named openssl-0.9.6g. This restriction will be lifted in
rem directory be named openssl-0.9.6k. This restriction will be lifted in
rem a future release of BIND 9 for Windows NT/2000/XP.
echo Setting up the BIND files required for the build

View File

@ -1,19 +1,19 @@
echo off
rem
rem Copyright (C) 2000-2002 Internet Software Consortium.
rem Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
rem Copyright (C) 2001-2002 Internet Software Consortium.
rem
rem Permission to use, copy, modify, and distribute this software for any
rem purpose with or without fee is hereby granted, provided that the above
rem copyright notice and this permission notice appear in all copies.
rem
rem THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
rem DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
rem IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
rem INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
rem FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
rem NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
rem WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
rem THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
rem REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
rem AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
rem LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
rem OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
rem PERFORMANCE OF THIS SOFTWARE.
rem BuildSetup.bat
rem This script sets up the files necessary ready to build BIND 9.
@ -32,7 +32,7 @@ rem Generate header files for lib/dns
call dnsheadergen.bat
echo Ensure that the OpenSSL sources are at the same level in
echo the directory tree and is named openssl-0.9.6g or libdns
echo the directory tree and is named openssl-0.9.6k or libdns
echo will not build.
rem Make sure that the Build directories are there.
@ -50,7 +50,7 @@ copy ..\FAQ ..\Build\Release
echo Copying the OpenSSL DLL.
copy ..\..\openssl-0.9.6g\out32dll\libeay32.dll ..\Build\Release\
copy ..\..\openssl-0.9.6k\out32dll\libeay32.dll ..\Build\Release\
rem Done

View File

@ -1,19 +1,19 @@
echo off
rem
rem Copyright (C) 2000, 2001 Internet Software Consortium.
rem Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
rem Copyright (C) 2001-2002 Internet Software Consortium.
rem
rem Permission to use, copy, modify, and distribute this software for any
rem purpose with or without fee is hereby granted, provided that the above
rem copyright notice and this permission notice appear in all copies.
rem
rem THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
rem DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
rem IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
rem INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
rem FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
rem NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
rem WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
rem THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
rem REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
rem AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
rem LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
rem OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
rem PERFORMANCE OF THIS SOFTWARE.
cd ..\lib\dns
cd win32

View File

@ -2,19 +2,13 @@ Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2001, 2003 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: readme1st.txt,v 1.11 2004/03/05 05:14:21 marka Exp $
$Id: readme1st.txt,v 1.12 2004/03/16 05:52:24 marka Exp $
Release of BIND 9.2.0 for Windows NT/2000
Release of BIND 9.4 for Window NT/2000
Date: 10-Aug-2001.
This is the first release of BIND 9.2.0 for Windows NT/2000. As such
it should be fully tested on a test system before installing on a
production system or anywhere that is considered critical for Internet
access. The release has not been thoroughly tested. While IPv6
addresses should work, there is no support yet for a BIND server using
an IPv6 stack. Only IPv4 stacks are supported on the box running this
version of BIND. IPv6 stacks will be supported in a future release.
This is a feature release of BIND 9.4 for Window NT/2000. Only
IPv4 stacks are supported on the box running this version of BIND.
IPv6 stacks will be supported in a future release.
Kit Installation Information
@ -75,6 +69,11 @@ started and stopped in the same way as any other service and
automatically starts whenever the system is booted. Signals are
not supported and are in fact ignored.
Note: Unlike most Windows applications, named does not, change its
working directory when started as a service. If you wish to use
relative files in named.conf you will need to specify a working
directory.
Documentation
This kit includes Documentation in HTML format. The documentation is not
@ -110,6 +109,8 @@ BIND running on that system.
This will be fixed in a future release.
Messages are logged to the Application log in the EventViewer.
Problems
Please report all problems to bind9-bugs@isc.org and not to me. All