From 28b863e609ff2d97b78663b46894494cfa2ea411 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 16 Mar 2004 05:52:24 +0000 Subject: [PATCH] pullup fixed from 9.3 --- bin/dig/dig.c | 4 +- bin/named/config.c | 12 +- bin/named/main.c | 12 +- bin/tests/rbt_test.txt | 156 +-- bin/tests/system/dnssec/ns2/dlv.db.in | 27 + bin/win32/BINDInstall/BINDInstallDlg.cpp | 36 +- lib/bind/.cvsignore | 3 +- lib/bind/include/netdb.h | 50 +- lib/bind/include/netgroup.h | 3 +- lib/bind/port/irix/include/paths.h | 19 - lib/bind/port/unknown/include/Makefile.in | 14 - lib/dns/Makefile.in | 8 +- lib/dns/gen.c | 80 +- lib/dns/rcode.c | 473 +++++++ lib/dns/rdata.c | 430 +------ lib/dns/resolver.c | 6 +- lib/dns/time.c | 4 +- lib/dns/win32/libdns.def | 34 +- lib/dns/win32/libdns.dsp | 28 +- lib/dns/win32/libdns.mak | 85 +- lib/isc/log.c | 4 +- lib/isc/netscope.c | 4 +- lib/isc/unix/entropy.c | 4 +- lib/isc/unix/include/isc/stat.h | 53 + lib/isc/win32/include/isc/ipv6.h | 25 +- lib/isc/win32/include/isc/offset.h | 4 +- lib/isc/win32/include/isc/platform.h | 4 +- lib/isc/win32/include/isc/time.h | 4 +- lib/isc/win32/ipv6.c | 8 +- lib/isc/win32/libisc.def | 10 + lib/isc/win32/libisc.dsp | 1416 +++++++++++---------- lib/isc/win32/libisc.mak | 24 + lib/isc/win32/net.c | 6 +- lib/isc/win32/time.c | 15 +- win32utils/BuildAll.bat | 28 +- win32utils/BuildSetup.bat | 28 +- win32utils/dnsheadergen.bat | 24 +- win32utils/readme1st.txt | 23 +- 38 files changed, 1714 insertions(+), 1454 deletions(-) create mode 100644 bin/tests/system/dnssec/ns2/dlv.db.in create mode 100644 lib/dns/rcode.c create mode 100644 lib/isc/unix/include/isc/stat.h diff --git a/bin/dig/dig.c b/bin/dig/dig.c index e00bbac1a1..ddf561f920 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -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 #include @@ -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); diff --git a/bin/named/config.c b/bin/named/config.c index 4c737e2674..8c5eaeb902 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -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 @@ -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\ diff --git a/bin/named/main.c b/bin/named/main.c index 690e41e5a1..6804ff0323 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -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 @@ -216,12 +216,12 @@ 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"); + " [-m {usage|trace|record}]\n"); } static void @@ -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"); diff --git a/bin/tests/rbt_test.txt b/bin/tests/rbt_test.txt index ce22acac7f..0cdd0013f6 100644 --- a/bin/tests/rbt_test.txt +++ b/bin/tests/rbt_test.txt @@ -13,81 +13,81 @@ # 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 $ - -add a.vix.com -add b.vix.com -add c.vix.com -print -add a.b.c.d.e.f.vix.com -add b.b.c.d.e.f.vix.com -add c.b.c.d.e.f.vix.com -print -add a.d.e.f.vix.com -add q.d.e.f.vix.com -add d.e.f.vix.com -print -add g.h.vix.com -print -search q.d.e.f.vix.com -search just-parent.a.vix.com -search no-real-parent.vix.com -search does.not.exist.at.all -forward -backward -# existing name -check vix.com. -# greater than stop node, which has down pointer -check zzz.com. -# less than lowest in level (would be left link from stop node) -check 0.vix.com -# greater than stop node, no down pointer -check d.vix.com -# superdomain stored in existing node -check f.vix.com -# common ancestor stored in existing node; existing is successor -check a.e.f.vix.com -# common ancestor stored in existing node; existing is less but not predecessor -check z.e.f.vix.com -# -check g.vix.com -# -check i.vix.com -# -check b.c.vix.com -nuke d.e.f.vix.com -print -add x.a.vix.com -add y.x.a.vix.com -print -delete a.vix.com -delete x.a.vix.com -print -delete b.vix.com -delete c.vix.com -print -delete y.x.a.vix.com -print -delete g.h.vix.com. -add \[b100000].vix.com. -add \[b010000].vix.com. -add \[b001000].vix.com. -add \[b000100].vix.com. -add \[b000010].vix.com. -add \[b000001].vix.com. -p -search \[b000100].vix.com. -# zap the entire tree -add vix.com. -nuke vix.com. -add a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. -add b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. -print -add . -# zap it again -nuke . -# test splitting of maximal bitstring -add \[xFFFF/16].\[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/256].com -add \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com -print -quit +# $Id: rbt_test.txt,v 1.15 2004/03/16 05:52:14 marka Exp $ + +add a.vix.com +add b.vix.com +add c.vix.com +print +add a.b.c.d.e.f.vix.com +add b.b.c.d.e.f.vix.com +add c.b.c.d.e.f.vix.com +print +add a.d.e.f.vix.com +add q.d.e.f.vix.com +add d.e.f.vix.com +print +add g.h.vix.com +print +search q.d.e.f.vix.com +search just-parent.a.vix.com +search no-real-parent.vix.com +search does.not.exist.at.all +forward +backward +# existing name +check vix.com. +# greater than stop node, which has down pointer +check zzz.com. +# less than lowest in level (would be left link from stop node) +check 0.vix.com +# greater than stop node, no down pointer +check d.vix.com +# superdomain stored in existing node +check f.vix.com +# common ancestor stored in existing node; existing is successor +check a.e.f.vix.com +# common ancestor stored in existing node; existing is less but not predecessor +check z.e.f.vix.com +# +check g.vix.com +# +check i.vix.com +# +check b.c.vix.com +nuke d.e.f.vix.com +print +add x.a.vix.com +add y.x.a.vix.com +print +delete a.vix.com +delete x.a.vix.com +print +delete b.vix.com +delete c.vix.com +print +delete y.x.a.vix.com +print +delete g.h.vix.com. +add \[b100000].vix.com. +add \[b010000].vix.com. +add \[b001000].vix.com. +add \[b000100].vix.com. +add \[b000010].vix.com. +add \[b000001].vix.com. +p +search \[b000100].vix.com. +# zap the entire tree +add vix.com. +nuke vix.com. +add a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. +add b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. +print +add . +# zap it again +nuke . +# test splitting of maximal bitstring +add \[xFFFF/16].\[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/256].com +add \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com +print +quit diff --git a/bin/tests/system/dnssec/ns2/dlv.db.in b/bin/tests/system/dnssec/ns2/dlv.db.in new file mode 100644 index 0000000000..7a25e576d5 --- /dev/null +++ b/bin/tests/system/dnssec/ns2/dlv.db.in @@ -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 diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index 8d0706c7df..b08d4b21ee 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -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, diff --git a/lib/bind/.cvsignore b/lib/bind/.cvsignore index 341f628287..00e1e6dc1d 100644 --- a/lib/bind/.cvsignore +++ b/lib/bind/.cvsignore @@ -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 diff --git a/lib/bind/include/netdb.h b/lib/bind/include/netdb.h index e9e445712f..f452aab789 100644 --- a/lib/bind/include/netdb.h +++ b/lib/bind/include/netdb.h @@ -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 diff --git a/lib/bind/include/netgroup.h b/lib/bind/include/netgroup.h index fee6787b3f..72003d4346 100644 --- a/lib/bind/include/netgroup.h +++ b/lib/bind/include/netgroup.h @@ -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 diff --git a/lib/bind/port/irix/include/paths.h b/lib/bind/port/irix/include/paths.h index f8ef579694..7ec03327e1 100644 --- a/lib/bind/port/irix/include/paths.h +++ b/lib/bind/port/irix/include/paths.h @@ -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" diff --git a/lib/bind/port/unknown/include/Makefile.in b/lib/bind/port/unknown/include/Makefile.in index 99e5985489..e69de29bb2 100644 --- a/lib/bind/port/unknown/include/Makefile.in +++ b/lib/bind/port/unknown/include/Makefile.in @@ -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. diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in index d283911bcf..04253a2a44 100644 --- a/lib/dns/Makefile.in +++ b/lib/dns/Makefile.in @@ -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 \ diff --git a/lib/dns/gen.c b/lib/dns/gen.c index 7defe95547..bc5bd645c3 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -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 @@ -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; @@ -631,11 +631,11 @@ main(int argc, char **argv) { DIGESTARGS, DIGESTTYPE, DIGESTCLASS, DIGESTDEF); doswitch("CHECKOWNERSWITCH", "checkowner", - CHECKOWNERARGS, CHECKOWNERTYPE, - CHECKOWNERCLASS, CHECKOWNERDEF); + CHECKOWNERARGS, CHECKOWNERTYPE, + CHECKOWNERCLASS, CHECKOWNERDEF); doswitch("CHECKNAMESSWITCH", "checknames", - CHECKNAMESARGS, CHECKNAMESTYPE, - CHECKNAMESCLASS, CHECKNAMESDEF); + CHECKNAMESARGS, CHECKNAMESTYPE, + CHECKNAMESCLASS, CHECKNAMESDEF); /* * From here down, we are processing the rdata names and @@ -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; diff --git a/lib/dns/rcode.c b/lib/dns/rcode.c new file mode 100644 index 0000000000..6bdb1d940c --- /dev/null +++ b/lib/dns/rcode.c @@ -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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#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, ®ion); + 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, ""); + array[size - 1] = '\0'; + } +} diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index ce93d84d90..a6575a588a 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -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 #include @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -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, ""); - 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. */ diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 9479916c9b..b71feb6598 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -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 @@ -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)); -}; +} diff --git a/lib/dns/time.c b/lib/dns/time.c index b60a933daf..b40f0b9e61 100644 --- a/lib/dns/time.c +++ b/lib/dns/time.c @@ -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 @@ -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); } diff --git a/lib/dns/win32/libdns.def b/lib/dns/win32/libdns.def index 9fc1715cfd..3cfc35f09f 100644 --- a/lib/dns/win32/libdns.def +++ b/lib/dns/win32/libdns.def @@ -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 + diff --git a/lib/dns/win32/libdns.dsp b/lib/dns/win32/libdns.dsp index 11438fd4f7..78ff41330d 100644 --- a/lib/dns/win32/libdns.dsp +++ b/lib/dns/win32/libdns.dsp @@ -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 diff --git a/lib/dns/win32/libdns.mak b/lib/dns/win32/libdns.mak index bbb1e26ee8..64b70be59f 100644 --- a/lib/dns/win32/libdns.mak +++ b/lib/dns/win32/libdns.mak @@ -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 diff --git a/lib/isc/log.c b/lib/isc/log.c index 8afc2ec7c1..4a98e46398 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -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 #include /* dev_t FreeBSD 2.1 */ -#include #include #include @@ -36,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/isc/netscope.c b/lib/isc/netscope.c index f92668768f..701999077d 100644 --- a/lib/isc/netscope.c +++ b/lib/isc/netscope.c @@ -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 @@ -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; diff --git a/lib/isc/unix/entropy.c b/lib/isc/unix/entropy.c index 22ea16899e..3ae3bd3a51 100644 --- a/lib/isc/unix/entropy.c +++ b/lib/isc/unix/entropy.c @@ -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 || diff --git a/lib/isc/unix/include/isc/stat.h b/lib/isc/unix/include/isc/stat.h new file mode 100644 index 0000000000..4f9493a799 --- /dev/null +++ b/lib/isc/unix/include/isc/stat.h @@ -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 +#include + +#endif /* ISC_STAT_H */ diff --git a/lib/isc/win32/include/isc/ipv6.h b/lib/isc/win32/include/isc/ipv6.h index 0c9c2ca9fb..a390168b3d 100644 --- a/lib/isc/win32/include/isc/ipv6.h +++ b/lib/isc/win32/include/isc/ipv6.h @@ -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 */ diff --git a/lib/isc/win32/include/isc/offset.h b/lib/isc/win32/include/isc/offset.h index 5e207234e0..1c2d0bf09f 100644 --- a/lib/isc/win32/include/isc/offset.h +++ b/lib/isc/win32/include/isc/offset.h @@ -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 /* Required for CHAR_BIT. */ #include -typedef off_t isc_offset_t; +typedef _off_t isc_offset_t; /* * POSIX says "Additionally, blkcnt_t and off_t are extended signed integral diff --git a/lib/isc/win32/include/isc/platform.h b/lib/isc/win32/include/isc/platform.h index 505b5063cb..6c399099c9 100644 --- a/lib/isc/win32/include/isc/platform.h +++ b/lib/isc/win32/include/isc/platform.h @@ -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. diff --git a/lib/isc/win32/include/isc/time.h b/lib/isc/win32/include/isc/time.h index aa915dc4ec..ca7b85384c 100644 --- a/lib/isc/win32/include/isc/time.h +++ b/lib/isc/win32/include/isc/time.h @@ -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 diff --git a/lib/isc/win32/ipv6.c b/lib/isc/win32/ipv6.c index d2824be09a..13ff4bf532 100644 --- a/lib/isc/win32/ipv6.c +++ b/lib/isc/win32/ipv6.c @@ -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 #include -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; diff --git a/lib/isc/win32/libisc.def b/lib/isc/win32/libisc.def index 10a6efb249..0018d2a3ac 100644 --- a/lib/isc/win32/libisc.def +++ b/lib/isc/win32/libisc.def @@ -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 diff --git a/lib/isc/win32/libisc.dsp b/lib/isc/win32/libisc.dsp index 1757228d20..7434387da4 100644 --- a/lib/isc/win32/libisc.dsp +++ b/lib/isc/win32/libisc.dsp @@ -1,704 +1,712 @@ -# Microsoft Developer Studio Project File - Name="libisc" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=libisc - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "libisc.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "libisc.mak" CFG="libisc - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libisc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libisc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "libisc - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# 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 "LIBISC_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "include" /I "../include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# 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 /nologo /dll /machine:I386 /out:"../../../Build/Release/libisc.dll" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "libisc - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# 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 "LIBISC_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# 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 /nologo /dll /map /debug /machine:I386 /out:"../../../Build/Debug/libisc.dll" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "libisc - Win32 Release" -# Name "libisc - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\app.c -# End Source File -# Begin Source File - -SOURCE=.\condition.c -# End Source File -# Begin Source File - -SOURCE=.\dir.c -# End Source File -# Begin Source File - -SOURCE=.\DLLMain.c -# End Source File -# Begin Source File - -SOURCE=.\entropy.c -# End Source File -# Begin Source File - -SOURCE=.\errno2result.c -# End Source File -# Begin Source File - -SOURCE=.\file.c -# End Source File -# Begin Source File - -SOURCE=.\fsaccess.c -# End Source File -# Begin Source File - -SOURCE=.\interfaceiter.c -# End Source File -# Begin Source File - -SOURCE=.\ipv6.c -# End Source File -# Begin Source File - -SOURCE=.\keyboard.c -# End Source File -# Begin Source File - -SOURCE=.\net.c -# End Source File -# Begin Source File - -SOURCE=.\ntpaths.c -# End Source File -# Begin Source File - -SOURCE=.\once.c -# End Source File -# Begin Source File - -SOURCE=.\os.c -# End Source File -# Begin Source File - -SOURCE=.\resource.c -# End Source File -# Begin Source File - -SOURCE=.\socket.c -# End Source File -# Begin Source File - -SOURCE=.\stdio.c -# End Source File -# Begin Source File - -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 - -SOURCE=.\thread.c -# End Source File -# Begin Source File - -SOURCE=.\time.c -# End Source File -# Begin Source File - -SOURCE=.\version.c -# End Source File -# Begin Source File - -SOURCE=.\win32os.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\include\isc\app.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\assertions.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\base64.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\bind_registry.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\bindevt.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\bitstring.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\boolean.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\buffer.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\bufferlist.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\commandline.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\condition.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\config.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\dir.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\entropy.h -# End Source File -# Begin Source File - -SOURCE=.\errno2result.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\error.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\event.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\eventclass.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\file.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\formatcheck.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\fsaccess.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\hash.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\heap.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\hex.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\hmacmd5.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\int.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\interfaceiter.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\ipv6.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\keyboard.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\lang.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\lex.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\lfsr.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\lib.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\list.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\log.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\magic.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\md5.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\mem.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\msgcat.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\msioctl.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\mutex.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\mutexblock.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\net.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\netaddr.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\netdb.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\ntpaths.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\offset.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\once.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\ondestroy.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\os.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\parseint.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\platform.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\print.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\quota.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\random.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\ratelimiter.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\region.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\resource.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\result.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\resultclass.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\rwlock.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\serial.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\sha1.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\sockaddr.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\socket.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\stat.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\stdio.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\stdtime.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\strerror.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\string.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\symtab.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\syslog.h -# End Source File -# Begin Source File - -SOURCE=.\syslog.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\task.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\taskpool.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\thread.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\time.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\timer.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\types.h -# End Source File -# Begin Source File - -SOURCE=.\unistd.h -# End Source File -# Begin Source File - -SOURCE=..\include\isc\util.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\versions.h -# End Source File -# Begin Source File - -SOURCE=.\include\isc\win32os.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Group "Main Isc Lib" - -# PROP Default_Filter "c" -# Begin Source File - -SOURCE=..\assertions.c -# End Source File -# Begin Source File - -SOURCE=..\base64.c -# End Source File -# Begin Source File - -SOURCE=..\bitstring.c -# End Source File -# Begin Source File - -SOURCE=..\buffer.c -# End Source File -# Begin Source File - -SOURCE=..\bufferlist.c -# End Source File -# Begin Source File - -SOURCE=..\commandline.c -# End Source File -# Begin Source File - -SOURCE=..\error.c -# End Source File -# Begin Source File - -SOURCE=..\event.c -# End Source File -# Begin Source File - -SOURCE=..\hash.c -# End Source File -# Begin Source File - -SOURCE=..\heap.c -# End Source File -# Begin Source File - -SOURCE=..\hex.c -# End Source File -# Begin Source File - -SOURCE=..\hmacmd5.c -# End Source File -# Begin Source File - -SOURCE=..\inet_aton.c -# End Source File -# Begin Source File - -SOURCE=..\inet_ntop.c -# End Source File -# Begin Source File - -SOURCE=..\inet_pton.c -# End Source File -# Begin Source File - -SOURCE=..\lex.c -# End Source File -# Begin Source File - -SOURCE=..\lfsr.c -# End Source File -# Begin Source File - -SOURCE=..\lib.c -# End Source File -# Begin Source File - -SOURCE=..\log.c -# End Source File -# Begin Source File - -SOURCE=..\md5.c -# End Source File -# Begin Source File - -SOURCE=..\mem.c -# End Source File -# Begin Source File - -SOURCE=..\nls\msgcat.c -# End Source File -# Begin Source File - -SOURCE=..\mutexblock.c -# End Source File -# Begin Source File - -SOURCE=..\netaddr.c -# End Source File -# Begin Source File - -SOURCE=..\ondestroy.c -# End Source File -# Begin Source File - -SOURCE=..\parseint.c -# End Source File -# Begin Source File - -SOURCE=..\quota.c -# End Source File -# Begin Source File - -SOURCE=..\random.c -# End Source File -# Begin Source File - -SOURCE=..\ratelimiter.c -# End Source File -# Begin Source File - -SOURCE=..\region.c -# End Source File -# Begin Source File - -SOURCE=..\result.c -# End Source File -# Begin Source File - -SOURCE=..\rwlock.c -# End Source File -# Begin Source File - -SOURCE=..\serial.c -# End Source File -# Begin Source File - -SOURCE=..\sha1.c -# End Source File -# Begin Source File - -SOURCE=..\sockaddr.c -# End Source File -# Begin Source File - -SOURCE=..\string.c -# End Source File -# Begin Source File - -SOURCE=..\symtab.c -# End Source File -# Begin Source File - -SOURCE=..\task.c -# End Source File -# Begin Source File - -SOURCE=..\taskpool.c -# End Source File -# Begin Source File - -SOURCE=..\timer.c -# End Source File -# End Group -# Begin Source File - -SOURCE=.\libisc.def -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="libisc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=libisc - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libisc.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libisc.mak" CFG="libisc - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libisc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libisc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libisc - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# 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 "LIBISC_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "include" /I "../include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# 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 /nologo /dll /machine:I386 /out:"../../../Build/Release/libisc.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "libisc - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# 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 "LIBISC_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# 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 /nologo /dll /map /debug /machine:I386 /out:"../../../Build/Debug/libisc.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "libisc - Win32 Release" +# Name "libisc - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\app.c +# End Source File +# Begin Source File + +SOURCE=.\condition.c +# End Source File +# Begin Source File + +SOURCE=.\dir.c +# End Source File +# Begin Source File + +SOURCE=.\DLLMain.c +# End Source File +# Begin Source File + +SOURCE=.\entropy.c +# End Source File +# Begin Source File + +SOURCE=.\errno2result.c +# End Source File +# Begin Source File + +SOURCE=.\file.c +# End Source File +# Begin Source File + +SOURCE=.\fsaccess.c +# End Source File +# Begin Source File + +SOURCE=.\interfaceiter.c +# End Source File +# Begin Source File + +SOURCE=.\ipv6.c +# End Source File +# Begin Source File + +SOURCE=.\keyboard.c +# End Source File +# Begin Source File + +SOURCE=.\net.c +# End Source File +# Begin Source File + +SOURCE=.\ntpaths.c +# End Source File +# Begin Source File + +SOURCE=.\once.c +# End Source File +# Begin Source File + +SOURCE=.\os.c +# End Source File +# Begin Source File + +SOURCE=.\resource.c +# End Source File +# Begin Source File + +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 + +SOURCE=.\stdtime.c +# End Source File +# Begin Source File + +SOURCE=.\syslog.c +# End Source File +# Begin Source File + +SOURCE=.\thread.c +# End Source File +# Begin Source File + +SOURCE=.\time.c +# End Source File +# Begin Source File + +SOURCE=.\version.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\include\isc\app.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\assertions.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\base64.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\bind_registry.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\bindevt.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\bitstring.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\boolean.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\buffer.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\bufferlist.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\commandline.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\condition.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\config.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\dir.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\entropy.h +# End Source File +# Begin Source File + +SOURCE=.\errno2result.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\error.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\event.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\eventclass.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\file.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\formatcheck.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\fsaccess.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\hash.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\heap.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\hex.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\hmacmd5.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\int.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\interfaceiter.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\ipv6.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\keyboard.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\lang.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\lex.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\lfsr.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\lib.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\list.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\log.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\magic.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\md5.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\mem.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\msgcat.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\msioctl.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\mutex.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\mutexblock.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\net.h +# End Source File +# Begin Source File + +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 + +SOURCE=.\include\isc\ntpaths.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\offset.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\once.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\ondestroy.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\parseint.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\os.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\platform.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\print.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\quota.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\random.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\ratelimiter.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\region.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\resource.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\result.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\resultclass.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\rwlock.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\serial.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\sha1.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\sockaddr.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\socket.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\stat.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\stdio.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\strerror.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\stdtime.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\string.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\symtab.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\syslog.h +# End Source File +# Begin Source File + +SOURCE=.\syslog.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\task.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\taskpool.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\thread.h +# End Source File +# Begin Source File + +SOURCE=.\include\isc\time.h +# End Source File +# Begin Source File + +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 + +SOURCE=.\unistd.h +# End Source File +# Begin Source File + +SOURCE=..\include\isc\util.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\versions.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Group "Main Isc Lib" + +# PROP Default_Filter "c" +# Begin Source File + +SOURCE=..\assertions.c +# End Source File +# Begin Source File + +SOURCE=..\base64.c +# End Source File +# Begin Source File + +SOURCE=..\bitstring.c +# End Source File +# Begin Source File + +SOURCE=..\buffer.c +# End Source File +# Begin Source File + +SOURCE=..\bufferlist.c +# End Source File +# Begin Source File + +SOURCE=..\commandline.c +# End Source File +# Begin Source File + +SOURCE=..\error.c +# End Source File +# Begin Source File + +SOURCE=..\event.c +# End Source File +# Begin Source File + +SOURCE=..\hash.c +# End Source File +# Begin Source File + +SOURCE=..\heap.c +# End Source File +# Begin Source File + +SOURCE=..\hex.c +# End Source File +# Begin Source File + +SOURCE=..\hmacmd5.c +# End Source File +# Begin Source File + +SOURCE=..\inet_aton.c +# End Source File +# Begin Source File + +SOURCE=..\inet_ntop.c +# End Source File +# Begin Source File + +SOURCE=..\inet_pton.c +# End Source File +# Begin Source File + +SOURCE=..\lex.c +# End Source File +# Begin Source File + +SOURCE=..\lfsr.c +# End Source File +# Begin Source File + +SOURCE=..\lib.c +# End Source File +# Begin Source File + +SOURCE=..\log.c +# End Source File +# Begin Source File + +SOURCE=..\md5.c +# End Source File +# Begin Source File + +SOURCE=..\mem.c +# End Source File +# Begin Source File + +SOURCE=..\nls\msgcat.c +# End Source File +# Begin Source File + +SOURCE=..\mutexblock.c +# End Source File +# Begin Source File + +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 + +SOURCE=..\parseint.c +# End Source File +# Begin Source File + +SOURCE=..\quota.c +# End Source File +# Begin Source File + +SOURCE=..\random.c +# End Source File +# Begin Source File + +SOURCE=..\ratelimiter.c +# End Source File +# Begin Source File + +SOURCE=..\region.c +# End Source File +# Begin Source File + +SOURCE=..\result.c +# End Source File +# Begin Source File + +SOURCE=..\rwlock.c +# End Source File +# Begin Source File + +SOURCE=..\serial.c +# End Source File +# Begin Source File + +SOURCE=..\sha1.c +# End Source File +# Begin Source File + +SOURCE=..\sockaddr.c +# End Source File +# Begin Source File + +SOURCE=..\string.c +# End Source File +# Begin Source File + +SOURCE=..\symtab.c +# End Source File +# Begin Source File + +SOURCE=..\task.c +# End Source File +# Begin Source File + +SOURCE=..\taskpool.c +# End Source File +# Begin Source File + +SOURCE=..\timer.c +# End Source File +# Begin Source File + +SOURCE=.\win32os.c +# End Source File +# End Group +# Begin Source File + +SOURCE=.\libisc.def +# End Source File +# End Target +# End Project diff --git a/lib/isc/win32/libisc.mak b/lib/isc/win32/libisc.mak index f48928a4b2..cba3a9fe97 100644 --- a/lib/isc/win32/libisc.mak +++ b/lib/isc/win32/libisc.mak @@ -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 diff --git a/lib/isc/win32/net.c b/lib/isc/win32/net.c index 687ed6e17e..080e0923e2 100644 --- a/lib/isc/win32/net.c +++ b/lib/isc/win32/net.c @@ -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 @@ -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 diff --git a/lib/isc/win32/time.c b/lib/isc/win32/time.c index 793c4faed7..7fa77028f6 100644 --- a/lib/isc/win32/time.c +++ b/lib/isc/win32/time.c @@ -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 @@ -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; diff --git a/win32utils/BuildAll.bat b/win32utils/BuildAll.bat index 50fcb54ad1..22222ad770 100644 --- a/win32utils/BuildAll.bat +++ b/win32utils/BuildAll.bat @@ -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 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 diff --git a/win32utils/BuildSetup.bat b/win32utils/BuildSetup.bat index 6747133f4e..d59d790896 100644 --- a/win32utils/BuildSetup.bat +++ b/win32utils/BuildSetup.bat @@ -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 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 diff --git a/win32utils/dnsheadergen.bat b/win32utils/dnsheadergen.bat index 936e123b62..09422fe8c6 100644 --- a/win32utils/dnsheadergen.bat +++ b/win32utils/dnsheadergen.bat @@ -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 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 diff --git a/win32utils/readme1st.txt b/win32utils/readme1st.txt index 564c606d2c..5390ddb5ac 100644 --- a/win32utils/readme1st.txt +++ b/win32utils/readme1st.txt @@ -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