From aeb08e70868f9c8be67b37f5b465e0edf60b4f52 Mon Sep 17 00:00:00 2001 From: Danny Mayer Date: Fri, 20 Jul 2001 05:10:29 +0000 Subject: [PATCH] Initial win32 release --- win32utils/BINDBuild.dsw | 308 ++++++++++++++++++++++++++++++++++++ win32utils/dnsheadergen.bat | 26 +++ win32utils/makedefs.pl | 134 ++++++++++++++++ win32utils/makeversion.pl | 120 ++++++++++++++ win32utils/readme1st.txt | 69 ++++++++ 5 files changed, 657 insertions(+) create mode 100644 win32utils/BINDBuild.dsw create mode 100644 win32utils/dnsheadergen.bat create mode 100644 win32utils/makedefs.pl create mode 100644 win32utils/makeversion.pl create mode 100644 win32utils/readme1st.txt diff --git a/win32utils/BINDBuild.dsw b/win32utils/BINDBuild.dsw new file mode 100644 index 0000000000..96c68673c0 --- /dev/null +++ b/win32utils/BINDBuild.dsw @@ -0,0 +1,308 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BINDInstall"=..\bin\win32\BINDInstall\BINDInstall.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "bindevt"=..\bin\win32\bindevt\bindevt.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "dig"=..\bin\dig\win32\dig.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "host"=..\bin\dig\win32\host.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "keygen"=..\bin\dnssec\win32\keygen.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "libdns"=..\lib\dns\win32\libdns.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "libisc"=..\lib\isc\win32\libisc.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libisccc"=..\lib\isccc\win32\libisccc.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "libisccfg"=..\lib\isccfg\win32\libisccfg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "liblwres"=..\lib\lwres\win32\liblwres.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "makekeyset"=..\bin\dnssec\win32\makekeyset.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "named"=..\bin\named\win32\named.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisccc + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisccfg + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblwres + End Project Dependency +}}} + +############################################################################### + +Project: "nslookup"=..\bin\dig\win32\nslookup.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "nsupdate"=..\bin\nsupdate\win32\nsupdate.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "rndc"=..\bin\rndc\win32\rndc.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisccc + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisccfg + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblwres + End Project Dependency +}}} + +############################################################################### + +Project: "signkey"=..\bin\dnssec\win32\signkey.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Project: "signzone"=..\bin\dnssec\win32\signzone.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libdns + End Project Dependency + Begin Project Dependency + Project_Dep_Name libisc + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/win32utils/dnsheadergen.bat b/win32utils/dnsheadergen.bat new file mode 100644 index 0000000000..dc9180f1b9 --- /dev/null +++ b/win32utils/dnsheadergen.bat @@ -0,0 +1,26 @@ +echo off +rem +rem Copyright (C) 2000, 2001 Internet Software Consortium. +rem +rem Permission to use, copy, modify, and distribute this software for any +rem purpose with or without fee is hereby granted, provided that the above +rem copyright notice and this permission notice appear in all copies. +rem +rem THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +rem DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +rem IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +rem INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +rem FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +rem NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +rem WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +cd ..\lib\dns +cd win32 +rem nmake -f gen.mak "gen - Win32 Release" +cd .. +gen -s . -t > include/dns/enumtype.h +gen -s . -c > include/dns/enumclass.h +gen -s . -i -P ./rdata/rdatastructpre.h -S ./rdata/rdatastructsuf.h > include/dns/rdatastruct.h +gen -s . > code.h +cd ..\..\win32utils diff --git a/win32utils/makedefs.pl b/win32utils/makedefs.pl new file mode 100644 index 0000000000..9962bc3858 --- /dev/null +++ b/win32utils/makedefs.pl @@ -0,0 +1,134 @@ +# makedefs.pl +# This script goes through all of the lib header files and creates a .def file for +# each DLL for Win32. It recurses as necessary through the subdirectories +# +# This program was written by PDM. mayer@gis.net 27-Feb-2001. +# +# Search String: ^(([_a-z0-9])*( ))*prefix_[_a-z0-9]+_[a-z0-9]+( )*\( +# List of directories +# +@prefixlist = ("isc", "isccfg","dns", "isccc", "libres"); +@prefixlist = ("isccc"); +@iscdirlist = ("isc/include/isc","isc/win32/include/isc"); +@iscprefixlist = ("isc", "isc", "cfg"); + +@isccfgdirlist = ("isccfg/include/isccfg"); +@isccfgprefixlist = ("cfg"); + +@iscccdirlist = ("isccc/include/isccc"); +@iscccprefixlist = ("isccc"); + +#@omapidirlist = ("omapi/include/omapi"); +#@omapiprefixlist = ("omapi"); + +@dnsdirlist = ("dns/include/dns","dns/sec/dst/include/dst"); +# , "dns/sec/openssl/include/openssl"); +@dnsprefixlist = ("dns", "dst"); + +@lwresdirlist = ("lwres/include/lwres"); +@lwresprefixlist = ("lwres"); + +# Run the changes for each directory in the directory list + +$ind = 0; +createoutfile($iscprefixlist[0]); +foreach $dir (@iscdirlist) { + createdeffile($dir, $iscprefixlist[$ind]); + $ind++; +} +close OUTDEFFILE; + +$ind = 0; +createoutfile($isccfgprefixlist[0]); +foreach $dir (@isccfgdirlist) { + createdeffile($dir, $isccfgprefixlist[$ind]); + $ind++; +} +close OUTDEFFILE; + +$ind = 0; +createoutfile($dnsprefixlist[0]); +foreach $dir (@dnsdirlist) { + createdeffile($dir, $dnsprefixlist[$ind]); + $ind++; +} +close OUTDEFFILE; + +$ind = 0; +createoutfile($iscccprefixlist[0]); +foreach $dir (@iscccdirlist) { + createdeffile($dir, $iscccprefixlist[$ind]); + $ind++; +} +close OUTDEFFILE; + +$ind = 0; +createoutfile($lwresprefixlist[0]); +foreach $dir (@lwresdirlist) { + createdeffile($dir, $lwresprefixlist[$ind]); + $ind++; +} +close OUTDEFFILE; + +sub createdeffile { +$xdir = $_[0]; + +# +# Get the List of files in the directory to be processed. +# +#^(([_a-z0-9])*( ))*prefix_[_a-z]+_[a-z]+( )*\( +$prefix = $_[1]; +#$xdir = "$prefix/include/$prefix"; +#$pattern = "\^\( \)\*$prefix\_\[\_a\-z\]\+_\[a\-z\]\+\( \)\*\\\("; +#$pattern = "\^\(\(\[\_a\-z0\-9\]\)\*\( \)\)\*$prefix\_\[\_a\-z0\-9\]\+_\[a\-z0\-9\]\+\( \)\*\\\("; +$pattern = "\^\(\(\[\_a\-z0\-9\]\)\*\( \)\)\*\(\\*\( \)\+\)\*$prefix\_\[\_a\-z0\-9\]\+_\[a\-z0\-9\]\+\( \)\*\\\("; +#print "$pattern\n"; + +opendir(DIR,$xdir) || die "No Directory: $!"; +@files = grep(/\.h$/i, readdir(DIR)); +closedir(DIR); + +foreach $filename (sort @files) { +# print "$filename\n"; + +# +# +# Open the file and locate the pattern. +# + open (HFILE, "$xdir/$filename") || die "Can't open file $filename : $!"; +# +#exit; + + while () { + if(/$pattern/) { + $func = $&; + chop($func); + $space = rindex($func, " ") + 1; + if($space >= 0) { + $func = substr($func, $space, 100); #strip out return values + } + print OUTDEFFILE "$func\n"; + } + } +# Set up the Patterns + close(HFILE); +} +} +exit; + +# This is the routine that applies the changes + +# output the result to the platform specific directory. +sub createoutfile { + +$outfile = "lib$_[0].def"; + +open (OUTDEFFILE, ">$outfile") || die "Can't open output file $outfile: $!"; +print OUTDEFFILE "LIBRARY lib$_[0]\n"; +print OUTDEFFILE "\n"; +print OUTDEFFILE "; Exported Functions\n"; +print OUTDEFFILE "EXPORTS\n"; +print OUTDEFFILE "\n"; + +} + diff --git a/win32utils/makeversion.pl b/win32utils/makeversion.pl new file mode 100644 index 0000000000..9e4463db0c --- /dev/null +++ b/win32utils/makeversion.pl @@ -0,0 +1,120 @@ +# makeversion.pl +# +# 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 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: makeversion.pl,v 1.1 2001/07/20 05:10:29 mayer Exp $ + +# This script takes the version information from the version file located at the +# root of the source tree and the api files in each library directory and writes +# the resulting information into a version.h file that the build process uses to +# build the executable code. +# This program was written by PDM. danny.mayer@nominum.com 1-Jul-2001. +# +# List of directories with version files +@dirlist = ("isc","dns","isccc","isccfg","lwres"); +$LibMacros{"isc"} = "LIBISC_EXPORTS"; +$LibMacros{"dns"} = "LIBDNS_EXPORTS"; +$LibMacros{"isccc"} = "LIBISCCC_EXPORTS"; +$LibMacros{"isccfg"} = "LIBISCCFG_EXPORTS"; +$LibMacros{"lwres"} = "LIBLWRES_EXPORTS"; + +@VersionNames = ("LIBINTERFACE", "LIBREVISION", "LIBAGE"); +$versionfile = "versions.h"; +$versionpath = "../$versionfile"; +# +# First get the version information +# +open (VERSIONFILE, "../version"); +while () { + chomp; + ($data) = split(/\#/); + if($data) { + ($name, $value) = split(/=/,$data); + ($name) = split(/\s+/, $name); + ($value) = split(/\s+/, $value); + $Versions{$name} = $value; + } +} +close(VERSIONFILE); + +# Now set up the output version file + +$ThisDate = scalar localtime(); +open (OUTVERSIONFILE, ">$versionpath") || die "Can't open output file $versionpath: $!"; + +#Standard Header + +print OUTVERSIONFILE '/* + * 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 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. + */ + +'; + +print OUTVERSIONFILE "/*\n"; +print OUTVERSIONFILE " * $versionfile. Generated automatically by makeversion.pl.\n"; +print OUTVERSIONFILE " * Date generated: $ThisDate\n"; +print OUTVERSIONFILE " */\n\n"; + +print OUTVERSIONFILE ' +#ifndef VERSIONS_H +#define VERSIONS_H 1 + +'; + +$Version = "$Versions{'MAJORVER'}.$Versions{'MINORVER'}.$Versions{'PATCHVER'}$Versions{'RELEASETYPE'}$Versions{'RELEASEVER'}"; +print "BIND Version: $Version\n"; + +print OUTVERSIONFILE "#define VERSION \"$Version\"\n\n"; + +foreach $dir (@dirlist) { + $apifile = "../lib/$dir/api"; + open (APIVERSION, $apifile); + while () { + chomp; + ($data) = split(/\#/); + if ($data) { + ($name, $value) = split(/=/, $data); + $name =~ s/\s+//; + $value =~ s/\s+//; + $ApiVersions{$name} = $value; + } + } + + print OUTVERSIONFILE "\n#ifdef $LibMacros{$dir}\n"; + foreach $name (@VersionNames) { + print OUTVERSIONFILE "#define $name\t$ApiVersions{$name}\n"; + } + print OUTVERSIONFILE "#endif\n\n"; + +} + +print OUTVERSIONFILE "#endif /* VERSIONS_H */\n"; +close OUTVERSIONFILE; + + diff --git a/win32utils/readme1st.txt b/win32utils/readme1st.txt new file mode 100644 index 0000000000..a882eb5ff2 --- /dev/null +++ b/win32utils/readme1st.txt @@ -0,0 +1,69 @@ + Alpha Release of BIND 9.2.0 for Window NT/2000 + +Date: 30-Jun-2001. + + This is the Alpha Release of BIND 9.2.0 for Windows NT/2000. As such +it should not be installed 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. + + Kit Installation Information + +If you have previously installed BIND 8 or BIND 4 on the system that +you wish to install this kit, you MUST use the BIND 8 or BIND 4 installer +to uninstall the previous kit. For BIND 8.2.x, you can use the +BINDInstall that comes with the BIND 8 kit to uninstall it. The BIND 9 +installer will NOT uninstall the BIND 8 binaries. That will be fixed +in a future release. + +Unpack the kit into any convenient directory and run the BINDInstall +program. This will install the named and associated programs +into the correct directories and set up the required registry +keys. + + Controlling BIND + +Windows NT/2000 uses the same rndc program as is used on Unix +systems. The rndc.conf file must be configured for your system in +order to work. You will need to generate a key for this. To do this +use the dnssec-keygen program. The program will be installed in the +same directory as named: dns/bin/. The syntax of the command is: + +dnssec-keygen -a hmac-md5 -b 128 -n user rndc + +A sample rndc.conf is include in the kit, but is not copied to +the dns/etc directory where it needs to reside. + +In addition the named.conf file will need to be modified in order +to allow rndc to control named. The additions look like the following: + +key rndckey { algorithm hmac-md5; secret "xxxxxxxxx=="; }; + +controls { + inet 127.0.0.1 allow { localhost; } keys { rndckey; }; +}; + +Note that the value of the secret must come from the key generated +above for rndc and must be the same key value for both. If you +have rndc on a Unix box you can use it to control BIND on the NT/W2K +box as well as using the Windows version of rndc to control a BIND 9 +daemon. + + DNS Tools + +I have built versions of the following tools for Windows NT: dig, +nslookup, host,nsupdate, dnssec-keygen, dnssec-makekeyset, dnssec-signkey, +dnssec-signzone. The tools will NOT run on Win9x, only WinNT and Win2000. +The latter tools are for use with DNSSEC. + + + Problems + +Please report all problems to bind9-bugs@isc.org and not to me. + + Danny Mayer + danny.mayer@nominum.com +