mdnkit has been replace by idnkit

This commit is contained in:
Mark Andrews 2003-06-04 00:39:15 +00:00
parent 2610933abd
commit 9c2a5c334b
268 changed files with 0 additions and 116747 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,200 +0,0 @@
# $Id: DISTFILES,v 1.1 2002/02/08 05:38:30 marka Exp $
README
README.ja
INSTALL
INSTALL.ja
ChangeLog
DISTFILES
LICENSE.txt
Makefile.in
NEWS
make.wnt
acconfig.h
aclocal.m4
config.guess
config.sub
ltconfig
ltmain.sh
configure.in
configure
install-sh
mkinstalldirs
include/Makefile.in
include/config.h.in
include/config.h.win
include/mdn/Makefile.in
include/mdn/ace.h
include/mdn/altdude.h
include/mdn/amcacem.h
include/mdn/amcaceo.h
include/mdn/amcacer.h
include/mdn/amcacev.h
include/mdn/amcacew.h
include/mdn/amcacez.h
include/mdn/api.h
include/mdn/assert.h
include/mdn/brace.h
include/mdn/checker.h
include/mdn/converter.h
include/mdn/debug.h
include/mdn/delimitermap.h
include/mdn/dn.h
include/mdn/dude.h
include/mdn/filechecker.h
include/mdn/filemapper.h
include/mdn/lace.h
include/mdn/localencoding.h
include/mdn/log.h
include/mdn/logmacro.h
include/mdn/mace.h
include/mdn/mapper.h
include/mdn/mapselector.h
include/mdn/msgheader.h
include/mdn/msgtrans.h
include/mdn/nameprep.h
include/mdn/normalizer.h
include/mdn/race.h
include/mdn/res.h
include/mdn/resconf.h
include/mdn/result.h
include/mdn/selectiveencode.h
include/mdn/strhash.h
include/mdn/ucsmap.h
include/mdn/ucsset.h
include/mdn/unicode.h
include/mdn/unormalize.h
include/mdn/utf5.h
include/mdn/utf6.h
include/mdn/utf8.h
include/mdn/util.h
include/mdn/version.h
lib/Makefile.in
lib/ace.c
lib/altdude.c
lib/amcacem.c
lib/amcaceo.c
lib/amcacer.c
lib/amcacev.c
lib/amcacew.c
lib/amcacez.c
lib/api.c
lib/brace.c
lib/checker.c
lib/converter.c
lib/debug.c
lib/delimitermap.c
lib/dn.c
lib/dude.c
lib/filechecker.c
lib/filemapper.c
lib/lace.c
lib/localencoding.c
lib/log.c
lib/make.wnt
lib/mace.c
lib/mapper.c
lib/mapselector.c
lib/msgheader.c
lib/msgtrans.c
lib/nameprep.c
lib/nameprep_template.c
lib/nameprepdata.c
lib/normalizer.c
lib/race.c
lib/res.c
lib/resconf.c
lib/result.c
lib/selectiveencode.c
lib/strhash.c
lib/ucsmap.c
lib/ucsset.c
lib/unicode.c
lib/unicode_template.c
lib/unicodedata_301.c
lib/unicodedata_310.c
lib/unormalize.c
lib/utf5.c
lib/utf6.c
lib/utf8.c
lib/util.c
lib/version.c
lib/mdn.conf.sample.in
mdnsproxy/Makefile.in
mdnsproxy/acl.c
mdnsproxy/logging.c
mdnsproxy/make.wnt
mdnsproxy/mdnsproxy.8.in
mdnsproxy/mdnsproxy.conf.sample
mdnsproxy/mdnsproxy.def
mdnsproxy/mdnsproxy.h
mdnsproxy/message.c
mdnsproxy/os2main.c
mdnsproxy/proxycnf.c
mdnsproxy/proxycnf.h
mdnsproxy/server.c
mdnsproxy/translate.c
mdnsproxy/unxmain.c
mdnsproxy/winmain.c
mdnsproxy/winserv.c
mdnsproxy/winserv.h
tools/Makefile.in
tools/mdnconv/Makefile.in
tools/mdnconv/mdnconv.c
tools/mdnconv/util.c
tools/mdnconv/util.h
tools/mdnconv/mdnconv.1
tools/mdnconv/mdnslookup.in
tools/rpm/mdnsproxy.init
tools/rpm/mdnkit.spec
tools/runmdn/Makefile.in
tools/runmdn/resolver.c
tools/runmdn/stub.c
tools/runmdn/stub.h
tools/runmdn/runmdn.1
tools/runmdn/runmdn.in
man/Makefile.in
man/libmdn.3.in
man/mdn.conf.5.in
patch/bind8/bind-8.2.3-patch
patch/bind9/bind-9.1.3-patch
patch/bind9/bind-9.2.0-patch
patch/libiconv/libiconv-1.6.1.patch
patch/squid/squid-2.4.STABLE1-patch
win/README.WIN
wsock/README.txt
wsock/README_j.txt
wsock/make.wnt
wsock/common/checkdll.c
wsock/common/convert.c
wsock/common/dllmain.c
wsock/common/dump.c
wsock/common/encoding.c
wsock/common/hook.c
wsock/common/jpnicmdn.def
wsock/common/jpnicmdn.h
wsock/common/make.wnt
wsock/common/printf.c
wsock/config/make.wnt
wsock/config/mdnconf.tcl
wsock/wsock11/dlldef.h
wsock/wsock11/dllfunc.c
wsock/wsock11/dllload.c
wsock/wsock11/dllmain.c
wsock/wsock11/dllstub.c
wsock/wsock11/make.wnt
wsock/wsock11/wsock32.def
wsock/wsock11/wsock32o.def
wsock/wsock20/dlldef.h
wsock/wsock20/dllfunc.c
wsock/wsock20/dllload.c
wsock/wsock20/dllmain.c
wsock/wsock20/dllstub.c
wsock/wsock20/make.wnt
wsock/wsock20/ws2_32.def
wsock/wsock20/ws2_32o.def
util/SparseMap.pm
util/UCD.pm
util/generate_nameprep_data.pl
util/generate_normalize_data.pl
map/Makefile.in
map/jp.map

View file

@ -1,248 +0,0 @@
mDNkit
Compilation and Installation
Japan Network Information Center (JPNIC)
This file explains how to compile and install the source package.
These procedures take the following steps:
+ Prerequisite: making iconv() available
+ System Configuration: running `configure' script
+ Compilation: running `make'
+ Installation: running `make install'
+ Site Configuration: tailoring `mdn.conf'
+ Configuration Check (optional)
0. Prerequisite
If your system's library does not have iconv() function, which is a
general codeset conversion utility, install it as an external library.
You also need external library if the system's implementation cannot
handle UTF-8 encoding, or it doesn't support some encodings which your
client applications uses.
You can get a free version of iconv() implementation (under LGPL
license, aka GNU libiconv) from:
http://clisp.cons.org/~haible/packages-libiconv.html
*Note*
GNU libiconv-1.6.1 have a compilation problem on NetBSD 1.5. There
is a patch file for the bug under patch/libiconv directory. If you
are a NetBSD 1.5 user and found a problem in compiling libiconv,
apply the patch and try again. The patch file contains brief
instructions on how to apply it at the beginning.
1. Running configure script
Run `configure' script in the top directory. This checks various
characteristics of your system and it will create Makefiles and
config.h appropriate for your system.
% ./configure
`configure' accepts many options. Here is a list of some important
options.
--prefix=PREFIX
Specifies the prefix of install directories of mDNkit. The
default is /usr/local.
--with-libiconv=LIBICONV_PREFIX
If you have installed GNU libiconv and would like to link it
to mDNkit, specify this option. The argument LIBICONV_PREFIX
is install prefix of GNU libiconv. If the argument is omitted,
PREFIX (derived from --prefix=PREFIX option) is assumed.
--with-libiconv is shorthand option for GNU libiconv.
--with-libiconv=/usr/local
This is equivalent to:
--with-iconv-include='-I/usr/local/include'
--with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv'
If both the shorthand option (--with-libiconv) and longhand
options (--with-iconv-include and/or --with-iconv) are specified,
the longhand options have priority.
--with-iconv-include=ICONV_INCDIR
If the header file "iconv.h" resides in a directory where your
C compiler doesn't search by default, specify the directory as
DIR like this:
--with-iconv-include=/usr/local/include
--with-iconv=ICONV_LIB
If your libc doesn't contain iconv(), specify the library
that contains iconv(). For example, if iconv() is libiconv
in /usr/local/lib, you should specify:
--with-iconv="-L/usr/local/lib -liconv"
Note that if the library is a shared one, you might also want
to specify -R option, like:
--with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
--with-iconv-sofile=SOFILE_PATH
``runmdn'' command in this kit needs to know the pathname of
shared library file that contains iconv(), if iconv() is not
part of libc. mDNkit tries to find out the pathname from the
informaiton provided by ``--with-iconv'' option described
above. But when it fails, you have to specify it with this
option, like:
--with-iconv-sofile=/usr/local/lib/libiconv.so.2.0
--with-utf8=UTF8_NAME
If your iconv() (precisely, iconv_open()) does not accept
"UTF-8" as the name of UTF-8 encoding, specify the name for
it. For example if your iconv() uses "utf8" instead, you
should specify:
--with-utf8=utf8
2. Other configure options
The configure script has many other options though they are not widely
used:
--with-preference=PREFERENCE
This option sets the preference for the sample mDNkit
configuration file (mdn.conf.sample). Also this option
enables to install default configuration file (mdn.conf)
if the file didn't exist.
The only preference supported by this version is "jp".
--with-amc-ace-z-prefix=AMCZ_PREFIX
AMC-ACE-Z is a proposed encoding for multilingual domain name
in DNS protocol data. It requires a specific prefix string
to distinguish domain names encoded by them from normal ASCII
domain names, but the current Internet draft of AMC-ACE-Z
doesn't define prefix. You can specify the prefix with this
option. Otherwise mDNkit defines "zq--" as the prefix.
--with-race-prefix=RACE_PREFIX
--with-dude-prefix=DUDE_PREFIX
Also RACE and DUDE are encodings for multilingual domain name,
but they are obsolete. Since Internet drafts for these
encodings defines ACE prefixes, mDNkit uses them by default,
but you can specify prefix with these options.
--exec-prefix=EXEC_PREFIX
Specifies the prefix of install directories for machine-specific
files. The default is PREFIX (derived from ``--prefix=PREFIX''
and its default is /usr/local).
--sbindir=SBINDIR
Specifies the install directory for mdnsproxy. The default is
EXEC_PREFIX/sbin.
--bindir=BINDIR
Specifies the install directory for mdnconv and runmdn.
The default is EXEC_PREFIX/bin.
--libdir=LIBDIR
Specifies the install directory for the MDN library (libmdn).
The default is EXEC_PREFIX/lib.
--includedir=INCDIR
Specifies the install directory for the header files of the MDN
library. The default is PREFIX/include.
--sysconfdir=SYSCONFDIR
Specifies the install directory for sample configuration files
of the MDN Library and mdnsproxy. The default is PREFIX/etc.
--mandir=MANDIR
Specifies the base install directory for online manuals.
The default is PREFIX/man.
--datadir=DATADIR
Specifies the base install directory for machine independent
data files. The default is PREFIX/share. Some data files for
mDNkit will be put under the DATADIR/mdnkit directory.
--localstatedir=LOCALSTATEDIR
--with-logdir=LOGDIR
LOGDIR specifies the directory where mdnsproxy outputs log
files by default. Its default value is LOCALSTATEDIR/mdnsproxy,
and the default value of LOCALSTATEDIR is PREFIX/var.
--enable-debug
Enable debugging codes. The fault is "no".
--enable-shared
Build shared library. The fault is "yes".
--enable-static
Build static library. The fault is "yes".
To see the list of available options, you should run it with --help
option.
% ./configure --help
3. Compiling
Run `make' for compilation.
% make
4. Installation
Run `make install' to install binaries and manuals. Don't forget to
become a super-user before the installation.
% su
# make install
5. Configuration and usage
mDNkit needs a configuration file `mdn.conf' to work properly. Unless
you specified --with-preference option to the `configure' script, you
have to create the file. Please refer the manual for `mdn.conf' for
details. A sample configuration (`mdn.conf.sample') is also provided
for your convenience.
Also online manuals for `mdnsproxy', `mdnconv' and `runmdn' commands
are available. Please refer them for the usage and configuration of
these commands.
% man mdn.conf
% man mdnsproxy
% man mdnconv
% man runmdn
6. Check your configuration
A simple shell script `mdnslookup' is available in the directory
`tools/mdnconv', with which you can make queries for multilingual
domain names. It may help you check your configuration.
The usage of `mdnslookup' is:
% tools/mdnconv/mdnslookup <domain-name> <dns-server>
Suppose that <domain-name> is an internationalized domain name written
in the local codeset (see ``LOCAL CODESET'' in the `mdn.conf' man page
for details), and <dns-server> is a hostname or IP address of DNS
server.
`mdnslookup' inquires <mdn-domain-name> from <dns-server>, using
`mdnconv' and `nslookup' commands. If something is wrong, you will
see an error message output by `mdnconv', `nslookup' or `mdnslookup'
itself.
; $Id: INSTALL,v 1.1 2002/02/08 05:38:30 marka Exp $

View file

@ -1,253 +0,0 @@
mDNkit
$B%3%s%Q%$%k$H%$%s%9%H!<%k$NJ}K!(B
($B<R(B) $BF|K\%M%C%H%o!<%/%$%s%U%)%a!<%7%g%s%;%s%?!<(B (JPNIC)
$BK\%Q%C%1!<%8$N%3%s%Q%$%k$*$h$S%$%s%9%H!<%k$O!"<!$N$h$&$J%9%F%C%W$G9T(B
$B$$$^$9!#(B
+ $BA0=`Hw(B: iconv() $B$,MxMQ$G$-$k$h$&$K$9$k(B
+ $B%7%9%F%`@_Dj(B: `configure' $B%9%/%j%W%H$N<B9T(B
+ $B%3%s%Q%$%k(B: `make' $B$N<B9T(B
+ $B%$%s%9%H!<%k(B: `make install' $B$N<B9T(B
+ $B%5%$%HKh$N@_Dj(B: `mdn.conf' $B$K$h$k@_Dj(B
+ $B@_Dj$N3NG'(B ($B>JN,2D(B)
0. $BA0=`Hw(B
$B$b$7$"$J$?$N;HMQ$7$F$$$k%7%9%F%`$N%i%$%V%i%j$K(B iconv() $B$,$J$$>l9g!"$"(B
$B$k$$$O$"$C$F$b(B UTF-8 $B$r07$&$3$H$,$G$-$J$$>l9g$K$O$"$i$+$8$a(B iconv() $B$r(B
$B%$%s%9%H!<%k$7$F$*$$$F$/$@$5$$!#(Biconv() $B$O!"Nc$($P(B GNU libiconv $B$H8F$P(B
$B$l$k%U%j!<(B (LGPL) $B$N<BAu$,(B
http://clisp.cons.org/~haible/packages-libiconv.html
$B$+$iF~<j2DG=$G$9!#(B
*$BCm0U(B*
GNU libiconv-1.6.1 $B$O(B NetBSD 1.5 $B$H$NAH9g$o$;$GLdBj$,$"$j!"%3%s%Q%$(B
$B%k;~$K%(%i!<$,H/@8$7$^$9!#$3$N%P%0$r=$@5$9$k$?$a$N%Q%C%A$,(B
patch/libiconv $B%G%#%l%/%H%j$N2<$KMQ0U$5$l$F$$$^$9$N$G!"$3$NLdBj$KAx(B
$B6x$7$?>l9g$K$O(B libiconv $B$K%Q%C%A$rEv$F$F:F%$%s%9%H!<%k$7$F$/$@$5$$!#(B
$B$J$*!"%Q%C%A$NEv$FJ}$O%Q%C%A%U%!%$%k$N@hF,$K=q$+$l$F$$$^$9!#(B
1. configure $B%9%/%j%W%H$N<B9T(B
$B%H%C%W%G%#%l%/%H%j$K$"$k(B configure $B%9%/%j%W%H$r<B9T$7$F$/$@$5$$!#(B
% ./configure
configure $B%9%/%j%W%H$K$O!"?tB?$/$N%*%W%7%g%s$,MQ0U$5$l$F$$$^$9!#$=$N$&(B
$B$A=EMW$H;W$o$l$k$b$N$O<!$NDL$j$G$9!#(B
--prefix=PREFIX
mDNkit $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$N%Q%9$r;XDj$7$^$9!#%G%U%)(B
$B%k%H$O(B /usr/local $B$G$9!#(B
--with-libiconv=LIBICONV_PREFIX
$B$"$i$+$8$a%$%s%9%H!<%k$7$F$"$k(B GNU libiconv $B$r(B mDNkit $B$K%j%s%/(B
$B$5$;$k>l9g$O!"$3$N%*%W%7%g%s$r;XDj$7$F2<$5$$!#0z?t(B LIBICONV_PREFIX
$B$K$O!"(BGNU libiconv $B$,%$%s%9%H!<%k$5$l$F$$$k0LCV$r;XDj$7$^$9!#(B
$B0z?t$r>JN,$9$k$H!"(BPREFIX (PREFIX $B$NCM$O(B --prefix=PREFIX $B$+$i(B
$BF3=P$5$l$^$9(B) $B$r;XDj$7$?$b$N$H8+$J$5$l$^$9!#(B
--with-libiconv $B$O(B GNU libiconv $BMQ$NC;=L7A$N%*%W%7%g%s$G(B
--with-libiconv=/usr/local
$B$3$l$O<!$HEy2A$K$J$j$^$9!#(B
--with-iconv-include='-I/usr/local/include'
--with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv'
$BC;=L7A$N%*%W%7%g%s(B (--with-libiconv) $B$HDL>oMQ$N%*%W%7%g%s(B
(--with-iconv-include, --with-iconv) $B$rN>J}$H$b;XDj$7$?>l9g$O!"(B
$BDL>oMQ$N%*%W%7%g%s$[$&$,M%@h$5$l$^$9!#(B
--with-iconv-include=ICONV_INCDIR
C $B%3%s%Q%$%i$,DL>o$G$O8!:w$7$J$$%G%#%l%/%H%j$K(B "iconv.h" $B$,CV(B
$B$+$l$F$$$k>l9g!"<!$N$h$&$K$7$F$=$N%G%#%l%/%H%j$r;XDj$7$^$9!#(B
--with-iconv-include=/usr/local/include
--with-iconv=ICONV_LIB
libc $B$K(B iconv $B$,F~$C$F$$$J$$>l9g(B ($B>e5-$N%Q%C%1!<%8$rF~$l$?(B
$B>l9g$J$I(B) $B$K!"(Biconv $B$N%i%$%V%i%j$r;XDj$7$^$9!#Nc$($P(B
--with-iconv="-L/usr/local/lib -liconv"
$B$N$h$&$K;XDj$7$^$9!#$b$7(B iconv $B$,6&M-%i%$%V%i%j$K$J$C$F$$$k(B
$B>l9g$K$O!"(B-R $B%*%W%7%g%s$b;XDj$7$F(B
--with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
$B$H$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#(B
--with-iconv-sofile=SOFILE_PATH
mDNkit $B$K4^$^$l$F$$$k(B runmdn $B%3%^%s%I$O!"(Biconv() $B$,(B libc $B$N0l(B
$BIt$H$7$FDs6!$5$l$J$$$H$-$K!"(Biconv() $B$r4^$`6&M-%i%$%V%i%j$X$N%Q(B
$B%9L>$rCN$kI,MW$,$"$j$^$9!#(BmDNkit $B$O!"(B--with-iconv $B%*%W%7%g%s$N(B
$B5-=R$r4p$K%Q%9L>$r8!:w$7$^$9$,!"$3$l$K<:GT$7$?$H$-$K!"0J2<$N$h(B
$B$&$K6&M-%i%$%V%i%j$r;XDj$9$k$3$H$,$G$-$^$9!#(B
--with-iconv-sofile=/usr/local/lib/libiconvv.so.2.0
--with-utf8=UTF8_NAME
iconv $B$K(B utf-8 $B%(%s%3!<%G%#%s%0$r;XDj$9$k>l9g!"K\%i%$%V%i%j$O(B
$B%G%U%)%k%H$G$O(B "UTF-8" $B$H$$$&L>A0$r;XDj$7$^$9!#$b$7$"$J$?$N(B
$B%7%9%F%`$N(B iconv $B$,(B "UTF-8" $B$H$$$&L>A0$r<u$1IU$1$J$$>l9g$K$O!"(B
$BBe$j$NL>A0$r;XDj$7$^$9!#Nc$($P(B "UTF-8" $B$G$O$J$/(B "utf8" $B$N(B
$B>l9g$K$O<!$N$h$&$K;XDj$7$^$9!#(B
--with-utf8=utf8
2. $B$=$NB>$N(B configure $B$N%*%W%7%g%s(B
$B$=$l$[$I$h$/;H$&$o$1$G$O$"$j$^$;$s$,!"(Bconfigure $B$K$OA09`$N$b$N0J30$K(B
$B$bMM!9$J%*%W%7%g%s$,MQ0U$5$l$F$$$^$9!#(B
--with-preference=PREFERENCE
mDNkit $B$N%5%s%W%k%3%s%U%#%.%e%l!<%7%g%s%U%!%$%k(B (mdn.conf.sample)
$B$N@_Dj$r(B PREFERENCE $B8~$1$N$b$N$K$7$^$9!#$^$?$3$N%*%W%7%g%s$r;XDj(B
$B$9$k$H%G%U%)%k%H$N%3%s%U%#%.%e%l!<%7%g%s%U%!%$%k(B (mdn.conf) $B$,(B
$B%$%s%9%H!<%k$5$l$^$9!#$?$@$7%U%!%$%k$,$9$G$KB8:_$7$F$$$k>l9g$K$O(B
$B%$%s%9%H!<%k$7$^$;$s!#(B
$B8=:_$N$H$3$m!";XDj$G$-$k(B PREFERENCE $B$O(B "jp" $B$N$_$G$9!#(B
--with-amc-ace-z-prefix=AMCZ_PREFIX
AMC-ACE-Z $B$O(B DNS $B%W%m%H%3%k>e$G;HMQ$5$l$kB?8@8l%I%a%$%sL>$K4X$7(B
$B$FDs0F$5$l$F$$$k%(%s%3!<%G%#%s%0J}<0$G$9!#$3$N%(%s%3!<%G%#%s%0(B
$B$G%3%s%3!<%I$5$l$?%I%a%$%sL>$H=>Mh$N(B ASCII $B%I%a%$%sL>$H6hJL$9(B
$B$k$?$a$K$O!"8GDj$N@\F,<-$rMQ0U$9$kI,MW$,$"$j$^$9!#$7$+$7$J$,$i!"(B
$B8=:_$N(B AMCE-ACE-Z $B$N%$%s%?!<%M%C%H%I%i%U%H$G$O@\F,<-$rDj5A$7$F(B
$B$$$^$;$s!#$3$N%*%W%7%g%s$rMQ$$$k$3$H$G!"@\F,<-$r;XDj$9$k$3$H$,(B
$B$G$-$^$9!#;XDj$7$J$1$l$P!"(B"zq--" $B$,@\F,<-$H$7$FDj5A$5$l$^$9!#(B
--with-race-prefix=RACE_PREFIX
--with-dude-prefix=DUDE_PREFIX
RACE $B$b(B DUDE $B$b(B DNS $B%W%m%H%3%k>e$G;HMQ$5$l$kB?8@8l%I%a%$%sL>$K(B
$B4X$7$FDs0F$5$l$F$$$k%(%s%3!<%G%#%s%0J}<0$G$9$,!"$9$G$KGQ$l$?$b(B
$B$N$H$J$C$F$$$^$9!#%(%s%3!<%G%#%s%0J}<0$K$D$$$F5-=R$7$?%$%s%?!<(B
$B%M%C%H%I%i%U%H$K$O@\F,<-$,Dj5A$5$l$F$$$^$9$,!"$3$l$i$N%*%W%7%g(B
$B%s$rMQ$$$F@\F,<-$rJQ99$9$k$3$H$b2DG=$G$9!#(B
--exec-prefix=EXEC_PREFIX
$B%^%7%s8GM-$N%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$N%Q%9$r;XDj(B
$B$7$^$9!#%G%U%)%k%H$O(B PREFIX (``--prefix=PREFIX'' $B$K$h$C$F;XDj(B
$B2DG=!"(BPREFIX $B$N%G%U%)%k%H$O(B /usr/local) $B$K$J$j$^$9!#(B
--sbindir=SBINDIR
mdnsproxy $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#%G%U%)%k(B
$B%H$G$O(B EXEC_PREFIX/sbin $B$G$9!#(B
--bindir=BINDIR
mdnconv $B$H(B runmdn $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#(B
$B%G%U%)%k%H$G$O(B EXEC_PREFIX/bin $B$G$9!#(B
--libdir=LIBDIR
MDN $B%i%$%V%i%j(B (libmdn) $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7(B
$B$^$9!#%G%U%)%k%H$G$O(B EXEC_PREFIX/lib $B$G$9!#(B
--includedir=INCDIR
MDN $B%i%$%V%i%j$N%X%C%@%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r(B
$B;XDj$7$^$9!#%G%U%)%k%H$G$O(B PREFIX/include $B$G$9!#(B
--sysconfdir=SYSCONFDIR
MDN $B%i%$%V%i%j$*$h$S(B mdnsproxy $B$N@_Dj%U%!%$%k$N%5%s%W%k$r%$%s(B
$B%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#%G%U%)%k%H$G$O(B PREFIX/etc
$B$G$9!#(B
--mandir=MANDIR
$B%*%s%i%$%s%^%K%e%"%k$N%$%s%9%H!<%k%G%#%l%/%H%j$r;XDj$7$^$9!#(B
$B%G%U%)%k%H$G$O(B PREFIX/man $B$G$9!#(B
--datadir=DATADIR
$B0[$J$k%^%7%s$G6&M-2DG=$J%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j(B
$B$r;XDj$7$^$9!#%G%U%)%k%H$O(B PREFIX/share $B$G$9!#(BDATADIR/mdnkit
$B$N2<$K!"(BmDNkit $B$G;HMQ$9$k4v$D$+$N%G!<%?%U%!%$%k$,%$%s%9%H!<%k(B
$B$5$l$^$9!#(B
--localstatedir=LOCALSTATEDIR
--with-logdir=LOGDIR
LOGDIR $B$O(B mdnsproxy $B$N%m%0%U%!%$%k$r=PNO$9$kI8=`$N%G%#%l%/%H%j(B
$B$r;XDj$7$^$9!#(BLOGDIR $B$N%G%U%)%k%H$O(B LOLOCALSTATEDIR/mdnsproxy
$B$G!"(BLOLOCALSTATEDIR $B$N%G%U%)%k%H$O(B PREFIX/var $B$G$9!#(B
--enable-debug
$B%G%P%C%0MQ$N%3!<%I$rM-8z$K$7$^$9!#%G%U%)%k%H$O(B "no" ($BL58z(B) $B$G$9!#(B
--enable-shared
$B6&M-%i%$%V%i%j$r:n@.$7$^$9!#%G%U%)%k%H$O(B "yes" ($B:n@.$9$k(B) $B$G$9!#(B
--enable-static
$B@EE*%i%$%V%i%j$r:n@.$7$^$9!#%G%U%)%k%H$O(B "yes" ($B:n@.$9$k(B) $B$G$9!#(B
configure $B$K$OB>$K$bB?$/$N%*%W%7%g%s$,$"$j$^$9$,!";D$j$O0lHLE*$J%*%W%7%g(B
$B%s$J$N$G@bL@$O>J$-$^$9!#(B
% ./configure --help
$B$r<B9T$9$k$H%*%W%7%g%s$N0lMw$,I=<($5$l$^$9!#(B
3. $B%3%s%Q%$%k(B
configure $B$r<B9T$9$k$H(B Makefile $B$J$I$,@8@.$5$l$^$9$N$G!"B3$1$F(B make$B$r(B
$B<B9T$7$F%3%s%Q%$%k$7$^$9!#(B
% make
4. $B%$%s%9%H!<%k(B
$B%9!<%Q%f!<%6$K$J$C$F%$%s%9%H!<%k$7$^$9!#(B
% su
# make install
5. $B@_Dj$H;HMQJ}K!(B
mDNkit $B$r@5$7$/F0:n$5$;$k$K$O!"@_Dj%U%!%$%k(B `mdn.conf' $B$,I,MW$G$9!#(B
configure $B%9%/%j%W%H$K(B --with-preference $B%*%W%7%g%s$r;XDj$7$J$+$C$?>l(B
$B9g$K$O$3$N%U%!%$%k$r:n@.$9$kI,MW$,$"$j$^$9!#$3$N@_Dj%U%!%$%k$N>\:Y$K$D(B
$B$$$F$O(Bmdn.conf $B$N%*%s%i%$%s%^%K%e%"%k$r$4Mw$/$@$5$$!#$^$?@_DjNc$,=q$+(B
$B$l$?%5%s%W%k%U%!%$%k(B (mdn.conf.sample) $B$b%$%s%9%H!<%k$5$l$^$9$N$G$4Mx(B
$BMQ$/$@$5$$!#(B
$B$^$?!"(Bmdnsproxy$B!"(Bmdnconv$B!"(Brunmdn $B$H$$$C$?%D!<%k$N%*%s%i%$%s%^%K%e%"%k(B
$B$bDs6!$5$l$F$$$^$9!#$3$l$i$N%3%^%s%I$N;H$$J}!"@_DjJ}K!$K4X$7$F$O$=$A$i(B
$B$r;2>H$7$F$/$@$5$$!#(B
% man mdn.conf
% man mdnsproxy
% man mdnconv
% man runmdn
6. $B@_Dj$N3NG'(B
`mdnsproxy' $B$H$$$&4JC1$J%7%'%k%9%/%j%W%H$,(B tools/mdnconv $B%G%#%l%/%H%j(B
$B$KMQ0U$5$l$F$$$^$9!#$3$N%9%/%j%W%H$r;H$&$H(B DNS $B%5!<%P$KBP$7$FB?8@8l%I(B
$B%a%$%sL>$rLd$$9g$o$;$k$3$H$,$G$-$^$9!#@_Dj%U%!%$%k$N3NG'$KLrN)$D$+$bCN(B
$B$l$^$;$s!#(B
`mdnslookup' $B$N;HMQJ}K!$O!"<!$NDL$j$G$9!#(B
% tools/mdnconv/mdnslookup <domain-name> <dns-server>
$B$3$3$G(B <domain-name> $B$O%m!<%+%k%3!<%I%;%C%H(B ($B>\$7$/$O(B mdn.conf $B$N%^%K%e(B
$B%"%k$N(B ``LOCAL CODESET'' $B$r;2>H$N$3$H(B) $B$G=q$+$l$?B?8@8l%I%a%$%sL>$G!"(B
<dns-server> $B$O(B DNS $B%5!<%P$N%[%9%HL>$b$7$/$O(B IP $B%"%I%l%9$G$9!#(B
`mdnslookup' $B$O(B `mdnconv' $B$*$h$S(B `nslookup' $B%3%^%s%I$rMQ$$$F!"(B
<dns-server> $B$KBP$7$F(B <domain-name> $B$r0z$-$K9T$-$^$9!#@_Dj$K2?$+4V0c$$(B
$B$,$"$l$P!"(B`mdnconv', `nslookup', $B$"$k$$$O(B `mdnslookup' $B<+?H$K$h$k%(%i!<(B
$B%a%C%;!<%8$,=PNO$5$l$^$9!#(B
; $Id: INSTALL.ja,v 1.1 2002/02/08 05:38:30 marka Exp $

View file

@ -1,56 +0,0 @@
Copyright (c) 2000, 2001 Japan Network Information Center.
All rights reserved.
By using this file, you agree to the terms and conditions set forth bellow.
LICENSE TERMS AND CONDITIONS
The following License Terms and Conditions apply, unless a different
license is obtained from Japan Network Information Center ("JPNIC"),
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
Chiyoda-ku, Tokyo 101-0047, Japan.
1. Use, Modification and Redistribution (including distribution of any
modified or derived work) in source and/or binary forms is permitted
under this License Terms and Conditions.
2. Redistribution of source code must retain the copyright notices as they
appear in each source code file, this License Terms and Conditions.
3. Redistribution in binary form must reproduce the Copyright Notice,
this License Terms and Conditions, in the documentation and/or other
materials provided with the distribution. For the purposes of binary
distribution the "Copyright Notice" refers to the following language:
"Copyright (c) Japan Network Information Center. All rights reserved."
4. Neither the name of JPNIC may be used to endorse or promote products
derived from this Software without specific prior written approval of
JPNIC.
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
6. Indemnification by Licensee
Any person or entities using and/or redistributing this Software under
this License Terms and Conditions shall defend indemnify and hold
harmless JPNIC from and against any and all judgements damages,
expenses, settlement liabilities, cost and other liabilities of any
kind as a result of use and redistribution of this Software or any
claim, suite, action, litigation or proceeding by any third party
arising out of or relates to this License Terms and Conditions.
7. Governing Law, Jurisdiction and Venue
This License Terms and Conditions shall be governed by and and
construed in accordance with the law of Japan. Any person or entities
using and/or redistributing this Software under this License Terms and
Conditions hereby agrees and consent to the personal and exclusive
jurisdiction and venue of Tokyo District Court of Japan.

View file

@ -1,86 +0,0 @@
# $Id: Makefile.in,v 1.1 2002/01/02 02:46:20 marka Exp $
# Copyright (c) 2000 Japan Network Information Center. All rights reserved.
#
# By using this file, you agree to the terms and conditions set forth bellow.
#
# LICENSE TERMS AND CONDITIONS
#
# The following License Terms and Conditions apply, unless a different
# license is obtained from Japan Network Information Center ("JPNIC"),
# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
# Chiyoda-ku, Tokyo 101-0047, Japan.
#
# 1. Use, Modification and Redistribution (including distribution of any
# modified or derived work) in source and/or binary forms is permitted
# under this License Terms and Conditions.
#
# 2. Redistribution of source code must retain the copyright notices as they
# appear in each source code file, this License Terms and Conditions.
#
# 3. Redistribution in binary form must reproduce the Copyright Notice,
# this License Terms and Conditions, in the documentation and/or other
# materials provided with the distribution. For the purposes of binary
# distribution the "Copyright Notice" refers to the following language:
# "Copyright (c) Japan Network Information Center. All rights reserved."
#
# 4. Neither the name of JPNIC may be used to endorse or promote products
# derived from this Software without specific prior written approval of
# JPNIC.
#
# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#
# 6. Indemnification by Licensee
# Any person or entities using and/or redistributing this Software under
# this License Terms and Conditions shall defend indemnify and hold
# harmless JPNIC from and against any and all judgements damages,
# expenses, settlement liabilities, cost and other liabilities of any
# kind as a result of use and redistribution of this Software or any
# claim, suite, action, litigation or proceeding by any third party
# arising out of or relates to this License Terms and Conditions.
#
# 7. Governing Law, Jurisdiction and Venue
# This License Terms and Conditions shall be governed by and and
# construed in accordance with the law of Japan. Any person or entities
# using and/or redistributing this Software under this License Terms and
# Conditions hereby agrees and consent to the personal and exclusive
# jurisdiction and venue of Tokyo District Court of Japan.
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
PERL = perl
MKTARPKG = ../util/mktarpkg
SHELL = @SHELL@
SUBDIRS = include lib mdnsproxy man tools map
all: force
for d in $(SUBDIRS); do (cd $$d; $(MAKE) all); done
install: force
for d in $(SUBDIRS); do (cd $$d; $(MAKE) install); done
clean: force
for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done
dist: force
@v=`sed -ne '/^# *define *MDNKIT_VERSION/s/^.*"\([^"]*\)".*$$/\1/p' \
$(srcdir)/include/mdn/version.h`; \
echo generate mdnkit-$$v-src.tar.gz; \
cd $(srcdir); \
$(PERL) $(MKTARPKG) --gzip=9 mdnkit-$$v-src
force:

View file

@ -1,226 +0,0 @@
; $Id: NEWS,v 1.1 2002/01/02 02:46:20 marka Exp $
Major changes in version 2.2.3:
* BIND-9 patch for BIND-9.2.0 is available.
* NAMEPREP draft -06 is supported.
* Problems on Tru64 are fixed.
Major changes in version 2.2.2:
* Now runmdn can work on NetBSD-1.5 or later.
Major changes in version 2.2.1:
* Fix a bug that the MDN library misses prohibited characters.
Major changes in version 2.2:
* Alternate encoding is no longer supported.
mDNkit now follows IDNA-03 which says in the section 2.1.2 that An
IDNA-aware application MUST NOT do any preparation or conversion to
ACE on any non-internationalized name part. `alternate-encoding'
entry in configuration file is simply ignored.
* The MDN library (libmdn) performs NAMEPREP check at decoding an ACE
name. If the name is not NAMEPREPed, libmdn returns a name with ACE
encoding instead of local encoding.
* Supported ACEs are now AMC-ACE-Z, RACE and DUDE only.
Since the IDN working group has chosen AMC-ACE-Z, most of other ACEs
are no longer supported by default. If you wanted to use those
ACEs, specify `--enable-extra-ace' option of configure.
* mdnsproxy can output log messages to standard error.
* mdnsproxy adds date and time string to a message logged to a regular
file.
* `--with-iconv-include', `--with-libiconv' and `--enable-debug'
options are added to `configure'.
* `--with-libiconv' option is also added to `configure' in BIND-9 patch.
* A build problem on Linux with glibc-2.2 is fixed.
* The base version of BIND-9 patch is now 9.1.3.
* Supported NAMEPREP drafts are -03 and -05.
-02 and -04 are not supported.
* `-e' option is added to runmdn to set local encoding.
* `dig', `host' and `nslookup' of BIND-9 with MDN support patch
recognize the MDN_DISABLE environment variable. Those commands turn
off MDN support if the variable is defined.
Major changes in version 2.1:
* BIND-9 patch is back. The patch adds encoding conversion and
NAMEPREP capability to `dig', `host' and `nslookup'.
Since mDNkit version 2 adopts IDNA, in which all the MDN processing
are performed in the application layer before calling the resolver
layer, the patch no longer contains modification of the light-weight
resolver or `allow-utf8' extension of `named' configuration syntax
found in mDNkit version 1.x.
* Runmdn is back. The strategy for making resolver MDN-aware has been
changed from replacing low-level resolver functions to wrapping
resolver API functions, so that it should also work for exotic
resolver implementations such as Solaris's.
* Several new ACEs are supported. These are `AltDUDE', `AMC-ACE-M',
`AMC-ACE-O' and `AMC-ACE-R'.
* `-version' option is added to mdnconv and mdnsproxy. When the option
is specified, the command prints its version number and exits
immediately.
* For some of frequently used options, single-character short-cut options
are provided for mdnconv.
* The base versions of Squid patch is now 2.4.STABLE1.
* A build problem on NetBSD 1.5 is fixed.
Major changes in version 2.0.1:
* A bug in mdnsproxy/Makefile.in is fixed. Now mdnsproxy 2.X can be
built on Solaris.
Major changes in version 2.0:
* The MDN library (libmdn) performs domain name preparation (NAMEPREP)
according to the current Internet Draft. Currently nameprep-02 and
nameprep-03 are supported. Also additional local name preparation
can be performed before NAMEPREP. Along with this change, command
line options of `mdnconv' are greatly changed. See the man page
mdnconv(1) for more details.
* mDNkit adopts IDNA, which is an architecture for handling
multilingual domain names currently being discussed at IETF IDN
working group. MDN library provides new API in accordance with this
IDNA, and NAMEPREP.
* The default configuration file name for the MDN Library is changed
from `mdnres.conf' to `mdn.conf'. Note that syntax of the file has
some incompatible changes. See the man page mdn.conf(5).
* dnsproxy is renamed to `mdnsproxy'. The default configuration file
is also renamed from `dnsproxy.conf' to `mdnsproxy.conf', and its
syntax is revised. Unlike dnsproxy which only reads `dnsproxy.conf',
mdnsproxy also reads mdn.conf. The path name of `mdn.conf' can be
specified in mdnsproxy.conf. See mdnsproxy.conf(5) for more details.
* For security reason, default directory where mdnsproxy outputs log
files is moved from `/tmp' to `/var/log/mdnsproxy'. `--with-logdir'
option to configure can customize the directory location.
* mdnsproxy can output log messages with syslog.
* DUDE converter is revised and now conforms to -01 draft.
* This release doesn't contain runmdn and bind9 patch. They are
expected to appear again in future versions.
Major changes in version 1.3:
* dnsproxy supports access control. dnsproxy now recognizes
`allow-access' and `log-on-denied' entries in a configuration file.
See dnsproxy.8 and dnsproxy.conf.sample for more details.
* LACE converter incorporates numeral checks introduced by -01 draft.
* New encoding converters for `DUDE' and `UTF-6' are implemented.
* Whether a given name conforms the host name requirement in STD13 or
not is checked more strictly by the MDN library. A name starting
or ending with hypen is not considered as STD13 conformed name, even
if the name consists exclusively of alphabets, digits and hypens.
* The base versions of BIND-9 patch are now 9.0.1 and 9.1.0.
* The base versions of BIND-8 patch is now 8.2.3 only.
Major changes in version 1.2.1:
* RACE converter incorporates numeral checks introduced by -03 draft.
Also a bug, which produces incorrectly encoded string (actually
encoded in the way -00 draft specifies), is fixed.
* The base version of BIND-9 patch has changed from 9.0.0 to 9.0.1.
* The base versions of BIND-8 patch are now 8.2.2-P7 and 8.2.3-T9B.
* runmdn now works again.
* mdnconv is improved so that it can nicely convert ACE-encoded text
to other encodings. It detects ACE portions of the input string and
converts only them, leaving non-ACE portions intact. Previously
only RACE had such capability, but now other ACEs also have this
capability as long as they have certain prefix/suffix ("bq--" for
RACE, for example).
Major changes in version 1.2:
* New encoding converters for `BRACE' and `LACE' are implemented.
* New normalize schemes `ja-compose-voiced-sound', 'ja-kana-fullwidth'
and 'ja-alnum-halfwidth' introduced.
* mDN Wrapper is thoroughly overhauled.
- Log level can be specified by using GUI (or directly editing the
registry Software\JPNIC\MDN\LogLevel). Note that fine grain
control over logging is supported only by the MDN library (libmdn).
Log output from mDN Wrapper itself can be turned on or off, but
no log level support.
- Log file can also specified.
- Some serious bugs are fixed, including incorrect program-side
encoding (codeset) detection.
- Advanced configuration feature implemented. Now DNS encoding and
normalization can be customizable. Also you can configure which
winsock DLL to be wrapped.
* dnsproxy and mDN Wrapper now correctly accept and process client-
supplied domain names encoded in the alternate encoding. Previously
worked correctly only when the alternate encoding happened to be the
same as the server encoding.
* 8bit-through patch for BIND-8.2.2-P5 is replaced by a new patch
for BIND-8.2.2-P7.
* A buffer overrun bug in RACE converter is fixed.
Major changes in version 1.1:
* Log level of dnsproxy can be specified with ``log-level'' entry.
available levels are `none', `fatal', `warning' and `trace'. See
dnsproxy.8 or dnsproxy.conf.sample for details.
* Sending SIGHUP to dnsproxy causes it to close and re-open the log file.
Useful for log file turnover.
* If log file is not specified, dnsproxy uses the default log file
/tmp/dnsproxy.log. Previously behavior was that no logging was done
at all, conflicting with what document says.
* dnsproxy won't terminate even if recvfrom() returns unexpected
errors such as `connection refused (ECONNREFUSED)'. On Linux, it is
reported that it sometimes returns this error even for
connection-less (ie UDP) sockets.
* DNS message ID allocation/release bugs in dnsproxy are fixed.
Previously dnsproxy seems to stop working if it receives more than
4096 requests in 10 minutes.
* RACE conversion bug is fixed. Previously, if the prefix part contains
any uppercase letters (such as "Bq--"), it is not recognized as a
RACE prefix.

View file

@ -1,262 +0,0 @@
mDNkit
-- multilingual domain name toolkit --
version 2.2.3
Japan Network Information Center (JPNIC)
Table of contents of this file:
1. Overview
2. Directory structure of this distribution
3. Applying patches
4. Supported systems
5. Contact information
See the file INSTALL for compilation and installation instructions.
See the file NEWS for a list of major changes in the current release.
1. Overview
mDNkit is a toolkit for handling multilingualized/internationalized
domain names. To handle such names, the following features are required:
+ Encoding conversion
Multilingualized domain names have to be converted from
the encoding application uses (local encoding) to
the encoding used for name resolution (IDN encoding), and
vice versa. Since domain names in IDN encoding just look
like good old ASCII domain names, the encoding is also known
as ASCII-compatible encoding (ACE).
+ NAMEPREP
Name preparation of domain names before converting to
IDN encoding. Basically this is a normalization process
of the domain names.
These conversion/nameprep processes to domain names have to be
performed before they are sent to DNS servers. And since the
processed domain names (in IDN encoding) consist of only legal ASCII
characters, no changes are required to DNS servers.
mDNkit provides several ways for adding these features.
This kit consists of following components.
+ library for handling multilingual domain names (libmdn)
This is a library implementing encoding conversion and
nameprep. The library provides easy-to-use API for these
features, so it should be easy to add capability of handling
multilingual domain name to your applications using this
library.
This library is also used for implementing various commands in
this toolkit (such as mdnsproxy and mdnconv).
+ DNS proxy server (mdnsproxy)
This works as a fake DNS server for the clients. It receives
DNS request containing domain names in the client's local
encoding (e.g. Shift_JIS), translates them into the encoding
on DNS protocol (e.g. UTF-8 or RACE), and forwards to the real
DNS server. Also the response from the server is converted
back to the client's local encoding and returned. See
``2. using mdnsproxy'' below.
+ a command dynamically adds MDN feature to unix applications (runmdn)
This command enables normal applications to handle
multilingual domain names by dynamically attaching special
library to them. See ``3. using runmdn'' below.
+ a patch for BIND-9 that adds MDN capability
This patch adds MDN capability to BIND9. It adds encoding
conversion and nameprep features to `dig', `host' and
`nslookup'. With the patch, those commands become capable of
multilingual domain names.
+ mDN wrapper for Windows applications
On windows, name resolving request is passed to WINSOCK DLL. So,
replacing WINSOCK DLL with multi-lingual domain name version
makes legacy windows applications compatible with mDN. This is
wrapper DLL for WINSOCK's name resolving functions. See
``4. using mDN wrapper'' below.
+ a codeset converter for named.conf/zone master files (mdnconv)
This is a codeset (encoding) converter specially designed for
converting named.conf and zone master files from your local
encoding (e.g. EUC-JP) to the encoding which internationalized
DNS servers employ (e.g. RACE).
+ a patch that makes BIND-8 8-bit through
This is needed in order for named and resolver to handle
non-ascii domain names encoded in local encoding or UTF-8.
The patch is rudimentary; it makes almost any byte sequence
legal as a domain name (which is what 8-bit through is for).
+ a patch for making Squid cache server 8-bit through
This is a simple patch that disables Squid's validity check
for host name part in URLs. Without this patch, Squid rejects
URLs containing multilingual domain name (correctly).
This kit provides several ways to handle multilingual domain names
using above components.
** 1. using API
This is the preferred way to handle multilingual domain names,
applications are required to explicitly call the name conversion
API mDNkit provides.
domain name
+-----------+-------+--------+ in ACE
| | | | encoding +------------+
| client | mdn |system's|----------->| DNS server |
|application|library|resolver|<-----------| |
| | | | +------------+
+-----------+-------+--------+
** 2. using mdnsproxy
In case the application cannot be modified to use the above API,
you can still be able to use multilingual domain names using
mdnsproxy, provided that the application uses 8bit-through
resolver.
domain name encoding domain name
in local conversion and in ACE
+------------+ encoding nameprep endoding
| client | +----------------+ +----------+
|application |------------>| mdnsproxy |------------>|DNS server|
| with |<------------| |<------------| |
|8bit through| +----------------+ +----------+
| resolver |
+------------+
** 3. using runmdn
Or if the client application dynamically links resolver API (such as
gethostbyname) and the OS supports certain features, you can use
runmdn. By replacing the resolver API with a version which performs
encoding conversion and nameprep, runmdn enables normal applications
to resolve multilingual domain names.
encoding domain name
conversion and in ACE
nameprep encoding
+-----------+-------------+ +----------+
| client | dynamically |---------------->|DNS server|
|application| attached |<----------------| |
| | library | +----------+
+-----------+-------------+
** 4. using mDN wrapper
By wrapping WINSOCK DLL, mDN Wrapper enables Windows applications
to resolve multilingual domain names.
domain name nameprep domain name
in local and encoding in ACE
+-----------+ encoding conversion encoding
| legacy | +---------+---------+ +----------+
| windows |------------>| mDN | orignal |---------->|DNS server|
| network |<------------| wrapper | winsock |<----------| |
|application| +---------+---------+ +----------+
+-----------+
2. Directory structure of this distribution
Below is a directory structure of this distribution with some
important files and their brief description.
+README this file
+README.ja .. in Japanese
+INSTALL compilation and installation instructions.
+INSTALL.ja .. in Japanese
+DISTFILES list of files in this distribution
+NEWS what's new in this version
+ChangeLog list of changes
+Makefile.in toplevel makefile template
+configure a `configure' script
+include/
| +config.h.in template header file for configuration
| +mdn/ header files for mdn library
+lib/ source directory for mdn library
+mdnsproxy/ source directory for DNS proxy server
+patch/ various patch files
| +bind8/ bind-8 patch directory
| +bind9/ bind-9 patch directory
| +libiconv/ libiconv patch directory
| +squid/ squid patch directory
+tools/ source directory for tools
| +mdnconv/ source directory for codeset converter
| +runmdn/ source directory for runmdn command
+util/ utilities
+wsock/ source directory for mDN wrapper
3. Applying patches
This distribution also contains patches for BIND 9.1.3, BIND 8.2.3 and
Squid 2.4.STABLE1. The top of these patch files describe how to apply
the patch and (re)install.
Note that on Solaris, "patch" command that comes with the system
sometimes doesn't work correctly. You may want to install the GNU
version of the command (http://www.gnu.org/software/patch/) and use
it.
4. Supported systems
We've had successful builds on the following systems:
-------------------------------------------------------------------
OS iconv library configure options
===================================================================
FreeBSD 4.4-RELEASE GNU libiconv --with-libiconv
for Intel 1.6.1
-------------------------------------------------------------------
FreeBSD 3.5.1-RELEASE GNU libiconv --with-libiconv
for Intel 1.7
-------------------------------------------------------------------
NetBSD 1.5.2 GNU libiconv --with-libiconv
for Intel 1.7
-------------------------------------------------------------------
Red Hat Linux 7.1 standard library none
for Intel (glibc)
-------------------------------------------------------------------
Red Hat Linux 7.0 standard library none
for Intel (glibc)
-------------------------------------------------------------------
Debian/GNU Linux 2.2r3 standard library none
for Intel (glibc)
-------------------------------------------------------------------
Solaris 2.6 standard library none
for Sparc (libc)
-------------------------------------------------------------------
Windows2000 GNU libiconv --with-libiconv
(cygwin-1.3.2) *1 1.7
-------------------------------------------------------------------
*1: Only mdnconv can work on that system.
The latest information about supported/unsupported systems will be
found at the mDNkit FAQ page linked from:
http://www.nic.ad.jp/jp/research/idn/
5. Contact information
Please see
http://www.nic.ad.jp/jp/research/idn/
for the latest news about this kit.
Bug reports and comments on this kit should be sent to
mdnkit-bugs@nic.ad.jp
and
idn-cmt@nic.ad.jp
respectively.
; $Id: README,v 1.1 2002/01/02 02:46:21 marka Exp $

View file

@ -1,254 +0,0 @@
mDNkit
-- 多言語ドメイン名ツールキット --
バージョン 2.2.3
(社) 日本ネットワークインフォメーションセンター (JPNIC)
このファイルの目次:
1. 概要
2. ディレクトリ構成
3. パッチの当て方
4. 本キットが対応しているシステム
5. 本キットに関する最新情報、問い合わせについて
コンパイルおよびインストール方法については、INSTALL.ja というファイルを
ご覧下さい。このバージョンでの主な変更点に付いては、(英文ですが) NEWS
というファイルをご覧下さい。
1. 概要
mDNkit とは多言語ドメイン名を扱うためのツールキットです。多言語ドメイ
ン名を扱うためには、次のような機能が要求されます。
・エンコーディング変換
多言語ドメイン名に対して、そのエンコーディングをアプリケーションが使
用しているもの (ローカルエンコーディング) から名前解決に用いられるも
の (IDN エンコーディング) への変換、またその逆方向の変換を行います。
ドメイン名を IDN エンコーディングにした結果は、従来のドメイン名と同
じく ASCII 文字のみで構成されるので、IDN エンコーディングはASCII 互
換エンコーディング (ACE) とも呼ばれます。
・NAMEPREP
ドメイン名を IDN エンコーディングに変換する前に、名前の正規化を行い
ます。これを NAMEPREP と呼びます。
上記の処理はドメイン名を DNS サーバに送る前に実行する必要があります。
処理済のドメイン名は ASCII 文字から構成され、従来の ASCII ドメイン名と
しても正しい形式になっているので、DNS サーバ側にはなんの変更も必要あり
ません。
この配布キットには次のようなものが含まれます。
・多言語ドメイン名を処理するためのライブラリ (libmdn)
これはエンコーディング変換や NAMEPREP の機能を実装したライブラリです。
このライブラリはこれらの機能を使うためのシンプルな API を備えているので、
このライブラリを使用すれば、多言語ドメイン名を扱う機能を簡単に
アプリケーションに追加することができます。
またこのライブラリは本ツールキットに含まれるさまざまなコマンド
(mdnsproxy や mdnconv など) を実装するのにも使われています。
・DNSプロキシサーバ (mdnsproxy)
ドメイン名変換機能をもつ DNS のプロキシサーバです。クライアントから
受信した DNS メッセージ中のドメイン名をクライアントのローカルエンコー
ディングから DNS サーバの使用する DNS プロトコル上のエンコーディング
へと変換して DNS サーバに送信します。また DNS サーバから返されたDNS
メッセージ中のドメイン名をクライアントのローカルエンコーディングに戻
してクライアントに返します。詳しくは、後述の「2. mdnsproxy を使う」
を御覧ください。
・UNIX アプリケーションに MDN 機能を動的に追加するコマンド (runmdn)
UNIX の通常のアプリケーションで多言語ドメイン名を取り扱うために、特
別なライブラリを動的にリンクするためのコマンドです。詳しくは、後述の
「3. runmdn を使う」を御覧ください。
・bind-9 に MDN 機能を追加するパッチ
bind-9 に MDN の機能を追加するパッチです。`dig'、`host'、`nslookup'
にエンコーディング変換と NAMEPREP の機能を追加し、多言語ドメイン名が
扱えるようにします。
・Windows アプリケーション用の mDN ラッパー
WINSOCK の名前解決機能に対するラッパー DLL です。Windows 上では、名
前解決の要求は、WINSOCK DLL を通して行われます。そこで、これを多言語
ドメイン用の WINSOCK DLL に置き換えることで、従来の Windows アプリケー
ションでも mDN 機能を使用できるようにします。詳しくは、後述の
「4. mDN ラッパーを使う」を御覧ください。
・named.conf およびゾーンマスタファイル用コードセットコンバータ (mdnconv)
named.conf およびゾーンマスタファイルを対象としたコードセット (エン
コーディング) 変換用ツールです。SJIS などのローカルエンコーディング
で書かれたこれらのファイルを、IDN エンコーディング (例えば RACE) へ
と変換します。
・bind-8 を 8 ビットスルー化するパッチ
named やリゾルバでローカルエンコーディングや UTF-8 エンコーディング
のドメイン名を使用可能にするためのパッチです。8ビットスルーなのでほ
とんどどんなコードでも通ってしまいます。
・squid を 8 ビットスルー化するパッチ
URL 中のホスト名に関する正当性チェックを外すためのパッチです。このパッ
チを当てないと Squid は多言語ドメイン名を含む URL をエラーとしてはじ
いてしまいます。
この配布キットは、以上のものを用いて、多言語ドメイン名を扱うための複数
の方法を提供しています。
** 1. API を使う
多言語ドメイン名を扱うための方式としてはこの方法が推奨されています。
アプリケーションは mDNkit の提供する API を明示的に呼び出して
エンコーディング変換や NAMEPREP を行います。
ACE エンコーディングの
+----------------+-------+--------+ ドメイン名
| | | | +------------+
| クライアント | mdn |システム|----------->| DNS サーバ |
|アプリケーション|library| 付属の |<-----------| |
| | |リゾルバ| +------------+
+----------------+-------+--------+
** 2. mdnsproxy を使う
上記の API を使うようにアプリケーションを修正できない場合でも、
mdnsproxy を使用すれば多言語ドメイン名の名前解決を行うことが
可能です。ただしこの場合アプリケーションが 8 ビットスルーの
リゾルバを使っていることが前提となります。
ローカルエン エンコーディン ACEエンコーディ
コードィング グ変換および正 ングのドメイン名
+----------------+のドメイン名 規化
| クライアント | +--------------+ +------+
|アプリケーション|------------>| mdnsproxy |------------>| DNS |
|と 8ビットスルー|<------------| |<------------|サーバ|
| 化したリゾルバ | +--------------+ +------+
+----------------+
** 3. runmdn を使う
あるいは、クライアントアプリケーションが名前解決 用の API
(gethostbyname など) を動的にリンクし、かつ OS が適切な機能を
備えている場合には runmdn を使うこともできます。名前解決用の
API を、エンコーディング変換や NAMEPREP 機能を備えたバージョンの
ものに動的に置換えることにより、通常のアプリケーションが多言語
ドメイン名を名前解決できるようにします。
エンコーディング変換 ACEエンコーディ
および正規化 ングのドメイン名
+----------------+------------------+
| クライアント |動的にリンクされた| +------+
|アプリケーション| ライブラリ |---------------->| DNS |
|と通常のリゾルバ| |<----------------|サーバ|
+----------------+------------------+ +------+
** 4. mDN ラッパーを使う
WINSOCK DLL をラップすることにより、mDN ラッパーは Windows の
アプリケーションが多言語ドメイン名を名前解決できるようにします。
ローカルエ 正規化および ACEエンコーディ
ンコーディ エンコーディ ングのドメイン名
+----------------+ ングのドメ ング変換
|従来の Windows | イン名 +---------+------------+ +------+
|ネットワーク |---------->| mDN | オリジナル |---------->| DNS |
|アプリケーション|<----------| ラッパー| winsock |<----------|サーバ|
+----------------+ +---------+------------+ +------+
2. ディレクトリ構成
配布キットのディレクトリ構成と、主要なファイルを示します。
README 英語版の README
README.ja このファイル
INSTALL 英語版の INSTALL
INSTALL.ja コンパイルとインストール方法
DISTFILES 配布されるファイル一覧
NEWS 主な変更
ChangeLog 変更詳細
configure configure スクリプト
Makefile.in トップレベルの Makefile のテンプレート
include/ インクルードファイルディレクトリ
config.h.in config.h のテンプレート
mdn/ mdn ライブラリ用インクルードファイル
lib/ mdn ライブラリソース
mdnsproxy/ DNS プロキシサーバソース
patch/ 各種パッチファイル
bind8/ bind8 用パッチ
bind9/ bind9 用パッチ
libiconv/ libiconv 用パッチ
squid/ squid 用パッチ
tools/ 周辺ツール
mdnconv/ コードセットコンバータソース
runmdn/ runmdn コマンドソース
util/ ユーティリティ
wsock/ mDN ラッパーソース
4. パッチの当て方
この配布キットには、bind-9.1.3、bind-8.2.3 および squid-2.4-STABLE1 に
対するパッチが含まれています。パッチの当て方は、パッチファイルの先頭に
書かれていますのでそちらを参照してください。
Solaris では、システム付属の patch コマンドが正常に動作しないことがあ
ります。そのような場合には、GNU バージョンの patch
(http://www.gnu.org/software/patch/) をインストールして、これを使用し
てください。
5. 本キットが対応しているシステム
正常にインストールできることが確認できているのは、次のシステムです。
------------------------------------------------------------------
OS iconv configure のオプション
==================================================================
FreeBSD 4.4-RELEASE GNU libiconv --with-libiconv
Intel 1.6.1
-------------------------------------------------------------------
FreeBSD 3.5.1-RELEASE GNU libiconv --with-libiconv
Intel 1.7
-------------------------------------------------------------------
NetBSD 1.5.2 GNU libiconv --with-libiconv
Intel 1.7
------------------------------------------------------------------
Red Hat Linux 7.1 標準ライブラリ なし
Intel (glibc)
------------------------------------------------------------------
Red Hat Linux 7.0 標準ライブラリ なし
Intel (glibc)
-------------------------------------------------------------------
Debian/GNU Linux 2.2r3 標準ライブラリ なし
Intel (glibc)
------------------------------------------------------------------
Solaris 2.6 標準ライブラリ なし
Sparc (libc)
------------------------------------------------------------------
Windows 2000 GNU libiconv --with-libiconv
(cygwin-1.3.2) *1 1.7
-------------------------------------------------------------------
*1: 動作するのは mdnconv だけです。
本キットが対応している/していないシステムに関する最新の情報は、次のと
ころから辿れる mDNkit FAQ のページに記されています。
http://www.nic.ad.jp/jp/research/idn/
6. 本キットに関する最新情報、問い合わせについて
本キットに関する最新情報については、
http://www.nic.ad.jp/jp/research/idn/
を参照してください
本キットに関するバグレポートおよびコメントは、それぞれ
mdnkit-bugs@nic.ad.jp
および
idn-cmt@nic.ad.jp
へお願いします。
; $Id: README.ja,v 1.1 2002/01/02 02:46:21 marka Exp $

View file

@ -1,69 +0,0 @@
/* $Id: acconfig.h,v 1.1 2002/01/02 02:46:21 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
@TOP@
/* Define as an appropriate type (ex. int) if your system doesn't have. */
#undef BOOL
@BOTTOM@
/* Define as the pathname of the shared libc object if your system has one. */
#undef SOPATH_LIBC
/* Define as the pathname of the shared libnsl object if your system has one. */
#undef SOPATH_LIBNSL

View file

@ -1,557 +0,0 @@
##
## $Id: aclocal.m4,v 1.1 2002/01/02 02:46:21 marka Exp $
##
dnl
dnl AC_ACE_PREFIX(ace-name, default)
dnl AC_ACE_SUFFIX(ace-name, default)
dnl AC_ACE_SIGNATURE(ace-name, prefix-default, suffix-default)
dnl
define([AC_ACE_PREPARE], [dnl
undefine([ACE_ID])undefine([ACE_PSYM])undefine([ACE_SSYM])dnl
define([ACE_ID],translit($1,[A-Z_],[a-z-]))dnl
define([ACE_PSYM],[MDN_]translit(ACE_ID,[a-z-],[A-Z])[_PREFIX])dnl
define([ACE_SSYM],[MDN_]translit(ACE_ID,[a-z-],[A-Z])[_SUFFIX])])dnl
dnl
AC_DEFUN([AC_ACE_PREFIX],[AC_ACE_PREPARE($1)dnl
ace_prefix=no
AC_ARG_WITH(ACE_ID-prefix,
[ --with-]ACE_ID[-prefix=PREFIX prefix for $1 encoding [$2]],
ace_prefix=$withval)
case "${ace_prefix}" in
no)
ace_prefix="$2"
;;
yes)
AC_MSG_ERROR([You must specify PREFIX to --with-ACE_ID-prefix option.])
;;
esac
if test "${ace_prefix}" != ""; then
AC_DEFINE_UNQUOTED(ACE_PSYM, "${ace_prefix}",
[Define if the prefix of $1 encoding differs from '$2'.])
fi
])
AC_DEFUN([AC_ACE_SUFFIX],[AC_ACE_PREPARE($1)dnl
ace_suffix=no
AC_ARG_WITH(ACE_ID-suffix,
[ --with-]ACE_ID[-suffix=SUFFIX suffix for $1 encoding [$2]],
ace_suffix=$withval)
case "${ace_suffix}" in
no)
ace_suffix="$2"
;;
yes)
AC_MSG_ERROR([You must specify SUFFIX to --with-ACE_ID-suffix option.])
;;
esac
if test "${ace_suffix}" != ""; then
AC_DEFINE_UNQUOTED(ACE_SSYM, "${ace_suffix}",
[Define if the suffix of $1 encoding differs from '$2'.])
fi
])
AC_DEFUN([AC_ACE_SIGNATURE],[AC_ACE_PREPARE($1)dnl
ace_prefix=no
ace_suffix=no
AC_ARG_WITH(ACE_ID-prefix,
[ --with-]ACE_ID[-prefix=PREFIX prefix for $1 encoding [$2]],
ace_prefix=$withval)
case "${ace_prefix}" in
no)
ace_prefix=""
;;
yes)
AC_MSG_ERROR([You must specify PREFIX to --with-ACE_ID-prefix option.])
;;
esac
AC_ARG_WITH(ACE_ID-suffix,
[ --with-]ACE_ID[-suffix=SUFFIX suffix for $1 encoding [$3]],
ace_suffix=$withval)
case "${ace_suffix}" in
no)
ace_suffix=""
;;
yes)
AC_MSG_ERROR([You must specify SUFFIX to --with-ACE_ID-suffix option.])
;;
esac
if test "${ace_prefix}${ace_suffix}" = ""; then
ace_prefix="$2"
ace_suffix="$3"
fi
if test "${ace_prefix}" != ""; then
AC_DEFINE_UNQUOTED(ACE_PSYM, "${ace_prefix}",
[Define if the prefix of $1 encoding differs from '$2'.])
elif test "${ace_suffix}" != ""; then
AC_DEFINE_UNQUOTED(ACE_SSYM, "${ace_suffix}",
[Define if the suffix of $1 encoding differs from '$3'.])
fi
])
AC_DEFUN(AC_FIND_SYSTEM_SHOBJ,[
AC_MSG_CHECKING(for $1 shared object)
shobj_name=$1
shobj_path=
case "$host" in
*-hpux*)
SOEXT=sl
;;
*)
SOEXT=so
;;
esac
for shobj_libdir in /lib /usr/lib; do
if test -f $shobj_libdir/$shobj_name.$SOEXT; then
shobj_path=$shobj_libdir/$shobj_name.$SOEXT
else
shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1`
if test "$shobj_path" != "" -a -f "$shobj_path"; then
:
else
shobj_path=
fi
fi
if test "$shobj_path" != ""; then
AC_MSG_RESULT($shobj_path)
shobj_pathsymbol=SOPATH_`echo $shobj_name | tr a-z A-Z`
AC_DEFINE_UNQUOTED($shobj_pathsymbol, "$shobj_path")
break
fi
done
if test "$shobj_path" = ""; then
AC_MSG_RESULT(no)
fi
])dnl
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 40 AC_PROG_LIBTOOL
AC_DEFUN(AC_PROG_LIBTOOL,
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
# Save cache, so that ltconfig can load it
AC_CACHE_SAVE
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
AC_DEFUN(AC_LIBTOOL_SETUP,
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
case "$target" in
NONE) lt_target="$host" ;;
*) lt_target="$target" ;;
esac
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
[libtool_flags="$libtool_flags --enable-dlopen"])
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[libtool_flags="$libtool_flags --enable-win32-dll"])
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock avoid locking (might break parallel builds)])
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
])
esac
])
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_SHARED, [dnl
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_STATIC, [dnl
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
])
# AC_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(fast-install,
changequote(<<, >>)dnl
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AC_PROG_LD,
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
changequote(,)dnl
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
ac_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$ac_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_PROG_LD_GNU
])
AC_DEFUN(AC_PROG_LD_GNU,
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
fi])
])
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN(AC_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
ac_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
break
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -p"
break
else
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN(AC_CHECK_LIBM,
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case "$lt_target" in
*-*-beos* | *-*-cygwin*)
# These system don't have libm
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
;;
*)
AC_CHECK_LIB(m, main, LIBM="-lm")
;;
esac
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments. Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case "$enable_ltdl_convenience" in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-install to the configure
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
[if test x"$enable_ltdl_install" = xno; then
AC_MSG_WARN([libltdl not installed, but installation disabled])
else
enable_ltdl_install=yes
fi
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
INCLTDL=
fi
])
dnl old names
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,692 +0,0 @@
dnl $Id: configure.in,v 1.1 2002/01/02 02:46:23 marka Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright (c) 2000 Japan Network Information Center. All rights reserved.
dnl
dnl By using this file, you agree to the terms and conditions set forth bellow.
dnl
dnl LICENSE TERMS AND CONDITIONS
dnl
dnl The following License Terms and Conditions apply, unless a different
dnl license is obtained from Japan Network Information Center ("JPNIC"),
dnl a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
dnl Chiyoda-ku, Tokyo 101-0047, Japan.
dnl
dnl 1. Use, Modification and Redistribution (including distribution of any
dnl modified or derived work) in source and/or binary forms is permitted
dnl under this License Terms and Conditions.
dnl
dnl 2. Redistribution of source code must retain the copyright notices as they
dnl appear in each source code file, this License Terms and Conditions.
dnl
dnl 3. Redistribution in binary form must reproduce the Copyright Notice,
dnl this License Terms and Conditions, in the documentation and/or other
dnl materials provided with the distribution. For the purposes of binary
dnl distribution the "Copyright Notice" refers to the following language:
dnl "Copyright (c) Japan Network Information Center. All rights reserved."
dnl
dnl 4. Neither the name of JPNIC may be used to endorse or promote products
dnl derived from this Software without specific prior written approval of
dnl JPNIC.
dnl
dnl 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
dnl BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
dnl ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
dnl
dnl 6. Indemnification by Licensee
dnl Any person or entities using and/or redistributing this Software under
dnl this License Terms and Conditions shall defend indemnify and hold
dnl harmless JPNIC from and against any and all judgements damages,
dnl expenses, settlement liabilities, cost and other liabilities of any
dnl kind as a result of use and redistribution of this Software or any
dnl claim, suite, action, litigation or proceeding by any third party
dnl arising out of or relates to this License Terms and Conditions.
dnl
dnl 7. Governing Law, Jurisdiction and Venue
dnl This License Terms and Conditions shall be governed by and and
dnl construed in accordance with the law of Japan. Any person or entities
dnl using and/or redistributing this Software under this License Terms and
dnl Conditions hereby agrees and consent to the personal and exclusive
dnl jurisdiction and venue of Tokyo District Court of Japan.
AC_INIT(include/mdn/converter.h)
AC_CANONICAL_HOST
debug=no
AC_ARG_ENABLE(debug,
[ --enable-debug enable debug codes [default=no]],
debug=$enableval)
case "$enableval" in
yes)
CFLAGS="$CFLAGS -DDEBUG"
;;
esac
logdir=no
AC_ARG_WITH(logdir,
[ --with-logdir=DIR mdnsproxy's log files are in DIR.
[default=LOCALSTATEDIR/mdnsproxy]],
logdir=$withval)
case "$logdir" in
no)
logdir='${localstatedir}/mdnsproxy'
;;
yes)
AC_MSG_ERROR([You must specify DIR to --with-logdir option.])
;;
esac
AC_SUBST(logdir)
extraace=no
AC_ARG_ENABLE(extra-ace,
[ --enable-extra-ace enable additional ACE converters. [default=no]],
extraace=$enableval)
case "$extraace" in
no)
;;
yes)
AC_DEFINE(MDN_EXTRA_ACE, 1,
[Define if you want additional ACE converters compiled in.])
;;
*)
AC_MSG_ERROR([You must specify yes or no to --enable-extra-ace option.])
;;
esac
utf8name=no
AC_ARG_WITH(utf8,
[ --with-utf8=NAME codeset name for UTF-8 encoding [UTF-8]],
utf8name=$withval)
case "$utf8name" in
no)
utf8name=UTF-8
;;
yes)
AC_MSG_ERROR([You must specify NAME to --with-utf8 option.])
;;
*)
AC_DEFINE_UNQUOTED(MDN_UTF8_ENCODING_NAME, "$utf8name",
[Define if your iconv() does not accept "UTF-8" as the codeset name for utf-8.])
;;
esac
AC_ACE_PREFIX(RACE, [bq--])
AC_ACE_SUFFIX(BRACE, [-8q9])
AC_ACE_PREFIX(LACE, [lq--])
AC_ACE_PREFIX(UTF-6, [wq--])
AC_ACE_PREFIX(DUDE, [dq--])
AC_ACE_SIGNATURE(AltDUDE, [a---], [])
AC_ACE_SIGNATURE(AMC-ACE-M, [], [-amc1])
AC_ACE_SIGNATURE(AMC-ACE-O, [], [-amc2])
AC_ACE_PREFIX(AMC-ACE-R, [amc3-])
AC_ACE_PREFIX(AMC-ACE-V, [amc4-])
AC_ACE_PREFIX(AMC-ACE-W, [amc5-])
AC_ACE_PREFIX(AMC-ACE-Z, [zq--])
AC_ACE_PREFIX(MACE, [mq--])
ICONVINC=
ICONVLIB=
libiconv=unspec
AC_ARG_WITH(libiconv,
[ --with-libiconv=IPREFIX GNU libiconv are installed in IPREFIX [PREFIX]],
libiconv=$withval)
case "$libiconv" in
unspec)
;;
no)
ICONVINC=
ICONVLIB=
;;
yes)
if test X$prefix = XNONE ; then
libiconv=$ac_default_prefix
else
libiconv=$prefix
fi
ICONVINC="-I$libiconv/include"
ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv"
;;
*)
ICONVINC="-I$libiconv/include"
ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv"
;;
esac
iconv_include=unspec
AC_ARG_WITH(iconv-include,
[ --with-iconv-include=DIR iconv include files are in DIR []],
iconv_include=$withval)
case "$iconv_include" in
unspec)
;;
no)
ICONVINC=
;;
yes)
AC_MSG_WARN([You must supply DIR to --with-iconv-include option.
Ignored.])
ICONVINC=
;;
*)
ICONVINC="-I$iconv_include"
;;
esac
if test "X$ICONVINC" != X ; then
iconv_include="`echo X$ICONVINC | sed -e 's/^X-I//'`"
if test ! -f "$iconv_include/iconv.h" ; then
AC_MSG_ERROR([iconv.h doesn't exist in $iconv_include])
fi
fi
AC_SUBST(ICONVINC)
iconv=unspec
AC_ARG_WITH(iconv,
[ --with-iconv=LIB special library for iconv []],
iconv=$withval)
case "$iconv" in
unspec)
;;
no)
ICONVLIB=
;;
yes)
AC_MSG_WARN([You must supply LIB to --with-iconv option.
-liconv is assumed.])
ICONVLIB=-liconv
;;
*)
ICONVLIB=$iconv
;;
esac
AC_SUBST(ICONVLIB)
AC_ARG_WITH(iconv-sofile,
[ --with-iconv-sofile=PATH shared library file for libiconv []],
iconv_file=$withval, iconv_file=guess)
ICONVSOFILE=
case "$iconv_file" in
no)
ICONVSOFILE=none
;;
yes)
AC_MSG_ERROR([You must supply PATH to --with-iconv-sofile option.])
;;
guess)
if test "$ICONVLIB" = ""; then
ICONVSOFILE=none
else
AC_MSG_CHECKING(pathname of iconv shared library)
ic_libdir=
ic_libname=
case "$host" in
*-hpux*)
SO=sl
;;
*)
SO=so
;;
esac
for arg in $ICONVLIB; do
case "$arg" in
-L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;;
-l*) ic_libname=`echo $arg | sed s/-l//` ;;
/*.$SO*) ICONVSOFILE=$arg ;;
esac
done
if test "$ICONVSOFILE" = ""; then
if test "$ic_libname" = ""; then
AC_MSG_RESULT(unknown)
AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file])
ICONVSOFILE=none
else
if test "$ic_libdir" = ""; then
# Standard (and semi-standard) library directories
ic_libdir="/lib /usr/lib /usr/local/lib"
fi
for dir in $ic_libdir; do
ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1`
if test "$ICONVSOFILE" != ""; then
break
fi
done
if test "$ICONVSOFILE" != ""; then
AC_MSG_RESULT($ICONVSOFILE)
else
AC_MSG_RESULT(unknown)
AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file])
ICONVSOFILE=none
fi
fi
fi
fi
;;
*)
ICONVSOFILE=$iconv_file
;;
esac
AC_SUBST(ICONVSOFILE)
CONF_PREFERENCE=no
INSTALL_DEFAULT_CONF=yes
AC_ARG_WITH(preference,
[ --with-preference=ARG change the default configuration to the one
suitable for ARG.],
CONF_PREFERENCE=$withval)
CONF_PREFERENCE=`echo $CONF_PREFERENCE | tr A-Z a-z`
case "$CONF_PREFERENCE" in
no)
CONF_PREFERENCE=default
INSTALL_DEFAULT_CONF=no
;;
yes)
AC_MSG_ERROR([You must specify ARG to --with-preference option.])
;;
jp)
;;
*)
AC_MSG_ERROR([Unknown ARG for --with-preference option.])
;;
esac
AC_SUBST(CONF_PREFERENCE)
AC_SUBST(INSTALL_DEFAULT_CONF)
dnl Figure out preload stuff.
PRELOAD_VAR="LD_PRELOAD"
PRELOAD_SEP=":"
PRELOAD_LAST=""
case "$host" in
*-solaris*)
PRELOAD_SEP=" "
;;
*-linux*)
PRELOAD_SEP=" "
;;
*-osf*)
PRELOAD_VAR="_RLD_LIST"
PRELOAD_LAST=":DEFAULT"
;;
*-netbsd*)
if test -x /usr/bin/file -a -x /usr/bin/grep ; then
case "`/usr/bin/file /usr/bin/grep`" in
*ELF*)
PRELOAD_SEP=" "
;;
esac
fi
;;
esac
AC_SUBST(PRELOAD_VAR)
AC_SUBST(PRELOAD_SEP)
AC_SUBST(PRELOAD_LAST)
dnl Checks for standard tools.
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_LIBTOOL
dnl Checks for header files.
AC_CHECK_HEADERS(unistd.h locale.h langinfo.h resolv.h)
AC_CHECK_HEADERS(sys/select.h arpa/nameser.h)
AC_CHECK_HEADERS(dlfcn.h)
saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $ICONVINC"
AC_CHECK_HEADER(iconv.h, , [AC_MSG_ERROR([iconv.h doesn't exist])])
CPPFLAGS=$saved_CPPFLAGS
dnl Checks for data types.
AC_TYPE_UID_T
dnl for dnsproxy.
AC_CHECK_TYPE(BOOL, int)
dnl Checks for libraries.
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_addr)
AC_CHECK_LIB(dl, dlopen, [
LIBS="-ldl $LIBS"
LIBDL="-ldl"
AC_DEFINE(HAVE_LIBDL, 1, [Define if you have the dl library (-ldl).])
AC_SUBST(LIBDL)
])
dnl Checks for library functions.
AC_CHECK_FUNCS(vsnprintf setvbuf setlocale nl_langinfo memmove bcopy syslog)
AC_CHECK_FUNCS(gethostbyname gethostbyname2 gethostbyaddr)
AC_CHECK_FUNCS(gethostbyname_r gethostbyname2_r gethostbyaddr_r, find_gethost_r=yes)
AC_CHECK_FUNCS(getipnodebyname getipnodebyaddr freehostent)
AC_CHECK_FUNCS(getaddrinfo freeaddrinfo getnameinfo)
AC_CHECK_FUNCS(dlopen dlsym)
dnl Checks the flavor of gethostbyaddr* functions.
AC_CACHE_CHECK(flavor of gethostbyaddr, ac_cv_flavor_gethostbyaddr,
[ac_cv_flavor_gethostbyaddr=unknown
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) {
return NULL;
}
int main() {
(void)gethostbyaddr(NULL, 0, 0);
return 0;
}
], ac_cv_flavor_gethostbyaddr=glibc2_2,,
ac_cv_flavor_gethostbyaddr=unknown)
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
struct hostent *gethostbyaddr(const char *addr, size_t len, int type) {
return NULL;
}
int main() {
(void)gethostbyaddr(NULL, 0, 0);
return 0;
}
], ac_cv_flavor_gethostbyaddr=glibc,,
ac_cv_flavor_gethostbyaddr=unknown)
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
struct hostent *gethostbyaddr(const char *addr, int len, int type) {
return NULL;
}
int main() {
(void)gethostbyaddr(NULL, 0, 0);
return 0;
}
], ac_cv_flavor_gethostbyaddr=traditional,,
ac_cv_flavor_gethostbyaddr=unknown)
if test "$ac_cv_func_gethostbyaddr" = no ; then
ac_cv_flavor_gethostbyaddr=none
fi])
case "$ac_cv_flavor_gethostbyaddr" in
glibc2_2)
ac_cv_type_ghba_addr_t='const void *'
ac_cv_type_ghba_addrlen_t='socklen_t'
;;
glibc)
ac_cv_type_ghba_addr_t='const char *'
ac_cv_type_ghba_addrlen_t='size_t'
;;
traditional | none)
ac_cv_type_ghba_addr_t='const char *'
ac_cv_type_ghba_addrlen_t='int'
;;
*)
AC_MSG_WARN([runmdn command will not be built.])
;;
esac
AC_DEFINE_UNQUOTED(GHBA_ADDR_T, $ac_cv_type_ghba_addr_t,
[Define as the type of the 1st argument of gethostbyaddr.])
AC_DEFINE_UNQUOTED(GHBA_ADDRLEN_T, $ac_cv_type_ghba_addrlen_t,
[Define as the type of the 2nd argument of gethostbyaddr.])
dnl Checks the flavor of getnameinfo functions.
AC_CACHE_CHECK(flavor of getnameinfo, ac_cv_flavor_getnameinfo,
[ac_cv_flavor_getnameinfo=unknown
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
socklen_t hostlen, char *serv, socklen_t servlen,
unsigned int flags) {
return NULL;
}
int main() {
(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
return 0;
}
], ac_cv_flavor_getnameinfo=glibc2_2_2,,
ac_cv_flavor_getnameinfo=unknown)
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
socklen_t hostlen, char *serv, socklen_t servlen, int flags) {
return NULL;
}
int main() {
(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
return 0;
}
], ac_cv_flavor_getnameinfo=rfc2553bis_03,,
ac_cv_flavor_getnameinfo=unknown)
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
size_t hostlen, char *serv, size_t servlen, int flags) {
return NULL;
}
int main() {
(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
return 0;
}
], ac_cv_flavor_getnameinfo=rfc2553,,
ac_cv_flavor_getnameinfo=unknown)
AC_TRY_RUN(
[
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
size_t hostlen, char *serv, size_t servlen, int flags) {
return NULL;
}
int main() {
(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
return 0;
}
], ac_cv_flavor_getnameinfo=rfc2133,,
ac_cv_flavor_getnameinfo=unknown)
if test "$ac_cv_func_getnameinfo" = no ; then
ac_cv_flavor_getnameinfo=none
fi])
case "$ac_cv_flavor_getnameinfo" in
glibc2_2_2)
ac_cv_type_gni_salen_t='socklen_t'
ac_cv_type_gni_hostlen_t='socklen_t'
ac_cv_type_gni_servlen_t='socklen_t'
ac_cv_type_gni_flags_t='unsigned int'
;;
rfc2553bis_03)
ac_cv_type_gni_salen_t='socklen_t'
ac_cv_type_gni_hostlen_t='socklen_t'
ac_cv_type_gni_servlen_t='socklen_t'
ac_cv_type_gni_flags_t='int'
;;
rfc2553)
ac_cv_type_gni_salen_t='socklen_t'
ac_cv_type_gni_hostlen_t='size_t'
ac_cv_type_gni_servlen_t='size_t'
ac_cv_type_gni_flags_t='int'
;;
rfc2133 | none)
ac_cv_type_gni_salen_t='size_t'
ac_cv_type_gni_hostlen_t='size_t'
ac_cv_type_gni_servlen_t='size_t'
ac_cv_type_gni_flags_t='int'
;;
*)
AC_MSG_WARN([runmdn command will not be built.])
;;
esac
AC_SUBST(RUNMDN_SUBDIR)
AC_DEFINE_UNQUOTED(GNI_SALEN_T, $ac_cv_type_gni_salen_t,
[Define as the type of the 2nd argument of getnameinfo.])
AC_DEFINE_UNQUOTED(GNI_HOSTLEN_T, $ac_cv_type_gni_hostlen_t,
[Define as the type of the 4th argument of getnameinfo.])
AC_DEFINE_UNQUOTED(GNI_SERVLEN_T, $ac_cv_type_gni_servlen_t,
[Define as the type of the 6th argument of getnameinfo.])
AC_DEFINE_UNQUOTED(GNI_FLAGS_T, $ac_cv_type_gni_flags_t,
[Define as the type of the 7th argument of getnameinfo.])
dnl Check whether building runmdn or not.
RUNMDN_SUBDIR=runmdn
if test "$ac_cv_flavor_gethostbyaddr" = unknown ; then
RUNMDN_SUBDIR=
fi
if test "$ac_cv_flavor_getnameinfo" = unknown ; then
RUNMDN_SUBDIR=
fi
AC_SUBST(RUNMDN_SUBDIR)
dnl Checks the flavor of gethost*_r functions.
if test "$find_gethost_r" = yes; then
AC_CACHE_CHECK(flavor of gethostbyname_r, ac_cv_flavor_gethost_r,
[AC_TRY_RUN(
changequote(<<, >>)dnl
<<
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
int main()
{
int err = 0;
struct hostent hebuf, *hp;
char buf[10];
/* Try resolving a invalid name using glibc flavor. */
(void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err);
if (err != 0)
return 0; /* glibc flavor */
else
return 1; /* Sun flavor */
}
>>,
changequote([, ])dnl
ac_cv_flavor_gethost_r=glibc,
ac_cv_flavor_gethost_r=sun,
ac_cv_flavor_gethost_r=sun)])
if test "$ac_cv_flavor_gethost_r" = "glibc"; then
AC_DEFINE(GETHOST_R_GLIBC_FLAVOR, 1,
[Define if the prototype of gethost*_r is glibc flavor.])
fi
fi
dnl Find system shared object paths.
AC_FIND_SYSTEM_SHOBJ(libc)
AC_FIND_SYSTEM_SHOBJ(libnsl)
dnl Checks for iconv library.
AC_MSG_CHECKING(for iconv)
saved_CPPFLAGS=$CPPFLAGS
saved_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ICONVINC"
LIBS="$LIBS $ICONVLIB"
AC_TRY_LINK([
#include <iconv.h>
], [
iconv_t i;
i = iconv_open("ISO-8859-1", "UTF-8");
], [iconv_try_link=yes], [iconv_try_link=no])
LIBS=$saved_LIBS
CPPFLAGS=$saved_CPPFLAGS
AC_MSG_RESULT($iconv_try_link)
if test "$iconv_try_link" = no ; then
AC_MSG_ERROR(iconv function not available)
fi
dnl Check for codeset name for UTF-8.
AC_MSG_CHECKING([for codeset name $utf8name])
saved_CPPFLAGS=$CPPFLAGS
saved_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ICONVINC"
LIBS="$LIBS $ICONVLIB"
AC_TRY_RUN([
#include <stddef.h>
#include <stdlib.h>
#include <iconv.h>
#define UTF8_NAME "$utf8name"
#define ICONV_FAIL ((iconv_t)(-1))
/* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */
int main() {
int i;
/* list of codeset names likely to exist */
static char *codeset[] = {
"ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1",
"Shift_JIS", "SJIS", "sjis", NULL,
};
/* First try null conversion. */
if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0;
/* Unfortunately, above check fails on certain systems, such as Solaris. */
for (i = 0; codeset[i] != NULL; i++) {
if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0;
}
return 1;
}
], utf8_name_valid=yes, utf8_name_valid=no, utf8_name_valid=unknown)
LIBS=$saved_LIBS
CPPFLAGS=$saved_CPPFLAGS
AC_MSG_RESULT($utf8_name_valid)
dnl Output.
AC_CONFIG_HEADER(include/config.h)
AC_OUTPUT(
Makefile
include/Makefile
include/mdn/Makefile
lib/Makefile
mdnsproxy/Makefile
man/Makefile
tools/Makefile
tools/mdnconv/Makefile
tools/runmdn/Makefile
tools/runmdn/runmdn
map/Makefile
)
AC_OUTPUT_COMMANDS([
if test "$ac_cv_flavor_gethostbyaddr" = unknown ; then
echo
echo "NOTICE: runmdn command will not be built, since parameter type"
echo " list of gethostbyaddr() is unknown to configure."
fi
if test "$ac_cv_flavor_getnameinfo" = unknown ; then
echo
echo "NOTICE: runmdn command will not be built, since parameter type"
echo " list of getnameinfo() is unknown to configure."
fi
if test "$utf8_name_valid" = no ; then
echo
echo "WARNING: It seems that iconv does not accept codeset name $utf8name,"
echo " which is supposed to refer to UTF-8 encoding."
echo " Please make sure it is indeed correct."
fi
])

View file

@ -1,55 +0,0 @@
Copyright (c) 2000 Japan Network Information Center. All rights reserved.
By using this file, you agree to the terms and conditions set forth bellow.
LICENSE TERMS AND CONDITIONS
The following License Terms and Conditions apply, unless a different
license is obtained from Japan Network Information Center ("JPNIC"),
a Japanese association, Fuundo Bldg., 1-2 Kanda Ogawamachi, Chiyoda-ku,
Tokyo, Japan.
1. Use, Modification and Redistribution (including distribution of any
modified or derived work) in source and/or binary forms is permitted
under this License Terms and Conditions.
2. Redistribution of source code must retain the copyright notices as they
appear in each source code file, this License Terms and Conditions.
3. Redistribution in binary form must reproduce the Copyright Notice,
this License Terms and Conditions, in the documentation and/or other
materials provided with the distribution. For the purposes of binary
distribution the "Copyright Notice" refers to the following language:
"Copyright (c) Japan Network Information Center. All rights reserved."
4. Neither the name of JPNIC may be used to endorse or promote products
derived from this Software without specific prior written approval of
JPNIC.
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
6. Indemnification by Licensee
Any person or entities using and/or redistributing this Software under
this License Terms and Conditions shall defend indemnify and hold
harmless JPNIC from and against any and all judgements damages,
expenses, settlement liabilities, cost and other liabilities of any
kind as a result of use and redistribution of this Software or any
claim, suite, action, litigation or proceeding by any third party
arising out of or relates to this License Terms and Conditions.
7. Governing Law, Jurisdiction and Venue
This License Terms and Conditions shall be governed by and and
construed in accordance with the law of Japan. Any person or entities
using and/or redistributing this Software under this License Terms and
Conditions hereby agrees and consent to the personal and exclusive
jurisdiction and venue of Tokyo District Court of Japan.

View file

@ -1,233 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: bind9.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>bind9 patch</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>bind9 パッチ</h1>
<h1>bind9 patch</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#overview">Overview</a>
<li><a href="#named">named</a>
<li><a href="#named">named</a>
<li><a href="#resolver">リゾルバ</a>
<li><a href="#resolver">Resolver</a>
<li><a href="#dig">dig/host/nslookup</a>
<li><a href="#dig">dig/host/nslookup</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p>
mDNkit では bind9 用のパッチファイルを提供しています。
このパッチを適用することにより、
bind9 において多言語ドメイン名を扱うことが可能になります。
<p>
The mDNkit provides a patch file for bind9.
This patch file enables bind9 to support multilingual domain names.
<p>
具体的には、このパッチは bind9 に次のような機能を追加します。
<p>
The patch adds the following functionality to bind9.
<ul>
<li>bind9 の DNS サーバ (named) において、ドメイン名をテキストに
変換する際にUTF-8 文字がそのまま通るようになります。
<li>When a domain name is converted to text in bind9 DNS servers (named), UTF-8 characters will be allowed to pass.
<li>bind9 のリゾルバ (lightweight resolver) の提供する名前解決用の
API 関数に、ホスト名としてローカルエンコーディングで表現されたホスト名を
指定できるようになります。
<li>It will enable the name resolving API function provided with the bind9 resolver
(a lightweight resolver) to denote host names in local encoding to be specified as host names.
<li>同じく名前解決結果として、ローカルエンコーディングで表現された
ホスト名が返されるようになります。
<li>Host names denoted in local encoding can be returned as a result of name resolution.
<li>dig、host、nslookup コマンドがローカルエンコーディングのドメイン名を
受け付け、また問い合わせ結果に含まれるドメイン名をローカルエンコーディングで
表示するようになります。
<li>The dig, host and nslookup commands will accept locally encoded domain names and display domain names included in the result of a query in local encoding.
</ul>
<p>bind9 へのパッチの適用方法は、パッチファイルの先頭に記載してあります。
<a href="install.html">インストールガイド</a>
<a href="install.html#bind9">bind9 用パッチの適用とインストール</a>
ご覧ください。
<p>Instructions for how to install this patch to bind9 are given at the beginning of the patch file.
Refer also to <a href="install.html#bind9">the section "Adding and installing the bind9 patch"</a>in <a href="install.html">the Installation guide</a>.
<p>
<hr>
<h2><a name="named">named</a></h2>
<h2><a name="named">named</a></h2>
<p>このパッチの適用により、DNS サーバである named に対して、
UTF-8 文字の透過機能が追加されます。
<p>A UTF-8 character pass function★(透過機能)★ will be added to the named DNS server by installing this patch.
<p>bind9 の named ではドメイン名の処理はほとんど8ビットスルーになって
いるのですが、named 内のドメイン名の内部表現からテキスト表現への
変換部分は8ビットスルーになっておらず、ASCII 文字以外
はバックスラッシュでクォートされ、<tt>\DDD</tt> という形式の表現に
変換されてしまいます。
<P>Although most domain name processing under bind9 named is 8-bit through, the conversion of the internal expression of domain names to text in named is not 8-bit through. Therefore, non-ASCII characters are quoted with backslashes as <TT>\DDD</TT>.
<p>これは DNS プロトコル上で用いられるエンコーディングとして UTF-8 を
使用する場合に問題となります。
<p>This makes it difficult to use UTF-8 for encoding DNS protocols.
<p>本パッチでは、変換しようとする文字がUTF-8 文字の
場合にはバックスラッシュによるクォートをせずそのまま透過させる機能を
追加しました。
この動作は named の設定ファイル (named.conf) で切り替えることができます。
デフォルトは互換性のため透過しない設定になっています。
もしDNS プロトコル上で用いるエンコーディングとして UTF-8 を用いる場合には、
設定ファイルの options セクションの <tt>allow-utf8</tt> パラメータを
次のように指定してください。
<p>This patch contains a function that allow UTF-8 characters to pass through, so that they are not converted and quoted with backslashes.
This function can be turned on or off in the named configuration file (named.conf).
For the sake of compatibility, in the default setting UTF-8 characters are not let through.
When UTF-8 characters are to be used as encoding in a DNS protocol, change the options section <tt>allow-utf8</tt> parameter in the configuration file as follows:
<blockquote>
<pre>
options {
...
allow-utf8 yes;
...
};
</pre>
</blockquote>
<p>DNS プロトコル上で用いられるエンコーディングとして RACE 等の
<a href="../spec/library.html#ACE">ASCII 互換エンコーディング</a>
使用する場合には、この設定は不要です。
<p>This setting is not required when RACE or other <a href="../spec/library.html#ACE"> ASCII compatible encoding </a> is used as encoding in a DNS protocol.
<hr>
<h2><a name="resolver">リゾルバ</a></h2>
<h2><a name="resolver">Resolver</a></h2>
<p>bind9 のリゾルバは、bind8 までのものとは全く異なり、
lightweight resolver ライブラリと呼ばれるアプリケーションに
リンクされるライブラリと、lightweight resolver デーモンと呼ばれる
サーバから構成されています。
<p>The bind9 resolver differs greatly from any resolver up to bind8, in that it is comprised of a library, linked to an application referred to as a lightweight resolver library, and a server called a lightweight resolver daemon.
<p>本パッチを適用することにより、このリゾルバに多言語ドメイン名の
処理機能が加わります。具体的には次のような機能が追加されます。
<p>The use of this patch enables the resolver to handle multilingual domain names. It specifically adds the following functions.
<ul>
<li>多言語ホスト名の指定<br>
リゾルバライブラリが提供する名前解決用の API 関数に対して、
ホスト名引数にローカルエンコーディングで表されたホスト名を指定することが
できるようになります。
ローカルエンコーディングで入力されたこれらのドメイン名は
自動的に DNS プロトコル上で用いられるエンコーディングに変換され、
DNS サーバへの問い合わせが行われます。エンコーディングの変換の際には
同時に正規化も行われます。
<li>Specifying Multilingual host name<br>
It allows the name resolving API function provided by the resolver library to specify host names whose host name argument contains local encoding.
Locally encoded domain names can automatically be converted to the encoding used in a DNS protocol and be used for querying DNS servers.
The encoding is normalized when it is converted.<p>
<li>多言語ドメイン名の返却<br>
リゾルバライブラリが提供する名前解決用の API 関数が、
名前解決結果のデータとしてローカルエンコーディングで表されたホスト名を
返すことができるようになります。
<li>Multilingual domain names returned<br>
The name resolving API function provided by the resolver library can return host names denoted in local encoding as a result of the resolved data.
</ul>
<p>DNS プロトコル上で用いられるエンコーディングや使用する正規化方式の指定は
あらかじめコンフィギュレーションファイルで設定しておきます。
このファイルの設定方法については
<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
をご覧ください。
<p>The encoding and the normalization scheme to be used in DNS protocol should first be set in the configuration file.
Refer to the <a href="resolvconfig.html">mDNkit resolver configuration </a>
for information on how to set up this file.
<p>以下に、パッチによって多言語化される名前解決用 API 関数の一覧を示します。
多言語化された API 関数は、従来の ASCII ドメイン名に加え、
非 ASCII ドメイン名を扱うことができます。
<p>Name-resolving API functions that the patch enables to handle multilingual domain names are listed below.
Multilingual API functions can handle non-ASCII domain names in addition to traditional ASCII domain names.
<ul>
<li>lwres_getaddrinfo()
<li>lwres_getnameinfo()
<li>lwres_gethostbyname()
<li>lwres_gethostbyname2()
<li>lwres_gethostbyname_r()
<li>lwres_gethostbyaddr()
<li>lwres_gethostbyaddr_r()
<li>lwres_getipnodebyname()
<li>lwres_getipnodebyaddr()
</ul>
<p>引数の型や返り値の型に変更はありません。
パッチを当てる前と同様の呼び出し方法で、従来の ASCII ドメイン名と、
非 ASCII ドメイン名の両方を扱うことができます。
<p>Argument types and returned value types do not change.
Both regular ASCII domain names and non-ASCII domain names can be handled through the call up methods used prior to patch installation.
<p>本パッチを適用した bind9 リゾルバは
<a href="../spec/library.html">MDN ライブラリ</a> を利用してエンコーディング
変換や正規化を行います。従って bind9 リゾルバを使用したクライアントを
コンパイルする場合、MDN のライブラリ <em>libmdn</em> をリンクする必要が
あります。もしあなたのシステムが <em>iconv()</em> をサポートしていない
場合には、<em>iconv()</em> のライブラリも合わせてリンクする必要があります。
<p>A bind9 resolver with this patch installed utilizes <a href="../spec/library.html">the MDN library</a> for encoding, conversion and normalization. Thus when compiling clients that use the bind9 resolver, the MDN library <em>libmdn</em> must be linked. If your system does not support <em>iconv()</em>, the <em>iconv()</em> library must also be linked.
<p>
<hr>
<h2><a name="dig">dig/host/nslookup</a></h2>
<h2><a name="dig">dig/host/nslookup</a></h2>
<p>bind9 には DNS の問い合わせツールとして dig、host、nslookup という
コマンドが付属します。bind9 パッチを適用することにより、これらはいずれも
多言語ドメイン名が扱えるようになります。具体的には以下の機能が
付加されます。
<p>Included within bind9 are the dig, host and nslookup commands for querying DNS. These commands can support multilingual domain names when the bind9 patch is installed.
The following functions have been added.
<ul>
<li>多言語ドメイン名の入力<br>
コマンド引数、あるいは標準入力で、ローカルエンコーディングで
表現された非 ASCII のドメイン名を指定することができるようになります。
ローカルエンコーディングで入力されたこれらのドメイン名は
自動的に DNS プロトコル上で用いられるエンコーディングに変換され、
DNS サーバへの問い合わせが行われます。エンコーディングの変換の際には
同時に正規化も行われます。
<li>Entry of multilingual domain names<br>
Non-ASCII domain names in local encoding can be specified by command arguments and standard input.
Locally encoded domain names are automatically converted to encoding used in a DNS protocol and are used for querying DNS servers.
The encoding is normalized as it is converted.<p>
<li>多言語ドメイン名の表示<br>
DNS サーバからの返答に含まれる多言語ドメイン名がローカルエンコーディングに
変換され、表示されるようになります。
<li>Display of multilingual domain names<br>
Multilingual domain names that are part of a response from a DNS server are converted to local encoding before being displayed.
</ul>
<p>DNS プロトコル上で用いられるエンコーディングや使用する正規化方式の指定は
あらかじめコンフィギュレーションファイルで設定しておきます。
このファイルの設定方法については
<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
をご覧ください。
<p>The encoding and the normalization scheme to be used in a DNS protocol shoud first be set in the configuration file.
Refer to the <a href="resolvconfig.html">mDNkit resolver configuration </a> for information on how to configure this file.
</body>
</html>

View file

@ -1,403 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: bindconfig.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>mDNkit BIND configuration guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>DNSサーバの設定</h1>
<h1>DNS server setup</h1>
<p>DNSサーバにて多言語ドメイン名を扱うための設定方法について
解説します。とはいっても従来の ASCII ドメイン名の場合の設定方法と
大きく変わるわけではありません。注意すべき点は次の2点だけです。
<p>This document describes how to configure a DNS server to enable handling of multilingual domain names. This configuration procedure does not differ greatly from that used for configuring ASCII domain names. However, two points have to be borne in mind.
<ul>
<li>DNS サーバにパッチを当てなければならない場合があること
<li>A patch may have to be installed in the DNS server
<li>ゾーンマスタファイル等のエンコーディングを変換する必要があること
<li>Zone master file and other encoding must be converted
</ul>
<p>DNSサーバの設定の手順は、およそ以下の通りです。
<p>Configure a DNS server according to the following procedure.
<ol>
<li><a href="#encoding">エンコーディング・正規化方式を決める。</a>
<br><a href="#encoding">Determine the encoding and normalization scheme.</a>
<li><a href="#bind">DNS サーバを用意する。</a>
<br><a href="#bind">Set a DNS server.</a>
<li><a href="#file">named.conf、ゾーンマスタファイルを作成する。</a>
<br><a href="#file">Create named.conf, a zone master file.</a>
</ol>
<p>最後のファイル作成に関しては、エンコーディングとして UTF-5 を
使用したときに特有の問題があり、これを
<br><p>When UTF-5 is used for encoding during file generation, the last item, specific problems occur. These problems are discussed in the following section.
<ul>
<li><a href="#utf5">UTF-5 特有の問題</a>
<li><a href="#utf5">UTF-5 specific problems</a>
</ul>
としてまとめてあります。
<p>設定で使用するエンコーディング変換ツール <b>mdnconv</b> の外部仕様
および内部処理の詳細に関しては、
<a href="../spec/mdnconv.html">mdnconv の仕様書</a>をご覧ください。
<p>For information on external specifications and internal processing of <b>mdnconv</b>, the encoding conversion tool, used in the setup, refer to the <a href="../spec/mdnconv.html">mdnconv specifications</a>.
<p>また、クライアントからこれらの DNS サーバにアクセスするためには、
<a href="bind9.html">多言語ドメイン名用パッチを当てた bind9</a>
<a href="runmdn.html">runmdn コマンド</a>
<a href="wrapper.html">mDN Wrapper</a> などを使用してクライアント側で
エンコーディング変換や正規化を行うか、あるいは
エンコーディング変換を行うプロキシサーバである dnsproxy を通す必要があります。
dnsproxy の設定については
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>で説明します。
<p>To enable the client to access these DNS servers, encoding, conversion and normalization using <a href="bind9.html">bind9 with a multilingual domain name patch installed</a>、the <a href="runmdn.html">runmdn command</a>、the <a href="wrapper.html">mDN Wrapper</a> or similar tool must be used on the client side or access has to be made via dnsproxy, a proxy server that performs encoding and conversion.
dnsproxy configuration is described in <a href="proxyconfig.html">DNS Proxy Server configuration</a>.
<p>
<hr>
<h2><a name="encoding">エンコーディング・正規化方式の決定</a></h2>
<h2><a name="encoding">Determining Encoding and Normalization Scheme</a></h2>
<p>まず DNS の設定に先だって、DNS サーバで使用するドメイン名の
エンコーディングおよび正規化方式を決める必要があります。
<p>The encoding and normalization scheme to be used for a DNS server must be determined prior to DNS setup.
<p>評価しようとする DNS の多言語化方式が決まっていれば、
その方式に合わせることになります。
現在提案されている方式の中から、使用するエンコーディング・正規化を
いくつか紹介します。これ以外の方式も多数提案されています。詳しくは
<a href="reference.html">参考文献</a>をご覧ください。
<p>Encoding scheme should be selected to suit a DNS multilingual system to be assessed.
The following are some of the currently proposed encoding and normalization schemes. Various other systems are also being proposed. For details, see
<a href="reference.html">reference document</a>.
<ul>
<li><a href="../../reference/draft/draft-ietf-idn-race-02.txt">RACE: Row-based ASCII Compatible Encoding for IDN</a><br>
エンコーディングは <tt>RACE</tt> です。このプロポーザルはエンコーディング
のみのプロポーザルなので正規化方式は規定していません。
<br>
The encoding scheme is <tt>RACE</tt>. Since this is only an encoding proposal, it does not prescribe normalization.
<p>
<li><a href="../../reference/draft/draft-skwan-utf8-dns-04.txt">Using the UTF-8 Character Set in the Domain Name System</a><br>
エンコーディングは <tt>UTF-8</tt> です。
正規化は ``locale-sensitive downcasing'' ですが、
この方式はロケール依存になるので mDNkit ではサポートされていません。
最も近いのはロケール非依存の大文字→小文字マッピングである
<tt>unicode-lowercase</tt> でしょう。
<br>
The encoding scheme is <tt>UTF-8</tt> while the normalization scheme is``locale-sensitive downcasing'', which is locale dependent and is not supported by the mDNkit.
The closest resembling system is <tt>unicode-lowercase</tt>, a non-locale dependent uppercase-to-lowercase mapping scheme.
<p>
<li><a href="../../reference/draft/draft-ietf-idn-udns-01.txt">Using the Universal Character Set in the Domain Name System (UDNS)</a><br>
エンコーディングは <tt>UTF-8</tt>、正規化は <tt>unicode-form-c</tt> および
<tt>unicode-lowercase</tt> です。
<br>
The encoding scheme is <tt>UTF-8</tt> and normalization is <tt>unicode-form-c</tt> and <tt>unicode-lowercase</tt>.
<p>
<li><a href="../../reference/draft/draft-jseng-utf5-01.txt">UTF-5, a transformation format of Unicode and ISO 10646</a><br>
エンコーディングは <tt>UTF-5</tt> です。このプロポーザルもエンコーディング
のみのプロポーザルなので正規化方式は規定していません。
<br>
The encoding scheme is <tt>UTF-5</tt>. Since this, also, is only an encoding proposal, it does not prescribe normalization.
</ul>
<p>エンコーディングとして <tt>UTF-5</tt> を採用した場合には、
ZLD (zero level domain) を付けることで従来のドメイン名と区別する必要が
あります。したがって ZLD を何にするかも決定する必要があります。
<p>When <tt>UTF-5</tt> encoding is employed, it is essential to distinguish it from traditional domain names by adding ZLD (zero level domain). Consequently, it is necessary to determine which type of ZLD is to be used.★ZLD を何にするか★
<p>その他 mDNkit がサポートしているエンコーディング・正規化方式については
MDN ライブラリの仕様を参照してください。
<p>Refer to the MDN library specifications for information on other encoding and normalization schemes supported by the mDNkit.
<ul>
<li>エンコーディングについては
<a href="../spec/library.html#converter">converter モジュール</a>
<li>Refer to the <a href="../spec/library.html#converter">converter module</a> for information on encoding schemes
<li>正規化方式については
<a href="../spec/library.html#normalizer">normalizer モジュール</a>
<li>Refer to the <a href="../spec/library.html#normalizer">normalizer module</a> for information on normalization schemes.
</ul>
<p>もちろん、1台の DNS サーバに複数のエンコーディングを持たせることも可能
です。この場合はゾーン毎に異なるエンコーディングを割り当てることになる
でしょう。ただし mDNkit を用いて多言語ドメイン名の扱いを可能にした
クライアントや dnsproxy は DNS サーバ側のエンコーディングが単一である
ことを仮定しているので、例えば dnsproxy の場合にはエンコーディング毎に
複数の dnsproxy を起動するなどのテクニックが必要です。
<p>Of course, multiple types of encoding schemes can be employed for one DNS server.In such a case, a different type of encoding would be assigned to each zone. However, a client or dnsproxy enabled to support multilingual domain names through mDNkit assumes that a DNS server employs a single encoding scheme. Such techniques that start up multiple dnsproxies to handle all encodings would have to be used for dnsproxy.
<p>
<hr>
<h2><a name="bind">DNS サーバの用意</a></h2>
<h2><a name="bind">Setting up a DNS server</a></h2>
<p>エンコーディングとして ASCII 互換エンコーディング (ACE: ASCII Compatible
Encoding) である RACE、UTF-5 を用いる場合には、エンコード結果は従来の
ホスト名として正当な文字列になるので、現在使用中の DNS サーバをそのまま
使うことができます。しかし ASCII 互換エンコーディング以外のエンコーディング、
特に UTF-8 を用いる場合には、多言語ドメイン処理を付加するパッチを当てた
bind9 の DNS サーバ (named) を使用するか、
8ビットスルーパッチを当てた bind8 の DNS サーバを用意する必要があります。
<p>When ASCII compatible encoding (ACE: ASCII Compatible Encoding) such as RACE or UTF-5 is used, the encoding results legal characters in traditional host names and allow use of current DNS servers.
However, the other encoding schemes, especially UTF-8, requires the use of a bind9 DNS server (named) with a multilingual domain patch installed, or a bind8 DNS server with an 8-bit through patch installed.
<p>それぞれのパッチの当て方およびインストールの方法については
<a href="install.html#bind9">bind9 用パッチの適用とインストール</a> および
<a href="install.html#bind">bind8 用パッチの適用とインストール</a>
ご覧ください。
<p>For information on procedures for adding or installing these patches, refer to <a href="install.html#bind9">Adding and installing bind9 patch</a> and
<a href="install.html#bind">Adding and installing bind8 patch</a>.
<p>
<hr>
<h2><a name="file"><tt>named.conf</tt>、ゾーンマスタファイルの作成</a></h2>
<h2>Creating <a name="file"><tt>named.conf</tt> and a zone master file</a></h2>
<p><tt>named.conf</tt> やゾーンマスタファイル書き方自体は、
多言語ドメイン名と従来のドメイン名で変わるところはありません。
単にドメイン名に漢字などを含めることができるかどうかだけの違いです。
<p>The writing of <tt>named.conf</tt> and zone master files for multilingual domain names does not differ from those of traditional domain names.
The only difference is that the domain names contain kanji or other non-ASCII characters.
<p>DNS サーバ自体にエンコーディング変換機能は備わっていないので、
DNS の読み込む <tt>named.conf</tt> ファイルやゾーンマスタファイルの
エンコーディングは<a href="#encoding">エンコーディング・正規化方式の決定</a>
決定したエンコーディングに合わせる必要があります。
<b>mdnconv</b> はこのような目的のために設計されたコード変換ツールです。
<p>Since the DNS server does not contain the encoding coversion function, the encoding of the <tt>named.conf</tt> file and zone master file read by DNS must be adjusted to encoding determined by the <a href="#encoding">encoding and normalization scheme</a>.
<b>mdnconv</b> is the code conversion tool designed to solve this problem.
<p>RACE や UTF-5 なら、ASCII 文字が編集できるエディタがあれば直接入力
することも可能ですが、例えば「こんにちは.世界.」と入力する代わりに
<tt>bq--gbjzg23bn4.bq--3bhbm5km.</tt>
などといった暗号のような文字列を (しかも正確に) 入力しなければならず、
変換ツールを使用するほうがはるかにに簡単です。
<p>Although an ASCII character editor allows direct entries with RACE and UTF-5, you would be forced to accurately enter code strings such as <tt>bq--gbjzg23bn4.bq--3bhbm5km.</tt> for 「こんにちは.世界.」. Thus the conversion tool radically simplifies the character entry task.
<p>UTF-8 ならばエディタによっては直接編集可能なものがあるので、それを
使うこともできます。しかしそのエディタも正規化までは多分してくれない
でしょうから、やはりツールでエンコーディング変換することをお勧めします。
<p>Editors that allow direct editing with UTF-8 can also be used.
However, since such editors will probably not support normalization; encoding conversion is again the recommended procedure.
<p>例えば次のようなコマンドを実行すると EUC-JP で書かれたゾーンマスタファイル
<tt>db.somezone.euc</tt> を RACE エンコーディングの <tt>db.somezone.race</tt>
に変換し、同時に Unicode Normalization Form C による正規化を適用する
ことができます。
<p>For example when the following command is executed, the <tt>db.somezone.euc</tt> zone master file is converted to <tt>db.somezone.race</tt> RACE encoding and is simultaneously normalized according to Unicode Normalization Form C.
<blockquote>
<pre>
% mdnconv -noconf -in EUC-JP -out RACE -normalize unicode-form-c \
db.foo.euc &gt; db.foo.race
</pre>
</blockquote>
<p><tt>-in</tt> オプションで入力テキストのエンコーディングを、
<tt>-out</tt> で出力テキストのエンコーディングを、
そして <tt>-normalize</tt> で正規化方式を指定します。
オプションの一覧とどのような値が指定できるかについては、
<a href="../spec/mdnconv.html">mdnconv の仕様書</a>をご覧ください。
<p><tt>-in</tt> option specifies encoding of input text, <tt>-out</tt> specifies output text encoding and <tt>-normalize</tt> specifies the normalization scheme.Refer to <a href="../spec/mdnconv.html">mdnconv specifications</a> for a list of options and other values.
<p>ではこの逆に RACE エンコーディングから EUC-JP への変換ができるかというと、
RACE エンコーディングの場合には可能です。ただしこれは mdnconv が
RACE エンコーディング専用の特別な処理を備えているためで、
一般的には ASCII 互換エンコーディングからローカルエンコーディングへの変換は
できないということを覚えておいてください。
これは、入力された文字列の中で ASCII 互換エンコーディングを用いて
表記されている個所とそうでない通常の ASCII 表記の場所を区別できないからです。
これについては mdnconv の仕様書の
<a href="../spec/mdnconv.html#detail">変換処理の詳細</a>を参照してください。
<p>RACE encoding also allows you to do the opposite; to convert from RACE encoding to EUC-JP encoding. But note that this is only because mdnconv is provided with RACE encoding specific processing; normally, it is not possible to convert from ASCII compatible encoding to local encoding. The reason is that it is not possible to distinguish between characters denoted in ASCII compatible encoding and those that use normal ASCII encoding in entered character strings.
Refer to the <a href="../spec/mdnconv.html#detail"> conversion information</a>, the mdnconv specifications, for details.
<p>以上のことから、ゾーンマスタファイル等 DNS サーバが読み込むファイル
の作成と管理には次のような方法をとるのがよいと考えられます。
まずローカルエンコーディングを用いて記述した版を用意して、これに対して
編集やバージョン管理を行います。
そして mdnconv を用いてエンコーディング変換と正規化を行い、
DNS サーバの使用するエンコーディング版のファイルを生成して、これを
DNS サーバが読み込むためのファイルとして使用します。
<p>Consequently, the following procedure should be adhered to in creating and maintaining zone master files and other files that are to be read by a DNS server.First, create a file version in local encoding that is edited under version control.
Then use mdnconv to convert encoding and normalize the file to generate a file with the encoding employed by a DNS server and use it as the file the DNS server will read.
<p>とはいってもローカルエンコーディング版のファイルを改訂するたびに
mdnconv を実行してサーバエンコーディング版のファイルを作るのは面倒です。
この場合例えば make コマンドを使用すれば変換を自動化することができます。
<p>However, executing mdnconv each time a locally encoded file has to be converted to a server encoded file is time-consuming.
In this situation, use the make command to automate conversion.
<p>例えばローカルエンコーディング版のファイル名にサフィックス <tt>.lc</tt>
UTF-8 エンコーディング版にサフィックス <tt>.utf8</tt>
RACE エンコーディング版にサフィックス <tt>.race</tt> をつけるとします。
すると次のような Makefile を書くことにより、ローカルエンコーディング版を
更新したら make を実行するだけで変換を自動的に行うことができます。
<p>For example, let's assume that a file in local encoding has the suffix <tt>.lc</tt>, a UTF-8 encoding file the suffix <tt>.utf8</tt> and a RACE encoding version file the suffix tt>.race</tt>.
Then the following type of Makefile could be written to allow automatic conversion using make when a file in local encoding is updated.
<blockquote>
<pre>
.SUFFIXES: .lc .utf8 .race
.lc.utf8:
mdnconv -in $(LOCALCODE) -out UTF-8 $(NORMALIZE) $&lt; &gt; $@
.lc.race:
mdnconv -in $(LOCALCODE) -out RACE $(NORMALIZE) $&lt; &gt; $@
LOCALCODE = EUC-JP
NORMALIZE = -normalize unicode-form-c -normalize unicode-lowercase
TARGETS = db.foo.utf8 db.bar.race
all: $(TARGETS)
</pre>
</blockquote>
<p>1つの DNS サーバに異なるエンコーディングの複数のゾーンのマスタを
させようとした場合、<tt>named.conf</tt> に複数のエンコーディングを
混在させなくてはならない状況になることがあります。残念ながらこれは
mdnconv では無理なので、<tt>include</tt> ディレクティブ等を使って
ファイルを分割し、1つのファイルに複数のエンコーディングが
混在しないようにしてください。
<p>When multiple zone master files with different encoding schemes are attempted in a single DNS server, it may be necessary to include multiple encoding schemes in <tt>named.conf</tt>. Unfortunately, this cannot be handled with mdnconv so the <tt>include</tt> directive or similar command must be used to split the file so that each file does not contain multiple encoding schemes.
<p>最後にもう1つ、UTF-5 特有の問題について説明します。
<p>Finally, we will discuss UTF-5 specific problems.
<p>
<hr>
<h2><a name="utf5">UTF-5 特有の問題</a></h2>
<h2><a name="utf5">UTF-5 specific problems</a></h2>
<p>DNS サーバで使用するドメイン名のエンコーディングを UTF-5 にした場合には
いくつかの問題が生じます。
<p>A number of problems occur when UTF-5 encoding is used as the domain name encoding of a DNS server.
<ul>
<li><a href="#zld">ZLD の指定</a>
<li><a href="#zld">ZLD specification</a>
<li><a href="#asciilabel">単独で出現する ASCII ラベル</a>
<li><a href="#asciilabel">ASCII labels that appear singly</a>
</ul>
<h3><a name="zld">ZLD の指定</a></h3>
<h3><a name="zld">ZLD specification</a></h3>
<p>UTF-5 は ASCII 互換エンコーディングの一つなので、UTF-5 でエンコードされた
ドメイン名はそのままでは従来の ASCII のドメイン名と区別できません。
同じく ASCII 互換エンコーディングの一つである RACE では、ドメイン名の
各ラベルの先頭に特定のプリフィックス (<tt>bq--</tt>) をつけることによって
従来のドメイン名と (一応) 識別できるのですが、
UTF-5 にはこのような機構がないため、ZLD という概念を使用して従来のドメイン
名との識別を可能にしています。
<p>
Since UTF-5 is an ASCII compatible encoding scheme, domain names encoded in UTF-5 cannot be distinguished from regular ASCII domain names.
By contrast, RACE, another ASCII compatible encoding scheme, appends (<tt>bq--</tt>), a prefix, to the beginning of each domain name label to allow differentiation from traditional domain names. But since UTF-5 does not have this feature a concept called ZLD is used to identify traditional domain names.
<p>ZLD (zero level domain) とはドメイン名の最後につける
トップレベルドメインのことで、例えば <tt>utf5.</tt> という
トップレベルドメインを作り、
UTF-5 エンコーディングのドメイン名はすべてこのドメインのサブドメインとする
ことで、従来のドメイン名との区別を可能にします。実際には このトップレベル
ドメインはローカルエンコーディングから UTF-5 エンコーディングへの変換を行う
場所 (現在の mDNkit では dnsproxy) で自動的に付加され、また UTF-5 から
ローカルエンコーディングに戻すときに自動的に除去されるので
アプリケーションにはこのドメインは見えません。アプリケーションにとっての
トップレベルドメインよりさらに上位ドメインに位置するので zero level domain
なわけです。もちろん DNS サーバからは ZLD は隠されておらず、したがって
DNS サーバの設定では ZLD を意識しなければなりません。
<p>ZLD (zero level domain) is the top level domain appended at the end of a domain name. For example, when a <tt>utf5.</tt> top level domain is created, all UTF-5 encoded domain names can be made the subdomains of this top level domain making it possible to distinguish them from traditional domain names.
Since this top level domain is automatically added to the area (dnsproxy in current mDNkit) where conversion from local encoding to UTF-5 encoding takes place and is automatically deleted when coding is returned from UTF-5 to local encoding, the application does not see this level.
The top level domain to an application is at a still higher level, hence the name zero level domain. ZLD is of course visible to a DNS server, so DNS server settings must take ZLD into account.
<p>さて、このように UTF-5 エンコーディングでは ZLD が必須ですが、
mdnconv によるローカルエンコーディングから UTF-5 エンコーディングへの変換
の際には、ドメイン名の ZLD の部分とそうでない部分を明確に区別する
必要があります。例えば <tt>www.ニック.日本.utf5.</tt> というドメイン名を
UTF-5 に変換すると <tt>N7N7N7.J0CBJ0C3J0AF.M5E5M72C.utf5</tt> となります
(ただし ZLD は <tt>utf5.</tt> だとします)。先頭の <tt>www</tt>
UTF-5 に変換しますが、ZLD 部分は変換しません。このため mdnconv は
ZLD がなんであるかをあらかじめ知っておく必要があります。このために
<a href="../spec/mdnconv.html#zld-opt">-zld</a> というオプションが用意されています。
このオプションは、ゾーンマスタファイル等に書かれたドメイン名が
指定された ZLD にマッチした時に、マッチした部分を出力エンコーディングへの
変換対象から外すという働きをします。ただしドメイン名と ZLD がマッチするのは
<p>Thus ZLD is required in UTF-5 encoding, whereas conversion from local encoding to UTF-5 encoding using mdncon requires that the ZLD part of the domain name is distinguished from other parts.
For example when the domain name <tt>www.ニック.日本.utf5.</tt> is converted to UTF-5, it beccomes <tt>N7N7N7.J0CBJ0C3J0AF.M5E5M72C.utf5</tt> (but ZLD is <tt>utf5.</tt>).
Thus mdnconv must know what ZLD is. The option <a href="../spec/mdnconv.html#zld-opt">-zld</a> is provided for this reason.
When a domain name written in a zone master file or other file matches a specified ZLD, this option removes the matching portion from conversion to output encoding.★マッチした部分を出力エンコーディングへの変換対象から外すという働きをします★
The conditions for a domain name and ZLD match are as follows:
<ol>
<li>ドメイン名の最後がピリオドで終わっていること
<br>The domain name ends in a period
<li>ZLD がドメイン名の最後の部分と一致していること
<br>ZLD matches the last part of the domain name
</ol>
という条件を満たしているときだけです。例えば ZLD が <tt>utf5.</tt> だとすると
ZLD とマッチするのは次に示す3つのドメイン名の中で最初のものだけです。
<br>For example if ZLD is <tt>utf5.</tt>, only the first of the following three domain names matches ZLD.
<blockquote>
<pre>
www.ニック.日本.utf5.
www.ニック.日本
utf5.ニック.日本.
</pre>
</blockquote>
<p>さらに mdnconv の <a href="../spec/mdnconv.html#auto-opt">-auto</a> オプション
を併用するとある程度 ZLD を自動付加させることができ、
この場合ゾーンマスタファイルにいちいち ZLD を書く必要がなくなります。
ただし確実に付加できるわけではないので、このオプションには頼らない方が
よいでしょう。
<p>Also, if used with the mdnconv option <a href="../spec/mdnconv.html#auto-opt">-auto</a>, ZLD is often automatically added in which case there is no need to write ZLD in each zone master file.
However, as addition of this option is not guaranteed, it may be best not to rely on it.
<p>
<h3><a name="asciilabel">単独で出現する ASCII ラベル</a></h3>
<h3><a name="asciilabel">Single ASCII labels</a></h3>
<p>mdnconv は、デフォルトでは非 ASCII 文字を1文字以上含むドメイン名のみを
出力エンコーディングに変換します。つまり ASCII のみからなるドメイン名は
変換しません。これは従来の ASCII ドメイン名と多言語ドメイン名を混在させた
時に、ASCII ドメイン名までが UTF-5 などに変換されてしまうのを防ぐための
処置です。
<p>By default, mdnconv converts to output encoding only domain names that contain two or more non-ASCII characters. Consequently, it does not convert domain names that are entirely made up of ASCII characters. This is to prevent ASCII domain names from being converted to UTF-5 when there are both ASCII domain names and multilingual domain names.
<p>ところが多言語ドメイン名の中に ASCII 文字のみから構成されるラベルが
ある場合、それが単独でゾーンマスタファイルに出現するとこの処置のために
そのラベルが UTF-5 に変換されないという問題が生じます。
例えばドメイン名 <tt>www.ニック.日本.utf5.</tt> の A レコードを
ゾーンマスタファイルに記述するときに、次のように書いてしまうと
<tt>www</tt> の部分が UTF-5 に変換されません。
<p>However, this gives rise to the following problem. A label containing only ASCII characters in a multilingual domain name that occurs independently in the zone master file is not converted to UTF-5. For example when the A record of the domain name <tt>www.ニック.日本.utf5.</tt> is denoted in the zone master file as shown below the <tt>www</tt> part is not converted to UTF-5.
<blockquote>
<pre>
$ORIGIN ニック.日本.utf5.
...
www IN A 10.9.8.7
</pre>
</blockquote>
<p>このような場合、FQDN で記述するなどして、非 ASCII 文字が含まれる
ようにしてやる必要があります。
<p>In this case, use FQDN, for example, to add non-ASCII characters.
</body>
</html>

View file

@ -1,182 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: clientconfig.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>Configuring Your Clients</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1><a name="clientconfig">クライアント側の設定</a></h1>
<h1><a name="clientconfig"> Client configuration</a></h1>
<p>
DNS Proxy Server (dnsproxy) は、基本的には
多言語ドメイン名に対応していないクライアントから
多言語化対応したDNSサーバを利用できるようにするものです。
<p>
The DNS Proxy Server (dnsproxy) enables clients that basically do not support multilingual domain names the use of multilingual compatible DNS servers.
<blockquote>
ある手法の多言語ドメイン名に対応しているクライアントから
他の手法で多言語化対応したDNSサーバを利用するためにも使用できます。
</blockquote>
<blockquote>
This enables clients that use a specific type of multilingual domain name support procedure to access a DNS server with a different multilingual support procedure.
</blockquote>
<p>
実際にあるクライアントで多言語ドメイン名を使うことができるかどうかは、
そのクライアントがドメイン名をどのように扱うかによります。
クライアントが、ドメイン名を、クライアント側のエンコーディングで
なにもチェック/加工しないで使用しているなら、
dnsproxyを経由することによって、多言語ドメイン名が利用可能になります。
しかし、クライアント側でドメイン名のシンタックスを厳密にチェックしていたり、
ある種の変換を行なっているような場合には、dnsproxyは役に立ちません。
<p>
Whether or not multlingual domain names can be used with a specific client depends on how that client handles domain names.
When a client uses domain names without checking or processing the encoding, multilingual domain names can be used via dnsproxy.
But if the domain name syntax is carefully checked or conversion is performed on the client side, dnsproxy is not useful.
<p>
ここでは、いくつかの代表的なクライアントについて、
dnsproxyによる多言語ドメイン名が使うことができるかどうか、
どうすれば多言語ドメイン名を使うことができるようになるか、
を説明します。
<p>
This document will identify a number of major clients that will allow multilingual domain names when used with dnsproxy or what you have to do to use multilingual domain names.
<p>
<hr>
<h2>UNIXのアプリケーション</h2>
<h2>UNIX applications</h2>
<p>
<h3>resolverの問題</h3>
<h3>resolver problems</h3>
<p>
UNIXの場合、DNSへの要求は、多くの場合resolverを経由して送られます。
しかし、標準的なresolverはnon-ASCIIのドメイン名を受付けません。
この問題に対処するため、mDNkitにはbin8のresolver
(およびnslookup、named)を8-bit throughにするためのパッチが
付属しています。まずは、bind8にこのパッチを適用し、
8-bit throughのresolverを使って再リンクしてください。
詳しくは<a href="install.html">インストールガイド</a>
<a href="install.html#preparation">前準備</a>
<a href="install.html#bind">bind 用パッチの適用とインストール</a>
ご覧ください。
<p>
UNIX often sends DNS queries via a resolver.
The problem is that standard resolvers do not accept non-ASCII domain names.
To cope with this problem, mDNkit is provided with a patch that makes the bind8 resolver (nslookup and named) 8-bit through. First, install this patch in bind8 and use the 8-bit through resolver to relink.
For details, refer to <a href="install.html#preparation">Preparations</a> and <a href="install.html#bind">Applying and Installing the Bind Patch</a> in the <a href="install.html">Installation Guide</a>.
<p>
<h3>nslookup</h3>
<p>
標準的なnslookupはnon-ASCIIのドメイン名を受付けません。
mDNkitのbind8への8-bit throughパッチを適用して作成された
nslookupなら、多言語ドメイン名を使用することが可能になります。
詳しくは<a href="install.html">インストールガイド</a>
<a href="install.html#preparation">前準備</a>
<a href="install.html#bind">bind 用パッチの適用とインストール</a>
ご覧ください。
<p>
Standard inslookup does not support non-ASCII domain names.
nslookup generated by applying the bind8 8-bit through patch in mDNkit can use multilingual domain names.
For details, refer to <a href="install.html#preparation">Preparations</a> and <a href="install.html#bind">Applying and Installing the Bind Patch</a> in the <a href="install.html">Installation Guide</a>.
<h3>Squid</h3>
<p>
Squid経由でWebにアクセスするような場合には、non-ASCII文字を含む
ドメイン名はsquidによってエラーとされます。
mDNkitにはsquidを8-bit through にする
(シンタックスチェックを外す)パッチが含まれています。
これを適用したsquidであれば、多言語ドメイン名を受付けるようになります。
詳しくは<a href="install.html">インストールガイド</a>
<a href="install.html#preparation">前準備</a>
<a href="install.html#squid">squid 用パッチの適用とインストール</a>
ご覧ください。
<p>
When the Web is accessed via Squid, domain names that contain non-ASCII characters generate an error.
mDNkit includes a patch that makes squid 8-bit through (by removing the syntax check).
squid with this patch installed accepts multilingual domain names.
For details, refer to <a href="install.html#preparation">Preparations</a> and <a href="install.html#bind">Applying and Installing the squid Patch</a> in the <a href="install.html">Installation Guide</a>.
<h3>Netscape</h3>
<p>
残念ながら、入力時点でnon-ASCII文字は拒否されてしまいます。
<p>
Unfortunately, non-ASCII characters are rejected when entered.
<p>
<hr>
<h2>Windowsのアプリケーション</h2>
<h2>Windows applications</h2>
<p>
Windowsのresolver(WINSOCK)は、non-ASCIIのドメイン名を通すようです。
クライアント内でのチェック、変換が行なわれなければ問題なく
多言語ドメイン名を使うことができます。通常は
<p>
The Windows resolver (WINSOCK) passes non-ASCII domain names.
So long as no checks or conversions are performed in the client, multilingual domain names can be used without a problem. Usually,
<pre>
client-translation . Shift_JIS
</pre>
とすればOKです。
<p>is OK.
<p>
<h3>nslookup</h3>
<p>
残念ながら、ホスト名の入力時点で、non-ASCII文字を含むホスト名は
拒否されるようです。ls による一覧表示は動作します。
<p>
Unfortunately, domain names that contain non-ASCII characters are rejected upon entry. ls works as usual.
<h3>Netscape Communicator</h3>
<p>
Version 4.7 は問題なく動作しました。
<p>
Version 4.7 works without any problems.
<p>
ただ、HTTPプロキシサーバを使われている場合には、その
プロキシサーバが多言語ドメイン名に対応しているかどうかが
問題になりますのでご注意ください。
<p>However, when an HTTP proxy server is used, operation depends on whether or not that proxy server supports multilingual domain names.
<p>
<h3>Internet Explrore</h3>
<p>
IEには多言語ドメイン名への対応が一部含まれています。
<p>
Some IE features support multilingual domain names.
<pre>
ツール
インターネットオプション
いつもUTF-8としてURLを送信する
</pre>
<pre>
tool
Internet option
URLs are always sent as UTF-8
</pre>
しかし、これを使うと、余分なところまでUTF-8で
エンコードしてしまうようで、dnsproxyでは使用できません。
逆に、これをオフにして、
<br>However, this function encodes more than is required with the result that dnsproxy cannot be used. Instead, turn it off,
<pre>
client-translation . Shift_JIS
</pre>
とすれば、dnsproxy経由で多言語ドメイン名が使えるようになります。
<br>then multilingual domain names can be used via dnsproxy.
<p>
ですが、IEの場合には、webページ内に埋め込まれたURLについては、
そのページのエンコーディングに合わせたエンコーディングに変換して
DNSの問合せを行なうようになっていますので、Shift_JIS以外で
記述されたWebページ上の多言語ドメイン名についてはクエリーが
失敗してしまいます。
<p>
But for URLs embedded in a web page IE converts to encoding that suits the encoding on that page and bases DNS queries on this so entries that use characters other than Shift_JIS fail.
</body>
</html>

View file

@ -1,158 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: dnsproxy.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>dnsproxy</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>dnsproxy</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#overview">Overview</a>
<li><a href="#setup">設定</a>
<li><a href="#setup">Setup</a>
<li><a href="#usage">使用法</a>
<li><a href="#usage">Usage</a>
<li><a href="#limitation">制限事項</a>
<li><a href="#limitation">Limitations</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p><b>dnsproxy</b> は文字通り DNS のプロキシサーバとして動作する
プログラムです。クライアントと本物の DNS サーバの間で両者の間の
通信データ (DNS プロトコルメッセージ) の変換を行います。
<p>As the name implies, <b>dnsproxy</b> is a program that operates as a DNS proxy server. It converts communications data (DNS protocol messages) between clients and real DNS servers.
<p>クライアントからローカルエンコードされた多言語ドメイン名を含む
DNS要求を受け取ると、DNSメッセージ中のドメイン名を
多言語化対応したDNS サーバが受付けられる標準エンコーディングに変換し、
DNS サーバに送出します。
エンコーディングの変換と同時に正規化も行います。
また逆に DNS サーバからの応答メッセージを受信すると、その中に
含まれる多言語ドメイン名をクライアント側で認識できるローカル
エンコーディングに変換し、クライアントに返します。
<p>When DNS queries that contain multlingual domain names in local encoding are received from a client, it is converted to standard encoding that can be accepted by a DNS server that supports.
Normalization is performed at the same time as the encoding is converted.
On the other hand, when a response message from a DNS server is received, the multilingual domain names in the message are converted to local encoding that is understood by the client before it is returned to the client.
<p>dnsproxy はこのようなメカニズムによって一般のクライアントが
多言語ドメイン名を扱うことを可能にします。
<p>dnsproxy uses this mechanism to enable regular clients to handle multilingual domain names.
<p>具体的には、
<p>Specifically,
<ul>
<li>日本語など、非 ASCII 文字の入ったホスト名を名前解決できるようになります。
<li>It is possible to resolve host names that contain Japanese and other non-ASCII characters.
<li>非 ASCII 文字の入ったホスト名を名前解決の結果として受け取れるように
なります。
<li>Thus host names containing non-ASCII characters can be received as a result of name resoving.
</ul>
<p>
<hr>
<h2><a name="setup">設定</a></h2>
<h2><a name="setup">Setup</a></h2>
<p>dnsproxy を使用するには、専用のコンフィギュレーションファイルで
使用するエンコーディングや正規化の方法を設定しておく必要があります。
このファイルの設定方法については
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
をご覧ください。
<p>To use dnsproxy, the encoding and normalization method must be set up using a special configuration file.
Refer to <a href="proxyconfig.html">DNS Proxy Server Configuration</a> for information on how to configure this file.
<p>
<hr>
<h2><a name="usage">使用法</a></h2>
<h2><a name="usage">Usage</a></h2>
<p>dnsproxy を使用するためにはあらかじめ設定が必要です。
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
をご覧ください。
<p>Use of dnsproxy requires prior setup.
Refer to <a href="proxyconfig.html">DNS Proxy Server Configuration</a>.
<p>dnsproxy は以下のコマンド行オプションを受け付けます。
<p>dnsproxy accepts the following command line options.
<dl>
<dt><tt>-daemon</tt>
<dd>dnsproxy をデーモンとして起動します。
<dd>Starts up dnsproxy as a daemon.
<dt><tt>-config </tt><em>config-file</em>
<dd><em>config-file</em> をコンフィギュレーションファイルとして使用します。
このオプションを指定しなかった場合にはデフォルトのコンフィギュレーション
ファイル (通常は <tt>/usr/local/etc/dnsproxy.conf</tt>) が使用されます。
<dd>Uses <em>config-file</em> as a configuration file.
When this option is not specified, the default configuration file (usually, <tt>/usr/local/etc/dnsproxy.conf</tt>) is used.
<dt><tt>-logfile </tt><em>log-file</em>
<dd>ログをファイル <em>log-file</em> に出力します。このオプションが
指定されなかった場合にはコンフィギュレーションファイルで指定された
ログファイル、またはデフォルトのログファイルに出力されます。
<dd>Outputs the log to <em>log-file</em>. When this option is not specified, the log is output to the file specified by the configuration file or to the default log file.
</dl>
<hr>
<h2><a name="limitation">制限事項</a></h2>
<h2><a name="limitation">Limitations</a></h2>
<p>dnsproxy は、エンコーディング変換や正規化の機能を持たない
一般のクライアントが多言語ドメイン名を扱うことを可能にします。
クライアントではローカルコードで記述されたドメイン名を、
そのまま多言語ドメイン名として使うことができるようになります。
<p>dnsproxy enables ordinary clients without encoding conversion and normalization functions to handle multilingual domain names.
Clients can use domain names in local codes as multilingual domain names.
<p>しかしそれにはクライアントがドメイン名に対して独自のチェックや変換を
行なっていなければ、という前提条件があります。
問題はこの点にあり、
クライアントによっては、ドメイン名のシンタックスを厳密にチェックしていたり、
独自の手法で部分的に多言語化していたりするものがあります。
このようなクライアントであれば、dnsproxyを使っても
多言語ドメイン名を使うことはできません。
<p>However, this is on condition that the client does not check or convert the domain names.
This is a problem since some clients make strict checks of domain name syntax or use proprietary methods to perform partial multilingual encoding.
Multilingual domain names cannot be handled by such clients through dnsproxy.
<p>UNIXの場合は、DNSへの要求は通常リゾルバライブラリを経由して送られますが、
既存のリゾルバはドメイン名のシンタックスをチェックしていて、
ドメイン名にnon-ASCIIコードが含まれているとエラーとして
はじかれてしまいます。
この問題に対処するために、mDNkitには、bind8付属のリゾルバライブラリを
8ビット透過にするためのパッチが付属しています。このパッチを適用した
リゾルバライブラリを組み込めば、クライアントからのローカルコードによる
多言語ドメイン名がdnsproxyに渡されて、多言語化DNSサーバと組み合わせて
使用することができるようになります。
Windowsの場合には、リゾルバ(WINSOCK)は8ビット透過になっていますので、
この問題はありません。
<p>UNIX usually sends DNS queries to the resolver library and current resolvers checks the syntax of domain names and rejects non-ASCII code as an error.
To cope with this problem, the bind8 resolver library in mDNkit has been provided with an 8-bit through patch.
By installing a resolver library with this patch the local encoding of multilingual domain names handled by clients is submitted to dnsproxy and can be used with multilingual DNS servers.
The Windows resolver (WINSOCK) is already 8-bit through so this is not a problem.
<p>残る問題は、アプリケーションでのチェックや変換ですが、
これは対象となるクライアントが多数ありますし、また、
ソースが公開されていないものについては手の出しようがありませんので、
基本的には、mDNkitには含まれていません。しかし、
DNSのチェックに多用される<b>nslookup(in bind8)</b>と、
汎用のproxyとして使用されることの多い<b>squid</b>については、
ドメイン名のチェックを外すためのパッチが含まれています。
<p>The remaining problem, i.e. checks and conversions performed by the application, a problem that affects many clients and which little can be done about when sources are not made public. Functions are not provided in mDNkit to handle this issue. However, a patch that removes the check of domain names from <b>nslookup(in bind8)</b>, an often used DNS check tool, and <b>squid</b>, an often used as a general-purpose proxy, are included.
<p>dnsproxy を使用してどのようなアプリケーションが多言語ドメイン名を
扱えるようになるのかをまとめた
<a href="clientconfig.html">文書</a>を用意してありますので、
こちらをご覧ください。
<p>Refer to <a href="clientconfig.html">document</a> for information on which applications dnsproxy can enable to handle multilingual domain names.
</body>
</html>

View file

@ -1,441 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: guide.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>Introduction to mDNkit</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>ガイド一覧</h1>
<h1>Guide List</h1>
<p>
mDNkitのガイドは以下のドキュメントから構成されています。
<p>
The mDNkit guide is comprised of the following documents.
<ul>
<li>概要説明
<li>Overview
<ul>
<li><a href="#intro">mDNkitの紹介</a>
<li><a href="#intro">Introduction to mDNkit</a>
</ul>
<li>mDNkit の提供する多言語ドメイン名処理方式
<li>Multilingual domain name processing system provided with mDNkit
<ul>
<li><a href="bind9.html">bind9 パッチ</a>
<li><a href="bind9.html">bind9 patch</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="dnsproxy.html">dnsproxy</a>
</ul>
<li>インストールと設定
<li>Installation and Configuration
<ul>
<li><a href="install.html">インストール</a>
<li><a href="install.html">Installation</a>
<li><a href="bindconfig.html">DNSサーバの設定</a>
<li><a href="bindconfig.html">DNS Server Setup</a>
<li><a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
<li><a href="proxyconfig.html">DNS Proxy Server Configuration</a>
<li><a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
<li><a href="resolvconfig.html">mDNkit Resolver Configuration</a>
</ul>
<li>その他
<li>Other details
<ul>
<li><a href="reference.html">参考文献</a><br>
<li><a href="reference.html">Reference</a><br>
</ul>
</ul>
<p>
一般ユーザの方はまず<a href="#intro">mDNkitの紹介</a>をご覧ください。
そのあと、使用する多言語ドメイン処理方式 (あなたのシステムで
利用できる処理方式についてはシステム管理者にお尋ねください) に応じて
<a href="bind9.html">bind9 パッチ</a>
<a href="runmdn.html">runmdn</a>
<a href="wrapper.html">mDN Wrapper</a>
<a href="dnsproxy.html">dnsproxy</a> のいずれかをご覧ください。
<p>
Ordinary users should refer to <a href="#intro">Introduction to mDNkit</a>.
Depending on the method of processing multilingual domain names (ask the system administrator which method your system uses) refer to <a href="bind9.html">bind9 patch</a>, <a href="runmdn.html">runmdn</a>, <a href="wrapper.html">mDN Wrapper</a>、or <a href="dnsproxy.html">dnsproxy</a>.
<p>
本キットをインストールするシステム管理者の方はすべてのガイドに
一通り目を通しておくことをお勧めします。
<p>
It is recommended that the system administrator that installs this kit carefully reads through all the guides.
<p>
本キットはフリーソフトウェアです。本キットの使用、再配布等に関する
条件については <a href="../../LICENSE.txt">LICENSE.txt</a>
ご覧ください。
<p>
This kit is free software. Read the <a href="../../LICENSE.txt">LICENSE.txt</a> for information on the redistribution conditions of this kit.
<hr>
<h1><a name="intro">mDNkit の紹介</a></h1>
<h1><a name="intro">Introduction to mDNkit</a></h1>
<p>
mDNkitは、既存のDNSサーバ(bind8/9)、既存のクライアントで、
多言語ドメイン名を使うために提案されている各種の方式を試験的に
評価してみることができるようにするための
パッチ、ツール、ライブラリをまとめたものです。
<p>
The mDNkit comprises all the patches, tools and libraries to experimentally assess the variety of systems that enable existing DNS servers (bind8, bind9) to use multilingual domain names with current clients.
<p>
従来、ドメイン名には、英字、数字(およびハイフン)しか使えませんでした。
多言語化されたドメイン名とは、ドメイン名としてこれらに加えて日本語など
いろいろな言語の文字を使えるようにしたものです。
その実現方式として、現在インターネットドラフトでいくつかの
提案がなされています。(<a href="reference.html">参考文献</a> 参照)
<p>
Traditional domain names can only use alphabetic characters, numerics and hyphe ns.
In addition to these characters, multilingual domain names can also handle Japanese and a great number of characters from other languages.
A number of recommendations for how these are to be implemented are offered in the form of drafts on the Internet. See (<a href="reference.html">Reference</a>.)
<p>
<h2>エンコーディング変換</h2>
<h2>Encoding Conversion</h2>
<p>
DNS で多言語ドメイン名を使えるようにするには、まず DNS サーバ間で
多言語ドメイン名として使用する標準エンコーディング (コードセット) を
決める必要があります。
現在提案されている方式は、いずれもISO10646 をベースとした
エンコーディングで、大きく次の2つに分けられます。
<p>
First, the standard encoding (code set) to be used for multilingual domain names between DNS servers must be determined to enable use of multilingual names in DNS.
Currently recommended systems are all based on ISO10646 encoding and are basically of the following two types.
<ol>
<li>従来のドメイン名として使うことのできる文字だけを使ったエンコーディング
<br>Encoding that uses only characters that can be used in traditional domain names
<li>UTF-8 のように、従来のドメイン名としては正しくない文字列となる
エンコーディング
<br>Encoding that uses characters that are not legal in traditional domain names such as UTF-8
</ol>
<p>
1. の方法は、エンコード結果が従来のドメイン名としても使える文字列になるので、
多言語ドメイン名を既存のDNSが受付けることができる文字列で
表現することができます。この場合、DNSサーバ自体は
既存のものがそのまま使えます。
<p>
With method 1, the encoded result are character strings that could also be used in traditional domain names, allowing you to use a multilingual domain name in the existing DNS server. Existing DNS servers can be used with this method.
<p>
2.の方法では、DNS サーバをそのエンコーディングに対応するように
改造する必要があります。
<p>
With method 2, the DNS server has to be modified to support the encoding.
<p>
いずれの方式に関しても、DNS サーバの持つドメイン名のデータはあらかじめ
そのエンコーディングで用意する必要があります。
<p>
Whichever method is selected, the domain name data held by a DNS server has to be prepared in that encoding.
<p>
一方、アプリケーションは一般的には SJIS 等のローカルエンコーディングを
使用するので、多言語ドメイン名を使えるようにするためにはどこかで
エンコーディングの相互変換をする必要があります。
<p>
On the other hand, applications normally use SJIS or other local encoding so some type of interconversion must be performed at some point to enable the use of multilingual domain names.
<p>
つまりアプリケーションは多言語ドメイン名をローカルエンコーディングで
扱い、DNS サーバは標準エンコーディングで扱うので、
クライアントと DNS サーバの間のどこかでアプリケーションの指定した
ローカルエンコーディングのドメイン名を標準エンコーディングのドメイン名へ
変換し、
また DNS サーバからの応答に含まれる標準エンコーディングのドメイン名を
クライアントで表示可能なローカルエンコーディングに戻さなければなりません。
<p>
Thus applications handle multilingual domain names in local encoding, whereas the DNS server handles them in standard encoding. This requires that at some point between the client and the DNS server that domain names in local encoding specified by an application be converted to domain names in standard encoding, and that domain names in standard encoding in the response from the DNS server be returned to local encoding that can be displayed by the client.
<p>
このためには次の3種類の方法が考えられます。
<p>
The following three methods have been proposed to implement this.
<dl>
<dt>a. クライアントでの変換<dd>
クライアントでエンコーディングを変換する。
<dt>a. Conversion is performed by the client<dd>
Encoding is converted by the client.
<img src="img/method_resolver.jpg" alt="client-side conversion">
<p>
<dt>b. DNS サーバでの変換<dd>
DNS サーバでエンコーディングを変換する。
<dt>b. Conversion is performed by the DNS server<dd>
Encoding is converted by the DNS server.
<img src="img/method_named.jpg" alt="server-side conversion">
<p>
<dt>c. プロキシサーバでの変換<dd>
クライアントと DNS サーバの間にエンコーディング変換用の中継サーバを
設ける。
<dt>c. Conversion is performed by a proxy server<dd>
An intermediate server is set up between the client and the DNS server to handle encoding conversions.
<img src="img/method_proxy.jpg" alt="proxy conversion">
</dl>
<p>
<a name="no-server-conversion">
ただし b. の方式は DNS サーバに不必要に複雑な機構を持ち込むこと、負
荷を高めることなどの問題があり好ましくないため、</a>本キットでは a. と
c. の2通りの方法を提供します。
<br>System b. unduly increases the complexity of DNS server configuration and thereby its load making it less desirable, therefore, methods a. and c. are recommended for use with </a>this kit.
<p>
mDNkitは、既存のDNSサーバ、クライアントを、最小限の改造で
複数の方式の多言語ドメイン名を
実際に試してみることができるようにするものです。
<p>
mDNkit requires a minimum of modifications to allow experimental use of multiple multilingual domain name systems with existing DNS servers and clients.
<p>
<h2>正規化</h2>
<h2>Normalization</h2>
<p>多言語ドメイン名を扱うためには、エンコーディング変換の他にも重要な
機能があります。それはドメイン名の正規化です。
<p>In addition to encoding conversion, normalization is another vital function to enable handling of multilingual domain names.
<p>すでに述べたように、DNS サーバ間で使用されるドメイン名のエンコーディング
として提案されている方式はいずれも ISO10646 をベースとしていますが、
ISO10646 では見かけ上全く同一の文字を表す方法が複数ある場合があります。
このような文字に対してその表現方法を1つに統一しないと、ユーザが
正しい (と思える) ドメイン名を入力したにも関わらず、名前解決ができない
という不都合が生じることになります。
<p>As stated above, the recommended encoding of domain names to be used between DNS servers are all based on ISO10646, the problem is that a number of characters that look identical can be denoted in a number of different ways.
Unless a single unique method of notation is found for such characters, what a user thinks is a correctly entered domain name may not be possible to resolve.
<p>また、従来の ASCII ドメイン名では、ドメイン名のマッチングの際に大文字と
小文字は同一視されていました。これをそのまま多言語ドメイン名にも適用する
ことは、マッチングの処理効率などの点で問題があり、あらかじめすべて小文字
あるいは大文字に統一するのがより効率的だと考えられます。
<p>Another problem is that upper case and lower case characters in domain name matching of traditional ASCII domain names are handled as equivalents. If this method is carried over to the handling of multilingual domain names in its present form, the matching process will be slowed down. To ensure higher efficiency, it may a good idea to use only lower case or upper case letters.
<p>このようにドメイン名をあらかじめ設定した基準にしたがって標準形に変換するのが
正規化です。基本的には正規化はエンコーディング変換と同時に行われるので、
エンコーディング変換と同じく
<p>Normalization is the method used to convert domain names to standard encoding using a set standard. Normalization is normally performed simultaneous with encoding conversion and just like encoding conversion there are the following three types.
<ul>
<li>クライアントでの正規化
<li>Normalization performed by the client
<li>DNS サーバでの正規化
<li>Normalization performed by the DNS server
<li>プロキシサーバでの正規化
<li>Normalization performed by a proxy server
</ul>
の3種類の方法が考えられます。そして2番目の方式が好ましくないことも
エンコーディング変換と同じです。
<p>Like encode conversion, the second option is not desirable.
<h2>クライアントでの変換・正規化</h2>
<h2>Conversiona and normalization performed by the client</h2>
<p>多言語ドメイン名を扱う方法のあるべき姿は、クライアント側の
リゾルバライブラリなどにエンコーディングの変換や正規化の機能を
持たせることによって、DNS プロトコルにはローカルエンコーディングの
データを一切載せないことだと考えられます。
この処理方法を実現するために mDNkit ではいくつかの方式を提供しています。
<p>The ideal method of handling multilingual domain names is thought to be to leave the conversion and normalization of encoding to resolver libraries and other features on the client side and let no local encoding data be handled by the DNS protocol.
mDNkit provides a number of methods to implement this type of processing.
<dl>
<dt><a href="bind9.html">bind9 に対するパッチ</a><dd>
<dt><a href="bind9.html">bind9 patch</a><dd>
このパッチは bind9 のリゾルバにエンコーディングの変換および
正規化の機能を持たせるものです。
アプリケーションはこのパッチを適用した bind9 のリゾルバライブラリを
リンクすることにより、多言語ドメイン名を扱うことが可能になります。
<p>This patch enables the bind9 resolver to convert and normalize encoding.
An application can handle multilingual domain names by linking to a bind9 resolver library where this patch has been installed.
<blockquote>
<img src="img/method_bind9.jpg" alt="conversion/normalization by bind9 patch">
</blockquote>
<p>
<dt><a href="runmdn.html">runmdn コマンド</a><dd>
<dt><a href="runmdn.html">runmdn command</a><dd>
このコマンドは、bind4 あるいは bind8 ベースのリゾルバライブラリを持つ
Unix アプリケーションを、再コンパイルなしに多言語ドメイン名を扱えるように
します。これは共有ライブラリの動的リンク機構を利用して、リゾルバライブラリの
提供する一部の関数を多言語ドメイン名の処理を付加したバージョンに
動的に置き換えることで実現されます。
<p>This command allows Unix applications with bind4 or bind8 based resolver libraries to handle multilingual domain names without the need for recompiling.
The command does this by utilizing the dynamic link of shared libraries to dynamically replace some of the functions of the resolver library with versions added to enable multilingual domain name processing.
<blockquote>
<img src="img/method_runmdn.jpg" alt="conversion/normalization by runmdn">
</blockquote>
<p>
<dt><a href="wrapper.html">mDN Wrapper</a><dd>
これは Windows クライアントを、やはり再コンパイルなしに多言語ドメイン名を
扱えるようにするものです。DLL の機構を利用して、名前解決を行う WINSOCK
の一部の関数に多言語ドメイン名の処理を付加することで実現されています。
<p>This function is provided to enable Windows clients handle multilingual domain names without the need for recompiling. It utilizes the DLL mechanism to add multilingual domain name processing capability to some of the functions of WINSOCK, the name resolver.
<blockquote>
<img src="img/method_wrapper.jpg" alt="conversion/normalization by winsock wrapper">
</blockquote>
</dl>
<p>runmdn コマンドと mDN Wrapper は、既存のアプリケーションを変更せずに
多言語ドメイン名の機能を付加しようとするものですが、実際にはいくつかの
制限事項があり、どのようなアプリケーションにも適用できるものではありません。
詳しくはそれぞれの解説をご覧ください。
<p>The rundmdn command and mDN Wrapper attempt to add multilingual domain name functions to existing applications without making any modifications, but there are a number of limitations and they cannot be used with any application.
Refer to respective instructions for details.
<p>また bind9 パッチといえども、例えばアプリケーションが独自に
ドメイン名の文字チェックを実行して英数字とハイフン以外の文字を含む
ドメイン名をエラーにしていたりする場合には無力です。
<p>For example if the application checks domain name characters, characters other than alphanumerics and hyphens will generate an error regardless of the bind9 patch.
<h2>プロキシサーバでの変換・正規化</h2>
<h2>Conversion and Normalization via a proxy server</h2>
<p>すでに述べたように、エンコーディング変換や正規化は
クライアント側で実行するのが理想的だと考えられますが、
実際問題としてソースが公開されていないためそのような改良のできない
クライアントや、特殊なリゾルバを持っていて runmdn が適用できないクライアントが
存在します。
<p>As stated above, conversion and normalization of encoding should ideally be performed on the client side. The problem is that there are clients that do not admit to such modifications because the source is not made public or it uses special resolvers that do not allow the use of runmdn.
<p>そこで mDNkit では、クライアントからローカルエンコードされた
多言語ドメイン名を含むDNS要求を受け取り、多言語化対応した
DNS サーバが受付けられる標準エンコーディングのドメイン名に変換し、
また逆に DNS サーバからの応答の多言語ドメイン名を
クライアント側で認識できる形式に戻す DNS proxy サーバを
用意しました。
<p>To cope with such situations, the mDNkit provides a DNS proxy server that receives DNS queries that include multilingual domain names in local encoding from a client and converts these to standard encoding acceptable to a DNS server supporting multilingual domain names, and conversly, returns multilingual domain names in the DNS server response to a format that is understood by the client.
<p><a href="dnsproxy.html">dnsproxy</a>を使うと、
クライアント側がドメイン名のチェックや変換を
行なっていなければ、クライアント側のローカルコードで記述された
ドメイン名を、そのまま多言語ドメイン名として使うことができる
ようになります。
<p>When <a href="dnsproxy.html">dnsproxy</a>is used, the domain names in the local code of the client side can be used as multilingual domain names without modification if domain names are checked and converted on the client side.
<blockquote>
<img src="img/dnsproxy.jpg" alt="mDNkit - DNS Proxy Server">
</blockquote>
<p>
<h2>DNS側でのドメイン名の変換</h2>
<h2>Domain Name Conversion on the DNS Side</h2>
<p>
DNS サーバ側のゾーンマスタファイルや named.conf ファイル上のドメイン名は、
あらかじめ、規定されたエンコーディングに変換されている必要があります
(<a href="#no-server-conversion">前述</a>の理由により
DNS サーバに変換機能を持たせる方法はここでは考えません)。
<p>
The domain names in the zone master file and named.conf file on the DNS server side must be converted to the prescribed encoding.
(<a href="#no-server-conversion">the above </a>reason i.e. adding conversion functionality to the DNS server is not considered here).
<p>
mDNkitでは、管理者はこれらのファイルをローカルエンコーディングで
作成して必要に応じて変換して使うものと想定し、
ローカルエンコーディングから
多言語ドメイン名で必要とするエンコーディングへの
変換ツール<b>mdnconv</b>を提供します。
<p>
mDNkit assumes that the administrator generate these files in local encoding and only convert them as need dictates and to this end provides <b>mdnconv</b>, a conversion tool to handle conversion from local encoding to multilingual domain names.
<blockquote>
<img src="img/mdnconv.jpg" alt="mDNkit - mDN converter">
</blockquote>
<table>
<tr>
<td valign=top>注:</td>
<td>
ローカルエンコーディングで記述されたゾーンマスタ
ファイルを多言語エンコーディングへ変換することはできますが、
多言語エンコーディングによっては逆変換が
できないことがあります。
これは、エンコーディングによってはそのエンコーディングで
エンコードされた文字列と通常の ASCII 文字列が
区別できず、ファイルのどの部分を逆変換すべきか判定できない
ものがあるためです。
しかし、DNSの管理のためには、
逆方向の変換も必要になると思いますので、一部のエンコーディングに
対しては逆変換をサポートしています。
</td>
</tr>
<tr>
<td valign=top>Note:</td>
<td>
Zone master fils in local encoding can be converted to multilingual encoding, but some multilingual encoding may not be possible to return to local encoding.
This is because the encoded character strings in some encoding schemes it cannot be distinguished from normal ASCII character strings making it impossible to know which part of the file should be converted back to local encoding.
Still, since backward conversion is regarded as essential for the sake of DNS management, backward conversion is supported for some encoding.
</td>
</tr>
</table>
<p>
<h2>DNS自体の多言語化</h2>
<h2>Multilingual support by DNS</h2>
<p>
DNS サーバの使用するエンコーディングによっては、
DNSサーバ自体がドメイン名を8ビット透過で扱うことを
要求するものもあります。
このようなエンコーディングへの対処のために
mDNkitにはbind8を8ビット透過にするためのパッチが
含まれています。このパッチはbind8に含まれている
nslookup、resolverについても8ビット透過にします。
<p>
Some encoding used by DNS servers requires that the DNS server itself handles domain names as 8-bit through. To handle such encoding, mDNkit is provided with a patch that makes bind8 8-bit through.
This patch also turns nslookup and resolver provided with bind8 into 8-bit through.
<p>bind9 の DNS サーバは本来8ビット透過になっていますが、
ドメイン名を内部形式からテキスト形式に変換する際、8ビット文字を
`\DDD' という表現に変換してしまうので、これを抑制して UTF-8 文字は
そのまま透過するようにする機能が bind9 パッチには含まれています。
<p>Although bind9 DNS servers are 8-bit through, when domain names are converted from the internal format to text format, 8-bit characters are converted to "\DDD". To suppress this and allow UTF-8 characters through, a bind9 patch has been provided.
<p>
<h2>補足</h2>
<h2>Notes</h2>
実際にmDNkitを使用するには、以下のドキュメントを参照してください。
<br>Refer to the following documents for information on mDNkit usage.
<ul>
<li><a href="bind9.html">bind9 パッチ</a>
<li><a href="bind9.html">bind9 patch</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="dnsproxy.html">dnsproxy</a>
<li><a href="dnsproxy.html">dnsproxy</a>
<li><a href="install.html">インストール</a>
<li><a href="install.html">Installation</a>
<li><a href="bindconfig.html">DNSサーバの設定</a>
<li><a href="bindconfig.html">DNS server configuration</a>
<li><a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
<li><a href="proxyconfig.html">DNS Proxy Server configuration</a>
<li><a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
<li><a href="resolvconfig.html">mDNkit resolver configuration</a>
<li><a href="reference.html">参考文献</a><br>
<li><a href="reference.html">Reference</a><br>
</ul>
それぞれのプログラム、ライブラリ、および設定ファイルの仕様については
以下のドキュメントをご覧になってください。
<br>Refer to the documents listed below for the specifications of these programs, libraries and configuration files.
<ul>
<li><a href="../spec/dnsproxy.html">dnsproxy</a>
<li><a href="../spec/dnsproxy.html">dnsproxy</a>
<li><a href="../spec/mdnconv.html">mdnconv</a>
<li><a href="../spec/mdnconv.html">mdnconv</a>
<li><a href="../spec/bind9.html">BIND-9 パッチ</a>
<li><a href="../spec/bind9.html">BIND-9 patch</a>
<li><a href="../spec/runmdn.html">runmdn</a>
<li><a href="../spec/runmdn.html">runmdn</a>
<li><a href="../spec/library.html">MDN ライブラリ</a>
<li><a href="../spec/library.html">MDN library</a>
<li><a href="../spec/wrapper.html">mDN Wrapper</a>
<li><a href="../spec/wrapper.html">mDN Wrapper</a>
<li><a href="../spec/clientconfig.html">クライアント設定ファイル</a>
<li><a href="../spec/clientconfig.html">Client configuration file</a>
</ul>
</body>
</html>

View file

@ -1,649 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: install.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>mDNkit installation guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>インストール</h1>
<h1>Install</h1>
<p>
mDNkit のコンパイルおよびインストール方法について解説します。
ここではソースからのインストール方法について説明します。
バイナリパッケージの配布も予定されていますが、
それらのインストール方法に関してはそれぞれのパッケージを参照してください。
<p>This document describes mDNkit compiling and installation procedures.
Procedures for how to install from the source is described here.
Distribution of binary packages is planned; refer to the instructions that accompany each package.
<p>
本ドキュメントでは Unix 用のコンパイルとインストール方法について
説明します。Windows 用の <a href="wrapper.html">mDN Wrapper</a> のインストール
方法に関しては mDN Wrapper の<a href="wrapper.html#setup">セットアップ</a>
項をご覧ください。
<p>
This document describes the compiling and installing procedures for Unix. Refer to the section <a href="wrapper.html#setup">Setup</a> in mDN Wrapper for information on procedures to install in Windows <a href="wrapper.html">mDN Wrapper</a>.
<p>
ソース配布からのインストール手順はおよそ次のようになります。
<p>
Installation procedure from source distribution is implemented as follows.
<ol>
<li><a href="#preparation">前準備</a>
<li><a href="#preparation">Prepare</a>
<li><a href="#extract">配布ソースの展開</a>
<li><a href="#extract">Extract distribution source</a>
<li><a href="#configure"><tt>configure</tt> 実行</a>
<li><a href="#configure"><tt>Configure</tt> Execute</a>
<li><a href="#make">コンパイル</a>
<li><a href="#make">Compile</a>
<li><a href="#install">ファイルのインストール</a>
<li><a href="#install">Install file</a>
</ol>
<p>
インストールの後は、<a href="bindconfig.html">DNS サーバの設定</a>
および <a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
、さらに dnsproxy を使用する場合には
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
を参照して設定を行ってください。
<p>
After installation, refer to and set up <a href="bindconfig.html">DNS server configuration</a>, <a href="resolvconfig.html">mDNkit resolver configuration</a>, and if dnsproxy is to be used <a href="proxyconfig.html">DNS Proxy Server configuration</a>.
<p>ソース配布に含まれているパッチを適用する場合には、
それぞれ次の手順にしたがってください。
<p>To install the patch included in source distribution, refer to the following instructions.
<ul>
<li><a href="#bind9">bind9 用パッチの適用とインストール</a>
<li><a href="#bind9">Applying and installing a bind9 patch</a>
<li><a href="#bind">bind8 用パッチの適用とインストール</a>
<li><a href="#bind">Applying and installing a bind8 patch</a>
<li><a href="#squid">squid 用パッチの適用とインストール</a>
<li><a href="#squid">Applying and installing a squid patch</a>
</ul>
<hr>
<h2><a name="preparation">前準備</a></h2>
<h2><a name="preparation">Preparations</a></h2>
<h3>iconv のインストール</h3>
<h3>iconv installation</h3>
<p><b>mDNkit</b> は EUC や SJIS など様々なローカルエンコーディングで記述された
ドメイン名のエンコーディングを変換するために、汎用のコードセット変換
ユーティリティである <em>iconv()</em> を使用します。
そこで、FreeBSD など <em>iconv()</em> が標準で組み込まれていないシステムでは、
<b>mDNkit</b> のインストールに先立って <em>iconv()</em> をインストール
しなければなりません。また、<b>mDNkit</b><em>iconv()</em>
UTF-8 エンコーディングをサポートしていることを要求します。システム付属の
<em>iconv()</em> が UTF-8 をサポートしていない場合にはやはり
外部のパッケージをインストールする必要があります。
<p><b>mDNkit</b> uses <em>iconv()</em>, a general-purpose utility, to convert domain name encoding of EUC, SJIS or other local encoding.
<em>iconv()</em> must be installed prior to <b>mDNkit</b> installation in those systems that do not have <em>iconv()</em> as a standard package, such as FreeBSD. Also, the <b>mDNkit</b> requires that <em>iconv()</em> should support UTF-8 encoding. An external package must be installed if the provided <em>iconv()</em> in the system does not support UTF-8.
<p><em>iconv()</em> のフリーな実装としては、例えば <em>libiconv</em>
<p>There are free versions of <em>iconv()</em>, for example, <em>libiconv</em>.
<ul>
<li><a href="http://clisp.cons.org/~haible/packages-libiconv.html">http://clisp.cons.org/~haible/packages-libiconv.html</a>
</ul>
<p>があり、ソースを上記のページから入手することができます。
これは LGPL に基づいたフリーソフトウェアで、多くの Unix 系 OS の
もとで動作します。このパッケージのインストール方法については、上記ページか、
あるいはソース配布に含まれる <tt>INSTALL.generic</tt> ファイルをご覧ください。
<p>This source can be downloaded from the above page.
This is an LGPL-based free software package that runs on a variety of Unix operating systems. Refer to the above page or the <tt>INSTALL.generic</tt> file that accompanies the source distribution for information on installation procedures.
<p>
<h3>bind9 ソースの入手</h3>
<h3>Obtaining the bind9 source</h3>
<p>mDNkit は bind9 に対するパッチを提供しており、これによって
多言語ドメイン名を扱うことのできる bind9 のリゾルバおよびサーバを
作成することができます。本キットに含まれるパッチは BIND 9.0.0 に
対するものです。ソースは以下の場所からダウンロードすることができます。
<p>The mDNkit provides a bind9 patch that can be used to generate bind9 resolvers and servers that can support multilingual domain names. The patch in this kit is for BIND 9.0.0. The source can be downloaded from the following page.
<ul>
<li><a href="http://www.isc.org/products/BIND/bind9.html">
http://www.isc.org/products/BIND/bind9.html</a>
</ul>
<p>
<h3>bind8 ソースの入手</h3>
<h3>Obtaining the bind8 source</h3>
<p>dnsproxy を利用してクライアントアプリケーションが
多言語ドメイン名を使用できるようにするためには、
名前解決を行うリゾルバライブラリを 8bit スルーにする必要があります。
また DNS サーバでも、多言語ドメイン名のエンコーディングとして
ASCII 互換エンコーディングである UTF-5 や RACE 以外の、
例えば UTF-8 などのエンコーディングを使用するためには、
8bit スルーの DNS サーバを使用する必要があります。
<p>To use dnsproxy to enable client applications to support multilingual domain names, the resolver library that resolves names must be made 8-bit through.
Also, 8-bit through DNS servers must be used to enable a DNS server to use encodings other than UTF-5, RACE or other ASCII compatible encoding (as multilingual domain name encoding), for example, UTF-8.
<p>mDNkit にはこのために
BIND 8.2.2-P7 および BIND 8.2.3-T6B を 8bit スルーにする
パッチが含まれています。パッチを適用した bind8 を使用したい場合には
あらかじめいずれかのバージョンのソースを用意してください。
ソースは以下の場所からダウンロードすることができます。
<p>The mDNkit for that reason supplies a patch that makes BIND 8.2.2-P7 and BIND 8.2.3-T6B 8-bit through. To use bind8 with a patch installed, obtain the source of the desired version.
Sources can be downloaded from the following page.
<ul>
<li><a href="http://www.isc.org/products/BIND/bind8.html">http://www.isc.org/products/BIND/bind8.html</a>
</ul>
<p>
<h3>Squid ソースの入手</h3>
<h3>Obtaining Squid</h3>
<p>Web のキャッシュサーバである Squid は、そのままでは多言語
ドメイン名が入力されるとそれをエラーにしてしまい、使用することができません。
このため<b>mDNkit</b> には
<a href="http://www.squid-cache.org/Versions/v2/2.3/">Squid-2.3.STABLE3</a>
8bit スルーにするパッチが含まれています。Squid を多言語ドメイン名で使用
したい場合にはこのソースも用意してください。
<p>Squid, a Web cache server, cannot be used as is, because it will generate an error when entering multilingual domain names.
<b>mDNkit</b> comes with a patch that makes <a href="http://www.squid-cache.org/Versions/v2/2.3/">Squid-2.3.STABLE3</a> 8-bit through. Obtain this source if you wish to make Squid support multilingual domain names.
<p>
<hr>
<h2><a name="extract">配布ソースの展開</a></h2>
<h2><a name="extract">Extracting distribution source</a></h2>
<p><b>mDNkit</b> に関する最新情報は以下の場所から入手可能で、
最新の配布ソースのダウンロードもできます。
<p>The latest information regarding the <b>mDNkit</b> is available on the following site. The most recent distribution source can also be downloaded from the following page.
<ul>
<li><a href="http://www.nic.ad.jp/jp/research/idn/">http://www.nic.ad.jp/jp/research/idn/</a>
</ul>
<p>入手した <b>mDNkit</b> の配布ソースを展開します。
配布ソースのファイル名を <tt>mdnkit-<i>X.Y</i>.tar.gz</tt>とすると
次のようにして展開できます。
<p>Extracting the obtained <b>mDNkit</b> distribution source.
Distribution sources with file names such as <tt>mdnkit-<i>X.Y</i>.tar.gz</tt> are extracted as shown below.
<blockquote>
<pre>
% <kbd>gunzip mdnkit-X.Y.tar.gz</kbd>
% <kbd>tar -xf mdnkit-X.Y.tar</kbd>
</pre>
</blockquote>
<p>展開すると、<tt>mdnkit-<i>X.Y</i></tt>というディレクトリが作られますので、
そこに移動してください。
<p>When extracted, a <tt>mdnkit-<i>X.Y</i></tt> directory is generated. Move to this directory.
<blockquote>
<pre>
% <kbd>cd mdnkit-X.Y</kbd>
</pre>
</blockquote>
<p>以降の説明では、このディレクトリを <tt>$MDNTOP</tt> という名前で
参照します。環境変数 <tt>$MDNTOP</tt> を設定しておくと便利でしょう。
<p>In the following descriptions, this directory is referred to as <tt>$MDNTOP</tt>. Setting the environment variable <tt>$MDNTOP</tt> makes it easier to use.
<blockquote>
<pre>
% <kbd>setenv MDNTOP `pwd`</kbd> (csh 系のシェルの場合)
% <kbd>MDNTOP=`pwd`; export MDNTOP</kbd> (sh 系のシェルの場合)
% <kbd>setenv MDNTOP `pwd`</kbd> (for a csh system shell)
% <kbd>MDNTOP=`pwd`; export MDNTOP</kbd> (for a sh system shell)
</pre>
</blockquote>
<p>
<hr>
<h2><a name="configure"><tt>configure</tt> 実行</a></h2>
<h2><a name="configure">Running <tt>Configure</tt></a></h2>
<p>まず <b>mDNkit</b> の本体である、
<p>First compile the following that form the major part of the <b>mDNkit</b>.
<ul>
<li>MDN ライブラリ (libmdn)
<li>MDN library (libmdn)
<li>DNS プロキシサーバ (dnsproxy)
<li>DNS proxy server (dnsproxy)
<li>ゾーンマスタファイルコード変換ツール (mdnconv)
<li>Zone master file code conversion tool (mdnconv)
<li>runmdn コマンド
<li>runmdn command
</ul>
<p>まず、<b>mDNkit</b> のトップディレクトリ
(<tt>$MDNTOP</tt> の指すディレクトリ) に移動し、
<tt>configure</tt> スクリプトを実行します。
<tt>configure</tt> はヘッダファイルやライブラリの有無など、システム毎の
特徴を調べ、コンパイル環境を適切に設定するためのツールです。
<p>First move to the <b>mDNkit</b> top directory (the directory that <tt>$MDNTOP</tt> points to) and execute the <tt>configure</tt> script.
<tt>Configure</tt> is a tool that checks the header file and libraries to learn the features of the system to configure the optimum compiler environment.
<blockquote>
<pre>
% <kbd>cd $MDNTOP</kbd>
% <kbd>./configure</kbd>
</pre>
</blockquote>
<p>システムに <em>iconv()</em> が組み込まれていて、かつコンパイル時に
特別なオプションを使用しないなら上記のようになにも引数を指定せずに
実行すればよいのですが、そうではない場合、オプションや環境変数で
<tt>configure</tt> の動作を変えることができます。
<p>When <em>iconv()</em> is included with the system and no special options are used during compilation, it can be executed like above without the need to specify any arguments. In other cases, operation of <tt>configure</tt> can be changed using options and environment variables.
<p><tt>configure</tt> に指定できるオプションの中で <b>mDNkit</b>
直接関係するものは以下の通りです。
<p>The following options that can be set by <tt>configure</tt> are directly related to <b>mDNkit</b>.
<dl>
<dt><tt>--with-iconv=<i>LIB</i></tt>
<dd>システムに <em>iconv()</em> が組み込まれていない、あるいは
システムの <em>iconv()</em> を使いたくないなどの理由で新たに
<em>iconv()</em> のパッケージをインストールした場合に、このオプションを
用いて <em>iconv()</em> のライブラリを指定します。<i>LIB</i>
ライブラリを指定します。ライブラリファイルをフルパスで指定するか、
あるいは C コンパイラに与えるオプションの形式で指定してください。<br>
When the <em>iconv()</em> package is installed either because it is not included with the system or because you do not wish to use the existing <em>iconv()</em> in the system, use this option to configure the <em>iconv()</em> library. Use <i>LIB</i> to specify the library. Use the full path to specify the library or specify it using an option format assigned to the C compiler.
<p>例えば<a href="#preparation">前準備</a>に挙げた
<em>iconv</em> のパッケージをインストールした場合、デフォルトでは
<tt>/usr/local/lib</tt><tt>libiconv</tt> にインストールされるので、<br>
For example, when the <em>iconv</em> package mentioned in <a href="#preparation">Preparations</a> is installed, it is by default installed in <tt>libiconv</tt> of <tt>/usr/local/lib</tt>, so it is a good idea to make the following entry.
<blockquote>
<pre>
--with-iconv="-L/usr/local/lib -liconv"
</pre>
</blockquote>
と指定すればよいでしょう。<tt>libiconv</tt> が共有ライブラリの時には、
<tt>-R</tt> オプションも指定して<br>
When <tt>libiconv</tt> is shared library, it may also be necessary to specify the <tt>-R</tt> option:
<blockquote>
<pre>
--with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
</pre>
</blockquote>
<dt><tt>--with-utf8=<i>NAME</i></tt>
<dd>UTF-8 エンコーディングを <em>iconv()</em> に指定する場合、
<b>mDNkit</b> はデフォルトで <tt>UTF-8</tt> というエンコーディング名称を
使用します。もし UTF-8 エンコーディングを指定するのに <tt>UTF-8</tt> 以外の
エンコーディング名称を使用する必要があれば、このオプションで <i>NAME</i>
にその名称を指定します。<a href="#preparation">前準備</a>にあげた
<em>iconv</em> のパッケージを使用する場合にはこのオプションの指定は
不要です。<br>
When UTF-8 encoding is specified using <em>iconv()</em>, <b>mDNkit</b> uses <tt>UTF-8</tt> to encoding names by default. If other names must be used when UTF-8 encoding is specified, specify the name in <i>NAME</i> using this option. This is not required when using <em>iconv</em>package mentioned in <a href="#preparation">Preparations</a>.
<p>
<dt><a name="race-prefix"><tt>--with-race-prefix=<i>PREFIX</i></tt></a>
<dd>DNS プロトコル上で用いられる多言語ドメイン名のエンコーディング方式
として RACE という方式が提案されています。これは
<a href="../spec/library.html#ACE">ASCII 互換エンコーディング</a>
1つですが、ドメイン名に特定のプリフィックスを付けることで通常の
ASCII ドメイン名と区別することが可能になっています。このプリフィックスは
現在の<a href="../../reference/draft/draft-ietf-idn-race-02.txt">
インターネットドラフト</a>では <tt>"bq--"</tt> ですが、将来変更される
可能性があります。変更された場合にはこのオプションを用いて正しい
プリフィックスを指定してください。
<br>RACE is proposed as one of the encoding system to be used for multilingual domain names in DNS protocols. RACE is <a href="../spec/library.html#ACE"> an ASCII compatible encoding scheme</a> and adds a specific prefix to the domain name to distinguish it from an ordinary ASCII domain name. This prefix is <tt>"bq--"</tt> in current <a href="../../reference/draft/draft-ietf-idn-race-02.txt"> Internet Drafts</a>, but this may change in future. Use this option to enter the new prefix when a change is made.
<p>
<dt><a name="brace-suffix"><tt>--with-brace-suffix=<i>SUFFIX</i></tt></a>
<dd>RACE と同じく DNS プロトコル上で用いられる多言語ドメイン名の
エンコーディング方式として BRACE という方式が提案されています。これも
ASCII 互換エンコーディングの
1つですが、RACE と異なり、ドメイン名に特定のサフィックスを付けることで通常の
ASCII ドメイン名と区別することが可能になっています。このサフィックスは
現在の<a href="../../reference/draft/draft-ietf-idn-brace-00.txt">
インターネットドラフト</a>では <tt>"-8q9"</tt> ですが、将来変更された
場合にはこのオプションを用いて正しいサフィックスを指定してください。<br>
Like RACE, BRACE is being proposed as an encoding scheme for multilingual domain names to be used in DNS protocols. It is also an ASCII compatible encoding scheme, but differs from RACE in that it adds a suffix to the domain name to distinguish from normal ASCII domain names. This suffix is <tt>"-8q9"</tt> in the current <a href="../../reference/draft/draft-ietf-idn-brace-00.txt">Internet Draft</a>, but this may change in future. Use this option to enter the correct suffix when a change is made.
<p>
<dt><a name="lace-prefix"><tt>--with-lace-prefix=<i>PREFIX</i></tt></a>
<dd>
RACE や BRACE と同じような ASCII 互換エンコーディングの一つとしてLACE という方式が提案されています。RACE と同様、LACE も通常の ASCII ドメイン名と区別ために特別なプリフィックスを使用します。
現在の<a href="../../reference/draft/draft-ietf-idn-lace-00.txt">インターネットドラフト</a>では <tt>"bq--"</tt> ですが、将来これが変更された場合にはこのオプションを用いて正しいプリフィックスを指定してください。
<p>
<p>Like RACE and BRACE, LACE is another ASCII compatible encoding scheme and like, RACE, it adds a special prefix to distinguish it from ordinary ASCII domain names.
In the current <a href="../../reference/draft/draft-ietf-idn-lace-00.txt"> Internet Draft</a> the prefix is <tt>"bq--"</tt>, but this may change in the future; if it does, use this option to enter the correct prefix.
<p>
<dt><a name="enable-zld"><tt>--enable-zld</tt></a>
<dd>ZLD (Zero Level Domain) 機能のサポートを追加します。
ZLD とは DNS サーバで用いられる一部のエンコーディングにおいて、通常の ASCII ドメイン名と多言語ドメイン名とを区別するために用いられる特殊なドメイン名です。
DNS プロトコル上で使用するエンコーディングとして ZLD を必要とするエンコーディングを選択しなければ、このオプションの指定は不要です。
<p>This option adds ZLD (Zero Level Domain) function support. ZLD is a special domain name used to differentiate standard ASCII domain names from multilingual domain names in some encodings used in a DNS server. This option need not be set unless ZLD is selected as the required encoding in a DNS protocol. <p>
<p>なお、ZLD 機能のサポートの有無は dnsproxy や runmdn が設定ファイルを読み込む際の振る舞い (ZLD の指定を無視するかどうか) に影響します。
mDNkit が提供する<a href="../spec/library.html">ライブラリ</a>自体は、(設定ファイルを読み込むための一部のモジュールを除いて)このオプションによって動作が変わることはなく、常に ZLD の処理を行うようになっています。
<p>The support of the ZLD function affects operation (i.e. whether or not the ZLD setting is ignored) when configuration files are read in using the dnsproxy or runmdn command. The operation of the <a href="../spec/library.html">library</a> provided by the mDNkit does not change with this option (except some modules used for reading in configuration files), but performs ZLD processing at all times.<p>
<dt><tt><a name="sbindir">--sbindir=<i>DIR</i></a></tt>
<dd>DNS プロキシサーバ dnsproxy をインストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/sbin</tt> にインストールされます。
<p>
Specifies the directory where dnsproxy, the DNS proxy server, is installed. <tt>/usr/local/sbin</tt> is the default directory.<p>
<dt><tt><a name="bindir">--bindir=<i>DIR</i></a></tt>
<dd>ゾーンマスタファイルコード変換ツール mdnconv およびクライアントに多言語ドメイン名処理を付加する runmdn コマンドをインストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/bin</tt> にインストールされます。
<p>
<p>
<dd>Specifies the directory where the mdnconv command, a tool for converting zone master file code, and the runmdn command that adds multilingual domain name processing capability to a client, are installed. <tt>/usr/local/bin</tt> is the default directory.<p>
<dt><tt><a name="libdir">--libdir=<i>DIR</i></a></tt>
<dd>dnsproxy や mdnconv 等が使用する mDNkit の基本ライブラリをインストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/lib</tt> にインストールされます。
<p>
<dd>Specifies the directory where the basic mDNkit and other basic libraries employed by dnsproxy or mdnconv are installed.
<tt>/usr/local/lib</tt> is the default directory.<p>
<p>
<dt><tt><a name="includedir">--includedir=<i>DIR</i></a></tt>
<dd>mDNkit の基本ライブラリを使用するのに必要なヘッダファイルをインストールするディレクトリを指定します。デフォルトでは <tt>/usr/local/include</tt> にインストールされます。
<p>
<dd>Specifies the directory where the header file required for use of the basic mDNkit library is installed. <tt>/usr/local/include</tt> is the default directory.<p>
<dt><tt><a name="sysconfdir">--sysconfdir=<i>DIR</i></a></tt>
<dd>DNS プロキシサーバ dnsproxy の設定ファイル、およびmDNkit のクライアント共通設定ファイルをインストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/etc</tt> にインストールされます。
<p>
<dd>Specifies the directory where dnsproxy, the DNS proxy server, configuration files and shared client configuration files for mDNkit are installed.
<tt>/usr/local/etc</tt> is the default directory.<p>
<p>
<dt><tt><a name="mandir">--mandir=<i>DIR</i></a></tt>
<dd>オンラインマニュアルをインストールするベースディレクトリを指定します。
デフォルトでは <tt>/usr/local/man</tt> です。実際にはこのディレクトリのサブディレクトリの <tt>man1</tt><tt>man8</tt> にインストールされます。
<p>
<dd>Specifies the base directory where the online manuals are installed.
<tt>/usr/local/man</tt> is the default directory. In fact, they are installed in its <tt>man1</tt> or <tt>man8</tt> subdirectory.<p>
</dl>
<p>この他にも <tt>configure</tt> にはいろいろなオプションを指定することができます。
<p>A number of other options can be specified using <tt>configure</tt>.<p>
<blockquote>
<pre>
% <kbd>./configure --help</kbd>
</pre>
</blockquote>
<p>で指定可能なオプションの一覧を表示させることができます。
<p>The above is used to display a list of specifiable options.<p>
<p>また、関係する環境変数は次の通りです。
<p>The related environment variables are as follows.<p>
<dl>
<dt><tt>CFLAGS</tt>
<dd>Cコンパイラに渡すオプションを指定します。例えば外部のiconv パッケージをインストールしたときに、インクルードファイル<tt>iconv.h</tt> が標準以外のディレクトリ、例えば<tt>/usr/local/include</tt> にインストールされたとします。このような場合には <tt>CFLAGS</tt><tt>-I/usr/local/include</tt> を設定する必要があります。具体的には、csh 系のシェルの場合には
<p>
<dd>Specifies options passed to the C compiler. Let's assume that when an external iconv package is installed, <tt>iconv.h</tt>, the include file is installed in a directory other than the standard directory, for example, <tt>/usr/local/include</tt>. This requires that <tt>-I/usr/local/include</tt> be configured in <tt>CFLAGS</tt>. The following configuration is required in a csh shell.<p>
<blockquote>
<pre>
% <kbd>setenv CFLAGS -I/usr/local/include</kbd>
</pre>
</blockquote>
<p>また sh 系のシェルの場合には
<p>An sh shell requires the following configuration.
<blockquote>
<pre>
% <kbd>CFLAGS=-I/usr/local/include; export CFLAGS</kbd>
</pre>
</blockquote>
<p>とします。
<p><tt>CFLAGS</tt> はこの他にも C コンパイラの最適化オプションを指定するためにも使えます。<tt>CFLAGS</tt><tt>-O</tt> を指定すれば最適化ありでコンパイルされます。
<p><tt>CFLAGS</tt> can be used in other situations to specify the optimum C compiler options. When <tt>-O</tt> is specified in <tt>CFLAGS</tt> compilation is optimized.
</dl>
<p><tt>configure</tt> を実行することにより、あなたのシステム環境に合わせて調整された Makefile その他のファイルが生成されます。
<p>When <tt>configure</tt> is executed, Makefile and other files are generated and adapted to your system environment.
<p>
<hr>
<h2><a name="make">コンパイル</a></h2>
<h2><a name="make">Compile</a></h2>
<p><a href="#configure"><tt>configure</tt> 実行</a>によって、システム環境に合った Makefile が生成されているので、コンパイルはトップディレクトリ(<tt>$MDNTOP</tt> の指すディレクトリ) で<tt>make</tt> コマンドを実行するだけです。
<p>Since <a href="#configure"><tt>configure</tt></a> generates a Makefile tailored to the system environment, all that compile needs to do is to execute the <tt>make</tt> command in the top directory (the directory pointing to <tt>$MDNTOP</tt>).
<blockquote>
<pre>
% <kbd>make</kbd>
</pre>
</blockquote>
<p>
<hr>
<h2><a name="install">ファイルのインストール</a></h2>
<p><h2><a name="install">Installing Files</a></h2>
<p>コンパイルが終了したら、実行ファイルなどのインストールを行います。
インストールの前にスーパーユーザになってください。
<p>When compiling is finished, install the executable files and other files. Become a superuser prior to installation.<p>
<blockquote>
<pre>
% <kbd>su</kbd>
</pre>
</blockquote>
<p>あとは <tt>make install</tt> を実行すれば、必要なファイルがシステムにインストールされます。
<p>Then execute <tt>make install</tt> to install all the required files in the system.<p>
<blockquote>
<pre>
# <kbd>make install</kbd>
</pre>
</blockquote>
<p>インストールされるファイルは以下の通りです。
<p>The following files will be installed.<p>
<dl>
<dt>実行ファイル
<p><dt>Executable files
<dd>以下の実行ファイルがインストールされます。
<p><dd>The following executable files will be installed.
<dl>
<dt><tt>dnsproxy</tt>
<dd>DNS プロキシサーバです。
<dd>The DNS proxy server.<p>
<dt><tt>mdnconv</tt>
<dd>ゾーンマスタファイル用のコード変換ツールです。
<dd>The code conversion tool for zone master files.<p>
<dt><tt>runmdn</tt>
<dd>クライアントを再コンパイルすることなしに多言語ドメイン名の名前解決機能を付加するコマンドです。
デフォルトでは <tt>/usr/local/bin</tt> にインストールされます。
<dd>This command adds, without the need for recompiling, the capability to resolve multilingual domain names to clients. It is installed in <tt>/usr/local/bin</tt> by default.<p>
</dl>
<p><tt>dnsproxy</tt> は、デフォルトでは <tt>/usr/local/sbin</tt>にインストールされます。
インストール先を変えるには<tt>configure</tt><tt><a href="#sysconfdir">--sysconfdir</a></tt>オプションを使用します。
<p><tt>dnsproxy</tt> is installed in <tt>/usr/local/sbin</tt> by default. If you wish to change the installation location, use the <tt>configure</tt> <tt><a href="#sysconfdir">--sysconfdir</a></tt> option.
<p><tt>mdnconv</tt> および <tt>runmdn</tt> は、デフォルトでは <tt>/usr/local/bin</tt> にインストールされます。
インストール先を変えるには <tt>configure</tt><tt><a href="#bindir">--bindir</a></tt>オプションを使用します。
<p>
<p><tt>mdnconv</tt> and <tt>runmdn</tt> are installed in <tt>/usr/local/bin</tt> by default. If you wish to change the installation location, use the </tt> <tt><a href="#bindir">--bindir</a></tt> option.<p>
<dt>オンラインマニュアル<p>
<dt>On-line manuals<p>
<dd>以下のオンラインマニュアルがインストールされます。
<p><dd>The following on-line manuals will be installed.<p><dl>
<dt><tt>dnsproxy.</tt>
<dd>DNS プロキシサーバ dnsproxy のマニュアルです。
<p><dd>The dnsproxy, a DNS proxy server, manual<p>
<dt><tt>mdnconv.1</tt>
<dd>ゾーンマスタファイル用のコード変換ツール mdnconv のマニュアルです。
<p><dd>The manual for mdnconv, a zone master file code conversion tool<p>
<dt><tt>runmdn.1</tt>
<dd>runmdn コマンドのマニュアルです。
<p><dd>The runmdn command manual<p>
<dt><tt>mdnres.conf.5</tt>
<dd>クライアント共通設定ファイル mdnres.conf のオンラインマニュアルです。
<p><dd>The on-line manual for mdnres.conf, a shared client configuration file
</dl>
<p>デフォルトでは <tt>/usr/local/man/man8</tt> (<tt>dnsproxy.8</tt>)、<tt>/usr/local/man/man1</tt> (<tt>mdnconv.1</tt><tt>runmdn.1</tt>)、<tt>/usr/local/man/man5</tt> (<tt>mdnres.conf.5</tt>)にそれぞれインストールされます。
<p>These manuals are by default installed in <tt>/usr/local/man/man8</tt> (<tt>dnsproxy.8</tt>), <tt>/usr/local/man/man1</tt> (<tt>mdnconv.1</tt>, <tt>runmdn.1</tt>) and <tt>/usr/local/man/man5</tt> (<tt>mdnres.conf.5</tt>), respectively.<p>
インストール先を変えるには、<tt>configure</tt><tt><a href="#mandir">--mandir</a></tt> オプションを使用します。
<p>
<p>To change the location of installation, use the <tt><a href="#mandir">--mandir</a></tt> option of <tt>configure</tt>.<p>
<dt>設定ファイル
<dd>以下の設定ファイルあるいはそのサンプルファイルがインストールされます。
<p>Configuration files
<dd>The following configuration files and sample files will be installed.<p>
<dl>
<dt><tt>dnsproxy.conf</tt>
<dd>DNS プロキシサーバ dnsproxy の設定ファイルの設定例を記述したサンプルファイルです。
このファイルがすでにインストールされている場合には、上書きしてしまわないように <tt>dnsproxy.conf.sample</tt> という名前でインストールされます。
<p>このファイルの設定方法に関しては <a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>を参照してください。
<p><dd>This sample file describes setup examples for the configuration file for dnsproxy, the DNS proxy server.
If this file has already been installed, it is installed under the name <tt>dnsproxy.conf.sample</tt> so as not to overwrite the previous file.
Refer to <a href="proxyconfig.html">DNS Proxy Server Configuration</a> for information on how to set it up.<p>
<dt><tt>mdnres.conf.sample</tt>
<dd>クライアント共通設定ファイル mdnres.conf の設定例を記述したサンプルファイルです。
<p><dd>This sample file describes setup examples for mdnres.conf, a shared client configuration file.<p>
<p>このファイルの設定方法に関しては<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>を参照してください。
<p><dd>Refer to the <a href="resolvconfig.html">mDNkit resolver configuration</a> for information on how to set it up.<p>
</dl>
<p>いずれもデフォルトでは <tt>/usr/local/etc</tt> にインストールされます。
インストール先を変えるには、<tt>configure</tt><tt><a href="#sysconfdir">--sysconfdir</a></tt> オプションを使用します。
<p>
<p>Both files are by default installed in <tt>/usr/local/etc</tt>. To change the installation location, use the <tt><a href="#sysconfdir">--sysconfdir</a></tt> option.<p>
<dt>ライブラリ
<dd>以下のライブラリがインストールされます。
<p><dt>Libraries
<dd>The following libraries will be installed.<p>
<dl>
<dt><tt>libmdn</tt>
<dd>dnsproxy や mdnconv 等のコマンドが使用しているmDNkit の基本ライブラリです。
<p>A basic mDNkit library that employs dnsproxy, mdnconv and other commands.
<dt><tt>libmdnres</tt>
<dd>runmdn コマンドによってクライアントに動的にリンクされるライブラリです。
<p><dd>A library dynamically linked to a client using the runmdn command.
</dl>
<p>いずれのライブラリもデフォルトでは <tt>/usr/local/lib</tt> にインストールされます。
インストール先を変えるには<tt>configure</tt><tt><a href="#libdir">--libdir</a></tt>オプションを使用します。
<p>
<p>Both libraries are by default installed in <tt>/usr/local/lib</tt>. To change the installation location, use <tt>configure</tt> with the <tt><a href="#libdir">--libdir</a></tt> option.<p>
<dt>ヘッダファイル
<dd>libmdn のヘッダファイルがインストールされます。
デフォルトでは <tt>/usr/local/include</tt> の下に <tt>mdn</tt> というディレクトリが作られ、その下にインストールされます。
インストール先を変えるには、<tt>configure</tt><tt><a href="#includedir">--includedir</a></tt> オプションを使用します。
<p><dt>Header file
<dd>Installs the libmdn header file.
This file is by fault installed in the <tt>mdn</tt> directory under <tt>/usr/local/include</tt>.
To change the installation location, use the <tt><a href="#includedir">--includedir</a></tt> option in <tt>configure</tt>.
</dl>
<p>
<hr>
<h2><a name="bind9">bind9 用パッチの適用とインストール</a></h2>
<h2><a name="bind9">Applying and Installing the bind9 Patch</a></h2>
<p>展開したソースの中の<tt>$MDNTOP/patch/bind9/bind-9.0.0-patch</tt> がBIND 9.0.0 に多言語ドメイン名の処理機能を付加するパッチです。
パッチの当て方はこのファイルの先頭にも書いてありますが、簡単に紹介すると、次のようになります。
<p><tt>$MDNTOP/patch/bind9/bind-9.0.0-patch</tt> in extracted source is the patch that adds multilingual domain name processing functionality to BIND 9.0.0.
Information on how to apply the patch is appended to the beginning of the file, but the following is a brief description.<p>
<ol>
<li>BIND 9.0.0 のソースのトップディレクトリ(<tt>README</tt> というファイルがあるディレクトリです) に移動します。
<p>Move to the BIND 9.0.0 source top directory (the directory that contains the <tt>README</tt> file).
<blockquote>
<pre>
% <kbd>cd /somewhere/.../bind-9.0.0</kbd>
</pre>
</blockquote>
<li><tt>patch</tt> コマンドを使用してソースにパッチを当てます。
<p>Use the <tt>patch</tt> command to apply the patch to the source.
<blockquote>
<pre>
% <kbd>patch -p0 &lt; $MDNTOP/patch/bind9/bind-9.0.0-patch</kbd>
</pre>
</blockquote>
</ol>
<p>パッチを当てると、トップディレクトリに <tt>README.mdnkit</tt> というファイルが作られます。コンパイルの前にこのファイルを読んでください。
<p>When the patch is applied a <tt>README.mdnkit</tt> file is created in the top directory. Read this file before compilation.<p>
<p>そのあとコンパイルとインストールを行います。方法は <tt>README.mdnkit</tt>
に書かれています。このファイルにも書かれていますが、<tt>configure</tt> コマンドの実行時に<tt>--with-mdn</tt> オプションをつけることを忘れないでください。
このオプションをつけないと多言語ドメイン名の処理機能は付加されません。
<p>After this perform compilation and installation. Refer to <tt>README.mdnkit</tt> for instructions. As stated in this file, be sure to add the <tt>--with-mdn</tt> option when executing the <tt>configure</tt> command. Unless this option is added, capability to process multilingual domain names will not be added.
<blockquote>
<pre>
% ./configure --with-mdn
</pre>
</blockquote>
<p>bind9 用のパッチは mDNkit の本体 (特にライブラリとヘッダファイル) がすでにインストールされていることを前提としています。したがって、この作業はmDNkit 本体のインストール終了後に実行してください。
<p>The bind9 patch assumes that the major portion of the mDNkit (especially, the library and header file) is already installed. Consequently, this operation should be performed after the mDNkit has been installed.
<p>
<hr>
<h2><a name="bind">bind8 用パッチの適用とインストール</a></h2>
<h2><a name="bind">Adding and Installing the bind8 patch</a></h2>
<p>展開したソースの中の<tt>$MDNTOP/patch/bind8/bind-8.2.2-P7-patch</tt> がBIND 8.2.2-P7 に対する 8ビットスルーパッチ、また<tt>$MDNTOP/patch/bind8/bind-8.2.3-T6B-patch</tt> がBIND 8.2.3-T6B に対する 8ビットスルーパッチです。
パッチの当て方はこれらのファイルの先頭にも書いてありますが、簡単に紹介すると、次のようになります。
<p>The <tt>$MDNTOP/patch/bind8/bind-8.2.2-P7-patch</tt> in the extracted source is the 8-bit through patch for BIND 8.2.2-P7 and the <tt>$MDNTOP/patch/bind8/bind-8.2.3-T6B-patch</tt> is the 8-bit through patch for BIND 8.2.3-T6B.
Information on how to apply the patch is appended to the beginning of the file, but the following is a brief description.
<ol>
<li>BIND 8.2.2-P7 あるいは BIND 8.2.3-T6B のソースのトップディレクトリ(<tt>src</tt> というサブディレクトリがあるディレクトリです) に移動します。
<p>Move to the top directory of the BIND 8.2.2-P7 or BIND 8.2.3-T6B source (the directory containing the <tt>src</tt> subdirectory).
<blockquote>
<pre>
% <kbd>cd /somewhere/.../bind-8.2.2-P7</kbd>
</pre>
</blockquote>
<li><tt>patch</tt> コマンドを使用してソースにパッチを当てます。
<p>Use the <tt>patch</tt> command to apply the patch to the source.
<blockquote>
<pre>
% <kbd>patch -p0 &lt; $MDNTOP/patch/bind8/bind-8.2.2-P7-patch</kbd>
</pre>
</blockquote>
</ol>
<p>パッチを当てたら、あとは通常の BIND のインストール方法にしたがってコンパイルとインストールを行ってください。インストール方法は BIND のソース中の <tt>src/INSTALL</tt> に書かれています。
<p>When the patch has been applied, perform compilation and installation according to the standard BIND installation procedure. Refer to <tt>src/INSTALL</tt> for installation instructions.
<p>bind8 用のパッチは BIND を単に 8ビットスルーにするだけで、mDNkit のライブラリ等は使用しません。したがって mDNkit 本体とは独立にコンパイルおよびインストールすることができます。
<p>
<p>The bind8 patch only makes BIND 8-bit through and does not use the mDNkit library. Thus it can be compiled and installed separately from the mDNkit.
<hr>
<h2><a name="squid">squid 用パッチの適用とインストール</a></h2>
<h2><a name="squid">Applying and Installing the squid Patch</a></h2>
<p>展開したソースの中の <tt>$MDNTOP/patch/squid/squid-2.3.STABLE3-patch</tt> がSquid 2.3.STABLE3 に対する 8ビットスルーパッチです。
パッチの当て方はこのファイルの先頭にも書いてありますが、簡単に紹介すると、次のようになります。
<p>The <tt>$MDNTOP/patch/squid/squid-2.3.STABLE3-patch</tt> in the extracted source is the 8-bit through patch for Squid 2.3.STABLE3.
Information on how to apply the patch is appended to the beginning of the file, but the following is a brief description.
<ol>
<li>Squid 2.3.STABLE3 のソースのトップディレクトリ (<tt>README</tt>ファイルがあるディレクトリです) に移動します。
<p>Move to the top directory of Squid 2.3.STABLE3 source (the directory containing the <tt>README</tt> file).
<blockquote>
<pre>
% <kbd>cd /somewhere/.../squid-2.3.STABLE3</kbd>
</pre>
</blockquote>
<li><tt>patch</tt> コマンドを使用してソースにパッチを当てます。
<p>Use the <tt>patch</tt> command to apply the patch to the source.
<blockquote>
<pre>
% <kbd>patch -p1 &lt; $MDNTOP/patch/squid/squid-2.3.STABLE3-patch</kbd>
</pre>
</blockquote>
</ol>
<p>パッチを当てたら、あとは通常の Squid のインストール方法にしたがってコンパイルとインストールを行ってください。インストール方法はSquid のソースに含まれる <tt>INSTALL</tt> ファイルに書かれています。
<p>When the patch has been applied, perform compilation and installation according to the standard Squid install procedure. Refer to <tt>INSTALL</tt> in the Squid source for installation instructions.
<p>Squid 用のパッチも bind8 用のパッチと同様単に 8ビットスルーにするだけで、mDNkit のライブラリ等は使用しません。
したがって mDNkit 本体とは独立にコンパイルおよびインストールすることができます。<p>Both the Squid and the bind8 patches only add 8-bit through capability and does not use any mDNkit library or other function.
Thus they can be compiled and installed independently from the mDNkit.
</body>
</html>

View file

@ -1,389 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: proxyconfig.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>Configuring DNS Proxy Server</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1><a name="proxyconfig">DNS Proxy Server のコンフィギュレーション</a></h1>
<h1><a name="proxyconfig">Configuring DNS Proxy Server<a></h1>
<p>
DNS Proxy Server <b>dnsproxy</b>を使うには、いくつかの情報を設定する必要があります。ここでは、これらの情報の設定方法と意味とを説明します。
<p>
A number of data items have to be set up to allow use of <b>dnsproxy</b>, the DNS Proxy Server. This draft describes the procedure for setup, and its significance.
<ul>
<li><a href="#config-file">コンフィギュレーションファイル</a>
<li><a href="#config-file">Configuration file</a>
<li><a href="#config-data">コンフィギュレーションデータ</a>
<li><a href="#config-data">Configuration data</a>
<ul>
<ul>
<li><a href="#listen">listen</a>
<li><a href="#forward">forward</a>
<li><a href="#log-file">log-file</a>
<li><a href="#log-level">log-level</a>
<li><a href="#client-translation">client-translation</a>
<li><a href="#alternate-encoding">alternate-encoding</a>
<li><a href="#normalize">normalize</a>
<li><a href="#server-translation">server-translation</a>
<li><a href="#user-id">user-id</a>
<li><a href="#group-id">group-id</a>
<li><a href="#root-directory">root-directory</a>
</ul>
</ul>
<hr>
<h2><a name="config-file">コンフィギュレーションファイル</a></h2>
<h2><a name="config-file">Configuration File</a></h2>
<hr>
<p>
設定情報はコンフィギュレーションファイルに記載されます。コンフィギュレーションファイルは、<b>dnsproxy</b>の起動時にコマンドラインで指示することができます。
<p>
The setup data can be found in the configuration file. The configuration file can be specified on the command line when <b>dnsproxy</b> starts up.
<blockquote>
<pre>
% <kbd>dnsproxy -config &lt;config-file&gt;</kbd>
</pre>
</blockquote>
コマンドラインで指示しなかった場合にはデフォルトのコンフィギュレーションファイルが使用されます。
デフォルトのコンフィギュレーションファイルは、ディレクトリ
When not specified on the command line, the default configuration file can be used. The default configuration file is found under the following directory.
<pre>
/usr/local/etc
</pre>
の下の
<pre>
dnsproxy.conf
</pre>
です。ディレクトリは、mDNkit作成時に
<pre>
configure --sysconfdir=DIR
</pre>
This directory can be specified when the mDNkit is generated.
<pre>
configure --sysconfdir=DIR
</pre>
で指示することもできます。
詳しくは、インストールガイドの
<a href="install.html#sysconfdir">configure 実行</a>
ところをご覧ください。
</pre>
For details, refer to the installation guide:
<a href="install.html#sysconfdir">Configure and implement</a>
<hr>
<h2><a name="config-data">コンフィギュレーションデータ</a></h2>
<p>
<hr>
<h2><a name="config-data">Configuration Data</a></h2>
<p>
コンフィギュレーションファイルはテキストファイルで、以下のコンフィギュレーションデータを指定します。
<p>
The configuration file is a text file and specifies the following configuration data.
<dl>
<dt><a name="listen">listen</a><dd>
<p>
dnsproxyがクライアントからの要求を受付けるネットワークアドレス、ポート番号を指定します。
<p>
Specifies the network address and port number dnsproxy needs in order to receive client queries.
<pre>
listen &lt;address&gt;
</pre>
&lt;address&gt;は以下のいずれかの形式で指示します。<br>
&lt;address&gt; specifies one of the following formats.
<blockquote>
<table>
<tr><td>&lt;IP address&gt;:&lt;port number&gt;</td></tr>
<tr><td>:&lt;port number&gt;</td></tr>
<tr><td>&lt;IP address&gt;</td></tr>
</table>
</blockquote>
省略された場合には
<br>
When these settings are omitted, the following settings are used.
<blockquote>
<table>
<tr><td>IP address</td><td>0.0.0.0</td><td># INADDR_ANY</td></tr>
<tr><td>port number</td><td>53</td></tr>
</table>
</blockquote>
が使用されます。
<br>
<p>
dnsproxy経由でDNSサーバを使用するクライアントは、ここで指示したアドレス、ポートをDNSサーバとして設定します。
クライアント側ではポート番号を変更できないものが多いのでポート番号はデフォルトの53をそのまま使った方がよいでしょう。
<p>
<p>
Clients that use a DNS server via dnsproxy will set up the address and port of the DNS server here.
Because most clients cannot usually change the port number, it is best to use default port number 53.
<p>
<dt><a name="forward">forward</a><dd>
<p>
dnsproxyが、DNS要求を転送し、応答を受け取る本来のDNSサーバのネットワークアドレス、ポート番号を指定します。
<p>
dnsproxy transfers DNS queries and specifies the network address and port number of the DNS server that is to receive the response.
<pre>
forward &lt;address&gt; [ bind4compat ]
</pre>
&lt;address&gt;の形式は上の<a href="#listen">listen</a>のものと同じです。
&lt;address&gt;The address format is the same as that of <a href="#listen"> listen</a> above.
<p>
オプションの <b>bind4compat</b>が指示された場合には、UDPでリクエストを転送する時に、ソースアドレスとして、listenで指示されたアドレス/ポートを使用します。
これはbind4にある機能で、UDPポートについてのアクセス制限下で運用することを想定したものです。このオプションが指示されなかった場合には、1024以上のソースポートが使用されます。
<p>
<p>
When the option <b>bind4compat</b> is specified, the address and port specified by listen is used as the source address when a request is transferred using UDP.
This is a bind4 function and assumes that UDP port access is limited. A source port greater than 1024 is used when this option is not specified.
<p>
<dt><a name="log-file">log-file</a><dd>
<p>
dnsproxyが実行ログを出力するファイル名を指定します。
<p>
Specifies the name of the file that contains the execution log output by dnsproxy.
<pre>
log-file &lt;path&gt;
</pre>
ログファイル名は、以下のコマンドラインオプションで指定することもできます。
両方指定した場合にはコマンドラインオプションの指定のほうが優先されます。
<pre>
</pre>
The log file name can also be specified using the following command line option.
When both are entered, the command line option takes precedence.
<pre>
dnsproxy -logfile &lt;address&gt;
</pre>
指定されなかった場合には、
<pre>
</pre>
When not specified,
<pre>
/tmp/dnsproxy.log
</pre>
に書き込まれます。
<p>
</pre>
is written.
<p>
なお、実行ログは常に追記されていきますので、適当な時を見計らって消すことをお勧めします。
<p>
Note that the execution log is added to continuously and should be deleted from time to time.
<p>
また、dnsproxy にハングアップシグナル (SIGHUP) を送るといったんログファイルを閉じて、再度オープンするようになっています。ログファイルをアーカイブする場合に便利な機能です。
<p>
<p>
When a hangup signal (SIGHUP) is sent to dnsproxy, it temporarily closes the log file and then reopens it. This is a convenient command when the log file is to be archived.
<p>
<dt><a name="log-level">log-level</a><dd>
<p>
ログのレベルを設定します。
<p>
Specifies the log level.
<pre>
log-level &lt;level&gt;
</pre>
レベルとして指定できる値は次の通りです。
<blockquote>
</pre>
The following log level values can be specified.
<blockquote>
<dl>
<dt>none<dd>一切ログを記録しません。ログがないと不具合が生じた場合の
原因解明が難しくなりますので、できればこのレベルは指定しないでください。
<dt>none<dd> No log is recorded. The absence of a log file makes it very difficult to identify the cause of a problem. If possible do not use this level.
<dt>fatal<dd>致命的なエラーが生じたときにのみログを出力します。
<dt>fatal<dd>Outputs a log only when a fatal error occurs.
<dt>warn<dd>警告メッセージにもログに記録します。これがログレベルを
指定しなかったときのデフォルトです。
<dt>warn<dd>Records warning messages in the log. This is the default used when no log level is specified.
<dt>trace<dd>実行トレースメッセージもログに出力します。
このレベルを指定すると dnsproxy の動作がかなり詳細に記録されるので障害が発生した場合の原因究明には便利ですが、大量のログが出力されるので普段は指定しない方がよいでしょう。
<dt>trace<dd>Outputs execution trace messages in the log.
This level provides a detailed record of dnsproxy operation, which is helpful in determining the cause of a problem. As it records a large amount of data, it is best not used during normal operation.
</dl>
</blockquote>
<p>
<dt><a name="client-translation">client-translation</a><dd>
<p>
クライアント側でのドメイン名のエンコーディングを指示します。
<br>
Specifies the domain name encoding to be used on the client side.
<pre>
client-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
多言語ドメイン名に対応していないクライアントの場合には、通常、クライアントのローカルエンコーディングになっています。そのような場合には
<br>
For clients that do not support multilingual domain names, the local encoding of the client is normally used. In such a case, the following format is used without &lt;ZLD&gt;.
<pre>
client-translation . Shift_JIS
</pre>
という形で、&lt;ZLD&gt;無しで指示します。
<p>
<p>
多言語ドメイン名の手法によっては、クライアント側で多言語ドメイン名を通常のDNSでも受付けられる形式にエンコードして、それを通常のドメイン名と区別するために ZLD (Zero Level Domain) を付加するものがあります。そのような場合には、付加されるZLDとその時のドメイン名のエンコーディング方法とを対応付けることにより、他の多言語ドメイン名手法のDNSサーバを利用することができるようになります。
<p>
Some multilingual domain name schemes encode multilingual domain names in the client into a format that normal DNS can accept, and adds ZLD (Zero Level Domain) to distinguish it from regular domain names. Since the added ZLD and the domain name encoding scheme are interrelated, they can also be used with DNS servers using a different multilingual domain name scheme.
<pre>
client-translation .i-dns.net UTF-5
</pre>
クライアント側のドメイン名のエンコーディングは、ZLD が異なっていれば、複数指定することができます。
<p>
Multiple domain name encoding schemes can be used in a client if each scheme has its own unique \ZLDs.
<p>
なお、mDNkit のデフォルトの設定では ZLD の指定はできないようになっています。ZLD を使用するためには、mDNkit のコンパイルの際、<tt>configure</tt> コマンドに <a href="install.html#enable-zld"><tt>--enable-zld</tt></a>を指定する必要があります。この指定をせずに mDNkit をコンパイルした場合には、ZLD の指定はすべて無視されます。
<p>
Note that ZLD cannot be specified in the default setting of mDNkit. To use a ZLD, <a href="install.html#enable-zld"><tt>--enable-zld</tt></a> must be specifed using the <tt>configure</tt> command when mDNkit is compiled.
All ZLD settings are ignored unless this specification is made when mDNkit is compiled.
<p>
クライアントから送られてきたDNS要求のドメイン名は、ここで指示したエンコーディングから、内部的に使用されるUTF-8エンコーディングに変換されます。
そして、後述の正規化、サーバ側エンコーディングへの変換が行なわれてDNSサーバに送出されます。また、DNSサーバからの応答は、逆に元のエンコデーィングに戻されてクライアントに返されます。
<p>
The encoding of domain names in the DNS query sent by the client is converted to UTF-8 encoding that is used internally.
Then normalization (described below) and conversion to server side encoding are performed after which the data is sent to the DNS server. The response from the DNS server is converted back to the original encoding and returned to the client.
<p>
ここで指定可能なエンコーディング名は、mDNkit付属のlibmdnおよび使用するiconv ライブラリに依存します。
iconv ライブラリによって、エンコーディング名が異なっていることがありますので、ライブラリのマニュアルをご覧になって使用可能なエンコーディング名を確認してください。
<p>
The encoding names that can be used here depend on libmdn and iconv, mDNkit libraries.
Since the encoding name used differs with the iconv library that is employed, check the library manual to confirm the encoding names that can be used. In addition to the enconding provided by iconv, libdmn supports the following encoding schemes recommended for multilingual DNS.
<blockquote>
<table>
<tr><td>UTF-5</td>
<td><a href="../../reference/draft/draft-jseng-utf5-01.txt">draft-jseng-utf5-01.txt</a></td>
</tr>
<tr><td>RACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-race-02.txt">draft-ietf-idn-race-02.txt</a></td>
</tr>
<tr><td>BRACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-brace-00.txt">draft-ietf-idn-brace-00.txt</a></td>
</tr>
<tr><td>LACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-lace-00.txt">draft-ietf-idn-lace-00.txt</a></td>
</tr>
</table>
</blockquote>
をサポートしています。
<p>
<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
<p>DNS サーバから返されたドメイン名がクライアントのローカルエンコーディングに変換できない文字を含んでいた場合に、ローカルエンコーディングの代わりに使用するエンコーディングを指定します。
<p>Specifies the encoding to be used in place of local encoding when the domain name returned by the DNS server contains characters that cannot be converted to the local encoding of the client.
<pre>
alternate-encoding &lt;Encoding&gt;
</pre>
指定するエンコーディングは必ず「ASCII互換エンコーディング (ACE)」と呼ばれる、変換結果が従来のドメイン名として使用可能な文字 (英数字およびハイフン) だけからなるエンコーディングでなければなりません。たとえば ASCII 互換エンコーディングの一つである RACE を指定する場合には次のように指定します。
<P>The specified encoding must be ASCII compatible encoding (ACE) so that the result of conversion is in an encoding that contains only characters that can be used in traditional domain names (alphanumerics and hyphens). For example, this is how to specify RACE, one of the ASCII compatible encoding schemes.
<pre>
alternate-encoding RACE
</pre>
<p>
<dt><a name="normalize">normalize</a><dd>
<p>
ドメイン名の正規化手法を指定します。
<p>
Specifies the normalization scheme to be used for domain names.
<pre>
normalize &lt;scheme&gt; ...
</pre>
正規化手法は複数指定可能で、左側から順に適用されていきます。
<p>
A number of normalization schemes can be indicated, and they will be used in order from left to right.
<p>
クライアントから送られてきたDNS要求のドメイン名は、内部的に使用されるUTF-8エンコーディングに変換された上で、ここで指示した正規化が適用されます。
使用可能な正規化手法はmDNkitに含まれるlibmdnに依存しています。
どのような正規化手法があるかは、<a href="../spec/library.html">libmdnのマニュアル</a><a href="../spec/library.html#normalizer">normalizer モジュール</a>に記載されています。
<p>
When the domain name in the DNS query sent by the client has been converted to UTF-8 encoding for internal use, they are normalized according to the normalization scheme specified here.
The normalization schemes that can be used depends on the libmdn in the mDNkit.
Available normalization schemes are described in the <a href="../spec/library.html#normalizer">Normalizer Module</a> in <a href="../spec/library.html">the libmdn manual</a>.
<p>
<dt><a name="server-translation">server-translation</a><dd>
<p>
DNSサーバ側のドメイン名エンコーディング方法を指示します。
<p>
Specifies domain name encoding schemes to be used on the DNS server side.
<pre>
server-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
<p>ZLDが不要なエンコーディングであれば、省略値として'.'を指示します。
<p>Specifies '.' as the default when ZLD is not necessary.
<pre>
server-translation . UTF-8
</pre>
ZLDを必要するエンコーディングでは、ZLDとエンコーディング名の両方を指定します。
<pre>
</pre>
When ZLD is required, specify both ZLD and the encoding name.
<pre>
server-translation .i-dns.net UTF-5
</pre>
指定可能なエンコーディングは、前出のclient-translationでのものと同じです。
<p>
</pre>
The encoding that can be specified is the same as for client-translation above.
<p>
<dt><a name="user-id">user-id</a>
<dd>
<p>dnsproxy が動作するユーザを指定します。
<p>Specifies user that uses dnsproxy.
<pre>
user-id &lt;user&gt;
</pre>
<p>通常、dnsproxy は特権ポートを使用するためルート権限で起動させる必要がありますが、ルート権限のままで動作させるのはセキュリティ上好ましくありません。この指定により、dnsproxy は特権ポートを作成したあとサービスを開始する前に指定したユーザの権限で動くようになります。
<p>Normally, dnsproxy must be started up with root permission to use a privileged port, but continued use of root permission is not recommended for security reasons. With this specification, dnsproxy runs under the user's control with a privileged port before start of service.
<p>&lt;user&gt; にはユーザ名あるいはユーザ ID 番号を指定することができます。
<p>
<p>&lt;user&gt; allows you to specify user name or user ID number.
<p>
<dt><a name="group-id">group-id</a>
<dd>
<p>dnsproxy が動作するグループを指定します。
<pre>
<p>Specifies group that uses dnsproxy.
<pre>
group-id &lt;user&gt;
</pre>
<p>
これは <tt>user-id</tt> エントリと似ていますが、ユーザの代わりにグループを指定する点が異なります。
<p>
This resembles the <tt>user-id</tt> entry, but differs from it in that it specifies a group in place of the user.
<p>&lt;group&gt; にはグループ名あるいはグループ ID 番号を指定することができます。
<p>&lt;group&gt; can be specified by a group name or group ID number.
<p>
<dt><a name="root-directory">root-directory</a>
<dd>
<p>dnsproxy が動作する際のルートディレクトリを指定します。
<p>Specifies the root directory used with dnsproxy.
<pre>
root-directory &lt;path&gt;
</pre>
<p>これもセキュリティ対策の一つです。dnsproxy が動作する際のルートディレクトリ
を指定することで、そのディレクトリの外にはアクセスできないようにします。
この指定により、dnsproxy はサービスを開始する前に、<em>chroot()</em>システムコールを用いて指定したディレクトリをルートディレクトリとして設定します。
<p>This, also, is a security measure. By specifying the root directory used with dnsproxy access cannot be made outside of this directory.
This specification causes dnsproxy to use <em>chroot()</em> system calls to set the specified directory as the root directory before starting service.
<p>&lt;path&gt; にはルートとして設定したいディレクトリ名を指定します。
<p>&lt;path&gt; specifies the name of the directory to be used as the root.
</dl>
</body>
</html>

View file

@ -1,194 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: reference.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>mDNkit reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>参考文献</h1>
<h1>Reference Documentation</h1>
<p>多言語ドメイン名の方式の提案、関連 RFC、ソフトウェア等、mDNkit に関連する参考文献のリストです。
<p>Lists of references for recommended multilingual domain name schemes, related RFCs, software and mDNkit.
<ul>
<li><a href="#jpnic">JPNIC</a>
<li><a href="#rfc">RFCs</a>
<li><a href="#draft">インターネットドラフト</a>
<li><a href="#draft">Internet drafts</a>
<li><a href="#otherpaper">その他文書</a>
<li><a href="#otherpaper">Other documents</a>
<li><a href="#software">ソフトウェア</a>
<li><a href="#software">Software</a>
</ul>
<p>JPNIC の多言語ドメイン名に関する技術解説のページにある<a href="http://www.nic.ad.jp/jp/research/idn/reference/index.html">関連資料</a>も合わせてご覧ください。
<p>Also refer to <a href="http://www.nic.ad.jp/jp/research/idn/reference/index.html">Related documents</a> on the page that describes the technology behind JPNIC multilingual domain names.
<p>&nbsp;<p>
<hr>
<h2><a name="jpnic">JPNIC</a></h2>
<dl>
<dt><a href="http://www.nic.ad.jp/jp/research/idn/">多言語ドメイン名に関する技術解説</a>
<dt><a href="http://www.nic.ad.jp/jp/research/idn/">Description of Multilingual Domain Name Technology</a>
<dd><b>mDNkit</b> など、JPNIC の多言語ドメイン名に関する活動を紹介したページ。
</dl>
<dd>A Web page that introduces the <b>mDNkit</b> and other JPNIC multilingual domain name activities.
</dl>
<p>&nbsp;<p>
<h2><a name="rfc">RFCs</a></h2>
<dl>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc1034.txt">DOMAIN NAMES - CONCEPTS AND FACILITIES</a> (RFC1034)
<dd>DNS の概要を示した RFC。<p>
<dd>RFC providing an overview of DNS.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc1035.txt">DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION</a> (RFC1035)
<dd>DNS プロトコルを規定した RFC。<p>
<dd>RFC prescribing DNS protocols.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc1642.txt">UTF-7, A Mail-Safe Transformation Format of Unicode</a> (RFC1642)
<dd>Unicode/ISO10646 のエンコード方法の一つである UTF-7 について解説したRFC。<p>
<dd>RFC describing UTF-7, a Unicode/ISO10646 encoding scheme.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2044.txt">UTF-8, a transformation format of Unicode and ISO 10646</a> (RFC2044)
<dd>Unicode/ISO10646 のエンコード方法の一つである UTF-8 について解説した
RFC。<p>
<dd>RFC describing UTF-8, a Unicode/ISO10646 encoding scheme.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2130.txt">The Report of the IAB Character Set Workshop held 29 February - 1 March, 1996</a> (RFC2130)
<dd>インターネット上でのキャラクタセットの仕様に関するワークショップの レポート。<p>
<dd>Report on workshop regarding character set specifications to be used on the Internet.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2277.txt">IETF Policy on Character Sets and Languages</a> (RFC2277)
<dd>インターネット上でのキャラクタセットおよび言語の指定に関する IETFの方針を示した RFC。<p>
<dd>RFC describing IETF policy on character sets and language specifications on the Internet.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2671.txt">Extension Mechanisms for DNS (EDNS0)</a> (RFC2671)
<dd>DNS プロトコルの拡張方式である EDNS0 を定義した RFC。<p>
<dd>RFC defining EDNSO, an extension mechanism for DNS protocols.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2781.txt">UTF-16, an encoding of ISO 10646</a> (RFC2781)
<dd>Unicode/ISO10646 のエンコード方法の一つである UTF-16 について解説した
RFC。<p>
<dd>RFC describing UTF-16, a Unicode/ISO10646 encoding scheme.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2825.txt">A Tangled Web: issues of I18N, domain names, and the other Internet protocols</a> (RFC2825)
<dd>ドメイン名やプロトコルの多言語化に関する問題等を示した文書。<p>
<dd>Document describing problems related to multilingualization of domain names and protocols.<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2826.txt">IAB Technical Comment on the Unique DNS Root</a> (RFC2826)
<dd>DNS のルートのユニーク性に関する文書。
<dd>Document on unique DNS routes.
</dl>
<p>&nbsp;<p>
<h2><a name="draft">インターネットドラフト</a></h2>
<h2><a name="draft">Internet Drafts</a></h2>
<dl>
<dt><a href="../../reference/draft/draft-ietf-idn-requirements-03.txt">draft-ietf-idn-requirements-03.txt</a>
<dd>IETF の IDN ワーキンググループによる、多言語ドメイン名に関する各種の要件 (requirement) をまとめた文書。<p>
<dd>Document on various requirements regarding multilingual domain names compiled by the IETF IDN working group.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-compare-01.txt">draft-ietf-idn-compare-01.txt</a>
<dd>IETF の IDN ワーキンググループによる、現在提案されているいくつかの方式の比較文書。<p>
<dd>Comparison of currently suggested systems by the IETF IDN working group<p>
<dt><a href="../../reference/draft/draft-ietf-idn-race-02.txt">draft-ietf-idn-race-02.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 RACE のプロポーザル。<p>
<dd>Proposal for multilingual domain name encoding scheme RACE.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-sace-00.txt">draft-ietf-idn-sace-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 SACE のプロポーザル。
mDNkit では現在のところサポートされていない。<p>
<dd>Proposal for multilingual domain name encoding scheme SACE.
mDNkit does not currently support it.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-brace-00.txt">draft-ietf-idn-brace-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 BRACE のプロポーザル。<p>
<dd>Proposal for multilingual domain name encoding scheme BRACE.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-lace-00.txt">draft-ietf-idn-lace-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 LACE のプロポーザル。<p>
<dd>Proposal for multilingual domain name encoding scheme LACE.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-utf6-00.txt">draft-ietf-idn-utf6-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 UTF-6 のプロポーザル。
mDNkit では現在のところサポートされていない。<p>
<dd>Proposal for multilingual domain name encoding scheme UTF-6.
mDNkit does not currently support it.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-dude-00.txt">draft-ietf-idn-dude-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 DUDE のプロポーザル。
mDNkit では現在のところサポートされていない。<p>
<dd>Proposal for multilingual domain name encoding scheme DUDE.
mDNkit does not currently support it.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-idne-01.txt">draft-ietf-idn-idne-01.txt</a>
<dd>多言語ドメイン名の実現方式のプロポーザル。EDNS0 を利用し、ドメイン名の エンコーディングには UTF-8 を使用する。<p>
<dd>Proposal for methods of implementing multilingual domain names. This system utilizes EDNS0 and UTF-8 for encoding domain names.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-idnra-00.txt">draft-ietf-idn-idnra-00.txt</a>
<dd>多言語ドメイン名の処理方式のプロポーザル。アプリケーション、リゾルバ、
DNS サーバのインタフェースについて述べられている。<p>
<dd>Proposal for processing multilingual domain names. It describes applications, resolvers and DNS server interfaces.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-nameprep-00.txt">draft-ietf-idn-nameprep-00.txt</a>
<dd>多言語ドメイン名の前処理 (正規化等) のプロポーザル。<p>
<dd>Proposal for preprocessing (normalization, etc.) to be used for multilingual domain names.<p>
<dt><a href="../../reference/draft/draft-jseng-utf5-01.txt">draft-jseng-utf5-01.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 UTF-5 のプロポーザル。<p>
<dd>Proposal for UTF-5 multilingual domain name encoding scheme.<p>
<dt><a href="../../reference/draft/draft-ietf-idn-udns-01.txt">draft-ietf-idn-udns-01.txt</a>
<dd>多言語ドメイン名の実現方式 (DNS プロトコルの変更、エンコーディングなど) のプロポーザル。ドメイン名のエンコーディングには基本的にUTF-8 を使用する。<p>
<dd>Proposal for a multilingual domain name implementation system (DNS protocol changes, encoding, etc.). Basically, UTF-8 will be used for domain name encoding.<p>
<dt><a href="../../reference/draft/draft-skwan-utf8-dns-04.txt">draft-skwan-utf8-dns-04.txt</a>
<dd>多言語ドメイン名の実現方式のプロポーザル。ドメイン名のエンコーディングには UTF-8 を使用する。<p>
<dd>Proposal for a multilingual domain name implementation system. UTF-8 will be used for domain name encoding.<p>
<dt><a href="../../reference/draft/draft-duerst-dns-i18n-02.txt">draft-duerst-dns-i18n-02.txt</a>
<dd>多言語ドメイン名の実現方式に関する考察とプロポーザル。
ZLD (zero level domain) の導入など。<p>
<dd>Proposal and review of methods for implementing multilingual domain names.
Introduction of ZLD (zero level domain)<p>
<dt><a href="../../reference/draft/draft-duerst-i18n-norm-04.txt">draft-duerst-i18n-norm-04.txt</a>
<dd>多言語ドメイン名の正規化の方式としていくつかの提案で参照されているUnicode Normalization Form C についての文書。
<dd>Document on Unicode Normalization Form C referred to as one normalization scheme for multilingual domain name in many drafts.
</dl>
<p>&nbsp;<p>
<h2><a name="otherpaper">その他文書</a></h2>
<dl>
<dt><a href="http://www.unicode.org/unicode/reports/tr15">Unicode Normalization Forms</a>
<dd>Unicode 文字列の正規化方式である Unicode Normalization Forms を定義した文書。Form C、Form D、Form KC、Form KD について書かれている。<p>
<dd>Document defining Unicode Normalization Forms, a Unicode character string normalization scheme. It deals with Form C, D, KC and KD.<p>
<dt><a href="http://www.unicode.org/unicode/reports/tr21">Case Mappings</a>
<dd>Unicode 文字列の大文字小文字の変換方法や大文字小文字の区別をしない比較の方法について述べた文書。<p>
<dd>Document that examines methods of converting Unicode upper-case and lower-case characters, as well as comparison methods that do not distinguish between upper-case and lower-case characters.<p>
<dt><a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt">UnicodeData.txt</a>
<dd>Unicode の文字属性を記述したデータファイル。上記Unicode Normalization Forms などで使われる。<p>
<dd>Data file recording Unicode character attributes. It is used in the Unicode Normalization Forms described above.<p>
<dt><a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.html">UnicodeData File Format</a>
<dd>上記 UnicodeData.txt のファイルフォーマットを記述した文書。
<dd>Document recording file formats for UnicodeData.txt described above.
</dl>
<p>&nbsp;<p>
<h2><a name="software">ソフトウェア</a></h2>
<h2><a name="software">Software</a></h2>
<dl>
<dt><a href="http://www.isc.org/products/BIND/">ISC BIND</a>
<dd>DNS の実装である BIND 4.x, 8.x のページ<p>
<dd>Web page for BIND 4.x, 8.x, DNS implementations <p>
<dt><a href="http://www.isc.org/products/BIND/bind9.html">ISC BIND 9</a>
<dd>DNS の実装である BIND 9.x のページ<p>
<dd>Web page for BIND 9.x, a DNS implementation <p>
<dt><a href="http://www.squid-cache.org/">Squid Web Proxy Cache</a>
<dd>Web のキャッシュサーバである Squid のページ<p>
<dd>Web page for Squid, a Web cache server<p>
<dt><a href="http://clisp.cons.org/~haible/packages-libiconv.html">libiconv</a>
<dd>iconv のフリーな実装である libiconv のページ
<dd>Web page for libiconv, a free implementation of iconv
</dl>
</body>
</html>

View file

@ -1,328 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: resolvconfig.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>Configuring mDNkit resolver</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1><a name="resolvconfig">mDNkit リゾルバのコンフィギュレーション</a></h1>
<h1><a name="resolvconfig">mDNkit Resolver Configuration</a></h1>
<p>mDNkit が提供するツール、コマンドのうち、dnsproxy 以外のもの、つまり runmdn と mdnconv は共通の設定ファイルを参照します。
また bind9 パッチも同じ設定ファイルを参照します。
<p>runmdn and mdnconv, commands and tools that the mDNkit provides in addition to dnsproxy, reference the shared configuration file.
The bind9 patch also references the same configuration file.
<p>このファイルには mDNkit を利用したクライアントあるいはリゾルバが必要とするいくつかの情報を設定する必要があります。
例えば正規化の方式や DNS プロトコル上で用いられるドメイン名のエンコーディング方法などをこのファイルで指定します。
ここでは、これらの情報の設定方法と意味とを説明します。
<p>A number of data items that the client or resolver needs, in order to be able to use the mDNkit, must be entered in this file.
For example, the normalization scheme and the domain name encoding scheme in the DNS protocol are specified in this file.
The procedure for entering this data, and its significance, are described below.
<p>また、アプリケーションの使用するローカルエンコーディングはアプリケーションの動作するロケール情報から取得します。これについても合わせて説明します。
<p>The local encoding used by the application is acquired from the locale information of the application.
<ul>
<li><a href="#config-file">コンフィギュレーションファイル</a>
<li><a href="#config-file">Configuration file</a>
<li><a href="#config-data">コンフィギュレーションデータ</a>
<li><a href="#config-data">Configuration data</a>
<ul>
<li><a href="#server-encoding">server-encoding</a>
<li><a href="#server-zld">server-zld</a>
<li><a href="#normalize">normalize</a>
<li><a href="#alternate-encoding">alternate-encoding</a>
<li><a href="#alias-file">alias-file</a>
</ul>
<li><a href="#local-encoding">ローカルエンコーディングについて</a>
<li><a href="#local-encoding">Local Encoding</a>
</ul>
<hr>
<h2><a name="config-file">コンフィギュレーションファイル</a></h2>
<h2><a name="config-file">Configuration File</a></h2>
<p>
mDNkit の設定は、コンフィギュレーションファイルによって行われます。
mDNkit をデフォルトの設定でコンパイルした場合には、このコンフィギュレーションファイルのパス名はとなります。
<p>mDNkit is set up using the configuration file.
When mDNkit is compiled in the default setting, the path name of the configuration file becomes the following.
<blockquote>
<pre>
/usr/local/etc/mdnres.conf
</pre>
</blockquote>
ディレクトリ部分、つまり <tt>/usr/local/etc</tt> はmDNkit の設定時に<a href="install.html#sysconfdir">オプション</a>で変更が可能です。
<p>The directory, <tt>/usr/local/etc</tt>, can be changed using <a href="install.html#sysconfdir">option</a> when setting up the mDNkit.
<p>mDNkit をインストールすると、このファイルのサンプルファイルが(デフォルトの設定の場合) にインストールされます。
<p>When mDNkit is installed, a sample file of this file is installed (when the default setting is used).
<blockquote>
<pre>
/usr/local/etc/mdnres.conf.sample
</pre>
</blockquote>
このサンプルファイルには設定項目とその説明が書かれていますので、コンフィギュレーションファイル作成の参考にしてください。
<p>This sample file contains the setting items and their descriptions. Use this information as reference in generating the configuration file.
<p>
<hr>
<h2><a name="config-data">コンフィギュレーションデータ</a></h2>
<h2><a name="config-data">Configuration Data</a></h2>
<p>
コンフィギュレーションファイルは通常のテキストファイルで、以下のコンフィギュレーションデータを指定します。
<p>
The configuration file is a text file, and specifies the following configuration data.
<dl>
<dt><a name="server-encoding">server-encoding</a>
<dd>
DNS プロトコルが使用するエンコーディングを指定します。
<p>Specifies the encoding used by a DNS protocol.
<blockquote>
<tt>server-encoding </tt><em>encoding</em>
</blockquote>
<em>encoding</em> にエンコーディング名を指定します。
<em>encoding</em> specifies the encoding name.
<blockquote>
<dl>
<dt>[設定例]
<dt>[Setting example]
<dd>
<pre>
server-encoding RACE
server-encoding UTF-8
</pre>
</dl>
</blockquote>
なお、アプリケーション側のローカルエンコーディングはロケールによって決まるので、client-encoding というエントリはありません。
ローカルエンコーディングに関しては<a href="#local-encoding">後述</a>します。
<p>
The local encoding used by the application is determined by the locale so there are no client-encoding entries.
Local encoding is described in the Section <a href="#local-encoding">below</a>.
<dt><a name="server-zld">server-zld</a>
<dd>
ZLD を指定します。ZLD とは <em>Zero Level Domain</em> の略で、<tt>server-encoding</tt> に UTF-5 など特殊なエンコーディングを指定した場合に必要となります。ZLD については<a href="bindconfig.html">DNSサーバの設定</a><a href="bindconfig.html#zld">ZLD の指定</a>の記述が参考になるでしょう。
なお、mDNkit をデフォルトの設定でコンパイルした場合には ZLD は使えず、このエントリを指定しても無視されます。
ZLD が使えるように mDNkit をコンパイルする方法については<a href="install.html">インストール</a>ドキュメントの<a href="install.html#enable-zld"><tt>--enable-zld</tt></a> の項をご覧ください。
<dd>
Specifies ZLD. ZLD, which is short for <em>Zero Level Domain</em>, is required when UTF-5 or other special encoding is used in the <tt>server-encoding</tt>. Refer to <a href="bindconfig.html#zld">ZLD Settings</a> in <a href="bindconfig.html">DNS Server Setup</a> for information on ZLD.
Note that when mDNkit is compiled in the default setting that ZLD cannot be used and that this entry will be ignored.
Refer to the Section <a href="install.html#enable-zld"><tt>--enable-zld</tt></a>in the <a href="install.html">Install</a> for instructions on how to compile mDNkit so that ZLD can be used.
<blockquote>
<tt>server-zld </tt><em>ZLD</em>
</blockquote>
<em>ZLD</em> で使用する ZLD を指定します。<p>
<em>ZLD</em> is used to specify ZLD.
<blockquote>
<dl>
<dt>[設定例]
<dt>[Setting example]
<dd>
<pre>
server-zld zld.to.be.used
</pre>
</dl>
</blockquote>
<p>
<dt><a name="normalize">normalize</a>
<dd>
このエントリーでは正規化の方法を指定します。
2 つ以上の正規化の方法が指定された場合、順番通り (左から右に) 適用します。
<p>
This entry specifies the normalization scheme to be used.
When 2 or more normalization schemes are specified, this will apply in order from left to right.
<blockquote>
<tt>normalize </tt><em>scheme...</em>
</blockquote>
<em>scheme</em> で正規化の方式の名称を指定します。
<p>
<em>scheme</em> specifies the normalization scheme to be used.
<p>正規化の方式として以下のものが指定できます。
<p>The normalization schemes listed below can be specified.
<blockquote>
<table>
<tr><td><i>ascii-lowercase</i></td>
<td>ASCII の大文字を小文字に正規化<br>
Normalizes upper case ASCII as lower case</td></tr>
<tr><td><i>ascii-uppercase</i></td>
<td>ASCII の小文字を大文字に正規化<br>
Normalizes lower case ASCII as upper case</td></tr>
<tr><td><i>unicode-lowercase</i></td>
<td>Unicode の大文字を小文字に正規化<br>
Normalizes Unicode upper case as lower case</td></tr>
<tr><td><i>unicode-uppercase</i></td>
<td>Unicode の小文字を大文字に正規化<br>
Normalizes Unicode lower case as upper case</td></tr>
<tr><td><i>unicode-form-c</i></td>
<td>Unicode normalization form C</td></tr>
<tr><td><i>unicode-form-kc</i></td>
<td>Unicode normalization form KC</td></tr>
<tr><td><i>ja-kana-fullwidth</i></td>
<td>半角カナ文字を全角カナ文字に正規化<br>
Normalizes half-width kana as full-width kana</td></tr>
<tr><td><i>ja-alnum-halfwidth</i></td>
<td>全角英数字およびマイナス記号を半角文字に正規化<br>
Normalizes full-width alphanumerics and minus symbol as half-width characters</td></tr><tr><td><i>ja-compose-voiced-sound</i></td>
<td>全角ひらがなカタカナとそれに続く濁点半濁点を1文字にまとめる正規化<br>
Normalizes full-width hiragana, katakana with voicing and aspirating signs as one character.</td></tr>
<tr><td><i>ja-minus-hack</i></td>
<td>全角マイナス記号をハイフン ('-') に正規化<br>
Normalizes full-width minus symbol as a hyphen ('-').</td></tr>
<tr><td><i>ja-delimiter-hack</i></td>
<td>全角ピリオドおよび句点を半角のピリオド ('.') に正規化<br>
Normalizes full-width periods and punctuation marks as half-width period ('.').</td></tr>
</table>
</blockquote>
<blockquote>
<dl>
<dt>[設定例]
<dt>[Setting example]
<dd>
<pre>
normalize unicode-lowercase unicode-form-kc
</pre>
</dl>
</blockquote>
<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
このエントリーでは代替エンコーディングの形式を指定します。
代替エンコーディングとは、DNS プロトコル上のエンコーディングからアプリケーション側のローカルエンコーディングへの変換に失敗した時に、ローカルエンコーディングの代わりに使用されるエンコーディングです。
例えば日本語を扱うアプリケーションに DNS サーバから韓国のハングル文字を含むドメイン名が返された場合には、日本語のローカルエンコーディングに変換できないので、代わりにこの代替エンコーディングに変換された結果が渡されます。
<dd>
This entry determines the alternate encoding format.
Alternate encoding is used in place of local encoding when a conversion from DNS protocol encoding to the local encoding on the application side fails.
For example, when a domain name that includes Korean characters is returned from a DNS server to an application that handles Japanese. Since the domain name cannot be converted to Japanese local encoding, it is converted to alternate encoding before the result is passed to the application.
<blockquote>
<tt>alternate-encoding </tt><em>encoding</em>
</blockquote>
<em>encoding</em> に代替エンコーディングの名称を指定します。
Enter the name of the alternate encoding in <em>encoding</em>.
<p>
代替エンコーディングは、<a href="../spec/library.html#ACE">ASCII 互換エンコーディング</a>でなくてはなりません。
<p>
<p>
The alternate encoding must be an <a href="../spec/library.html#ACE">ASCII-compatible encoding</a>.
<p>
<blockquote>
<dl>
<dt>[設定例]
<dt>[Setting example]
<dd>
<pre>
alternate-encoding RACE
</pre>
</dl>
</blockquote>
<dt><a name="alias-file">alias-file</a>
<dd>
エンコーディングのコードセット名を、別名として追加することができます。
ここでは、追加する別名の定義ファイルへのパス名を指定します。
<p>
The encoding code set name can be entered as an alias.
Here, we will enter the path name of the alias definition file to be added.
<blockquote>
<tt>alias-file </tt><em>path</em>
</blockquote>
<em>path</em> に定義ファイルのパス名を指定します。
Enter the definition file path in <em>path</em>.
<blockquote>
<dl>
<dt>[設定例]
<dt>[Setting example]
<dd>
<pre>
alias-file /some/where/mdnalias.txt
</pre>
</dl>
</blockquote>
別名の定義ファイルは通常のテキストファイルであり、1行に1つずつ別名を定義します。各行の形式は次の通りです。
<p>The alias definition file is a normal text file in which one alias is defined on each line. The line format is as follows.
<blockquote>
<pre>
&lt;別名&gt; &lt;元の名前&gt;
&lt;alias&gt; &lt;original name&gt;
</pre>
</blockquote>
エンコーディング名 &lt;元の名前&gt; の代わりに &lt;別名&gt; が使えるようになります。
&lt;an alias&gt; can be used instead of the encoding name &lt;original name&gt;
</dl>
<hr>
<h2><a name="local-encoding">ローカルエンコーディングについて</a></h2>
<h2><a name="local-encoding">Local Encoding</a></h2>
<p>
ローカルエンコーディングについては、ロケールから推測して自動判定するため、コンフィギュレーションファイルでは、ローカルエンコーディングを設定するエントリはありません。
<p>
There is no entry for setting local encoding in the configuration file because it is automatically determined by referencing the locale on the local machine.
<p>
ただし、以下のようなケースのときには自動判定ができません。
<p>
However, the following cases cannot be automatically sensed.
<ul>
<li>setlocate 関数を使用していないアプリケーションを実行したとき
<li>When an application that does not use the setlocate function is executed<li><li>C ロケールのままアプリケーションを実行したとき
<li>When an application is executed as a C locale
<li>ロケールとエンコーディングの対応がわからないとき
<li>When the relationship between locale and enconding is not known
</ul>
<p>
このような場合には環境変数 <b>MDN_LOCAL_CODESET</b> を設定することで、ローカルエンコーディングの設定を行うことができます。
例えばローカルエンコーディングを EUC-JP に設定する場合には、あらかじめ次のような設定をしておきます。
<p>
Specify the <b>MDN_LOCAL_CODESET</b> environment variable to set local encoding. For example, to set local encoding to EUC-JP, make the following setting beforehand.
<blockquote>
<dl>
<dt>[設定例]
<dd>
<dl>
<dt>sh 系のとき
<dd>
<pre>
$ MDN_LOCAL_CODESET=EUC-JP
$ export MDN_LOCAL_CODESET
</pre>
<dt>csh 系のとき
<dd>
<pre>
% setenv MDN_LOCAL_CODESET EUC-JP
</pre>
</dl>
</dl>
</blockquote>
<p>指定する値はローカルエンコーディング名で、これはシステムの<em>iconv()</em> 関数 (より正確には <em>iconv_open()</em>) が受け付ける名前で指定します。この名前は <em>iconv</em> の実装によってそれぞれ異なりますので、具体的な値については <em>iconv</em> のドキュメントを参照してください。
<p>The value to be specified is a local encoding name that must be specified using a name that is accepted by the <em>iconv()</em> function in the system (or more precisely <em>iconv_open()</em>). This name differs with the <em>iconv</em> implementation, refer to the <em>iconv</em> document for details.
<p>もしあなたが単一のローカルエンコーディングしか使用していないのであれば、このような設定を <tt>.profile</tt><tt>.cshrc</tt> 等に入れておくことをお勧めします。
<p>If you only use a single type of local encoding, it is recommended that you save this setting in <tt>.profile</tt> or <tt>.cshrc</tt>.
</body>
</html>

View file

@ -1,103 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: runmdn.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>runmdn</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>runmdn</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#setup">設定</a>
<li><a href="#usage">使用法</a>
<li><a href="#limitation">制限事項</a>
</ul>
<ul>
<li><a href="#overview">Overview</a>
<li><a href="#setup">Setup</a>
<li><a href="#usage">Usage</a>
<li><a href="#limitation">Limitations</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p><b>runmdn</b> は bind4 あるいは bind8 をベースとしたリゾルバライブラリを持つ Unix クライアントを、再コンパイルなしに多言語ドメイン名を扱えるようにするためのコマンドです。具体的には、名前解決用の API (例えば <em>gethostbyname</em>) がアプリケーションのローカルエンコーディング (EUC-JP 等) で表現されたホスト名を受け付けるようになります。またこれらの API が多言語ホスト名をローカルエンコーディングで返すようになります。
<p><b>runmdn</b> is a command that enables a Unix client with the bind4 or bind8 based resolver libraries to support multilingual domain names without recompiling. Specifically, the name-resolving API (for example, <em>gethostbyname</em>) accepts host names denoted in the local encoding (EUC-JP, etc.) of the application, and also returns multilingual host names in local encoding.
<p><b>runmdn</b> を使用してクライアントが多言語ドメイン名を扱えるようにする方法は、mDNkit が提供する方法の中で最も手間がかからず簡単なものですが、システムによっては使用できなかったり、コマンドによっては効果がなかったりします。これらの制限に関しては<a href="#limitation">制限事項</a>の項をご覧ください。
<p>Using <b>runmdn</b> to enable clients to support multilingual domain names is the easiest and least time-consuming of the methods provided by the mDNkit. However, it cannot be used with some systems and does not work with certain commands. See the Section <a href="#limitation">Limitations</a> for details.
<p>
<hr>
<h2><a name="setup">設定</a></h2>
<h2><a name="setup">Setup</a></h2>
<p>runmdn を使用するには、mDNkit のクライアント共通設定ファイルで使用するエンコーディングや正規化の方法を設定しておく必要があります。このファイルの設定方法については<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>をご覧ください。
<p>To use runmdn, the encoding and normalization schemes must be specified in the shared mDNkit client file. Refer to <a href="resolvconfig.html">mDNkit Resolver Configuration</a> for information on how to configure this file.
<p>また、runmdn はアプリケーションのローカルエンコーディングを自動的に推測しますが、推測に失敗する場合もあります。そのような場合の対処方法は<a href="resolvconfig.html#local-encoding">ローカルエンコーディングについて</a>をご覧ください。
<p>runmdn automatically senses the local encoding used by an application, but this may sometimes fail. In such an event, refer to <a href="resolvconfig.html#local-encoding">Local Encoding</a> for procedures to deal with the situation.
<p>
<hr>
<h2><a name="usage">使用法</a></h2>
<h2><a name="usage">Usage</a></h2>
<p>runmdn の使い方は極めて簡単で、アプリケーションの起動コマンドの先頭にコマンド名 <tt>runmdn</tt> をつけるだけです。
<p>runmdn is very easy to use. All that has to be done is to append <tt>runmdn</tt>, the command name, to the beginning of the application startup command.
<blockquote>
<pre>
% runmdn <i>コマンド</i> [<i>引数...</i>]
% runmdn <i>command</i> [<i>argument...</i>]
</pre>
</blockquote>
<p>例えば <tt>telnet</tt> コマンドを使用してホスト「私の会社.jp」に接続するには次のようにします。
<p>For example, to use the <tt>telnet</tt> command to connect to the host "私の会社.jp", do as follows.
<blockquote>
<pre>
% runmdn telnet 私の会社.jp
</pre>
</blockquote>
<hr>
<h2><a name="limitation">制限事項</a></h2>
<h2><a name="limitation">Limitations</a></h2>
<p>runmdn は、mDNkit が提供している方法の中で最も手軽にクライアントが多言語ドメインを扱えるようにするものですが、どのようなクライアントにも適用できるわけではありません。
<p>runmdn is the easiest method for enabling clients to support multilingual domain names of all the methods that the mDNkit provides. However, this method may not be applicable for some clients.
<p>runmdn はシステムの持つ共有ライブラリの動的リンク機構(ライブラリのプリロード機能) を利用し、クライアントアプリケーションの実行時に、アプリケーションにリンクされているリゾルバライブラリの一部の関数を多言語ドメイン名を扱う機能を持たせたバージョンのものと置き換えてしまうことによって多言語ドメイン名の処理を実現します。置き換える関数は bind4 および bind8 をベースとするリゾルバが内部で使用している関数です。
<p>runmdn uses the dynamic link (a library pre-load function) of system-owned shared libraries to replace some of the functions of the resolver libraries linked to an application with versions with functions that can handle multilingual domain names to enable handling of multilingual domain names. The functions that are replaced are functions used in bind4- and bind8-based resolvers.
<p>したがって runmdn が動作するには次のようないくつかの制限があります。
<p>As a result, runmdn operation has the following limitations:
<ol>
<li>共有ライブラリの動的リンク機構を用いているので、共有ライブラリが使用できるシステムでなければなりません
<li>As shared library links are used, the system must be able to use shared libraries.
<li>環境変数 <var>LD_PRELOAD</var> または類似の機構によるライブラリのプリロード機能を持つシステムでなければなりません
<li>The system must have a preload function that operates with the use of <var>LD_PRELOAD</var>, an environment variable, or similar mechanism.
<li>runmdn の対象となるコマンドはリゾルバライブラリをスタティックリンクしていてはなりません
<li>runmdn can only be used for commands that link resolver libraries statically.
<li>システムのライブラリが <em>iconv()</em> 関数を提供していない場合、外部のライブラリを用いることになりますが、そのライブラリも共有ライブラリでなければなりません。
<li>If the system library does not provide the <em>iconv()</em> function, an external library that does can be used, but it must be a shared library.
<li>システムのリゾルバライブラリは bind4 あるいは bind8 ベースのものでなければなりません。
<li>System resolver libraries must be based on bind4 or bind8.
<li>セキュリティ上の理由から一般に setuid されたコマンドはプリロード機能が使えないようになっているので、setuid されたコマンドであってはなりません。
<li>As setuid commands cannot use the preload function for security reasons, do not use such commands.
</ol>
<p>これらの制限により runmdn が使用できない場合は、mDNkit が提供する他の方法 (<em>dnsproxy</em><em>bind9 パッチ</em> など) をご利用ください。
<p>When these limitations make use of runmdn impossible, other methods provided by the mDNkit (for example, <em>dnsproxy</em> or <em>bind9 patches</em>) can be used.
</body>
</html>

View file

@ -1,491 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: wrapper.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>mDN Wrapper - User's Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDN Wrapper</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#overview">Overview</a><p>
<li><a href="#setup">セットアップ</a>
<li><a href="#setup">Setup</a><p>
<li><a href="#config">コンフィギュレーションプログラム</a>
<li><a href="#config">Configuration program</a><p>
<li><a href="#limitations">制限事項</a>
<li><a href="#limitations">Limitations</a>
<p>
<li><a href="#upgrade">バージョンアップ時の注意</a>
<li><a href="#upgrade">Version upgrade considerations</a>
<p>
</ul>
<p>
<hr>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p>
Windows で多言語ドメイン名を扱えるようにするためには、Windows 上のクライアントアプリケーションにおいて、解決しようとする名前のエンコーディングを、DNS サーバが受付ける形式のものに変換する必要があります。これは、Windows 上のアプリケーションが、きちんと多言語ドメイン名を扱えるようになっていなければならない、ということであり、本来はそれぞれのプログラムの作成者が行なうべきことです。
<p>
To enable Windows to support multilingual domain names, the name encoding that client applications resolve must be converted to a format that DNS servers can accept. This requires accurate handling of multilingual domain names by Windows applications, which is basically the responsibility of each program developer.
<p>
しかし、標準が決まっていない現状では、プログラム作成者にこのような対応を期待するのは無理なので、既存のアプリケーションを多言語ドメイン名対応させるためのトリックが必要になります。mDNkitに含まれるdnsproxyサーバはそのための一つの方法です。
ここでは、もう一つの方法、mDN Wrapper を提示します。
<p>
However, as no standard is yet in place, this is too much to expect of program developers at this time. Therefore, a trick is needed so that existing applications will be able to support multilingual domain names. The dnsproxy server supplied with the mDNkit is one such tool. In this draft, we will introduce another tool, the mDN Wrapper.
<p>
Windows において、多くの場合、ドメイン名解決の要求はWINSOCK DLLに渡されます。そこで、WINSOCK DLL を多言語ドメイン名対応のものに置き換えてやれば、既存のプログラムからでも多言語ドメイン名を使うことができるようになります。
<p>
Queries to resolve domain names in Windows are often passed to WINSOCK DLL. By replacing WINSOCK DLL with one that supports multilingual domain names, it will be possible for existing programs to support multilingual domain names.
<p>
<hr>
<h2><a name="setup">セットアップ</a></h2>
<h2><a name="setup">Setup</a></h2>
<p>
<b>*注意*</b>
もし古いバージョンの mDN Wrapper がすでにインストールされているマシンに新しいバージョンをインストールする場合には、まず<a href="#upgrade">バージョンアップ時の注意</a>をご覧ください。
<p>
<p>
<b>*Note:*</b>
If an old version of mDN Wrapper is already installed, read the <a href="#upgrade">Precautions in Upgrading</a> before installing the new version.
<p>
mDN Wrapper をインストールするには"setup.exe" を実行します。セットアッププログラムは次のような処理を行います。
<p>
Use "setup.exe" to install mDN Wrapper. The setup program does the following.<p>
<dl>
<dt>ファイルのインストール
<br>
Installing files
<dd>
ディレクトリ「\Program Files\JPNIC\mDN Wrapper」セットアップで変更可能以下に、mDN Wrapper を構成するファイルをコピーします。
<p>
Copy the file containing mDN Wrapper to the 「\Program Files\JPNIC\mDN Wrapper」can be changed at setup) directory.
<p>
<dt>レジストリの設定
<br>
Registry Setup
<p>
<dd>
HKEY_LOCAL_MACHINE\Software\JPNIC\MDN 以下に必要なレジストリキー、レジストリ値を作成、設定します。主なものは次の通りです。
<p>
Create the required registry key and registry values under HKEY_LOCAL_MACHINE\Software\JPNIC\MDN. The major items are as follows.
<p>
<dl>
<dt>Encoding&nbsp;REG_SZ
<dd>DNS サーバ側のエンコーディング名です。
デフォルト値は <tt>"RACE"</tt> で、これは現時点での有力候補であるRACEエンコーディングの指定です。
エンコーディング名は <a href="#config">コンフィギュレーションプログラム</a>で変更することができます。
<p>
An encoding name used on the DNS server side.
The default value is <tt>"RACE"</tt>, which is currently the leading encoding scheme.
The encoding name can be changed using the <a href="#config"> configuration program</a>.
<p>
<dt>Normalize&nbsp;REG_SZ
<dd>
ドメイン名の正規化の方式です。使用する正規化の名称 (複数指定する場合にはスペースで区切る) を指定します。
デフォルトは日本語ドメイン名の正規化として適当だと思われる値になっています。
これも <a href="#config">コンフィギュレーションプログラム</a>で変更することができます。
<p>
A domain name normalization scheme used to specify normalization names (multiple names must be separated by spaces).
It is set to a default value that is considered appropriate for normalization of Japanese domain names.
This value can also be changed using <a href="#config">configuration program</a>.
<p>
<dt>PerProg&nbsp;キー
<br>PerProg&nbsp;key
<dd>
プログラム毎の設定値を格納するためのキーです。
この下に、プログラムの実行モジュール名をキーとしてプログラム個別の設定が記録されます。設定される情報は以下の二つです。<p>
A key used to store values set for each program. Program specific setting is stored with its executable module name used as a key. The following two types of infomration is set.<p>
<table>
<dd>
<table>
<tr>
<td>PerProg\&lt;progname&gt;\Where</td><td>REG_DWORD</td><td>変換位置<br>Conversion location</td>
</tr>
<tr>
<td>PerProg\&lt;progname&gt;\Encoding</td><td>REG_SZ</td><td>エンコーディング名<br>Encoding name</td>
</tr>
</table>
<p>
エンコーディング名は通常コンフィギュレーションプログラムによって設定されます。
変換位置の指定は、標準インストールでは不要です。
システムディレクトリへのインストールを行なった場合には、レジストリエディタで環境に合わせて設定する必要があります。
<p>
The encoding name is normally specified by the configuration program.
The conversion location is not required for a standard installation.
When the program is installed in the system directory, the registry editor must be used to adjust the environment.
</dl>
<p>
<dt>アイコンの作成
<br>Creating Icons
<p>
<dd>
コンフィギュレーションプログラムのアイコンを作成し、スタートメニューに登録します。これによってコンフィギュレーションプログラムを起動することができます。
<p>
Create a configuration program icon and place it in the Start menu.
This icon allows you to start up the configuration program.
</dl>
<p>
アンインストールするには、コントロールパネルの「アプリケーションの追加と削除」で、「mDN Wrapper」を選択して削除「追加と削除」ボタンします。
<p>
To uninstall the program, select "mDN Wrapper" in Add/Remove Programs in the Control Panel and click the Add/Remove button.
<p>
<hr>
<h2><a name="config">コンフィギュレーションプログラム</a></h2>
<p>
<h2><a name="config">Configuration Program</a></h2>
<p>
コンフィギュレーションプログラムは、アプリケーションを特定して mDN Wrapper を適用したり、適用を解除するためのツールです。
<p>
The configuration program is a tool for specifying applications that are to be wrapped or unwrapped.
<p>
起動すると以下のような画面が表示されます。
<p>
<p>
The screen shown below appears when the program is started.
<p>
<center>
<img src="img/wrapper_config1.jpg" alt="Configuration Startup" align=top>
</center>
<p>
リストボックスには、その時点で mDN Wrapper が適用されているプログラムが表示されます。最初に実行した場合には空になっています。右側のボタンを押すことにより、操作を行うことができます。
<p>
The list box shows programs that mDN Wrapper is currently wrapping.
The box is blank when the program first starts. Press the buttons on the right to begin.
<h3>mDN Wrapper の適用</h3>
<h3>Using mDN Wrapper</h3>
プログラムに mDN Wrapper を適用するには、"Wrap.."ボタンを押します。
"Wrap.."ボタンを押すと以下のようなダイアログが表示されます。
<p>
Press the "Wrap.." button to wrap a program using mDN Wrapper.
Pressing the "Wrap.." button displays the following dialog box.
<p>
<center>
<img src="img/wrapper_config2.jpg" alt="Configuration Wrap" align=top>
</center>
<p>
最初に、mDN Wrapper を適用したいプログラムの実行ファイル名を設定します。
直接入力するか、ブラウズボタンでファイルを探してください。
<p>
<p>
First set the filename of the program that mDN Wrapper is to wrap. Enter the name directly or use the Browse button to find the file.
<p>
<center>
<img src="img/wrapper_config3.jpg" alt="Configuration Browse" align=top>
</center>
<p>
次にそのプログラムのローカルエンコーディングを指定します。
通常は「Default」 でかまいません。
プログラムが国際化エンコーディングに従っている場合にのみ「UTF-8」 を指示します。
<p>
<p>
Then, specify the local encoding of the program.
Select "Default" for the standard setting.
Select UTF-8 only if the program supports international encoding.
<p>
<center>
<img src="img/wrapper_config4.jpg" alt="Configuration Encoding" align=top>
</center>
<p>
最後に "Wrap" ボタンを押せば、そのプログラムに対して指定されたエンコーディングで mDN Wrapper が適用されます。
適用されたプログラムは、最初のウィンドウのリストボックスに反映されます。
<p>
<p>
Then press the Wrap button to use mDN Wrapper with the specified encoding for the selected program.
The wrapped program is displayed in the list box in the first window.
<p>
<center>
<img src="img/wrapper_config5.jpg" alt="Configuration Wrapped" align=top>
</center>
<h3>mDN Wrapper の解除</h3>
<h3>Canceling use of mDN Wrapper</h3>
プログラムに対する mDN Wrapper の適用を解除するには、リストボックスで解除するプログラムを選択して、"Unwrap.." ボタンを押します。
以下の確認用のダイアログが表示されますので、間違いがなければ "Unwrap" ボタンを押してください。
<p>
To cancel the use of mDN Wrapper for a program, select the program in the list box and click the Unwrap button.
The confirmation dialog box shown below is displayed. If this is correct, click the Unwrap button.
<p>
<center>
<img src="img/wrapper_config6.jpg" alt="Configuration Unwrap" align=top>
</center>
<p>
mDN Wrapper の適用が解除されると、そのプログラムは最初のウィンドウのリストボックスからも削除されます。
<p>
When use of mDN Wrapper is canceled for a program, that program is no longer displayed in the first window list box.
<p>
<center>
<img src="img/wrapper_config7.jpg" alt="Configuration Unwrapped" align=top>
</center>
<p>
"Unwrap All" ボタンを押すことによって、現在適用されているすべてのプログラムに対して mDN Wrapper の適用を解除することもできます。
<p>
Use the Unwrap All button to cancel use of mDN Wrapper for all currently selected programs.
<h3>ログ設定</h3>
<h3>Log setting</h3>
"Log.." ボタンを押すことによってログレベルやログファイルを設定することができます。このボタンを押すと次のようなダイアログが現れます。
<p>
Click the "Log.." button to set a log level or log file.
The dialog box shown below is displayed when this button is clicked.
<p>
<center>
<img src="img/wrapper_config8.jpg" alt="Configuration Log" align=top>
</center>
<p>
ログレベルは次の中から選ぶことができます。
<p>
The following log levels can be selected.
<dl>
<dt>None<dd>ログを一切出力しません。これがデフォルトです。
<dt>None<dd>Outputs no log at all. This is the default setting.
<dt>Fatal<dd>致命的エラーのみ出力します。
<dt>Fatal<dd>Outputs a log only when a fatal error occurs.
<dt>Error<dd>致命的でないエラーも出力します。
<dt>Error<dd>Outputs a log for non-fatal as well as fatal errors.
<dt>Warning<dd>警告メッセージも出力します。
<dt>Warning<dd>Also outputs warning messages.
<dt>Info<dd>エラー以外の情報も出力します。
<dt>Info<dd>Also outputs other information, in addition to errors.
<dt>Trace<dd>プログラムのトレース情報も出力します。このレベルを選択すると大量のログが出力されるので気をつけてください。
<dt>Trace<dd>Also outputs program trace information. Note that a large amount of information is output when this level is selected.
</dl>
なお、このログレベルは <a href="../spec/library.html">MDN ライブラリ</a> が出力するログに対するものです。mDN Wrapper 自体が出力するログについてはON/OFF 以外のレベルを指定することはできず、None を指定すればオフに、それ以外のレベルを指定すればオンになります。
<p>
These log levels are for logs output by the <a href="../spec/library.html">mDN library</a>. Because the mDN Wrapper log can only be set to "on" or "off," "None" turns off the log entirely (however, it is "on" in all other cases).
<p>
ログファイルを指定することも可能です。デフォルトでは mDN Wrapper をインストールしたディレクトリの "mdn_wrapper.log" になっています。
"Browse.." ボタンを押せばブラウズ用のダイアログを利用して選択することができます。
<p>
A log file can also be specified. The default setting is mdn_wrapper log and is stored in the directory where mDN wrapper is installed.
Click the Browse button to select the file from the Browse dialog box.
<p>
また、このダイアログではログファイルの内容を見ることと、ログファイルを削除することが可能です。それぞれ "View"、"Delete" ボタンを押してください。
"View" ボタンを押すとメモ帳が起動して、ログファイルの内容を表示します。
<p>
This dialog box can also be used to view and delete the log file. Use the View or Delete buttons to do this.
When the View button is clicked, NotePad opens displaying the contents of the log file.
<p>
"OK" ボタンを押すとダイアログの設定が有効になります。設定を変えたくない場合には "Cancel" ボタンを押してください。
<p>
Click the OK button to confirm the dialog settings. Click the Cancel button when none of the settings are to be changed.
<h3>詳細パラメータ設定</h3>
<h3>Detailed Parameters Settings</h3>
"Advanced.." ボタンを押すことにより、次のようなダイアログが表示されます。
これは上級ユーザのためのもので、適切なデフォルトが設定されているので通常ユーザが変更する必要のないような基本的なパラメータを変更することができます。
<p>
Click the "Advanced.." button to display the dialog box shown below.
This is for experienced users; an appropriate default setting is provided for ordinary users to enable the change of basic parameters without the need for making detailed settings.
<p>
<center>
<img src="img/wrapper_config9.jpg" alt="Configuration Advanced" align=top>
</center>
<p>
ダイアログ最上部のパネルでプログラムに対する mDN Wrapper の適用モードを指定することができます。選択できる値とその意味は次の通りです。
<p>
The appropriate mDN Wrapper mode can be set in the panel at the top of the dialog box. Settings and their meanings are listed below.
<dl>
<dt>Wrap both WINSOCK 1.1 and WINSOCK 2.0
<dd>WINSOCK 1.1 と 2.0 の両方の呼び出しについて mDN Wrapper を適用し、ドメイン名のエンコーディング変換や正規化を行います。通常はこのモードで使えば正しく動くはずです。
<dd>Uses mDN Wrapper to convert and normalize domain name encoding for calls from both WINSOCK 1.1 and 2.0. Select this mode for normal operation.
<dt>Wrap only WINSOCK 1.1
<dd>WINSOCK 1.1 の呼び出しについては mDN Wrapper を適用しますが、WINSOCK 2.0 の呼び出しについては適用しません。
<dd>Uses mDN Wrapper only for calls from WINSOCK 1.1 but not from WINSOCK 2.0.
<dt>Wrap only WINSOCK 2.0
<dd>WINSOCK 2.0 の呼び出しについては mDN Wrapper を適用しますが、WINSOCK 1.1 の呼び出しについては適用しません。
<dd>Uses mDN Wrapper only for calls from WINSOCK 2.0, but not for WINSOCK 1.0.
<dt>Wrap only WINSOCK 2.0 if it exists. Otherwise wrap only WINSOCK 1.1
<dd>WINSOCK 2.0 が存在すれば WINSOCK 2.0 の呼び出しについてのみ mDN Wrapper を 適用します。存在しない場合には WINSOCK 1.1 の呼び出しについて適用します。WINSOCK のバージョンによってはデフォルトでは正しく動かず、このモードを指定しなければならないかもしれません。
<dd>Uses mDN Wrapper only for calls from WINSOCK 2.0, if it exists. Otherwise, mDN Wrapper is used for calls from WINSOCK 1.1.
The default setting may not function properly with some versions of WINSOCK, in which case this mode must be used.
</dl>
<p>
中段のパネルでは正規化の方式を設定することができます。左側のリストボックスに使用する正規化の名称が入っており、右側のリストボックスには使用可能な正規化の名称が入っています。右側のリストボックスから追加したい正規化を選択し、"Add" ボタンを押すと左側のリストボックスに追加されます。
また、左側のリストボックスで削除したい正規化を選択して "Remove" ボタンを押せば削除することができます。"Clear" ボタンを押すとすべての正規化が削除され、また "Reset" ボタンによりデフォルトの設定に戻すことができます。
<p>
Normalization schemes can be set in the center panel. The left box lists the names of selected normalization schemes, while the box on the right lists the names of available normalization schemes. Select a normalization scheme from the right box; click the Add button to add it to the list in the left box.
You can also delete normalization schemes from the left list box, by selecting it and clicking the Remove button. The Clear button removes all normalization schemes, and the Reset button reinstates the default settings.
<p>
3段目のパネルでは DNS サーバ側のエンコーディング名を指定することができます。
デフォルトは "RACE" ですが、他のエンコーディングを使用したい場合には
ここで指定してください。
<p>
The third panel is used to enter the encoding name of the DNS server.
The default setting is RACE, but this panel allows you set the desired encoding.
<p>
以上の設定は "OK" ボタンを押すことにより有効になります。設定を変えずにダイアログを終了したい場合には "Cancel" ボタンを押してください。
<p>
The settings become effective by clicking the OK button. Click Cancel to close the dialog box without changing the settings.
<p>
<hr>
<h2><a name="limitations">制限事項</a></h2>
<h2><a name="limitations">Limitations</a></h2>
<dl>
<dt>DLL バージョン
<dt>DLL Version
<dd><p>
ラッパーDLL は、元のWINSOCK のDLL のバージョンに強く依存します。
これは、非公開のエントリも含めてすべてのエントリを提供する必要があるためです。
このためWINSOCK DLL のバージョンが変わると、mDN Wrapper が動作しなくなる可能性があります。
<p>
Wrapper DLL is highly dependent on the original WINSOCK DLL version.
This is because all entries including non-public entries must be supplied.
As a result, mDN Wrapper may stop functioning when a different version of WINSOCK DLL is installed.
<p>
今回作成されたmDN Wrapper は、
<p>
It has been confirmed that the current version of mDN Wrapper operates with the following software.
<blockquote>
<table>
<tr><td>WinNT4.0 SP6a</td><td>(WINSOCK 1.1 + 2.0)</td></tr>
<tr><td>Win98 </td><td>(WINSOCK 1.1 + 2.0)</td></tr>
<tr><td>Win95 OSR2 </td><td>(WINSOCK 1.1) </td></tr>
</table>
</blockquote>
で動作を確認しています。ただ、将来にわたって動作する保証はありません。
<p>
There is no guarantee, however, that it will function in the future.
<p>
<dt>DNS, WINS, LMHOSTS
<dd><p>
Windows では、DNS だけではなく、WINSやLMHOSTS によってもドメイン名、ホスト名の解決が行なわれます。
mDN Wrapper を使った場合には、ドメイン名の変換が、これらの方式へのディスパッチを行なう場所よりも上位層で行なわれるので、これらのすべての方式について、ドメイン名、ホスト名の変換が行なわれることになります。
このため、Windows が、WINSやLMHOSTS を使っている場合には、予期しない問題が発生する可能性があります。
これについては、mDN Wrapper を使う場合には、名前解決にDNS だけを使用することをお勧めします。
<p>
In Windows, not only DNS but also WINS and LMHOSTS resolve domain names and host names. When mDN Wrapper is used, domain name conversion are not dispatched to these schemes but are performed at a higher level.
As a result, when Windows uses WINS or LMHOSTS, unexpected results may occur. Thus when you use mDN Wrapper, we recommend that only DNS is used for name resolving.
<p>
<dt>ドメイン名以外の名前の解決
<dd><p>
WINSOCK 2.0 の名前解決API
<dd><p>The following are WINSOCK 2.0 name resolving APIs
<blockquote>
<table>
<tr><td>WSALookupServiceBeginW</td></tr>
<tr><td>WSALookupServiceNextW </td></tr>
<tr><td>WSALookupServiceEnd </td></tr>
</table>
</blockquote>
は、ドメイン名以外でも使用できる汎用の名前解決用のAPI として定義されています。
現時点では、これらはもっぱらドメイン名の解決で使用されていますが、他の名前(例えばサービス名)の解決にも使用できることになっています。
<p>
These are defined as a universal name resolving API that can be used for other than domain names. Currently, it is used only for resolving names, but it can also be used for resolving service names, for example.
<p>
mDN Wrapper は、名前の対象の如何にかかわらず、名前のエンコーディングを変換してしまうので、これらのAPI が、ドメイン名以外の解決に使われている場合には、問題を引き起こす可能性があります。
<p>
Because the mDN Wrapper converts encodings of any type of name, these APIs could cause problems if used for resolving names other than domain names.
<p>
<dt>名前解決API を使わないプログラム
<p>
Programs not using name resolving API
<dd><p>
アプリケーションによっては、ドメイン名の解決にこれらのAPI を使用しないものもあります。例えば、'nslookup'は、これらのAPI を使用しないで、直接DNS サーバと通信してしまいます。このようなアプリケーションについては、mDN Wrapper は役に立ちません。
<p>
Some applications do not use these APIs for resolving domain names.
For example, nslookup does not; instead, it communicates directly with the DNS server. mDN Wrapper cannot be used for such applications.
<p>
<dt>特定WINSOCK DLL にバインドされたアプリケーション
<p>
Applications tied to specific WINSOCK DLLs
<p>
<dd><p>
アプリケーションによっては、標準のDLL サーチパスに従わないで、
特定のパスのDLL にバインドされているものがあります。
よく使われるプログラムの中では、Netscape Communicator がそうなっています。
このようなプログラムについては、標準のインストール/コンフィギュレーションでは mDN Wrapper を適用することはできません。
<p>
Some applications do not conform to standard DLL search paths, but are tied to a DLL of a specific path. An often used program, Netscape Communicator, is a case in point. mDN Wrapper cannot be added to such programs in a standard install or configuration.
<p>
このようなプログラムについて、どうしても mDN Wrapper を適用する必要があるなら、システムディレクトリへのインストールを行なうことができます。
ただし、このインストールは大変危険で、場合によってはシステムを再起動不能にしてしまう可能性もあります。
<p>
If mDN Wrapper must be added to this type of program, it can be installed under the system directory.
However, such an installation is quite risky as it may sometimes make it impossible to restart.
<p>
<dt>代替手段としての'dnsproxy'
<p>
<dt>dnsproxy, an alternate solution
<dd><p>
これらの制限事項が問題になる場合には、代替手段として'dnsproxy'を使うこともできます。これは、DNS サーバとのトランザクションを中継するので、上で問題になったようなことを回避することができます。
<p>
dnsproxy can be used as an alternate approach to avoid such limitations.
The above problems are avoided since dnsproxy operates between the DNS server and the transaction.
<p>
ただし、'dnsproxy'は、ラッパーよりも複雑な設定が必要ですし、また、呼び元のプログラムを特定することができませんので、プログラム固有のローカルエンコーディングを取り扱うことはできません。しかし、上記の制限事項が問題になるようなケースでは、ラッパーの代わりに使用するといいかもしれません。
<p>
However, dnsproxy requires a more complex setup procedure than Wrapper and cannot identify a calling program so it cannot handle the local encoding of specific programs.
It is perhaps best used as an alternative to Wrapper to avoid the above limitations.
</dl>
<hr>
<h2><a name="upgrade">バージョンアップ時の注意</a></h2>
<h2><a name="upgrade">Precautions when Upgrading</a></h2>
<p>古いバージョンの mDN Wrapper がすでにインストールされているマシンに新しいバージョンをインストールする際には、次のことに気をつけてください。
<p>Note the following when a new version of the software is to be installed in a machine containing an earlier version.
<ol>
<li>インストールする前に古いバージョンをアンインストールする<br>
新しいバージョンをインストールする前に、古いバージョンをアンインストールしてください。そうしないと、新しいバージョンをインストールしてもいくつかのファイルが更新されず、古いまま残ってしまいます。
アンインストールするには、コントロールパネルの「アプリケーションの追加と削除」を実行し、「mDN Wrapper」を選択して削除を実行してください。<br>もしアンインストールせずに新しいバージョンをインストールしてしまった場合には、
一度それをアンインストールしてから再度インストールを行ってください。<p>
Uninstall old version prior to installation.<br>
Before the most recent version is installed, uninstall the old version. Otherwise, a number of files will not be updated and the old version will remain in effect even though the latest version has been installed.
To delete, open the Control Panel and select mDN Wrapper in Add/Remove Applications.<br>If you made the mistake of installing the new version without first removing the old version, first uninstall, and then reinstall, the software.<p>
<li>すべてのファイルを再度ラップする<br>
mDN Wrapper はその動作原理上、mDN Wrapper を適用するプログラムが存在するディレクトリにDLL をコピーします。
コピーされた DLL は新しいバージョンをインストールしても更新されないので、そのままでは新しいバージョンが使われません。このため、新しいバージョンをインストールしたら、一度 mDN Wrapper の適用をすべて解除し、改めて適用し直してください。すべてのプログラムに対する適用を解除するには、コンフィギュレーションプログラムの "Unwrap All" ボタンを使用するのが便利です。
<p>
Re-wrapping all files<br>
mDN Wrapper copies a DLL file to the directory that contains programs that can be wrapped by mDN Wrapper.
The copied DLL is not automatically updated to the latest version when a new version of the software is installed preventing use of the latest version. Therefore, after installation, unwrap all applications wrapped using mDN Wrapper and then wrap them again. The easiest way to do this is to click the Unwrap All button in the configuration program.
</ol>
</body>
</html>

View file

@ -1,641 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: bind9.html,v 1.1 2001/03/05 12:58:02 tale Exp $ -->
<html>
<head>
<title>bind-9 patch</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>BIND-9 パッチ</h1>
<h1>BIND-9 Patch</h1>
<ul>
<li><a href="#overview">概要<br>
Overview</a>
<li><a href="#arch">アーキテクチャ<br>
Architecture</a>
<li><a href="#named">named 修正<br>
Fixes in named</a>
<li><a href="#lwresd">lwresd 修正<br>
Fixes in lwresd</a>
<li><a href="#client">クライアントライブラリ修正<br>
Fixes in Client Library</a>
<li><a href="#dig">dig/host/nslookup 修正<br>
Fixes in dig/host/nslookup</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p>
mDNkit に含まれる BIND-9 用のパッチファイルを適用することにより、
BIND-9 において従来の ASCII 文字によるドメイン名に加え、
非 ASCII 文字による多言語ドメイン名を扱うことが可能になります。
<p>
The BIND-9 patch file included in the mDNkit provides the ability to support both conventional ASCII character domain names and non-ASCII character-derived multilingual domain names.
<p>
具体的には、このパッチは BIND-9 に次のような機能を追加します。
<p>
Specifically, this patch adds the following functions to BIND-9.
<ul>
<li>lightweight resolver API (lwres_gethostbyname など) で、
ローカルエンコーディングで表現されたホスト名を名前解決する
<li>Uses a lightweight resolver API (lwres_gethostbyname, etc.) to search the IP address from the host name, as expressed in local encoding.
<li>同じく名前解決結果としてローカルエンコーディングで表現された
ホスト名を返す
<li>For the result of name resolution, returns the host name expressed in the local encoding as well.
<li>dig、host、nslookup コマンドがローカルエンコーディングのドメイン名を
受け付け、また問い合わせ結果に含まれるドメイン名をローカルエンコーディングで
表示する
<li>Uses dig, host, and nslookup commands to accept domain names in the local encoding and displays domain names included in the inquiry result using local encoding.
</ul>
<p>
BIND-9 へのパッチの適用方法は、パッチファイルの先頭に記載してあります。
なおパッチファイルについては、
対応する BIND のバージョンをよく確認してから、使用してください。
<p>
Instructions for how to apply the patch file to BIND-9 is explained at the beginning of the patch file.
Before using the patch file, be sure to check the version of BIND being used.
<p>
<hr>
<h2><a name="arch">アーキテクチャ</a></h2>
<h2><a name="arch">Architecture</a></h2>
<p>BIND-9 はそれまでの BIND-8 とはリゾルバの構成が全く異なっています。
BIND-8 まではリゾルバはアプリケーションにリンクされるライブラリとして
実装されていましたが、
BIND-9 ではリゾルバの機能の大部分が
<b>lwresd</b> (lightweight resolver daemon) というサーバに移され、
アプリケーションにリンクされるのはlightweight resolver と呼ばれる
<b>lwresd</b> との通信を行うためのライブラリとなっています。
<p>BIND-9 has a different resolver structure than BIND-8.
Up to BIND-8, the resolver was implemented as a library linked by the application. However, with BIND-9, most of the functions of the resolver have been moved to the server called <b>lwresd</b> (lightweight resolver daemon) and only the library called lightweight resolver that is used to communicate with <b>lwresd</b> is linked by the application.
<p>本パッチはこのアーキテクチャに合わせ、多言語ドメイン名の各処理を
それぞれのコンポーネントに分散させました。以下に各コンポーネントで
実装される機能とコンポーネント間のインタフェースで用いるエンコーディングを
表した図を示します。
<p>Matched to this architecture, the patch distributes multilingual domain name processing to the respective components. The following diagram shows the function implemented in each component and the encoding used by the interface between the components.
<blockquote>
<img src="img/bind9_arch.jpg" alt="bind9 resolver architecture">
</blockquote>
<hr>
<h2><a name="named">named 修正</a></h2>
<h2><a name="named">Fixes in named</a></h2>
<p>named における修正は次の一点のみです。
<p>The following fixes were made in named:
<h3><a name="named-utf8">UTF-8 文字の透過</a></h3>
<h3><a name="named-utf8">UTF-8 Character Transparency</a></h3>
<p>BIND-9 の named ではドメイン名の処理はほとんど8ビットスルーになっており、
UTF-8 等の MSB のセットされたバイトもそのまま透過します。
しかし named 内で処理に使用されているドメイン名の内部表現 (<em>dns_name_t</em>)
からテキスト表現への変換部分は8ビットスルーになっておらず、ASCII 文字以外
はバックスラッシュでクォートされ、<tt>\DDD</tt> という形式の表現に
変換されてしまいます。
DNS プロトコル上で用いられるエンコーディングが RACE などの ASCII 互換
エンコーディングであれば ASCII 以外の文字がドメイン名に現れることはないので
問題ないのですが、UTF-8 を使用する場合には問題となります。
<p>With BIND-9 named, most domain name processing is based on 8-bit through and UTF-8 bytes in which MSB is set are also passed as is. However, the conversion of domain names from an internal expression (<em>dns_name_t</em>) to the text expression used for processing in named is not 8-bit through and other than ASCII text is quoted with a backslash and converted to a <tt>\DDD</tt> format expression.
If ASCII-compatible encoding such as RACE is used for the DNS protocol, there is no problem because only ASCII characters appear in domain names; there are, however, problems when UTF-8 is used.
<p>BIND-9 パッチは、この処理を修正し、変換しようとする文字がUTF-8 文字の
場合にはバックスラッシュによるクォートをしないようにします。
この動作は named の設定ファイル (named.conf) で切り替え可能であり、
設定ファイルの options セクションの <tt>allow-utf8</tt> パラメータで
指定します。DNS プロトコル上で用いるエンコーディングとして UTF-8 を
使用する際には次のように記述してください。
<p>The BIND-9 patch corrects processing so that the backslash quote is not used when converting UTF-8 characters.
This operation can be switched using the <tt>allow-utf8</tt> parameter of the options section in the named configuration file (named.conf).
When UTF-8 is used for encoding the DNS protocol, write as follows.
<blockquote>
<pre>
options {
...
allow-utf8 yes;
...
};
</pre>
</blockquote>
<hr>
<h2><a name="lwresd">lwresd 修正</a></h2>
<h2><a name="lwresd">Fixes in lwresd</a></h2>
<p>lwresd に対しては次のような修正を加えてあります。
<p>The following fixes were made to lwresd.
<dl>
<dt>UTF-8 文字の透過<dd>
<dt>UTF-8 Character Transparency<dd>
<p>これは named に対する修正と同じで、ドメイン名を内部表現から
テキスト表現に変換する際のバックスラッシュによるクォーティングを
行わないようにするものです。
<p>This is the same fix made in named wherein backslash quoting is not used for conversion of domain names from an internal expression to a text expression.
<p>named の場合、これは設定ファイル named.conf のオプションで
切り替えられるようになっていますが、lwresd の場合には自動切り替えに
なっています。lwresd が読み込む
<a name="clientconfig.html">クライアント設定ファイル</a>
サーバエンコーディングエントリに設定されているコードセット名を参照し、
それが ASCII 互換エンコーディングでない場合にはバックスラッシュによる
クォートをしないようにします。
<p>With named, this setting can be changed using the option setting in the named.conf configuration file; however, it is automatically changed with Iwresd. The code set name set in the server encoding entry of the <a name="clientconfig.html"> client configuration file </a> to be loaded by lwresd is referenced and if it is not ASCII-compatible encoding, the backslash quote is not used.
<dt>エンコーディング変換<dd>
<dt>Encoding Conversion<dd>
<p>lwresd は多言語ドメイン名のエンコーディングとして、クライアント
つまり lightweight resolver ライブラリとの間の通信には UTF-8 を、
また named との通信には DNS プロトコル上のエンコーディングをそれぞれ
使用します。したがって両者の間のエンコーディング変換を行います。
<p>For encoding of multilingual domain names, lwresd uses UFT-8 for communication with the client, i.e. the lightweight resolver library, and also uses the encoding used for the DNS protocol for communication with named, respectively. Therefore, encoding conversion is performed between both components.
<p>エンコーディング変換には MDN ライブラリの
<a href="library.html#res">res モジュール</a> を使用しています。
DNS プロトコル上のエンコーディングの指定は
<a href="clientconfig.html">クライアント設定ファイル</a>で行います。
<p>The <a href="library.html#res">res module</a> of the MDN library is used for encoding conversion.
The <a href="clientconfig.html">client configuration file</a> is used to specify the encoding used by the DNS protocol.
</dl>
<p>
<hr>
<h2><a name="client">クライアント側ライブラリ修正</a></h2>
<h2><a name="client">Fixes in Client Library</a></h2>
<p>クライアント側のライブラリは、
<p>The client side library was corrected as follows:
<ul>
<li>エンコーディング変換
<li>Encoding Conversion
<li>正規化
<li>Normalization
</ul>
を行うように修正されています。これらの処理には MDN ライブラリの
<a href="library.html#res">res モジュール</a> を使用しています。
設定は<a href="clientconfig.html">クライアント設定ファイル</a>で行います。
<p>The <a href="library.html#res">res module</a> of the MDN library is used for this processing.
The <a href="clientconfig.html">client configuration file</a> is used to set settings.
<p>名前解決用の API 関数はローカルエンコーディングで表された
多言語ドメイン名が扱えるように修正されています。
また内部実装は、将来 UTF-8 エンコーディングのドメイン名を扱える
API の追加が容易にできるように設計されています。これらについて
この後説明します。
<p>The API function for name resolution was corrected to that it can handle multilingual domain names expressed in local encoding.
Also, internal implementation is designed so that it will be simpler to add APIs that can handle domain names in UTF-8 encoding in the future. An explanation of those issues will follow at a later date.
<ul>
<li><a href="#api-func">多言語化された API 関数</a>
<li><a href="#api-func">Multilingual API Functions</a>
<li><a href="#internal-func">追加された内部関数</a>
<li><a href="#internal-func">Added Internal Functions</a>
</ul>
<p>
<h3><a name="api-func">多言語化された API 関数</a></h3>
<h3><a name="api-func">Multilingual API Functions</a></h3>
<p>
パッチによって多言語化される API 関数の一覧です。
<p>
The list of API functions that are made multilingual by the patch is shown below.
<ul>
<li>lwres_getaddrinfo()
<li>lwres_getnameinfo()
<li>lwres_gethostbyname()
<li>lwres_gethostbyname2()
<li>lwres_gethostbyname_r()
<li>lwres_gethostbyaddr()
<li>lwres_gethostbyaddr_r()
<li>lwres_getipnodebyname()
<li>lwres_getipnodebyaddr()
</ul>
<p>
多言語化された API 関数は、従来の ASCII ドメイン名に加え、
非 ASCII ドメイン名を扱うことができます。非 ASCII ドメイン名として、
<a href="clientconfig.html">クライアント設定ファイル</a>の内容に応じて、
新たに以下のようなドメイン名を取り扱うことができるようになります。
<p>
In addition to the conventional ASCII domain names, API functions that are made multilingual can handle non-ASCII domain names. With regard to non-ASCII domain names, the following domain names can be handled, depending on which settings are set in the <a href="clientconfig.html">client configuration file</a>.
<ul>
<li>ホスト.会社.jp
<li>host.company.jp
<li>www.別の会社.com
<li>www.other company.com
</ul>
<p>
引数の型や返り値の型に変更はありません。
パッチを当てる前と同様の呼び出し方法で、従来の ASCII ドメイン名と、
非 ASCII ドメイン名の両方を扱うことができます。
非 ASCII ドメイン名については、
ローカルエンコーディングのドメイン名を引数として受け取ることができます。
<p>
The type of arguments and return values are not changed.
Using the same calling method that was used prior to applying the patch allows the system to handle both conventional ASCII domain names and non-ASCII domain names.
Regarding non-ASCII domain names, domain names of local encoding can be received as arguments.
<p>
これまで上記の API 関数で行なわれていた処理は、
以降で説明する<a href="#internal-func">それぞれの内部関数</a>に移行し、API
関数は、ドメイン名のエンコーディング情報をこの内部関数に渡す役割をしています。
<p>
Processing performed by the above API functions are moved to <a href="#internal-func">respective internal functions</a> explained later and API functions pass the encoding information of domain names to these internal functions.
<p>
<h3><a name="internal-func">追加された内部関数</a></h3>
<h3><a name="internal-func">Added internal functions</a></h3>
<p>
多言語化された API 関数に関連して、以下の内部関数が追加されました。
<p>
In association with the API functions that were made multilingual, the following internal functions are added.
<dl>
<dt><a href="#getaddrinfo">lwres_getaddrinfo_enc()</a>
<dd>lwres_getaddrinfo() の内部関数
<dd>lwres_getaddrinfo() internal function
<dt><a href="#getnameinfo">lwres_getnameinfo_enc()</a>
<dd>lwres_getnameinfo() の内部関数
<dd>lwres_getnameinfo() internal function
<dt><a href="#gethostbyname">lwres_gethostbyname_enc()</a>
<dd>lwres_gethostbyname() の内部関数
<dd>lwres_gethostbyname() internal function
<dt><a href="#gethostbyname2">lwres_gethostbyname2_enc()</a>
<dd>lwres_gethostbyname2() の内部関数
<dd>lwres_gethostbyname2() internal function
<dt><a href="#gethostbyname_r">lwres_gethostbyname_r_enc()</a>
<dd>lwres_gethostbyname_r() の内部関数
<dd>lwres_gethostbyname_r() internal function
<dt><a href="#gethostbyaddr">lwres_gethostbyaddr_enc()</a>
<dd>lwres_gethostbyaddr() の内部関数
<dd>lwres_gethostbyaddr() internal function
<dt><a href="#gethostbyaddr_r">lwres_gethostbyaddr_r_enc()</a>
<dd>lwres_gethostbyaddr_r() の内部関数
<dd>lwres_gethostbyaddr_r() internal function
<dt><a href="#getipnodebyname">lwres_getipnodebyname_enc()</a>
<dd>lwres_getipnodebyname() の内部関数
<dd>lwres_getipnodebyname() internal function
<dt><a href="#getipnodebyaddr">lwres_getipnodebyaddr_enc()</a>
<dd>lwres_getipnodebyaddr() の内部関数
<dd>lwres_getipnodebyaddr() internal function
</dl>
<p>
追加された内部関数についての仕様は、以下の通りです。
<p>
The specifications of the added internal functions are as follows.
<dl>
<dt><a name="getaddrinfo">lwres_getaddrinfo_enc</a>
<dd>
<pre>
int
lwres_getaddrinfo_enc(const char *, const char *, const struct addrinfo *,
struct addrinfo **, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getaddrinfo() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getaddrinfo() との違いは、static 関数である set_order()
関数にエンコードタイプの判定フラグを渡している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getaddrinfo() function.
The only difference between this function and the lwres_getaddrinfo() function is that the encode type judgment flag is passed to the set_order() function, which is a static function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getaddrinfo() 関数から lwres_getaddrinfo_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag. <tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specified for the encode type judgment flag in order to call the lwres_getaddrinfo_enc() function from the lwres_getaddrinfo() function.
<p>
返される値は
<tt>EAI_NONAME</tt><tt>EAI_BADFLAGS</tt><tt>EAI_SYSTEM</tt>
<tt>EAI_FAMILY</tt><tt>EAI_SOCKTYPE</tt><tt>EAI_SERVICE</tt>
<tt>EAI_MEMORY</tt><tt>0</tt>
のいずれかです。
<p>
One of the following values is returned.
<tt>EAI_NONAME</tt>, <tt>EAI_BADFLAGS</tt>, <tt>EAI_SYSTEM</tt>,
<tt>EAI_FAMILY</tt>, <tt>EAI_SOCKTYPE</tt>, <tt>EAI_SERVICE</tt>,
<tt>EAI_MEMORY</tt>, <tt>0</tt>
<p>
<dt><a name="getnameinfo">lwres_getnameinfo_enc</a>
<dd>
<pre>
int
lwres_getnameinfo_enc(const struct sockaddr *, size_t, char *, size_t, char *,
size_t, int, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getnameinfo() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getnameinfo() との違いは、lwres_getnamebyaddr() 関数の呼び出し部を
lwres_getnamebyaddr_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getnameinfo() function.
The only difference between this function and the lwres_getnameinfo() function is that the call portion of the lwres_getnamebyaddr() function is changed to the lwres_getnamebyaddr_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getnameinfo() 関数から lwres_getnameinfo_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag. <tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specified for the encode type judgment flag in order to call the lwres_getnameinfo_enc() function from the lwres_getnameinfo() function.
<p>
返される値は
<tt>ENI_NOSOCKET</tt><tt>ENI_SALEN</tt><tt>ENI_FAMILY</tt>
<tt>ENI_MEMORY</tt><tt>ENI_SYSTEM</tt><tt>ENI_NOHOSTNAME</tt>
<tt>SUCCESS</tt>
のいずれかです。
<p>
One of the following values is returned.
<tt>ENI_NOSOCKET</tt>, <tt>ENI_SALEN</tt>, <tt>ENI_FAMILY</tt>,
<tt>ENI_MEMORY</tt>, <tt>ENI_SYSTEM</tt>, <tt>ENI_NOHOSTNAME</tt>,
<tt>SUCCESS</tt>
<p>
<dt><a name="gethostbyname">lwres_gethostbyname_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyname_enc(const char *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyname() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyname() との違いは、lwres_getipnodebyname()
関数の呼び出し部を lwres_getipnodebyname_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyname() function.
The only difference between this function and the lwres_gethostbyname() function is that the call portion of the lwres_getipnodebyname() function is changed to the lwres_getipnodebyname_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyname() 関数から lwres_gethostbyname_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag. <tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specified for the encode type judgment flag in order to call the lwres_gethostbyname_enc() function from the lwres_gethostbyname() function.
<p>
lwres_getipnodebyname_enc() から返って来た hostent
構造体へのポインタを返します。
<p>
A pointer is returned that points to the hostent structure returned from lwres_getipnodebyname_enc().
<p>
<dt><a name="gethostbyname2">lwres_gethostbyname2_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyname2_enc(const char *, int, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyname2() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyname2() との違いは、lwres_getipnodebyname()
関数の呼び出し部を lwres_getipnodebyname_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyname2() function.The only difference between this function and the lwres_gethostbyname2() function is that the call portion of the lwres_getipnodebyname() function is changed to the lwres_getipnodebyname_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyname2() 関数から
lwres_gethostbyname2_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag. <tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specified for the encode type judgment flag in order to call the lwres_gethostbyname2_enc() function from the lwres_gethostbyname2() function.
<p>
lwres_getipnodebyname_enc() から返って来た hostent
構造体へのポインタを返します。
<p>
A pointer is returned that points to the hostent structure returned from lwres_getipnodebyname_enc().
<p>
<dt><a name="gethostbyname_r">lwres_gethostbyname_r_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyname_r_enc(const char *, struct hostent *, char *,
int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyname_r() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyname_r() との違いは、lwres_getipnodebyname()
関数の呼び出し部を lwres_getipnodebyname_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyname_r() function.
The only difference between this function and the lwres_gethostbyname_r() function is that the call portion of the lwres_getipnodebyname() function is changed to the lwres_getipnodebyname_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyname_r() 関数から
lwres_gethostbyname_r_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag. <tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specifed for the encode type judgment flag in order to call the lwres_gethostbyname_r_enc() function from lwres_gethostbyname_r() function.
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
NULL is returned when there is an error and a pointer to the hostent structure that contains the value is returned when the result of processing is normal.
<p>
<dt><a name="gethostbyaddr">lwres_gethostbyaddr_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyaddr_enc(const char *, int, int, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyaddr() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyaddr() との違いは、lwres_getipnodebyaddr()
関数の呼び出し部を lwres_getipnodebyaddr_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyaddr() function.
The only difference between this function and the lwres_gethostbyaddr() function is that the call portion of the lwres_getipnodebyaddr() function is changed to the lwres_getipnodebyaddr_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyaddr() 関数から lwres_gethostbyaddr_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag.
<tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specifed for the encode type judgment flag in order to call the lwres_gethostbyaddr_enc() function from tge lwres_gethostbyaddr() function.
<p>
lwres_getipnodebyaddr_enc() から返って来た hostent
構造体へのポインタを返します。
<p>
The pointer is returned that points to the hostent structure returned from lwres_getipnodebyaddr_enc().
<p>
<dt><a name="gethostbyaddr_r">lwres_gethostbyaddr_r_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyaddr_r_enc(const char *, int, int, struct hostent *,
char *, int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyaddr_r() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyaddr_r() との違いは、lwres_getipnodebyaddr()
関数の呼び出し部を lwres_getipnodebyaddr_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyaddr_r() function.
The only difference between this function and the lwres_gethostbyaddr_r() funciton is that the call portion of the lwres_getipnodebyaddr() function is changed to the lwres_getipnodebyaddr_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyaddr_r() 関数から
lwres_gethostbyaddr_r_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag.
<tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specified to the encode type judgment flag in order to call the lwres_gethostbyaddr_r_enc() function from the lwres_gethostbyaddr_r() function.
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
NULL is returned when there is an error and pointer to hostent structure that contains the value is returned when the result of processing is normal.
<p>
<dt><a name="getipnodebyname">lwres_getipnodebyname_enc</a>
<dd>
<pre>
struct hostent *
lwres_getipnodebyname_enc(const char *, int, int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getipnodebyname() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getipnodebyname() との違いは、lwres_getaddrsbyname()
関数の呼び出し部を lwres_getaddrsbyname_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getipnodebyname() function.
The only difference between this function and the lwres_getipnodebyname() function is that the call portion of the lwres_getaddrsbyname() function is changed to the lwres_getaddrsbyname_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getipnodebyname() 関数から
lwres_getipnodebyname_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag.
<tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encoding.
<tt>LWRES_ENCODING_LOCAL</tt> is specified for the encode type judgment flag in order to call the lwres_getipnodebyname_enc() function from the lwres_getipnodebyname() function.
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
NULL is returned when there is an error and a pointer to the hostent structure that contains the value is returned when the result of processing is normal.
<p>
<dt><a name="getipnodebyaddr">lwres_getipnodebyaddr_enc</a>
<dd>
<pre>
struct hostent *
lwres_getipnodebyaddr_enc(const void *, size_t, int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getipnodebyaddr() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getipnodebyaddr() との違いは、lwres_getnamebyaddr()
関数の呼び出し部を lwres_getnamebyaddr_enc() 関数に変更している点のみです。
<p>
With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getipnodebyaddr() function.
The only difference between this function and the lwres_getipnodebyaddr() function is that the call portion of the lwres_getnamebyaddr() function is changed to the lwres_getnamebyaddr_enc() function.
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getipnodebyaddr() 関数から
lwres_getipnodebyaddr_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
The last argument of the function is the encode type judgment flag.
<tt>LWRES_ENCODING_LOCAL</tt> can be specified for local encoding and <tt>LWRES_ENCODING_UCS</tt> can be specified for UTF-8 encodong.
<tt>LWRES_ENCODING_LOCAL</tt> is specified for the encode judgment flag in order to call the lwres_getipnodebyaddr_enc() function from the lwres_getipnodebyaddr() function.
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
NULL is returned when there is an error and a pointer to the hostent structure that contains the value is returned when the result of processing is normal.
</dl>
<hr>
<h2><a name="dig">dig/host/nslookup 修正</a></h2>
<h2><a name="dig">Fixes in dig/host/nslookup </a></h2>
<p>BIND-9 には DNS の問い合わせツールとして dig、host、nslookup という
コマンドが付属します。mDNkit の BIND-9 パッチにより、これらはいずれも
多言語ドメイン名が扱えるようになります。具体的には以下の機能が
付加されます。
<p>The DNS inquiry commands called dig, host, and nslookup are attached to BIND-9. Because of the BIND-9 patch in mDNkit, these commands can handle multilingual domain names. Specifically, the following functions are added.
<ul>
<li>エンコーディング変換<br>
コマンド引数、あるいは標準入力から入力された、ローカルエンコーディングで
表現されたドメイン名を、DNS プロトコル上で用いられるエンコーディングに変換し、
DNS の問い合わせを発行します。
<p>また DNS の返答に含まれる多言語ドメイン名をローカルエンコーディングに
変換し、表示します。
<li>Encoding conversion<br>
Converts domain names expressed in local encoding entered using command arguments or through standard input to the encoding used by the DNS protocol and issues a DNS inquiry.
<p>Also converts multilingual domain names included in the DNS response to local encoding and displays the result.
<p>
<li>正規化<br>
DNS の問い合わせで、ローカルエンコーディングで表現されたドメイン名を
DNS プロトコル上で用いられるエンコーディングに変換する際、ドメイン名の
正規化を行います。
<li>Normalization<br>
When converting domain names expressed in local encoding to the encoding used in DNS protocol as a result of a DNS inquiry, the domain names are normalized.
</ul>
これらの処理には MDN ライブラリの
<a href="library.html#res">res モジュール</a> を使用しています。
設定は<a href="clientconfig.html">クライアント設定ファイル</a>で行います。
<p>
The <a href="library.html#res">res module</a> of the MDN library is used for that processing.
The <a href="clientconfig.html">client configuration file</a> is used to make the setting.
</body>
</html>

View file

@ -1,401 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: clientconfig.html,v 1.1 2001/03/05 12:58:02 tale Exp $ -->
<html>
<head>
<title>client configuration specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>クライアント設定ファイル</h1>
<h1>Client Configuration File</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#overview">Overview</a>
<li><a href="#server-encoding">サーバエンコーディングエントリ</a>
<li><a href="#server-encoding">Server Encoding Entry</a>
<li><a href="#server-zld">サーバ ZLD エントリ</a>
<li><a href="#server-zld">Server ZLD Entry</a>
<li><a href="#normalization">正規化エントリ</a>
<li><a href="#normalization">Normalization Entry</a>
<li><a href="#alternate-encoding">代替エンコーディングエントリ</a>
<li><a href="#alternate-encoding">Alternate Encoding Entry</a>
<li><a href="#alias-file">エンコーディングエイリアスエントリ</a>
<li><a href="#alias-file">Encoding Alias Entries</a>
<li><a href="#local-codeset">ローカルコードセット</a>
<li><a href="#local-codeset">Local Code Set</a>
<li><a href="#sample">コンフィギュレーションファイル記述例</a>
<li><a href="#sample">Configuration File Description Example</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p>
クライアント設定ファイルは、多言語ドメイン名のための各種の設定が
記述されているファイルで、mDNkit を使用して多言語化 (国際化)
したクライアント側のリゾルバが読み込むファイルです。
このファイルは MDN ライブラリの
<a href="library.html#resconf">resconf モジュール</a> によって読み込まれ、
多言語ドメインに関する以下のような設定ができます。
<p>
The client configuration file is the file in which various settings for multilingual domain names are described. This file is loaded by the resolver at the client side for which the mDNkit is used to make it multilingual (internationalized). The <a href="library.html#resconf">resconf module</a> of the MDN library is used to load this file and the following settings related to multilingual domains can be made.
<ul>
<li>DNS プロトコル上のドメイン名のエンコーディング
<li>Encoding of domain name for the DNS protocol
<li>正規化形式
<li>Normalization form
<li>DNS の返答メッセージ中のドメイン名がローカルエンコーディングに
変換できなかった時に使用される、代替エンコーディング
<li>Alternate encoding used when domain names in the return message from the DNS cannot be converted to local encoding
<li>エンコーディング名のエイリアス
<li>Alias for encoding name
</ul>
<p>
このファイルは通常のテキストファイルで、ファイルの各行 (#
で始まるコメント行と、空行を除いて) は、
次のような単純なフォーマットで構成されます。
<p>
This file is a standard text file and each line of the file (except comment lines starting with # and blank lines) consists of following simple format.
<blockquote>
<pre>
キーワード 値...
</pre>
</blockquote>
<blockquote>
<pre>
Keyword Value...
</pre>
</blockquote>
<p>
クライアント設定ファイルは、mDNkit をデフォルトの設定でコンパイルした
場合には以下に配置されます。
<p>
The client configuration file is located as follows when the mDNkit is compilied using the default settings.
<blockquote>
<pre>
/usr/local/etc/mdnres.conf
</pre>
</blockquote>
<p>以降、各キーワードごとに設定内容を記述します。
<p>The setting content is discussed below for each keyword.
<p>
<h2><a name="server-encoding">サーバエンコーディングエントリ</a></h2>
<h2><a name="server-encoding">Server Encoding Entry</a></h2>
<p>
DNS プロトコル上の多言語ドメイン名のエンコーディングとして使用する
エンコーディング (コードセット名) を指定します。
<p>
Specifies encoding (code set name) used as the encoding for multilingual domain name in the DNS protocol.
<dl>
<dt>[構文]
<dd><tt>server-encoding</tt> <em>encoding</em>
</dl>
<dl>
<dt>[Syntax]
<dd><tt>server-encoding</tt> <em>encoding</em>
</dl>
<p><em>encoding</em> には、使用するエンコーディング名を記述し、
次のものが指定できます。
<p>The encoding name to be used is described in <em>encoding</em> and the following types can be specified.
<ul>
<li>UTF-8
<li>RACE
<li>BRACE
<li>LACE
<li>UTF-5
<li>iconv_open() ライブラリ関数で許可されているコードセット名
(使用できるコードセット名については、iconv() のドキュメントを
御覧ください)
<li>Refer to the document for iconv() for code set names permitted by the iconv_open() library function (code set names that can be used).
<li>後述のエイリアスファイルで定義されたエイリアス名
(<a href="#alias-file">「エンコーディングエイリアス」</a>
の項を御覧ください)
<li>Alias name defined by the alias file is explained later.
(Refer to the <a href="#alias-file">"Encoding Alias"</a>) section.
</ul>
<p>
このエントリは必須エントリであり、必ず記述しなければなりません。
<p>
This entry is a prerequisite and must always be described.
<h2><a name="server-zld">サーバ ZLD エントリ</a></h2>
<h2><a name="server-zld">Server ZLD Entry</a></h2>
<P>
DNS プロトコル上で使用される多言語ドメイン名のエンコーディング
(<a href="#server-encoding">server-encoding エントリ</a>で指定されたもの)
の中には、多言語ドメイン名と従来の ASCII ドメイン名とを区別するために
ZLD (zero-level domain) というドメインを必要とするものがあります。
ZLD は通常のトップレベルドメインのさらに上位ドメインに相当します。
ただしこれは DNS のシステム内部でのみ使われるドメインであり、
一般ユーザやアプリケーションからは見えないようになっています。
<P>
Of the encoding types (specified by <a href="#server-encoding">server-encoding entry</a>) for multilingual domain names used by the DNS protocol, some require a domain called ZLD (zero-level domain) in order to distinguish multilingual domain names from conventional ASCII domain names.
ZLD is equivalent to a higher level domain that is above the usual top level domain. Note, however, that this domain is only used inside the DNS system and ordinary users and application cannot see this domain.
<dl>
<dt>[構文]
<dd><tt>server-zld</tt> <em>ZLD</em>
</dl>
<dl>
<dt>[Syntax]
<dd><tt>server-zld</tt> <em>ZLD</em>
</dl>
<p>mDNkit のデフォルトの設定では、ZLD は使用できないようになっており、
設定ファイル中にこのエントリがあると警告メッセージが表示されます。
このエントリの指定を有効にするには、mDNkit の configure 実行時に
<tt>--enable-zld</tt> オプションによって ZLD サポートを有効にしておく
必要があります。
<p>ZLD cannot be used in the default settings of the mDNkit. When this entry exists in the configuration file, a warning message is displayed.
To make this entry specification effective, it is necessary to use the <tt>--enable-zld</tt> option to make ZLD support effective when executing configuration of the mDNkit.
<p>
<h2><a name="normalization">正規化エントリ</a></h2>
<h2><a name="normalization">Normalization Entry</a></h2>
<p>
正規化エントリでは、DNS サーバに送る前にドメイン名に適用すべき
正規化の方式を指定します。
<p>
The normalization entry is used to specify the normalization scheme that should be applied to domain names before sending it to the DNS server.
<dl>
<dt>[構文]
<dd><tt>normalize</tt> <em>scheme [scheme..]</em>
</dl>
<dl>
<dt>[Syntax]
<dd><tt>normalize</tt> <em>scheme [scheme..]</em>
</dl>
<p>
<em>scheme</em> には、正規化形式を記述します。
以下のものが記述できます。
<p>
The normalization form is described in <em>scheme</em>.
The following formats can be described.
<dl>
<dt><tt>ascii-lowercase</tt>
<dd>ASCII 大文字を小文字に変換
<dd>Converts uppercase ASCII to lowercase ASCII
<dt><tt>ascii-uppercase</tt>
<dd>ASCII 小文字を大文字に変換
<dd>Converts lowercase ASCII to uppercase ASCII
<dt><tt>unicode-lowercase</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr21">
<cite>Unicode Technical Report #21: Case Mappings</cite></a>
に基づいて、Unicode 大文字を小文字に変換
<dd>Converts uppercase Unicode to lowercase Unicode based on <a href="http://www.unicode.org/unicode/reports/tr21">
<cite>Unicode Technical Report #21: Case Mappings</cite></a>
<dt><tt>unicode-uppercase</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr21">
<cite>Unicode Technical Report #21: Case Mappings</cite></a>
に基づいて、Unicode 小文字を大文字に変換
<dd>Converts lowercase Unicode to uppercase Unicode based on<a href="http://www.unicode.org/unicode/reports/tr21">
<cite>Unicode Technical Report #21: Case Mappings</cite></a>
<dt><tt>unicode-form-c</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr15">
<cite>Unicode Technical Report #15: Unicode Normalization Forms</cite></a>
の「Form C」による正規化
<dd>Performs normalization using "Form C" of <a href="http://www.unicode.org/unicode/reports/tr15">
<cite>Unicode Technical Report #15: Unicode Normalization Forms</cite></a>
<dt><tt>unicode-form-kc</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr15">
<cite>Unicode Technical Report #15: Unicode Normalization Forms</cite></a>
の「Form KC」による正規化
<dd>Performs normalization using "Form KC" <a href="http://www.unicode.org/unicode/reports/tr15">
<cite>Unicode Technical Report #15: Unicode Normalization Forms</cite></a>
<dt><tt>ja-kana-fullwidth</tt>
<dd>日本語半角カナを全角カナに変換
<dd>Converts single-byte Japanese katakana to double-byte Japanese katakana
<dt><tt>ja-alnum-halfwidth</tt>
<dd>日本語の全角英数字および全角マイナス記号を半角文字に変換
<dd>Converts double-byte Japanese alphanumeric characters and double-byte minus symbols to single-byte characters.
<dt><tt>ja-compose-voiced-sound</tt>
<dd>日本語の全角かなとそれに続く濁点(゛)半濁点(゜)を
濁点・半濁点つきのかな1文字に変換
<dd>Converts double-byte Japanese katakana and following voiced consonant marks (゛) and circles attached to certain katakana (゜) to one katakana character attached with a voiced consonant mark or circle.
<dt><tt>ja-minus-hack</tt>
<dd>日本語の全角マイナス記号()をハイフン(<tt>-</tt>)に変換
<dd>Converts double-byte Japanese minus symbols () to hyphens (<tt>-</tt>).
<dt><tt>ja-delimiter-hack</tt>
<dd>日本語の句点(。)および全角ピリオド()をピリオド(<tt>.</tt>)に変換
<dd>Converts Japanese delimiters (。) and double-byte periods () to periods (<tt>.</tt>).
</dl>
<p>
正規化形式には複数の形式が指定可能です。複数の形式が指定された場合、
順序通りに (左から右に) 適用されます。
<p>
More than one formats can be specified for the normalization method. When more than one method is specified, they are applied in the order indicated (from left to right).
<p>
<h2><a name="alternate-encoding">代替エンコーディングエントリ</a></h2>
<h2><a name="alternate-encoding">Alternate Encoding Entry</a></h2>
<p>
mDNkit で多言語化されたリゾルバライブラリは、
アプリケーションが使用しているローカルコードセットを自動的に決定し、
DNS の応答メッセージ中のドメイン名を、そのコードセットに変換しようとします。
しかし、ドメイン名に使用されているある文字がローカルコードセットに
マップされていないために、変換に失敗することもあり得ます。
例えば日本語コードセットを使用している日本語のアプリケーションが、
日本語の文字セットに含まれていない中国語の文字を含んだ DNS
応答を受信したような時にこのようなことが起こります。
<p>
Resolver library that was made multilingual by the mDNkit automatically determines the local code set used by the application, and tries to convert the domain name in the response message of DNS to that code set.
However, conversion may fail because some characters used for the domain name are not mapped in the local code set.
For example, this happens when a Japanese application using the Japanese code set receives a DNS response that includes Chinese characters that are not included in the Japanese character set.
<p>
代替エンコーディングエントリは、上記のような問題が生じた時に
ローカルコードセットの代わりに使用するコードセットを指定します。
<p>
The alternate encoding entry specifies a code set to be used instead of the local code set when the above type of problem occurs.
<dl>
<dt>[構文]
<dd><tt>alternate-encoding</tt> <em>encoding</em>
</dl>
<dl>
<dt>[Syntax]
<dd><tt>alternate-encoding</tt> <em>encoding</em>
</dl>
<p>
<em>encoding</em> はコードセット名で、RACE のような
<a href="library.html#ACE">ASCII 互換エンコーディング</a>
を使用しなければなりません。
<p>
<em>encoding</em> is a code set name and <a href="library.html#ACE"> ASCII-conpatible encoding</a> such as RACE must be used.
<p>
<h2><a name="alias-file">エンコーディングエイリアスエントリ</a></h2>
<h2><a name="alias-file">Encoding Alias Entries</a></h2>
<p>
エンコーディングエイリアスエントリでは、コードセット名のエイリアスを
記述したファイルのパス名を記述します。
<p>
The encoding alias entry contains a description of the path to the file that describes the alias of the code set name.
<dl>
<dt>[構文]
<dd><tt>alias-file</tt> <em>pathname</em>
</dl>
<dl>
<dt>[Syntax]
<dd><tt>alias-file</tt> <em>pathname</em>
</dl>
<p>
<em>pathname</em> には、エイリアスファイルへのパス名を指定します。
このエイリアスファイルは通常のテキストファイルで、
以下のような形式の行から構成されます。
<p>
<em>pathname</em> specifies the path for the alias file.
This alias file is usually a text file and consists of lines in the following format.
<blockquote>
<pre>
<em>alias-name</em> <em>name</em>
</pre>
</blockquote>
<p>
<em>alias-name</em> は定義されるエイリアス名で、<em>name</em>
実際のコードセット名か、定義済のエイリアス名です。
<p>
<em>alias-name</em> is the defined alias name and <em>name</em> is the actual code set name or previously defined alias name.
<p>
<h2><a name="local-codeset">ローカルコードセット</a></h2>
<h2><a name="local-codeset">Local Code Set</a></h2>
<p>
クライアント設定ファイルにはローカルコードセットを指定するエントリは
存在しません。
ローカルコードセットはアプリケーションがそのときに使用している
ロケールの情報から決定されるからです。
ですから、それぞれのアプリケーションがそれぞれ異なるローカルコードセットを
使用することができますし、同一アプリケーションが複数のローカルコードセットを
切り替えながら使用することも可能です。
<p>
The client configuration file does not have an entry used to specify local code set.
This is because the local code set is determined based on the locale information used by the application at that time.
Therefore, each application can use a different local code set and also a single application can use more than one local code sets by switching between them.
<p>
mDNkit はロケール情報からアプリケーションの使用しているローカルコードセットを
推測しようとしますが、時には失敗することもあります。
例えば、C ロケールで動作しているにも関わらず
非 ASCII コードセットを使用しているアプリケーションではロケール情報から
ローカルコードセットを判定することは不可能ですし、mDNkit が知らない
ロケールで動作するアプリケーションの場合にも推測に失敗するでしょう。
<p>
mDNkit tries to guess the local code set used by the application based on locale information but it sometimes fails to do so.
For example, though an application may run in the C locale, if the application uses a non-ASCII code set it is impossible to determine the local code set from the locale information. Also, mDNkit will fail when it attempts to guess the local code set an application uses if it does not understand the locale information.
<p>
このような場合のために、環境変数 <tt>MDN_LOCAL_CODESET</tt> によって
アプリケーションのローカルコードセットを強制指定することができるように
なっています。
この変数にコードセット名 (もしくはそのエイリアス名)
を指定すると、mDNkit はロケールの設定に関わらず、指定したコードセットを
ローカルコードセットとして動作します。
<p>
In such cases, the <tt>MDN_LOCAL_CODESET</tt> environmental variable can be used to forcefully specify the local code set used by the application.
When the code set name (or its alias name) specifies this variable, mDNkit operates using the specified code set as the local code set regardless of the locale setting.
<p>
<h2><a name="sample">コンフィギュレーションファイル記述例</a></h2>
<h2><a name="sample">Configuration File Description Example</a></h2>
<p>
以下に、コンフィギュレーションファイルの記述例を示します。
<p>
Description examples of the configuration file are shown below.
<blockquote>
<pre>
#
# a sample configuration.
#
# DNS プロトコル上のエンコーディングとして RACE を使用する
# Uses RACE as encoding for the DNS protocol
server-encoding RACE
# 正規化の手順として、小文字に変換した後、KC 正規化法を使用する
# For the normalization procedure, converts to lowercase and then
# uses the KC normalization method
normalize unicode-lowercase unicode-form-kc
# 代替エンコーディングとして RACE を使用する
# Uses RACE for alternate encoding
alternate-encoding RACE
</pre>
</blockquote>
</body>
</html>

View file

@ -1,497 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: dnsproxy.html,v 1.1 2001/03/05 12:58:02 tale Exp $ -->
<html>
<head>
<title>dnsproxy specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>dnsproxy</h1>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p>
dnsproxyは、クライアントからのローカルコードベースの多言語ドメイン名を
含むDNS要求を受け取り、多言語化対応したDNSが受付けられるドメイン名に
変換し、また逆に、DNSからの応答の多言語ドメイン名を、
クライアント側で認識できる形式に戻します。
<p>
dnsproxy receives DNS requests including local code-based multilingual domain names from the client and converts them to domain names that can be accepted by the multilingual DNS. In reverse, it returns multilingual domain names included in responses from the DNS to a format that can be recognized by the client side.
<p>
これによって、クライアントは何も改造することなく
各種の多言語ドメイン名を使うことができるようになります。
また、DNSサーバから見た場合には、クライアント+dnsproxyによって
多言語ドメイン名に対応したクライアントとして動作しているように
見えることになります。
<p>Because of this, the client can use various multilingual domain names without modification.
From the DNS server's point of view, because of client + dnsproxy, the client operates as if it supports multilingual domain names.
<p>
ただし、dnsproxy が正しく動作するには、クライアントのリゾルバライブラリが
ローカルエンコーディングのドメイン名をそのまま透過させ、エラーにならない
ようになっている必要があります。残念ながら現在 UNIX のリゾルバライブラリの
多くは 8ビットスルーではないので、そのままでは dnsproxy を用いても
多言語ドメイン名を扱えるようにはなりません。この場合には
<p>
However, in order for dnsproxy to operate correctly, it is necessary for the resolver library of the client to transmit domain names in local encoding as is and does not cause an error. Regretably, many current UNIX resolver libraries are not 8-bit through and they cannot support multilingual domain names even when dnsproxy is used. In such cases, it is necessary to use the following methods.
<ul>
<li><a href="spec.html#eightbitthru-patch">BIND-8 の8ビットスルーパッチ</a>
を当てたリゾルバライブラリを使用する
<li>Use resolver library for which <a href="spec.html#eightbitthru-patch">8-bit through patch of BIND-8</a> is applied
<li>dnsproxy の代わりに <a href="runmdn.html">runmdn</a>
<a href="bind9.html">BIND-9 パッチ</a> を使用する
<li>Instead of dnsproxy, use <a href="runmdn.html">runmdn</a> or <a href="bind9.html">BIND-9 patch</a>.
</ul>
というような方法をとる必要があります。
<h2><a name="invoke">起動</a></h2>
<h2><a name="invoke">Usage</a></h2>
<blockquote>
<pre>
$ dnsproxy [<i>オプション...</i>]
</pre>
</blockquote>
<blockquote>
<pre>
$ dnsproxy [<i>Option...</i>]
</pre>
</blockquote>
<p>
<h2><a name="options">オプション</a></h2>
<h2><a name="options">Option</a></h2>
<dl>
<dt><a name="opt-daemon">-daemon</a>
<dd>
<p>
dnsproxyをデーモンとして起動します。
<p>
dnsproxy is activated as a daemon.
<p>
<dt><a name="opt-config">-config <i>config-file</i></a>
<dd>
<p>
コンフィギュレーションファイルを指示します。
コマンドラインで指示しなかった場合には
デフォルトのコンフィギュレーションファイルが使用されます。
詳しくは<a href="#config">コンフィギュレーション</a>
項で説明します。
<p>
Indicates the configuration file. When the command line does is not used to indicate a configuration file, the default configuration file is used. The details of this are explained in the <a href="#config">Configuration</a> section.
<p>
<dt><a name="opt-logfile">-logfile <i>log-file</i></a>
<dd>
<p>
dnsproxyが実行ログを出力するファイル名を指定します。
特に指定されなかった場合には、コンフィギュレーションファイルで
指示されたログファイル、あるいはデフォルトのログファイルに
出力されます。
<p>
Specifies the file name for dnsproxy to output the execution log. Unless otherwise specified, the execution log is output to the log file specified by the configuration file or the default log file.
</dl>
<p>
<h2><a name="config">コンフィギュレーション</a></h2>
<h2><a name="config">Configuration</a></h2>
<p>
設定情報はコンフィギュレーションファイルに記載されます。
コンフィギュレーションファイルは、
<b>dnsproxy</b>の起動時にコマンドラインで指示することができます。
<p>
The configuration information is written in the configuration file.
The configuration file can be specified by the command line upon activation of <b>dnsproxy</b>.
<blockquote>
<pre>
% <kbd>dnsproxy -config &lt;config-file&gt;</kbd>
</pre>
</blockquote>
コマンドラインで指示しなかった場合には
デフォルトのコンフィギュレーションファイルが使用されます。
デフォルトのコンフィギュレーションファイルは、ディレクトリ
<pre>
/usr/local/etc
</pre>
の下の
<pre>
dnsproxy.conf
</pre>
です。ディレクトリは、mDNkit作成時に
<pre>
configure --sysconfdir=DIR
</pre>
で指示することもできます。
<p>When the configuration file is not specified by the command line, the default configuration file is used.
The default configuration file is located in
<pre>
dnsproxy.conf
</pre>
under
<pre>
/usr/local/etc
</pre>
The directory can be specified by
<pre>
configure --sysconfdir=DIR
</pre>
when mDNkit is created.
<p>
コンフィギュレーションファイルはテキストファイルで、
以下のコンフィギュレーションデータを指定します。
<p>
The configuration file is a text file and specifies the following configuration data.
<dl>
<dt><a name="listen">listen</a><dd>
<p>
dnsproxyがクライアントからの要求を受付ける
ネットワークアドレス、ポート番号を指定します。
<p>
Specifies the network address and port number used by dnsproxy to accept requests from the client.
<pre>
listen &lt;address&gt;
</pre>
&lt;address&gt;は以下のいずれかの形式で指示します。
<p>&lt;address&gt; is specified using one of the following formats.
<blockquote>
<table>
<tr><td>&lt;IP address&gt;:&lt;port number&gt;</td></tr>
<tr><td>:&lt;port number&gt;</td></tr>
<tr><td>&lt;IP address&gt;</td></tr>
</table>
</blockquote>
省略された場合には
<br>When omitted
<blockquote>
<table>
<tr><td>IP address</td><td>0.0.0.0 # INADDR_ANY</td></tr>
<tr><td>port number</td><td>53</td></tr>
</table>
</blockquote>
が使用されます。
<br>is used.
<p>
<dt><a name="forward">forward</a><dd>
<p>
dnsproxyが、DNS要求を転送し、応答を受け取る本来のDNSサーバの
ネットワークアドレス、ポート番号を指定します。
<p>
dnsproxy specifies the original network address and port number of the DNS server that transfers DNS requests and accepts responses.
<pre>
forward &lt;address&gt; [ bind4compat ]
</pre>
&lt;address&gt;の形式は上の<a href="#listen">listen</a>のものと同じです。
<br>&lt;address&gt; format is the same as the above <a href="#listen">listen</a>.
<p>
オプションの <b>bind4compat</b>が指示された場合には、
UDPでリクエストを転送する時に、ソースアドレスとして、
listenで指示されたアドレス/ポートを使用します。
<p>When an option <b>bind4compat</b> is specified, the address/port specified by listen is used as the source address when a request is transferred via UDP.
<p>
<dt><a name="log-file">log-file</a><dd>
<p>
dnsproxyが実行ログを出力するファイル名を指定します。
<p>
Specifies the file name for dnsproxy to output the execution log.
<pre>
log-file &lt;path&gt;
</pre>
ログファイル名は、
以下のコマンドラインオプションで指定することもできます。
両方指定した場合にはコマンドラインオプションの指定のほうが優先されます。
<p>The log file name can be specified by the following command line option. When both are specified, priority is given to the command line option specification.
<pre>
dnsproxy -logfile &lt;address&gt;
</pre>
指定されなかった場合には、
<pre>
/tmp/dnsproxy.log
</pre>
に書き込まれます。
<p>When the log file name is not specified, the execution log is output to
<pre>
/tmp/dnsproxy.log
</pre>
<p>
<dt><a name="log-level">log-level</a><dd>
<p>
ログのレベルを設定します。
<p>Sets the log level.
<pre>
log-level &lt;level&gt;
</pre>
レベルとして指定できる値は次の通りです。
<p>The level values that can be specified are as follows.
<blockquote>
<dl>
<dt>none<dd>一切ログを記録しません。
<dt>none<dd>Logs are not recorded at all.
<dt>fatal<dd>致命的なエラーのみ記録します。
<dt>fatal<dd>Records only fatal errors.
<dt>warn<dd>警告メッセージも記録します
<dt>warn<dd>Records warning messages as well.
<dt>trace<dd>実行トレースメッセージも記録します。
<dt>trace<dd>Records execution trace messages as well.
</dl>
</blockquote>
<p>指定しなかった場合のデフォルトは warn です。
<p>When the value is not specified, the default is warn.
<p>none を指定した場合、ログファイルは作成されません。
<p>When none is specified, no log file is created.
<p>trace レベルを指定すると大量のログが出力されるので、短時間で
ログファイルが巨大になる可能性があります。注意してください。
<p>Use care that when the trace level is specified, large log files are output and it is possible that the log file can become very large in a short period of time.
<p>
<dt><a name="client-translation">client-translation</a><dd>
<p>
クライアント側でのドメイン名のエンコーディングを指示します。
<p>Indicates the encoding of the domain name at the client side.
<pre>
client-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
多言語ドメイン名に対応していないクライアントの場合には、
通常、クライアントのローカルエンコーディングになっています。
そのような場合には
<p>When the client does not support multilingual domain names, usually the local encoding used by the client is used. In such a case, use the following form
<pre>
client-translation . Shift_JIS
</pre>
という形で、&lt;ZLD&gt;無しで指示します。
<p>and with no &lt;ZLD&gt;.
<p>
多言語ドメイン名の手法によっては、
クライアント側で多言語ドメイン名を通常のDNSでも
受付けられる形式にエンコードして、それを通常のドメイン名と
区別するために ZLD (Zero Level Domain) を付加するものがあります。
そのような場合には、付加されるZLDとその時のドメイン名の
エンコーディング方法とを対応付けることにより、
他の多言語ドメイン名の手法のDNSサーバを利用することが
できるようになります。
<p>
Depending on the multilingual domain name method used, the client side encodes multilingual domain names so that the usual DNS can accept them and adds ZLD (Zero Level Domain) in order to distinguish them from the usual domain names.
In such cases, by associating the added ZLD and encoding method of the domain name at that time, it becomes possible to use DNS servers that use another multilingual domain name method.
<pre>
client-translation .i-dns.net UTF-5
</pre>
クライアント側のドメイン名のエンコーディングは、
ZLD が異なっていれば、複数指定することができます。
<p>More than one encoding method can be specified for domain names at the client side when the ZLD is different.
<p>
ただし、mDNkit のデフォルトの設定では ZLD の指定はできないように
なっています。ZLD を使用するためには、mDNkit のコンパイルの際、
<tt>configure</tt> コマンドに
<a href="../guide/install.html#enable-zld"><tt>--enable-zld</tt></a>
を指定する必要があります。
この指定をせずに mDNkit をコンパイルした場合には、ZLD の指定は
すべて無視されます。
<p>
However, ZLD cannot be specified with the default setting of mDNkit. In order to use ZLD, it is necessary to specify <a href="../guide/install.html#enable-zld"><tt>--enable-zld</tt></a> in the <tt>configure</tt> command when compiling mDNkit.
If mDNkit is compiled without this specification, ZLDs are all ignored even though they may be specified.
<p>
クライアントから送られてきたDNS要求のドメイン名は、
ここで指示したエンコーディングから、内部的に使用される
UTF-8エンコーディングに変換されます。
そして、後述の正規化、サーバ側エンコーディングへの変換が
行なわれてDNSサーバに送出されます。また、DNSサーバからの
応答は、逆に元のエンコデーィングに戻されてクライアントに
返されます。
<p>
The domain name of the DNS request sent from the client is converted from the specified encoding to the internally used UTF-8 encoding.
Then, normalization (explained below) and conversion to the server side encoding are performed and it is output to the DNS server. Also, the response from the DNS server is converted back to the orginal encoding and is returned to the client.
<p>
ここで指定可能なエンコーディング名は、mDNkit付属のlibmdnおよび
使用するiconv ライブラリに依存します。
iconv ライブラリによって、エンコーディング名が異なっている
ことがありますので、ライブラリのマニュアルをご覧になって
使用可能なエンコーディング名を確認してください。
付属のlibmdnでは、iconvが提供するエンコーディングの他に、
多言語化DNS用に提案されている
<p>
Encoding names that can be specified here depend on libmdn attached to mDNkit and iconv library used.
Encoding names may differ depending on the iconv library. Refer to the manual of the library and check the encoding names that can be used.
With the attached libmdn, in addition to the coding provided by iconv, the following proposed multilingual DNS coding methods are supported.
<blockquote>
<table>
<tr><td>UTF-5</td>
<td><a href="../../reference/draft/draft-jseng-utf5-01.txt">draft-jseng-utf5-01.txt</a></td>
</tr>
<tr><td>RACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-race-02.txt">draft-ietf-idn-race-02.txt</a></td>
</tr>
<tr><td>BRACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-brace-00.txt">draft-ietf-idn-brace-00.txt</a></td>
</tr>
<tr><td>LACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-lace-00.txt">draft-ietf-idn-lace-00.txt</a></td>
</tr>
</table>
</blockquote>
をサポートしています。
<p>
<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
<p>DNS サーバから返されたドメイン名がクライアントのローカルエンコーディングに
変換できない文字を含んでいた場合に、ローカルエンコーディングの代わりに使用する
エンコーディングを指定します。
<p>When a domain name returned from the DNS server includes characters that cannot be converted to the local encoding used by the client, this specifies the encoding to be used instead of local encoding.
<pre>
alternate-encoding &lt;Encoding&gt;
</pre>
指定するエンコーディングは必ず「ASCII互換エンコーディング (ACE)」と呼ばれる、
変換結果が従来のドメイン名として使用可能な文字 (英数字およびハイフン) だけ
からなるエンコーディングでなければなりません。たとえば ASCII 互換
エンコーディングの一つである RACE を指定する場合には次のように指定します。
<p>The specified encoding must be "ASCII-conpatible encoding (ACE)" so that the conversion result consists of only characters (alphanumeric characters and hyphens) that are used in conventional domain names. For example, to specify RACE (one type of ASCII-compatible encoding), specify as follows.
<pre>
alternate-encoding RACE
</pre>
<p>
<dt><a name="normalize">normalize</a><dd>
<p>
ドメイン名の正規化手法を指定します。
<p>
Specifies the normalization method used for domain names.
<pre>
normalize &lt;scheme&gt; ...
</pre>
正規化手法は複数指定可能で、左側から順に適用されていきます。
<p>More than one normalization method can be specified and they are applied in order starting from the left side.
<p>
クライアントから送られてきたDNS要求のドメイン名は、
内部的に使用されるUTF-8エンコーディングに変換された上で、
ここで指示した正規化が適用されます。
<p>
Domain names in the DNS request sent from the client are converted to internally used UTF-8 encoding and then the normalization specified here is applied.
<p>
次に示す正規化手法を指定することができます。
<p>
The following normalization methods can be specified.
<p>
<ul>
<li>ascii-uppercase
<li>ascii-lowercase
<li>unicode-uppercase
<li>unicode-lowercase
<li>unicode-form-c
<li>unicode-form-kc
<li>ja-kana-fullwidth
<li>ja-alnum-halfwidth
<li>ja-compose-voiced-sound
<li>ja-minus-hack
<li>ja-delimiter-hack
</ul>
<p>それぞれの内容については
<a href="../spec/library.html">libmdnのマニュアル</a>
<a href="../spec/library.html#normalizer">normalizer モジュール</a>
を参照してください。
<p>For details of each method, refer to <a href="../spec/library.html#normalizer">normalizer module</a> of the <a href="../spec/library.html">libmdn manual</a>
<p>
<dt><a name="server-translation">server-translation</a><dd>
<p>
DNSサーバ側のドメイン名エンコーディング方法を指示します。
<p>
Indicates the encoding method used for domain names at the DNS server side.
<pre>
server-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
ZLDが不要なエンコーディングであれば、<tt>&lt;ZLD&gt;</tt> の部分には
<tt>'.'</tt> を指示します。
<p>When the encoding method does not need a ZLD, specify <tt>'.'</tt> in <tt>&lt;ZLD&gt;</tt>.
<pre>
server-translation . UTF-8
</pre>
ZLDを必要するエンコーディングでは、ZLDとエンコーディング名の
両方を指定します。
<p>When the encoding method requires a ZLD, specify both the ZLD and encoding name.
<pre>
server-translation .i-dns.net UTF-5
</pre>
ZLD の指定を有効にするには、mDNkit のコンパイル時の設定が必要です。
<a href="#client-translation"><tt>client-translation</tt></a>の項を
ご覧ください。
<p>To make the ZLD specification active, you must set a setting when compiling mDNkit.
Refer to the <a href="#client-translation"><tt>client-translation</tt></a> section for details.
<p>
指定可能なエンコーディングは、前出の <a href="#client-translation">
<tt>client-translation</tt></a> でのものと同じです。
<p>
The encoding methods that can be specified are the same as those previously explained in <a href="#client-translation">
<tt>client-translation</tt></a>.
<p>
<dt><a name="user-id">user-id</a>
<dd>
<p>dnsproxy が動作するユーザを指定します。
<p>Specifies users for whom dnsproxy is operational.
<pre>
user-id &lt;user&gt;
</pre>
<p>通常、dnsproxy は特権ポートを使用するためルート権限で起動させる必要が
ありますが、ルート権限のままで動作させるのはセキュリティ上好ましくありません。
この指定により、dnsproxy は特権ポートを作成したあとサービスを開始する前に
指定したユーザの権限で動くようになります。
<p>Usually, since dnsproxy uses a special port, it can only be activated if the user has root authorization; however, operating under root authorization is not recommended for security reasons.
With this specification, after the special port is created, dnsproxy operates uner the specified user authorization before starting the service.
<p>&lt;user&gt; にはユーザ名あるいはユーザ ID 番号を指定することができます。
<br>User name or user ID number can be specified in &lt;user&gt;.
<p>
<dt><a name="group-id">group-id</a>
<dd>
<p>dnsproxy が動作するグループを指定します。
<p>Specifies the group wherein dnsproxy operates.
<pre>
group-id &lt;user&gt;
</pre>
これは <tt>user-id</tt> エントリと似ていますが、ユーザの代わりにグループを
指定する点が異なります。
<p>This looks like the <tt>user-id</tt> entry but differs in that a group is specified instead of a user.
<p>&lt;group&gt; にはグループ名あるいはグループ ID 番号を指定することが
できます。
<p>The group name or group ID number can be specied in &lt;group&gt;.
<p>
<dt><a name="root-directory">root-directory</a>
<dd>
<p>dnsproxy が動作する際のルートディレクトリを指定します。
<p>Specifies the root directry when dnsproxy operates.
<pre>
root-directory &lt;path&gt;
</pre>
<p>これもセキュリティ対策の一つです。dnsproxy が動作する際のルートディレクトリ
を指定することで、そのディレクトリの外にはアクセスできないようにします。
この指定により、dnsproxy はサービスを開始する前に、<em>chroot()</em>
システムコールを用いて指定したディレクトリをルートディレクトリとして
設定します。
<p>This is also a security measure. By specifying the root directory when dnsproxy operates, access other than by the specified directory is prevented.
Because of this specification, dnsproxy sets the specified directry using the <em>chroot()</em> system call as the root directory before dnsproxy starts the service.
<p>&lt;path&gt; にはルートとして設定したいディレクトリ名を指定します。
<p>Directry name to be set as the root is specified in &lt;path&gt;.
</dl>
<p>
<h2><a name="signal">シグナル</a></h2>
<h2><a name="signal">Signal</a></h2>
<p>dnsproxy に SIGHUP シグナルを送ると、ログファイルをいったん閉じ、
再度オープンするという動作を行います。これは次のような手順で
ログをアーカイブできるようにするためです。
<p>When a SIGHUP signal is sent to dnsproxy, the log file is closed and opened again. This is performed so that the log can be archived as described in the following procedure.
<ol>
<li><tt>mv</tt> コマンド等を用いてログファイルを別の名前にする。
<br>Use <tt>mv</tt> command to create a different name for the log file.
<li>dnsproxy に SIGHUP を送り、新たなログファイルをオープンさせる。
<br> Send a SIGHUP signal to dnsproxy to open a new log file.
</ol>
</body>
</html>

View file

@ -1,71 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: index.html,v 1.1 2001/03/05 12:58:02 tale Exp $ -->
<html>
<head>
<title>mDNkit Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDNkit ドキュメント</h1>
<h1>mDNkit Documentation</h1>
<p>mDNkit のドキュメントは以下のような3部構成となっています。
<p>The mDNkit consists of three documents as described below.
<ul>
<li><a href="guide/guide.html">mDNkit ユーザーズガイド</a><br>
システム管理者および一般ユーザ向けのマニュアルです。
<p>
<ul>
<li><a href="guide/guide.html">mDNkit User's Guide</a><br>
Manual for users and system administrators
<p>
<li><a href="spec/spec.html">mDNkit 仕様書</a><br>
本キットの各コンポーネントの仕様書です。
<p>
<li><a href="spec/spec.html">mDNkit Specifications</a><br>
Specifications for each component of this kit
<p>
<li><a href="http://www.nic.ad.jp/jp/research/idn/mdnkit/html/ja/faq/index.html">mDNkit Frequently Asked Questions</a><br>
本キットの FAQ (JPNIC Web ページへのリンク)です。
FAQ は随時更新されるため、このパッケージには含まれていません。
ご了承ください。
<li><a href="http://www.nic.ad.jp/jp/research/idn/mdnkit/html/ja/faq/index.html">mDNkit Frequently Asked Questions</a><br>
Link to the FAQ on the JPNIC Web page
Note that the FAQ is not included in this package because it is updated continually.
</ul>
<p>mDNkit ユーザーズガイドおよび mDNkit 仕様書の内容は
mDNkit バージョン 1.2 に対応しています。
<p>mDNkit User's Guide and Specifications are for mDNkit version 1.2.
<p>関連するドキュメントおよび関連ソフトウェアなどへのポインタをまとめた
<a href="guide/reference.html">参考文献</a>のページもご覧ください。
<p>Also refer to the following page containing pointers pertaining to related documents and softwares.
<a href="guide/reference.html">Reference Documentation</a>
<p>本キットに関するコメントは
<a href="mailto:idn-cmt@nic.ad.jp">idn-cmt@nic.ad.jp</a>
に、またバグレポートは
<a href="mailto:mdnkit-bugs@nic.ad.jp">mdnkit-bugs@nic.ad.jp</a>
にそれぞれお送りください。
<p>Please send comments to:
<a href="mailto:idn-cmt@nic.ad.jp">idn-cmt@nic.ad.jp</a>
and reports of bugs to:
<a href="mailto:mdnkit-bugs@nic.ad.jp">mdnkit-bugs@nic.ad.jp</a>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,287 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: mdnconv.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>mdnconv specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mdnconv</h1>
<p>&nbsp;<p>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p><b>mdnconv</b> はネームサーバの設定ファイル <tt>named.conf</tt>
ゾーンマスタファイルのためのコードセット (エンコーディング) 変換ツールです。
<p><b>mdnconv</b> is a code set (encoding) conversion tool for the <tt>named.conf</tt> configuration or zone master files used with name servers.
<p><b>mdnconv</b> は引数で指定されたファイル、あるいは標準入力から
テキストを入力し、オプションで指定されたコードセット変換および正規化を
実行し、結果を標準出力に書き出します。
<p><b>mdnconv</b> receives the file specified by an argument or text entered using the keyboard, executes the code set conversion and normalization specified by the option, and writes the result in standard output.
<p>具体的な使い方に関しては利用者ガイドの
<a href="../guide/bindconfig.html#file"><tt>named.conf</tt>
ゾーンマスタファイルの作成</a>の項をご覧ください。
<p>For detailed information about usage, refer to <a href="../guide/bindconfig.html#file"><tt>named.conf</tt>, Creating a Zone Master File</a> in the User's Guide.
<p>
<h2><a name="invoke">起動</a></h2>
<h2><a name="invoke">Startup</a></h2>
<blockquote>
<pre>
% mdnconv [<i>オプション...</i>] [<i>ファイル...</i>]
</pre>
</blockquote>
<blockquote>
<pre>
% mdnconv [<i>Option...</i>] [<i>File...</i>]
</pre>
</blockquote>
<h2><a name="options">オプション</a></h2>
<h2><a name="options">Option</a></h2>
<dl>
<dt><a name="in-opt">-in</a> <i>in-code</i>
<dd>入力テキストのコードセット名 <i>in-code</i> を指定します。
<i>in-code</i> に指定できるコードセット名は、次のいずれかです。
<dd>Specifies the code set name <i>in-code</i> of input text.
The following code set names can be specified in <i>in-code</i>.
<ul>
<li><em>iconv_open()</em> が受け付けるコードセット名
<li>Code set name accepted by <em>iconv_open()</em>
<li><tt>UTF-5</tt>
<li><tt>RACE</tt>
<li><tt>BRACE</tt>
<li><tt>LACE</tt>
<li>上記のコードセット名の別名 (<a href="#alias-opt">-alias</a> オプション参照)
<li>Alias of above code set names (refer to the <a href="#alias-opt">-alias</a> option)
</ul>
<p>指定しなかった場合には現在のロケールからデフォルトのコードセットを
求めます。
<p>When not specified, the default code set is obtained from the current locale.
<p>
<dt>-out <i>out-code</i>
<dd>出力テキストのコードセット名 <i>out-code</i> を指定します。
<i>out-code</i> に指定できるコードセット名は
<a href="#in-opt">-in</a> オプションの <i>in-code</i> と同じです。
<dd>Specifies the code set name <i>out-code</i> of output text.
Code set names that can be specified for <i>out-code</i> are the same as for <i>in-code</i> of the <a href="#in-opt">-in</a> option.
<p>指定しなかった場合には
<a href="clientconfig.html">クライアント設定ファイル</a>
<a href="clientconfig.html#server-encoding">
サーバエンコーディングエントリ</a>
に設定されているコードセットが使用されます。
<br>When not specified, the code set specified in <a href="clientconfig.html#server-encoding"> server encoding entry</a> of the <a href="clientconfig.html"> client configuration file</a> is used.
<p>
<dt>-normalize <i>scheme</i>
<dd>正規化の方式を指定します。<i>scheme</i>に指定できる方式は
次のいずれかです。
<dd>Specifies the normalization method. The following methods can be specified for <i>scheme</i>.
<ul>
<li>ascii-uppercase
<li>ascii-lowercase
<li>unicode-uppercase
<li>unicode-lowercase
<li>unicode-form-c
<li>unicode-form-kc
<li>ja-kana-fullwidth
<li>ja-alnum-halfwidth
<li>ja-compose-voiced-sound
<li>ja-minus-hack
<li>ja-delimiter-hack
</ul>
個々の正規化方式については MDN ライブラリの
<a href="library.html#normalizer">normalizer モジュール</a>をご覧ください。
<p>For individual normalization methods, refer to the <a href="library.html#normalizer">normalizer module</a> of the MDN library.
<p>このオプションは複数指定することが可能です。複数指定した場合には、
指定した順に正規化が行われます。
<p>With this option, more than one method can be specified. When multiple methods are specified, normalization takes place in the order of the specification.
<p>このオプションを指定しなかった場合には
<a href="clientconfig.html">クライアント設定ファイル</a>
<a href="clientconfig.html#normalization">正規化エントリ</a>
指定されている正規化方式が使用されます。
<p>When this option is not specifed, the normalization method specified in <a href="clientconfig.html#normalization">normalization entry</a> of the <a href="clientconfig.html">client configuration file</a> is used.
<p>
<dt><a name="zld-opt">-zld</a> <i>ZLD</i>
<dd>使用する ZLD を指定します。変換されるドメイン名が
ピリオドで終わる FQDN で、かつ最後が <i>ZLD</i>
一致した場合には、一致した部分は変換対象から外されます。
これは UTF-5 など一部の ASCII互換エンコーディングにおいて、ZLD 部分が
変換されないようにするためにするために必要な処理です。
<dd>Specifies ZLD. When the domain name to be converted is FQDN that ends with a period and also the last character matches with <i>ZLD</i>, the matched part will not be converted.
This processing is necessary so that the ZLD part is not converted in some ASCII-compatible encoding schemes such as UTF-5.
<p>このオプションを指定しなかった場合には
<a href="clientconfig.html">クライアント設定ファイル</a>
<a href="clientconfig.html#server-zld">サーバ ZLD エントリ</a>
指定されている値が使用されます。
<p>When this option is not specified, the value specified in the <a href="clientconfig.html#server-zld">server ZLD entry</a> of the<a href="clientconfig.html"> client configuration file</a> is used.
<p>
<dt><a name="auto-opt">-auto</a>
<dd><a href="#zld-opt">-zld</a> オプションと組み合わせて使用します。
もし変換対象である、非ASCII文字を含むドメイン名の最後が
ピリオドで終わっていた場合に、-zld オプションで指定した ZLD
がそのあとに自動的に付加されます。
これによってゾーンマスタファイル等に ZLD を明示的に書く必要が
少なくなりますが、この補完機能は完全ではないので、明示的に ZLD を
書かなければならない場合もあります。一般的にはこの機能に
頼らない方がよいでしょう。
<dd>Used in combination with the <a href="#zld-opt">-zld</a> option.
When a domain name is converted that includes non-ASCII characters and ends with a period, ZLD specified by -zld option is automatically added after the period.
This reduces the need to explicitly write ZLD for zone master files, etc. However, because this is not a perfect complementary function, ZLD sometimes need to be explicitly written. In general, it is recommended that you do not rely on this function.
<p>
<dt>-whole
<dd>正規化とターゲットコードセットへの変換を
入力されたテキスト全体に対して行います。このオプションを指定しなければ
非ASCII文字を含むドメイン名だと判断された部分のみが変換対象と
なります。詳細は<a href="#detail">変換処理の詳細</a>をご覧ください。
<dd>Normalization and conversion to the target code set are applied to the entire entered text. When this option is not specified, only the part where it is determined that the domain name includes non-ASCII characters is the subject of conversion. For details, see <a href="#detail">Details of Conversion Processing</a>.
<p>
<dt>-alias <i>path</i>
<dd>コードセット名の別名を定義したファイル <i>path</i> を指定します。
このファイルはテキストファイル形式で、1行に一組ずつ
コードセット名の別名と正式名とを一つ以上のスペースで区切って書いた
ものです。例えば次の例は <tt>Shift_JIS</tt><tt>EUC-JP</tt>
別名としてそれぞれ <tt>sjis</tt><tt>euc-jp</tt> を定義するものです。
<dd>Specifies the file <i>path</i> that defines the alias name of the code set name.
This file is a text file and in each line, one set of the alias name and formal name of the code set is written with one or more spaces as a delimiter. For example, the following examples <tt>Shift_JIS</tt> and <tt>EUC-JP</tt> define <tt>sjis</tt> and <tt>euc-jp</tt> as the alias.
<blockquote>
<pre>
# "#" で始まる行はコメント
sjis Shift_JIS
euc-jp EUC-JP
</pre>
</blockquote>
<blockquote>
<pre>
# Lines that begin with a "#" are comments
sjis Shift_JIS
euc-jp EUC-JP
</pre>
</blockquote>
<dt>-noconf
<dd><a href="clientconfig.html">クライアント設定ファイル</a>
読み込まないようにします。
<dd>The <a href="clientconfig.html">client configuration file</a> is not loaded.
<p>
<dt>-flush
<dd>行ごとに出力をフラッシュします。mdnconv はファイルやパイプへの
出力の場合、通常は複数行のデータをまとめて書き出しますが、この
オプションを指定すると1行ごとに変換結果を書き出します。
通常はこのオプションを指定する必要はありませんが、
mdnconv をフィルタプログラムとして他のプログラムから利用する場合などに
便利なことがあります。
<dd>Flushes output for each line. When outputting to a pipe file, omdnconv usually writes data from a multiple number of lines in a single operation. By specifying this option, conversion result is written line by line.
Usually, this option does not need to be specified but it may be useful when using mdnconv as a program to filter output from another program.
</dl>
<h2><a name="detail">変換処理の詳細</a></h2>
<h2><a name="detail">Details of Conversion Processing</a></h2>
<p><b>mdnconv</b> が行う変換処理をステップごとに記述します。
<p>The steps performed during conversion processing by <b>mdnconv</b> are described below.
<ol>
<li>ファイルあるいは標準入力からテキストを1行読み込みます。
<br>Loads a file or one line of text entered with a keyboard.
<p>
<li>行末の改行コードを取り除きます。
これは -whole オプションをつけて <b>mdnconv</b> を実行し、かつ
出力エンコーディングが UTF-5 や RACE など ASCII 互換
エンコーディングの場合に、改行コードも UTF-5 や RACE で
エンコードされてしまい、改行がなくなってしまうのを避けるためです。
<br>Removes the carriage return at the end of the line. This prevents the carriage return from dissapearing; this is needed because when <b>mdnconv</b> is executed with the -whole option set, and also when the output encoding is ASCII-compatible encoding such as UTF-5 or RACE, the carriage code will also be encoded using UTF-5 or RACEencoding.
<p>
<li>行を UTF-8 エンコーディングに変換します。変換には
MDN ライブラリの <a href="library.html#converter">converter モジュール</a>
を使用します。
<br>Converts the line to UTF-8 encoding. The <a href="library.html#converter">converter module</a> of the MDN library is used for conversion.
<p>通常は行全体を UTF-8 に変換しますが、入力コードセットが
"RACE" の場合には、RACE エンコーディングを識別するプリフィックスを用いて
RACE エンコードされた部分のみを取り出して UTF-8 に変換します。
<p>Usually, the entire line is converted to UTF-8. However, when the input code set is "RACE", a prefix that identifies RACE encoding is used to extract the RACE encoded part for conversion to UTF-8.
<p>
<li>変換結果が UTF-8 として正しいエンコーディングであるかをチェックします。
これには MDN ライブラリの <a href="library.html#utf8">utf8 モジュール</a>
を使用します。本来この処理は不要なはずですが、コード変換の実装に
バグがあった場合に早い段階で検出できるよう、ここでチェックをするように
してあります。
<br>Checks whether or not the conversion result is correctly encoded as UTF-8.
The <a href="library.html#utf8">utf8 module</a> of the MDN library is used for this operation.
Basically, this processing is not necessary but checking is performed at this point so that if there is a bug in code conversion implementation, it can be detected at an early stage.
<p>
<li>-whole オプションが指定されていれば次の処理対象の取り出しを飛ばし、
行全体を処理対象として 7. に飛びます。
<br>When the -whole option is specified, extraction of the processing target explained below is skipped and processing jumps to Step 7 because the entire line is the processing target.
<p>
<li>UTF-8に変換された行の中から多言語ドメイン名の部分を取り出します。
これには MDN ライブラリの
<a href="library.html#selectiveencode">selectiveencode モジュール</a>
を使用します。取り出されるのは次のような部分文字列です。
<br>In a line that was converted to UTF-8, the multilingual domain name part is extracted.
The MDN <a href="library.html#selectiveencode">selectiveencode module</a> of the MDN library is used for this step.
The following partial text strings are extracted.
<ul>
<li>1文字以上の非ASCII文字を含むこと。
<br>Text that includes one or more non-ASCII characters
<li>従来のドメイン名に許される文字 (アルファベット、数字、ハイフン)、
非ASCII文字、ピリオドだけから構成されていること
<br>Text that consists of only characters permitted for conventional domain names (alphabet, numbers, hyphens), non-ASCII characters, and periods.
</ul>
<p>取り出された部分のみを以降の正規化等の処理対象とします。
<p>Only the extracted part is the processing target for the subsequent normalization and other processing.
<p>
<li>正規化を行います。
これには MDN ライブラリの
<a href="library.html#normalizer">normalizer モジュール</a>
を使用します。
<br>Normalization is performed.
The <a href="library.html#normalizer">normalizer module</a> of the MDN library is used for this operation.
<p>
<li>再度変換結果が UTF-8 として正しいエンコーディングであるかをチェックします。
本来この処理は不要なはずですが、正規化の実装に
バグがあった場合を考えてチェックを入れてあります。
<br>In this operation, a check is performed as to whether or not the conversion result is correctly encoded as UTF-8.
In essence, this processing is not necessary but checking is performed here in consideration of the possibility of bugs in normalization.
<p>
<li>正規化された文字列の最後がピリオドで終わっており、かつ
-zld オプションで指定された ZLD と文字列がマッチすれば、ZLD の部分を
次のコードセット変換の対象から外します。これは ZLD の部分まで
(UTF-5 などに) 変換されてしまうのを防ぐためです。
<br>When the normalized text string ends with a period and also matches the ZLD specified using -zld option, the ZLD part will not be included in the next code set conversion target. This method is used to prevent conversion of the ZLD part (to UTF-5, etc).
<p>
<li>UTF-8 エンコーディングから -out で指定された出力エンコーディングに
変換します。変換には
MDN ライブラリの <a href="library.html#converter">converter モジュール</a>
を使用します。
<br>Converts from UTF-8 encoding to the output encoding specified by -out. The <a href="library.html#converter">converter module</a> of the MDN library is used for this operation.
<p>
<li>出力エンコーディングに変換する前の文字列がピリオドで終わっており、
かつ -auto オプションが指定されていれば、文字列の後に ZLD を付加します。
<br>When a text ends with a period prior to converting to the output encoding, and also the -auto option is specified, ZLD will be added after the text string.
<p>
<li>-whole オプションが指定されていた場合には変換された文字列をそのまま
標準出力に出力します。
指定されていなかった場合には、変換された文字列と 6. で処理対象と
ならなかった部分とをマージしてからやはり標準出力に出力します。
どちらの場合も最後に改行コードを出力します。
<br>When the -whole option is specified, the converted text string is output in standard output.
When the -whole option is not specified, the converted text string and the part that was excluded from conversion in Step 6 above are merged and then output in standard output.
In both cases, the carriage return code is added at the end.
<p>
<li>すべての入力行を処理し終われば終了します。そうでなければ 1. に
戻ります。
<br>The procedure ends when all input lines are processed. If not, the process returns to Step 1.
</ol>
</body>
</html>

View file

@ -1,165 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: runmdn.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>runmdn specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>runmdn</h1>
<p>&nbsp;<p>
<h2><a name="overview">概要</a></h2>
<h2><a name="overview">Overview</a></h2>
<p><b>runmdn</b> は BIND-4 あるいは BIND-8 をベースとした
リゾルバライブラリを持つクライアントを、
再コンパイルなしに多言語ドメイン名を扱えるようにするためのコマンドです。
<p>The <b>runmdn</b> command allows clients that use a BIND-4 or BIND-8 based resolver library to support multilingual domain names without re-compiling.
<p>
<h2><a name="invoke">起動</a></h2>
<h2><a name="invoke">Invoke</a></h2>
<blockquote>
<pre>
% runmdn <i>コマンド</i> [<i>引数...</i>]
</pre>
</blockquote>
<blockquote>
<pre>
% runmdn <i>Command</i> [<i>Argument...</i>]
</pre>
</blockquote>
<p>例えば <tt>telnet</tt> コマンドで多言語ドメイン名を扱うためには
次のようにします。
<p>For example, multilingual domain names can be supported using a <tt>telnet</tt> command as follows.
<blockquote>
<pre>
% runmdn telnet ログイン.どこかの会社.jp
</pre>
</blockquote>
<blockquote>
<pre>
% runmdn telnet ログイン.どこかの会社.jp
</pre>
</blockquote>
<h2><a name="invoke">実装</a></h2>
<h2><a name="invoke">Implementation</a></h2>
<p><b>runmdn</b> は共有ライブラリのプリロード機構を用いて、標準の
リゾルバライブラリに含まれる関数の一部を、多言語ドメイン名の処理機能を持つ
別のバージョンに動的に置換えることで、クライアントでの多言語ドメイン名の
処理を実現します。
<p><b>runmdn</b> implements processing of multilingual domain names by the client using the pre-load mechanism of the common library, and dynamically replaces a part of function included in the standard resolver library with another version that has a multilingual domain name processing function.
<p>多くのシステムでは共有ライブラリのプリロードは環境変数
<em>LD_PRELOAD</em> を用いて実現されています。この環境変数にプリロードしたい
共有ライブラリファイルのパス名を指定すると、クライアントの実行時に、
アプリケーションに標準の共有ライブラリがリンクされる前に
指定したライブラリがリンクされます。これによって標準のライブラリ関数を
置換えることができます。
<p>In many systems, pre-loading of the common library is implemented using an environmental variable <em>LD_PRELOAD</em>. By specifying the path name of the common library file to pre-load in this environmental variable, when the client executes, the specified library is linked before the standard common library of the application is linked. Because of this, the standard library function can be replaced.
<p>したがって、<b>runmdn</b> の実体は、この環境変数を設定し、引数で
指定されたコマンドを起動するだけのシェルスクリプトであり、実際に
多言語ドメイン名の処理を行うのはアプリケーションにリンクされる
共有ライブラリ <b>libmdnresolv</b> です。
<p>Therefore, in reality <b>runmdn</b> is a shell script that sets this environmental variable and invokes the commands specified by arguments, and actual multilingual domain name processing is performed by the shared library <b>libmdnresolv</b> linked to the application.
<p><b>libmdnresolv</b> をリンクすることにより、BIND4 あるいは BIND8 ベースの
リゾルバライブラリで用いられている次の関数が置き換わります。
<p>By linking <b>libmdnresolv</b>, the following functions used by BIND4 or BIND8 based resolver library are replaced.
<blockquote>
<pre>
dn_comp
dn_expand
res_hnok
res_ownok
res_mailok
res_dnok
</pre>
</blockquote>
<p>それぞれの変更点を簡単に記述します。
<p>Changes in each function are briefly explained below.
<dl>
<dt>dn_comp<dd>
指定されたドメイン名を DNS プロトコルで用いられるドメインデータに変換する前に、
ローカルコードセットから DNS プロトコル上で用いられるエンコーディングへの
変換および正規化、(必要ならば) ZLDの付加を行います。
<br>Before the specified domain name is converted to the domain data for the DNS protocol, conversion from local encoding to the code set used by the DNS protocol and normanization, and addition of ZLD (if necessary) are performed.
<dt>dn_expand<dd>
DNS プロトコルで用いられるドメインデータをドメイン名文字列に変換した後、
(必要なら) ZLD を削除し、ローカルコードセットへの変換を行います。
また通常この関数はドメイン名に含まれる ASCII 以外の文字を
バックスラッシュエスケープする処理をしますが、これを抑制します。
<br>After the domain data used in DNS protocol is converted to the domain name text string, deletion of ZLD (if necessary) and conversion to local code set are performed.
Usually, this function applies backslash escape to non-ASCII characters but this processing is suppressed.
<dt>res_hnok<dd>
どんな文字でも正当な文字であると判断するようにします。
<br>All characters are determined to be valid.
<dt>res_ownok<dd>
どんな文字でも正当な文字であると判断するようにします。
<br>All characters are determined to be valid.
<dt>res_mailok<dd>
どんな文字でも正当な文字であると判断するようにします。
<br>All characters are determined to be valid.
<dt>res_dnok<dd>
どんな文字でも正当な文字であると判断するようにします。
<br>All characters are determined to be valid.
</dl>
<p>エンコーディング変換や正規化、ZLD の処理等はすべて
<a href="library.html">MDN ライブラリ</a> (libmdn) の
<a href="library.html#res">res モジュール</a>を使用しています。
<p>For all processing such as encoding conversion, normalization and ZLD, <a href="library.html#res">res module</a> of <a href="library.html">MDN library</a> (libmdn) is used.
<blockquote>
現在の実装では <b>libmdnresolv</b> は MDN ライブラリ (libmdn) を
呼び出すのではなく、libmdn 自体を内部に抱え込むような形態になっていますが、
これは単なる実装上の都合からそうなっているだけで、論理的には MDN
ライブラリの機能を呼び出しているといってよいでしょう。
<br>In the current implementation, <b>libmdnresolv</b> does not call the MDN library (libmdn) but holds libmdn itself internally. This is for convenience in implementation, but logically, the MDN library function is being called.
</blockquote>
<p>また使用するエンコーディングや正規化の設定は
<a href="clientconfig.html">クライアント設定ファイル</a>の設定を
利用します。
<p>Also, use "setup"in <a href="clientconfig.html">client configuration file</a>for encoding or normalization setup.
<h2><a name="invoke">制限</a></h2>
<h2><a name="invoke">Restrictions</a></h2>
<p><b>runmdn</b> にはいくつかの制限があり、どんなシステムでも使えるわけでは
ありません。
<p>There are certain restrictions on <b>runmdn</b> and it cannot be used in every system.
<ul>
<li>runmdn は共有ライブラリの動的リンク機構を用いているので、
共有ライブラリが使用できるシステムでなければなりません。
<li>Since runmdn uses the dynamic link mechanism of the shared library, the system must be able to use the shared library.
<li>また環境変数 <em>LD_PRELOAD</em> または類似の機構による
ライブラリのプリロード機能を持つシステムでなければなりません。
<li>Also, the system must have a library pre-load function using the <em>LD_PRELOAD</em> environmental variable or similar mechanism.
<li>runmdn の対象となるコマンドはリゾルバライブラリをスタティックリンク
していてはなりません。
<li>The target commands of runmdn must not statically link the resolver library.
<li>システムのライブラリが iconv() 関数を提供していない場合、外部の
ライブラリを用いることになりますが、そのライブラリも共有ライブラリで
なければなりません。
<li>When the system's library does not provide an iconv() function, an external library is used. This library must be a shared library.
<li>システムのリゾルバライブラリは BIND4 あるいは BIND8 ベースのものでなければ
なりません。
<li>System's resolver library must be BIND4 or BIND8 based.
<li>セキュリティ上の理由から一般に setuid されたコマンドはプリロード機能が
使えないようになっているので、setuid されたコマンドであってはなりません。
<li>For security reasons, generally speaking setuid commands cannot use a pre-load function, therefore, the command must not be setuid.
</ul>
</body>
</html>

View file

@ -1,181 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: spec.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>mDNkit specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDNkit 仕様書</h1>
<h1>mDNkit Specifications</h1>
<ul>
<li><a href="#overview">全体構成<br>
Overall Structure</a>
<li><a href="dnsproxy.html">dnsproxy</a>
<li><a href="mdnconv.html">mdnconv</a>
<li><a href="bind9.html">BIND-9 パッチ<br>
BIND-9 patch</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="library.html">MDN ライブラリ<br>
MDN library</a>
<li><a href="clientconfig.html">クライアント設定ファイル<br>
Client Configuration File</a>
</ul>
<hr>
<h2><a name="overview">全体構成</a></h2>
<h2><a name="overview">Overall Structure</a></h2>
<h3><a name="components">キットを構成するコンポーネント</a></h3>
<h3><a name="components">Kit Components</a></h3>
<p>mDNkit は次のようなコンポーネントから構成されます。
<p>The mDNkit is comprised of the following components.
<ul>
<li><a href="dnsproxy.html">dnsproxy</a><br>
DNS サーバのプロキシサーバとして動作し、クライアントからの DNS
メッセージを DNS サーバに中継し、また DNS サーバから返される
DNS メッセージをクライアントに中継します。<br>
Operating as a proxy server for the DNS server, this command relays DNS messages from the client to the DNS server and relays DNS messages returned from the DNS server to the client.<br>
クライアントから送られてきた DNS メッセージを中継する際には、
メッセージ中のドメイン名を、クライアントの使用する
ローカルエンコーディングから、多言語化された DNS サーバの使用する
DNS プロトコル上のエンコーディングに変換するとともに
正規化や ZLD の除去・付加を行います。<br>
When DNS messages sent from the client are relayed, the domain name in the message is converted from the local encoding used by the client to the DNS protocol encoding used by the multilingualized DNS server and normalization or deletion/addition of ZLD is also performed.<br>
また DNS サーバから返された DNS メッセージを中継する際には、
メッセージ中のドメイン名を、DNS プロトコル上のエンコーディングから
ローカルエンコーディングに変換し、同時に ZLD の除去・付加を行います。<br>
In addition, when a DNS message returned from the DNS server is relayed, the domain name in the message is converted from the DNS protocol encoding to the local encoding, and at the same time ZLD is deleted/added.<br>
<p>
<li><a href="mdnconv.html">mdnconv</a><br>
ゾーンマスタファイルや <tt>named.conf</tt> ファイルのエンコーディング
変換用ツールです。ローカルエンコーディングで記述されたこれらのファイルを、
多言語化された DNS サーバが使用するDNS プロトコル上のエンコーディングに
変換し、同時に正規化も行います。
<p> This is an encoding conversion tool for zone master files or <tt>named.conf</tt> files. These locally-encoded files are converted to the DNS protocol encoding used by the multilingualized DNS server, and normalization is performed at the same time.
<p>
<li><a href="bind9.html">BIND-9 パッチ</a><br>
<li><a href="bind9.html">BIND-9 Patch</a><br>
BIND-9 で多言語ドメイン名を扱えるようにするためのパッチです。
このパッチを適用することにより、BIND-9 のリゾルバに多言語ドメイン名の
エンコーディング変換や正規化の機能が付加されます。これにより
dnsproxy を使用することなく、多言語ドメイン名が扱えるようになります。
また dig 等のツールでも多言語ドメイン名を扱えるようになります。
<p>This patch adds to BIND-9 the ability to support multilingual domain names.
This patch adds encoding conversion of multilingual domain names and normalization functions to the BIND-9 resolver. Because of this, multilingual domain names will be supported without using dnsproxy.
Also, tools such as dig will be able to support multgilingual domain names.
<p>
<li><a href="runmdn.html">runmdn</a><br>
BIND-4 あるいは BIND-8 ベースのアプリケーションを再コンパイルすることなしに
多言語ドメイン名を扱えるようにするためのコマンドです。
アプリケーションの実行時に MDN ライブラリを動的にリンクすることにより
アプリケーションにリンクされているリゾルバに多言語ドメイン名の
エンコーディング変換や正規化の機能が付加されます。これにより
dnsproxy を使用することなく、多言語ドメイン名が扱えるようになります。
<p> This command allows support of multilingual domain names in BIND-4 or BIND-8 based applications, without re-compiling.
By dynamically linking the MDN library when the application is executed, encoding conversion of multilingual domain names and normalization functions are added to the resolver linked to the application. Because of this, multilingual domain names can be handled without using dnsproxy.
<p>
<li><a href="wrapper.html">mDN Wrapper</a><br>
Windows ベースのアプリケーションで多言語ドメイン名を扱えるようにするための、
WINSOCK に対するWrapper DLL です。
通常、WindowsアプリケーションはWINSOCK によってドメイン名を解決します。
mDN Wrapper は、WINSOCK の呼び出しをフックして、
多言語ドメイン名のエンコーディングの変換や正規化を行ないます。
同じようなことはdnsproxyでもできますが、
mDN Wrapper を使った場合には、
アプリケーション毎に異なったローカルエンコーディングを受付けることもできます。
<p> This is a Wrapper DLL for WINSOCK that allows Windows-based applications to support multilingual domain names.
Usually, Windows applications resolve domain names with WINSOCK.
mDN Wrapper intercepts the WINSOCK call and performs encoding conversion and normalization of multilingual domain names.
The same thing can be done with dnsproxy; however, when mDN Wrapper is used different local encoding used by applications can be accepted.
<p>
<li><a href="library.html">MDN ライブラリ</a><br>
<li><a href="library.html">MDN library</a><br>
上記のコンポーネントが使用するライブラリです。多言語ドメイン名の変換に
関わる
<p> This library is used by the above components, and provides the following multilingual domain name-related functions.
<ul>
<li>エンコーディング変換
<li>Encoding conversion
<li>文字列の正規化
<li>Normalization of text string
<li>DNS メッセージの解析と組み立て
<li>Analysis and assembly of DNS messages
<li>ZLD の削除、追加
<li>Deletion and addition of ZLD
</ul>
という機能を提供します。
<p>
<li><a name="eightbitthru-patch">8ビットスルーパッチ</a><br>
<li><a name="eightbitthru-patch">8-bit through patch</a><br>
dnsproxy を用いて多言語ドメイン名のエンコーディング変換や正規化等を
行う場合、DNS サーバやリゾルバライブラリにはこれらの機能は必要ありません。
ただし DNS プロトコル上のエンコーディングとして
UTF-8 等の 8 ビットコードを使用する場合、
従来の DNS サーバは使用することができず、8ビットコードをエラーにせずに
通すような改造が必要です。<br>
When dnsproxy is used to convert multilingual domain name encoding or perform normalization, these functions are not required in the DNS server or resolver library.
However, when 8-bit code such as UTF-8 is used for DNS protocol encoding, the conventional DNS server cannot be used and modification must be performed so that 8-bit code can be passed without error.<br>
またローカルエンコーディングが SJIS 等の 8 ビットコードを使用する場合、
やはりリゾルバライブラリにも 8 ビットコードをそのまま通し、
エラーにしないようにするための改造が必要です。<br>
When the local encoding uses 8-bit code such as SJIS, the resolver library also must be modified so that 8-bit code can be passed without error.<br>
さらにアプリケーションの中には、独自にドメイン名の検査を行い、
8 ビットコードを通さないものがあります。<br>
Furthermore, some applications check domain names themselves and do not pass 8-bit code.<br>
このため、本キットでは
<br>For this reason, this kit provides the following patches:
<ul>
<li>BIND-8 のネームサーバ、リゾルバを 8 ビットスルーにするためのパッチ
<li>Patch that makes the BIND-8 name server and resolver 8-bit through
<li>Web のキャッシュサーバである Squid の URL 解析部分を 8 ビットスルー
にするためのパッチ
<li>Patch that makes the URL analysis part of Squid 8-bit through (Squid is a Web cache server)
</ul>
を提供します。<br>
これらの 8 ビットスルーパッチに関しては特に仕様の記述は行いません。
<br>
The specifications of these 8-bit through patches are not discussed here.
</ul>
<h3><a name="comp-relation">コンポーネント構成図</a></h3>
<h3><a name="comp-relation">Component Diagram</a></h3>
<p>各コンポーネントがどこでどのように使われるのかを示したのが次の2枚の図です。
<p>The following two diagrams illustrate how and where each component is used.
<p>1枚目は多言語ドメイン名の処理を dnsproxy を利用して行う場合の構成図です。
<p>The first diagram depicts multilingual domain name processing using dnsproxy.
<p>
<blockquote>
<img src="img/components.jpg" alt="mDNkit components #1">
</blockquote>
<p>2枚目は dnsproxy を使用せず、クライアント側のリゾルバで多言語ドメイン名の
処理を行う場合の構成図です。
<p>The second diagram depicts multilingual domain name processing using the client side resolver without using dnsproxy.
<p>
<blockquote>
<img src="img/components2.jpg" alt="mDNkit components #2">
</blockquote>
<p>図中、イタリック体の部分が本キットに含まれるコンポーネントです。
<p>In the diagrams, the italicized parts are compoments included in the kit.
<p>図の上半分は SJIS など、ローカルエンコーディングが使用される
世界で、下半分が UTF-8 など、多言語化された DNS が使用する
DNS プロトコル上のエンコーディングが使用される世界です。
本キットが提供するコンポーネントはこれらの世界をつなぐためのものです。
<p>Local encoding such as SJIS is used in the upper half of the diagram, and multilingual DNS protocal encoding such as UTF-8 is used in the lower half of the diagram.
The components provided by this kit serve as a bridge between these two worlds.
</body>
</html>

View file

@ -1,728 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: wrapper.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>mDN Wrapper - Program Specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDN Wrapper</h1>
<p>&nbsp;<p>
<h2>実現方法 - Wrapper DLL</h2>
<h2>Implementation Method - Wrapper DLL</h2>
<p>
ラッパーDLL は、アプリケーションと元のDLL との間に割り込んで、
アプリケーションからのDLL の呼び出しを横取りして、
本来のDLL とは異なった処理をさせるものです。
<p>
Positioned between the application and the original DLL, the wrapper DLL hooks the application DLL call and operates different processing than that in the original DLL.
<blockquote>
<img src="img/wrapper.jpg" alt="how wrapper DLL works">
</blockquote>
<p>
アプリケーションからのDLL の呼び出しはラッパーに渡されます。
ラッパーはそこで、付加的な処理を行なって、
元のDLL のエントリを呼び出します。
また、元のDLL の処理結果は一旦ラッパーに返され、
ここでも付加的な処理を行なって、
最終的な結果がアプリケーションに返されることになります。
<p>
The application DLL call is passed to the wrapper.
The wrapper performs additional processing and calls the original DLL entry.
Next, the processing result of the original DLL is returned to the wrapper and the wrapper again performs additional processing, then the final result is returned to the application.
<p>
mDN wrapper では、WINSOCK DLLの
<blockquote>
<table>
<tr><td>WSOCK32.DLL</td><td>WINSOCK V1.1</td></tr>
<tr><td>WS2_32.DLL </td><td>WINSOCK V2.0</td></tr>
</table>
</blockquote>
に対するラッパーDLL を提供して、
多言語ドメイン名の名前解決ができるようにします。
<p>
With mDN Wrapper, to provide name resolution of multilingual domain names, a wrapper DLL is provided for the following WINSOCK DLLs:
<blockquote>
<table>
<tr><td>WSOCK32.DLL</td><td>WINSOCK V1.1</td></tr>
<tr><td>WS2_32.DLL </td><td>WINSOCK V2.0</td></tr>
</table>
</blockquote>
<blockquote>
<table>
<tr><td valign=top></td><td valign=top>:</td>
<td>
16ビット版のWINSOCK (WINSOCK.DLL) は対象外です。
</td></tr>
</table>
<table>
<tr><td valign=top>Note</td><td valign=top>:</td>
<td>
The 16-bit version of WINSOCK (WINSOCK.DLL) is not supported.
</td></tr>
</table>
</blockquote>
<p>
<h2>処理対象のAPI</h2>
<h2>APIs Subject to Processing</h2>
<p>
mDN Wrapper はWINSOCK の名前解決に関連したAPI についてのみ
付加的な処理を行ないます。
処理の対象となるWINSOCK APIは以下のものです。
<p>
mDN Wrapper performs additional processing on only those APIs that are associated with WINSOCK name resolution.
The following WINSOCK APIs are subject to processing.
<dl>
<dt>WINSOCK 1.1, WINSOCK 2.0 の両方にあるもの
<dt>When both the WINSOCK 1.1 and WINSOCK 2.0 APIs exist:
<dd>
<table>
<tr><td>gethostbyaddr</td></tr>
<tr><td>gethostbyname</td></tr>
<tr><td>WSAAsyncGetHostByAddr</td></tr>
<tr><td>WSAAsyncGetHostByName</td></tr>
</table>
<p>
<dt>WINSOCK 2.0 だけにあるもの
<dt>When only the WINSOCK 2.0 API exists:
<dd>
<table>
<tr><td>WSALookupServiceBeginA</td></tr>
<tr><td>WSALookupServiceNextA</td></tr>
<tr><td>WSALookupServiceEnd</td></tr>
</table>
</dl>
<p>
アプリケーションによっては、
これらのAPI を使わないで独自にドメイン名の解決を行なうものもあります。
例えば、nslookupは、これらのAPI を使わないで、
内部で独自にDNS リクエストの生成、解釈を行なっています。
当然のことながら、これらのアプリケーションについては、
mDN Wrapper では多言語化対応させることはできません。
<p>
Some applications independently resolve domain names without using these APIs.
For example, nslookup internally generates and interprets DNS requests independently. Naturally, mDN Wrapper does not provide multilingual domain name support to these applications.
<blockquote>
<table>
<tr><td valign=top></td><td valign=top>:</td>
<td>
dnsproxyはネットワーク上でDNS のリクエスト、
レスポンスについて多言語化しますので、
これらのアプリケーションについても多言語化させることができます。
必要に応じて適時使い分けるといいでしょう。
</td></tr>
<tr><td valign=top>Note</td><td valign=top>:</td>
<td>
dnsproxy makes DNS request/response multilingual on the network and also can make these applications multilingual.
It is recommended they be used as needed.
</td></tr>
<tr><td valign=top></td><td valign=top>:</td>
<td>
WINSOCK 2.0 には、WIDE CHARACTER ベースの名前解決のAPI として
<table>
<tr><td>WSALookupServiceBeginW</td></tr>
<tr><td>WSALookupServiceNextW</td></tr>
</table>
もありますが、これらについてはラップしません。
これらのAPI はマイクロソフト仕様による国際化に対応したものですから、
そのフレームワーク上で使うべきものです。
これらについてはmDN Kit によって他の多言語フレームワークに
変換してしまうのは危険ではないか、と判断しました。
</td>
<tr><td valign=top>Note</td><td valign=top>:</td>
<td>
WINSOCK 2.0 has the following APIs for WIDE CHARACTER based name resolution.
<table>
<tr><td>WSALookupServiceBeginW</td></tr>
<tr><td>WSALookupServiceNextW</td></tr>
</table>
However, these are not wrapped.
These APIs are internationalized for Microsoft specifications and therefore should be used within that framework.
We determined that it is dangerous to use mDN Kit to convert these APIs to another multilingual framework.
</td>
</table>
</blockquote>
<p>
<h2>処理対象外のAPI</h2>
<h2>APIs Not Subject to Processing</h2>
<p>
上記以外のWINSOCK API については、mDN Wrapper はなにもしないで、
元のWINSOCK API を呼び出します。
WINSOCK DLL にはドキュメントされていないエントリも含まれています。
それらのエントリについては、呼び出しパラメタ等が判らないので、
ラッパー内のコードから元のDLL のエントリを呼び出すことができません。
そこで、mDN Wrapper は上記以外のエントリについては、
function forwarding によって、
DLL の呼び出しが元のDLL にフォワードされるようにしています。
<p>
Regarding WINSOCK APIs other than those above, mDN Wrapper does not do anything and calls the original WINSOCK API.
WINSOCK DLL includes entries that are not documented.
Regarding those entries, since call parameters, etc. are not known, it is not possible to call the original DLL entries using codes inside the wrapper.
Therefore, for the entries other than the above, mDN Wrapper uses 'function forwarding' to forward calling of a DLL to the original DLL.
<p>
'function forwarding' を使う場合には、
ラッパーDLL 作成時にフォワード先のDLL 名を明示的に指定する必要があり、
そのDLL 名はラッパー自身とは別の名前、
すなわち元のDLL とも別の名前、になっていなければなりません。
mDN wrapper では、元のWINSOCK DLL を名前を変えてコピーし、
それをフォワード先のDLL として使用するものとします。
<p>
When 'function forwarding' is used, it is necessary to explicitly specify the forward destination DLL name when the wrapper DLL is created. The DLL name must be different from the wrapper itself, that is, a different name that the original DLL. mDN wrapper copies the original WINSOCK DLL as a different name and uses it as the forward destination DLL.
<blockquote>
<table>
<tr><td>wsock32.dll</td><td>-&gt;</td><td>wsock32o.dll</td></tr>
<tr><td>ws2_32.dll </td><td>-&gt;</td><td>ws2_32o.dll </td></tr>
</table>
</blockquote>
<p>
ラッパーDLL は元のWINSOCK DLL と同じ名前で作成されます。
従ってmDN wrapper がインストールされた状態では、
<p>
A wrapper DLL is created with the same name as the original WINSOCK DLL.
Therefore, when mDN Wrapper has been installed, their names are as follows:
<blockquote>
<table>
<tr><td>wsock32.dll </td><td>mDN Wrapper for WINSOCK V1.1</td></tr>
<tr><td>ws2_32.dll </td><td>mDN Wrapper for WINSOCK V2.0</td></tr>
<tr><td>wsock32o.dll</td><td>Original WINSOCK V1.1 DLL</td></tr>
<tr><td>ws2_32o.dll </td><td>Original WINSOCK V2.0 DLL</td></tr>
</table>
</blockquote>
となります。
<p>
<h2>非同期 API</h2>
<h2>Asynchronous API</h2>
<p>
ドメイン名の変換は、以下のタイミングで行なわれる必要があります。
<p>
Conversion of domain names must be carried out in the following sequence:
<p>
<blockquote>
<dl>
<dt>DNS へのリクエスト時
<dt>When request is sent to DNS
<dd>
<table>
<tr><td>ローカルエンコーディング</td><td>-&gt;</td><td>DNS エンコーディング</td></tr>
<tr><td>Local encoding</td><td>-&gt;</td><td>DNS encoding</td></tr>
</table>
<dt>DNS からの応答受信時
<dt>When response is received from DNS
<dd>
<table>
<tr><td>DNS エンコーディング</td><td>-&gt;</td><td>ローカルエンコーディング</td></tr>
<tr><td>DNS encoding</td><td>-&gt;</td><td>local encoding</td></tr>
</table>
</dl>
</blockquote>
<p>
同期API においては、
ローカルエンコーディングからDNS エンコーディングへの変換は、
元のAPI を呼び出す前に行われ、
DNS エンコーディングからローカルエンコーディングへの変換は、
元のAPI から復帰してきたところで行なわれます。
<p>
With synchronous API, conversion from local encoding to DNS encoding is performed before the original API is called and conversion from DNS encoding to local encoding is performed when control is returned from the original API.
<p>
しかし、WINSOCK の以下のAPI は非同期API で、
DNS からの応答受信前に復帰してしまいます。
<p>
However, the following WINSOCKs are asynchronous APIs and control is returned before response is received from the DNS.
<blockquote>
<dl>
<dt>WSAAsyncGetHostByAddr
<dt>WSAAsyncGetHostByName
</dl>
</blockquote>
<p>
これらのAPI においては、名前解決の完了は、
Windows へのメッセージによって通知されます。
このため、
DNS エンコーディングからローカルエンコーディングへの変換を行なうには、
ラッパーは通知先のウィンドウプロシジャのメッセージキューをフックして、
この完了メッセージを捕獲する必要があります。
<p>
With those APIs, the completion of name resolution is notified via the message to Windows. For that reason, in order to convert from DNS encoding to local encoding, the wrapper needs to hook the message queue of the window procedure to which notification is sent and capture the completion message.
<p>
そこで、非同期API が呼び出された場合には、mDN Wrapper は、
通知先のウィンドウプロシジャこれはAPI のパラメタで指示されます)に
フックを設定します。
フックが完了メッセージこれもAPI のパラメタで指示されます)を検出したなら、
フックは結果の格納領域これもAPI のパラメタで指示されています)のドメイン名を、
DNS 側のエンコーディングからローカルエンコーディングに変換するものとします。
<p>
Therefore, when an asynchronous API is called, mDN Wrapper sets the hook (this is specified by the parameter of the API) to the window procedure to which notification is sent.
When the hook detects the completion message (this is also specified by the parameter of the API), the hook converts the domain name in the storage area of the result (this is also specified by the paramter of the API) from the DNS side encoding to local encoding.
<p>
<h2>Wrapper DLL のインストール</h2>
<h2>Installing Wrapper DLL</h2>
<p>
WINSOCK DLL はWindows のシステムディレクトリに置かれています。
WINSOCK を確実にラップするには、システムディレクトリにおいて
<p>
The WINSOCK DLL is placed in the system directory of the Windows.
To surely wrap WINSOCK, the following need to be performed in the system directory;
<blockquote>
<dl>
<dt>オリジナルWINSOCK DLL の名前の変更
<dt>Change the names of original WINSOCK DLLs:
<dd>
<pre>
ren wsock32.dll wsock32o.dll
ren ws2_32.dll ws2_32o.dll
</pre>
<dt>ラッパーDLL の導入
<dt>Copy Wrapper DLLs:
<dd>
<pre>
copy somewhere\wsock32.dll wsock32.dll
copy somewhere\ws2_32.dll ws2_32.dll
copy another DLLs also
</pre>
</dl>
</blockquote>
を行なう必要があります。
<p>
しかし、システムディレクトリでこのようなDLL の置き換えを行なうのは
大変危険な操作になります。
<p>
However, this kind of replacement of DLLs in the system directory is a very dangerous operation.
<blockquote>
<table>
<tr><td valign=top>a)</td>
<td>
DLL を入れ替えた状態で、もういちど同じ操作を行なうと、
オリジナルのWINSOCK DLL が失われてしまうことになります。
<br>Once the DLL is replaced, if the same operation is repeated again, the original WINSOCK DLL will be lost.
</td></tr>
<tr><td valign=top>b)</td>
<td>
サービスパックやアプリケーションなどで、
WINSOCK DLL を再導入するものがありますが、
これによってもWINSOCK が利用不能になることがあります。
<br>Some service packs and applications re-introduce WINSOCK DLLs. This may also disable WINSOCK.
</td></tr>
</table>
</blockquote>
<p>
このような状態になると、ネットワーク機能が全く使えなくなったり、
最悪はWindows の起動すらできなくなる可能性があります。
<p>
When such status occurs, it is possible that the entire network function will become disabled, or, in the worst case, Windows will not boot.
<p>
そこで、mDN Wrapper では、上のようなシステムレベルのラップではなく、
アプリケーションに対するラップを基本機能として提供するものとします。
<p>
Therefore, mDN Wrapper shall provide application wrapping as a basic function, not at the system level.
<p>
Windows において、DLL は、基本的には
<p>
Basically, in Windows, DLLs are searched in the following order:
<blockquote>
<table>
<tr><td>アプリケーションのロードディレクトリ</td></tr>
<tr><td>Load directory of application</td></tr>
<tr><td>%SystemRoot%\System32</td></tr>
<tr><td>%SystemRoot%\System32</td></tr>
<tr><td>%SystemRoot%</td></tr>
<tr><td>%SystemRoot%</td></tr>
<tr><td>PATH で指示されるディレクトリ</td></tr>
<tr><td>Directory specified by PATH</td></tr>
</table>
</blockquote>
<p>
の順序で検索されて、最初に見つかったものがロードされます。
ですから、一般的には、
DLL をアプリケーションのロードディレクトリにインストールすれば、
そのアプリケーションからのWINSOCK の呼び出しをラップすることができます。
<p>
and the first one found is loaded.
Because of that, in general, installing the DLL in the load directory of the application enables calling of WINSOCK from the application to be wrapped.
<p>
ただし、いくつかのアプリケーション、DLL では、
検索パスを経由せずに特定のDLL をリンクするようになっているものがあります。
このような構成のアプリケーション、DLL が使われた場合には
mDN Wrapper では対処することはできません。
<p>
However, some applications and DLLs have a specific DLL linked without going through the search path. mDN Wrapper cannot handle this structure of application or DLL.
<blockquote>
<table>
<tr><td valign=top></td><td valign=top>:</td>
<td>
Netscapeは特定DLL にバインドされているようで、
アプリケーションディレクトリへのインストールではラップできません。
WINSOCK DLL 自体もシステムディレクトリの関連DLL に
バインドされているようです。
一方、Internet ExploreやWindows Media Playerは
標準のサーチパスに従っているので、
ラップすることができます。
</td></tr>
<tr><td valign=top>Note</td><td valign=top>:</td>
<td>
Netscape seems to be bound to a specific DLL and wrap cannot be performed by installing the wrapper DLL in the application directory.
WINSOCK DLL itself seems to be bound to the related DLL of the system directory.
On the other hand, because Internet Explorer and Windows Media Player follow the standard search path, wrap can be performed.
</td></tr>
</table>
</blockquote>
<p>
<h2>エンコーディングの変換位置</h2>
<h2>Location of Encoding Conversion</h2>
<p>
WINSOCK 2.0 をサポートしているWindows には、
WINSOCK の1.1 と2.0 のそれぞれに対応するDLL があり、
WINSOCK 1.1 のAPI の呼び出しは
2.0 の同じエントリにリダイレクトされるようになっています。
<p>
Versions of windows that support WINSOCK 2.0 have DLLs that correspond to WINSOCK 1.1 and 2.0, respectively. Calling of the WINSOCK 1.1 API is re-directed to the same entry for 2.0.
<blockquote>
<img src="img/winsock2.jpg" alt="calling winsock2.0 through winsock1.1">
</blockquote>
<p>
この場合には1.1 に対する呼び出しも2.0 に対する呼び出しも、
ともにV2.0用のDLL に渡されるので、
2.0用のラッパーDLL 側だけで
エンコーディングの変換を行なうようにするべきでしょう。
<p>
In this case, calling of 1.1 and 2.0 are both passed to the DLL of V2.0. Therefore, conversion of encoding should be performed at the wrapper DLL side of 2.0 only.
<p>
一方、WINSOCK 1.1 しかサポートしていない場合(Win95)には、
1.1 に対応したDLL しかありません。
<p>
On the other hand, when only WINSOCK 1.1 is supported (Win95), there is only a DLL that corresponds to 1.1.
<blockquote>
<img src="img/winsock1.jpg" alt="calling only winsock1.1">
</blockquote>
<p>
この場合には必然的に1.1 用のラッパーDLL で
エンコーディングを変換しなければなりません。
<p>
In that case, naturally the wrapper DLL for 1.1 is used for encoding conversion.
<p>
mDN Wrapepr がwindows のシステムディレクトリにインストールされた場合には、
上の通りに動作するので、
<p>
When mDN Wrapper is installed in the Windows system directory, the operation is as shown above, therefore, conversion must be performed as follows.
<blockquote>
<table>
<tr><td>WINSOCK 2.0 あり</td><td>2.0 ラッパーで変換</td></tr>
<tr><td>WINSOCK 2.0 exists</td><td>2.0 wrapper is used for conversion</td></tr>
<tr><td>WINSOCK 1.1 のみ</td><td>1.1 ラッパーで変換</td></tr>
<tr><td>WINSOCK 1.1 only</td><td>1.1 wrapper is used for conversion</td></tr>
</table>
</blockquote>
する必要があります。
<p>
しかし、
アプリケーションディレクトリにインストールされた場合には動作が変わってきます。
Windows 付属の WINSOCK 1.1 DLLは、
システムディレクトリのWINSOCK 2.0 にバインドされているため、
アプリケーションディレクトリ側のWINSOCK 2.0 ラッパーDLL には
リダイレクトされてきません。
このため、アプリケーションディレクトリへのインストールにおいては、
1.1DLL、2.0DLLの両方でエンコーディングを変換する必要があります。
<p>
However, when the wrapper DLL is installed in the application directory, the operation is different.
Since WINSOCK 1.1 DLL attached to the Windows is bound to WINSOCK2.0 located in the system directory, calling of the WINSOCK 1.1 API is not re-directed to the WINSOCK2.0 wrapper DLL at the application directory side.
For that reason, when the wrapper DLL is installed in the application directory, it is necessary to convert encoding for both the 1.1 and 2.0 DLL.
<p>
このようなDLL 間のバインディングはドキュメントされていませんので、
環境、バージョンによっては異なった動作をするかも知れません。
そこでmDN Wrapper では、レジストリ値によって、
ラッパーDLL のどこで変換を行なうかを決定するようにして、
インストール先による差異、あるいはバージョンによる差異を吸収するようにします。
<p>
Such binding between DLLs is not documented and operation may differ depending on the environment and version being used.
Therefore, with mDN Wrapper, the registry value is used to determine which wrapper DLL is used for conversion so that differences related to the installation location or version are neutralized.
<p>
mDN Wrapper 用のレジストリ設定は
<p>
The registry setting for mDN Wrapper is placed under the following directory:
<blockquote>
<table>
<tr><td>HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN</td></tr>
<tr><td>HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN </td></tr>
</table>
</blockquote>
以下に配置されます。エンコーディング変換を行なう位置については、
この直下のレジストリ値 WhereREG_DWORD によって決定します。
有効な値は、
<p>The location for encoding conversion is determined by the Registry Where value (REG_DWORD) under the above.
The effective values are as follows:
<blockquote>
<b>レジストリ Where (REG_DWORD)</b>
<br><b>Registry Where (REG_DWORD)</b>
<table>
<tr><td>0</td><td></td><td>WINSOCK 1.1、WINSOCK 2.0 の両方で変換する</td></tr>
<tr><td>0</td><td></td><td>Converted at both WINSOCK 1.1 and WINSOCK 2.0 are converted</td></tr>
<tr><td>1</td><td></td><td>WINSOCK 2.0 があれば、WINSOCK 2.0だけで変換する</td></tr>
<tr><td>1</td><td></td><td>When WINSOCK 2.0 exists, converted only at WINSOCK 2.0</td></tr>
<tr><td> </td><td></td><td>WINSOCK 1.1 だけの場合には WINSOCK 1.1 で変換する</td></tr>
<tr><td> </td><td></td><td>When only WINSOCK 1.1 exists, converted only WINSOCK 1.1</td></tr>
<tr><td>2</td><td></td><td>WINSOCK 1.1 だけで変換する</td></tr>
<tr><td>2</td><td></td><td>Converted only at WINSOCK 1.1 only</td></tr>
<tr><td>3</td><td></td><td>WINSOCK 2.0 だけで変換する</td></tr>
<tr><td>3</td><td></td><td>Converted at WINSOCK 2.0</td></tr>
</table>
</blockquote>
の4通りです。
アプリケーションディレクトリにインストールする場合には「0」を、
システムディレクトリにインストールする場合には「1」を設定する必要があります。
レジストリ値が存在しない場合には「0」を想定します。
これはアプリケーションディレクトリへのインストールを標準としたものです。
<p>When the wrapper DLL is installed in the application directory, "0" needs to be set and when installed in the system directory, "1" needs to be set.
If no value is set in the registry, "0" is assumed. This is based on installation in the application directory.
<p>
<h2>変換元/先のエンコーディング</h2>
<h2>Original/Converted Encoding</h2>
<p>
ラッパーDLL では、解決しようとするドメイン名を、
マシンのローカルエンコーディングからDNS サーバのエンコーディングに変換し、
また、DNS が返してきたドメイン名(DNS サーバのエンコーディング)を
マシンのローカルエンコーディングに戻します。
<p>
Wrapper DLL converts the domain name to be resolved from the local encoding used by the machine to the DNS server encoding and returns the domain name (DNS server encoding) returned from the DNS to the encoding used by the local machine.
<p>
現在、DNS 側の多言語化エンコーディングについては、
いくつもの方式が提案されています。
ラッパーDLL はそれらのDNS 側エンコーディングのどれかひとつに
変換するように構成されます。
このDNS 側エンコーディングはレジストリで指示されます。
このレジストリには、mDN Wrapper のインストール時に
デフォルトエンコーディング現時点ではRACEが設定されます。
当然、このレジストリは、後で他のものに変更することもできます。
<p>
With respect to multilingual encoding at the DNS side, a number of methods have been proposed.
Wrapper DLL is structured to convert encoding to one of those DNS side encodings.
This DNS side encoding is specified by the registry.
In this registry, the default encoding (currently, it is RACE) is set when mDN Wrapper is installed.
Naturally, this registry can be changed to some other encoding method.
<p>
mDN Wrapper 用のレジストリ設定は
<p>
The registry setting for mDN Wrapper is placed under the following directory.
<blockquote>
<table>
<tr><td>HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN</td></tr>
<tr><td>HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN </td></tr>
</table>
</blockquote>
以下に配置されます。
DNS 側のエンコーディングはレジストリ値 Encoding REG_SZで指示されます。
このエンコーディング名は、libmdnで認識されるものでなければなりません。
<br>DNS side encoding is specified by the registry value encoding (REG_SZ).
This encoding name must be one that can be recognized by libmdn.
<blockquote>
<b>レジストリ Encoding (REG_SZ)</b>
<br><b>Registry encoding (REG_SZ)</b>
<blockquote>
DNS サーバ側のエンコーディング名を設定します
<br>Set DNS server side encoding name.
</blockquote>
</blockquote>
<p>
一方、アプリケーションが使用しているローカルエンコーディングは、
通常はプロセスのコードページから求めます。
ラッパーDLL が使用する 'iconv' ライブラリは、
windows のコードページ名を
エンコーディング名として受付けることができるので、
コードページ名をそのままローカルエンコーディング名として使用します。
<p>
On the other hand, the local encoding used by the application is usually derived from the code page of the process.
Since the 'iconv' library used by Wrapper DLL can accept the code page name of the Windows as the encoding name, the code page name is used as the local encoding name as is.
<p>
しかし、アプリケーションによっては、
特定の多言語化エンコーディングで
ドメイン名をエンコーディングしてしまうものもあります。
例えば、IEではドメイン名をUTF-8 で表記するように
指示することができるようになっています。
UTF-8 によるエンコーディングは、
提案されている多言語化方式のひとつですが、
多言語化されたDNS サーバは他のエンコーディングしか受付けないかも知れません。
<p>
However, some applications encode domain names using a specific multilingual encoding method. For example, with Internet Explorer, you can specify that domain names are to be expressed in UTF-8. UTF-8 encoding is one of the proposed multilingual methods, but multilingual DNS server may accept only other encoding.
<p>
このような状況に対処するため、mDN Wrapper は、
ローカルエンコーディングとして
プログラム特有のエンコーディングも受付けることができるようにします。
このようなプログラム特有のローカルエンコーディングは
レジストリ記載されるものとします。
<p>
In order to handle this situation, mDN Wrapper is able to accept program-specific encoding as local encoding. Such program-specific local encoding shall be written in the registry.
<p>
mDN Wrapper 用のプログラム特有のレジストリ設定は
<p>Registry setting unique to the program for mDN Wrapper is placed under the following directory using the program name (execution module file name) as the key.
<blockquote>
<table>
<tr><td>HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg</td></tr>
<tr><td>HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg</td></tr>
</table>
</blockquote>
以下に、プログラム名(実行モジュールファイル名)をキーとして配置されます。
例えば、Internet Explore の場合には、実行モジュール名のIEXPLOREをキーとして
<p>For example, with Internet Explorer it is placed under the following directory using IEXPLORE of the execution module name as the key.
<blockquote>
HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE
</blockquote>
以下に置かれます。ローカルエンコーディング名は、レジストリ値Encoding REG_SZで指示します。これもlibmdnで認識されるものでなければなりません。
<p>The local encoding name is specified by the Registry Encoding value (REG_SZ).
This also must be one that can be recognized by libmdn.
<blockquote>
<b>レジストリ Encoding (REG_SZ)</b>
<br><b>Registry Encoding (REG_SZ)</b>
<blockquote>
アプリケーションプログラム特有のエンコーディング名
(デフォルトのエンコーディング以外を必要とする場合)を指定します。
<p>Indicates the encoding name unique to the application program (when other than default encoding is required).
</blockquote>
</blockquote>
<h2>ログ</h2>
<h2>Log</h2>
mDN Wrapper が期待した動作をしない場合、動作のログは問題解決に非常に
役立ちます。mDN Wrapper では、レジストリの設定により、以下の設定が
可能です。
<p>When mDN Wrapper does not operate as expected, the operation log can be very useful in resolving the problem. With mDN Wrapper, the following settings can be made with the registry setting.
<ul>
<li>ログレベル
<li>Log level
<li>ログファイル
<li>Log file
</ul>
<p>
ログレベル、ログファイルともに次のレジストリの下で設定されます。
<p>
Both the log level and log file are set under the following registry.
<blockquote>
HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN<br>
HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
</blockquote>
<p>
ログレベルはレジストリ値 LogLevel (REG_DWORD) で指定します。定義されている
値は次の通りです。
<p>
The log level is specified usingg the LogLevel registry value (REG_DWORD). The defined values are as follows.
<dl>
<dt>-1 (0xFFFFFFFF) <dd>[None] ログを一切出力しない
<dt>-1 (0xFFFFFFFF) <dd>[None] No log is output
<dt>0<dd>[Fatal] 致命的エラーのみ出力
<dt>0<dd>[Fatal] Outputs only fatal errors
<dt>1<dd>[Error] 致命的でないエラーも出力
<dt>1<dd>[Error] Outputs errors that are not fatal
<dt>2<dd>[Warning] 警告メッセージも出力
<dt>2<dd>[Warning] Outputs warning messages as well
<dt>3<dd>[Info] エラー以外の情報も出力
<dt>3<dd>[Info] Outputs information other than errors as well
<dt>4<dd>[Trace] プログラムのトレース情報も出力
<dt>4<dd>[Trace] Outputs program trace information
</dl>
なお、このレベル指定は mDN Wrapper が使用している
<a href="library.html">MDN ライブラリ</a> の出力するログのレベル指定です。
ログにはこの他 mDN Wrapper 自身が出力するものがありますが、こちらは
レベル指定はできず、単にオン・オフを切り替えるだけです。-1 を指定した場合には
オフ、それ以外の値を指定した場合にはオンになります。
デフォルトは -1 です。
<br>Note that this level specification is for the log level to be output by <a href="library.html">MDN library</a> used by mDN Wrapper.
In addition, mDN Wrapper itself outputs a log. The level of log of this cannot be specified and can only be switched ON and OFF. When -1 is specified, it is OFF; all other values switch the log ON.
The default is -1.
<p>
ログファイルはログを出力するファイルのパス名を指定するもので、
レジストリ値 LogFile (REG_SZ) で指定します。デフォルトは
mDN Wrapper をインストールしたディレクトリの下の "mdn_wrapper.log" です。
<p>
Log file is used to specify the path to the file to which the log is to be output.
The LogFile (REG_SZ) registry value is used to specify the path. The default is "mdn_wrapper.log" under the directory where mDN Wrapper is installed.
<p>
なお、ログレベルとログファイルはコンフィギュレーションプログラムを使用しても
設定することができます。
<p>
Note that the configuration program can be used to set the log level and log file settings.
<p>
<h2>レジストリ設定 - まとめ</h2>
<h2>Registry Setting - Summary</h2>
<p>
<h3>レジストリの優先順位</h3>
<h3>Registry Priority</h3>
<p>
mDN Wrapper の設定情報は、HKEY_LOCAL_MACHINE、HKEY_CURRENT_USERの<p>
<blockquote>
Software\JPNIC\MDN
</blockquote>
以下に格納されます。mDN Wrapperは最初にHKEY_LOCAL_MACHINEの設定を読み込み、HKEY_CURRENT_USER側にも設定があれば、これで上書きします。通常は、HKEY_LOCAL_MACHINE 側だけを設定します。ユーザ個別に異なった設定を使いたい場合のみ、HKEY_CURRENT_USERを設定するようにしてください。
<p>
mDN Wrapper configuration information stored under
<blockquote>
Software\JPNIC\MDN
</blockquote>
<p>
of HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER. mDN Wrapper first loads the setting of HKEY_LOCAL_MACHINE and overwrites the setting using the setting at HKEY_CURRENT_USER side, if any. Usually, only the HKEY_LOCAL_MACHINE side is set. The HKEY_CURRENT_USER side is also set only when it is desired to use different setting for each user.
<p>
特に、コンフィギュレーションプログラムは常に HKEY_LOCAL_MACHINE の
設定しか読み書きしません。コンフィギュレーションファイルを使用して
設定を行う場合には気をつけてください。
<p>
In particular, the configuration program reads and writes only the settings of HKEY_LOCAL_MACHINE. Be careful when using the configuration file to set settings.
<p>
<h3>レジストリキー</h3>
<h3>Registry Key</h3>
<p>
全体の共通の設定と、プログラム個別設定とがあります。
<p>
There are common settings and program-specific settings.
<h4>共通定義</h4>
<h4>Common definition</h4>
<pre>
Software\JPNIC\MDN\Where 変換位置
0:WINSOCK1.1 WINSOCK2.0の両方で
1:WINSOCK2.0 があればそちらで
2:WINSOCK1.1 だけで
3:WINSOCK2.0 だけで
Software\JPNIC\MDN\Encoding DNS側エンコーディング名
Software\JPNIC\MDN\Normalize 正規化の方式
Software\JPNIC\MDN\LogLevel ログレベル
Software\JPNIC\MDN\LogFile ログファイル
</pre>
<pre>
Software\JPNIC\MDN\Where Conversion location
0:Both WINSOCK1.1 and WINSOCK2.0
1:At WINSOCK2.0 when exists
2:At WINSOCK1.1 only
3:At WINSOCK2.0 only
Software\JPNIC\MDN\Encoding DNS side encoding name
Software\JPNIC\MDN\Normalize Method of normalization
Software\JPNIC\MDN\LogLevel Log level
Software\JPNIC\MDN\LogFile Log file
</pre>
<h4>プログラム個別設定</h4>
<h4>Program-specific Settings</h4>
<p>
変換位置、およびプログラム側のエンコーディングは
プログラム毎に特定することもできます。
これらは、以下のキーハイブの下に、
プログラム名をキーとする値で設定します。
<p>
Conversion location and program side encoding can be specified for each program.These are set under the following key hive using the value using the program name as the key.
<blockquote>
Software\JPNIC\MDN\PerProg\&lt;name&gt;\Where
Software\JPNIC\MDN\PerProg\&lt;name&gt;\Encoding
</blockquote>
指定されていない場合には、
<br>When they are not specified:
<blockquote>
<table>
<tr><td>Where </td><td>0</td><td>1.1、2.0 の両方で変換 </td></tr>
<tr><td>Where </td><td>0</td><td>Converts at both 1.1 and 2.0 </td></tr>
<tr><td>Encoding</td><td> </td><td>プロセスのコードページ</td></tr>
<tr><td>Encoding</td><td> </td><td>Code page of process</td></tr>
</table>
</blockquote>
とみなします。
<br>are assumed.
</body>
</html>

View file

@ -1,24 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: index.html,v 1.1 2001/03/05 12:58:00 tale Exp $ -->
<html>
<head>
<title>mDNkit Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
</head>
<body>
<h1>mDNkit Documents</h1>
<p>mDNkit documents are currently available only in Japanese.
<ul>
<li><a href="ja/index.html">Japanese documents</a><p>
<li><a href="en/index.html">English documents</a> (not yet)<p>
<li>..for other languages..
</ul>
<p>See <a href="LICENSE.txt">LICENSE.txt</a> for the license of this kit.
</body>
</html>

View file

@ -1,176 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: bind9.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>bind9 patch</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>bind9 パッチ</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#named">named</a>
<li><a href="#resolver">リゾルバ</a>
<li><a href="#dig">dig/host/nslookup</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<p>
mDNkit では bind9 用のパッチファイルを提供しています。
このパッチを適用することにより、
bind9 において多言語ドメイン名を扱うことが可能になります。
<p>
具体的には、このパッチは bind9 に次のような機能を追加します。
<ul>
<li>bind9 の DNS サーバ (named) において、ドメイン名をテキストに
変換する際にUTF-8 文字がそのまま通るようになります。
<li>bind9 のリゾルバ (lightweight resolver) の提供する名前解決用の
API 関数に、ホスト名としてローカルエンコーディングで表現されたホスト名を
指定できるようになります。
<li>同じく名前解決結果として、ローカルエンコーディングで表現された
ホスト名が返されるようになります。
<li>dig、host、nslookup コマンドがローカルエンコーディングのドメイン名を
受け付け、また問い合わせ結果に含まれるドメイン名をローカルエンコーディングで
表示するようになります。
</ul>
<p>bind9 へのパッチの適用方法は、パッチファイルの先頭に記載してあります。
<a href="install.html">インストールガイド</a>
<a href="install.html#bind9">bind9 用パッチの適用とインストール</a>
ご覧ください。
<p>
<hr>
<h2><a name="named">named</a></h2>
<p>このパッチの適用により、DNS サーバである named に対して、
UTF-8 文字の透過機能が追加されます。
<p>bind9 の named ではドメイン名の処理はほとんど8ビットスルーになって
いるのですが、named 内のドメイン名の内部表現からテキスト表現への
変換部分は8ビットスルーになっておらず、ASCII 文字以外
はバックスラッシュでクォートされ、<tt>\DDD</tt> という形式の表現に
変換されてしまいます。
<p>これは DNS プロトコル上で用いられるエンコーディングとして UTF-8 を
使用する場合に問題となります。
<p>本パッチでは、変換しようとする文字がUTF-8 文字の
場合にはバックスラッシュによるクォートをせずそのまま透過させる機能を
追加しました。
この動作は named の設定ファイル (named.conf) で切り替えることができます。
デフォルトは互換性のため透過しない設定になっています。
もしDNS プロトコル上で用いるエンコーディングとして UTF-8 を用いる場合には、
設定ファイルの options セクションの <tt>allow-utf8</tt> パラメータを
次のように指定してください。
<blockquote>
<pre>
options {
...
allow-utf8 yes;
...
};
</pre>
</blockquote>
<p>DNS プロトコル上で用いられるエンコーディングとして RACE 等の
<a href="../spec/library.html#ACE">ASCII 互換エンコーディング</a>
使用する場合には、この設定は不要です。
<hr>
<h2><a name="resolver">リゾルバ</a></h2>
<p>bind9 のリゾルバは、bind8 までのものとは全く異なり、
lightweight resolver ライブラリと呼ばれるアプリケーションに
リンクされるライブラリと、lightweight resolver デーモンと呼ばれる
サーバから構成されています。
<p>本パッチを適用することにより、このリゾルバに多言語ドメイン名の
処理機能が加わります。具体的には次のような機能が追加されます。
<ul>
<li>多言語ホスト名の指定<br>
リゾルバライブラリが提供する名前解決用の API 関数に対して、
ホスト名引数にローカルエンコーディングで表されたホスト名を指定することが
できるようになります。
ローカルエンコーディングで入力されたこれらのドメイン名は
自動的に DNS プロトコル上で用いられるエンコーディングに変換され、
DNS サーバへの問い合わせが行われます。エンコーディングの変換の際には
同時に正規化も行われます。
<li>多言語ドメイン名の返却<br>
リゾルバライブラリが提供する名前解決用の API 関数が、
名前解決結果のデータとしてローカルエンコーディングで表されたホスト名を
返すことができるようになります。
</ul>
<p>DNS プロトコル上で用いられるエンコーディングや使用する正規化方式の指定は
あらかじめコンフィギュレーションファイルで設定しておきます。
このファイルの設定方法については
<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
をご覧ください。
<p>以下に、パッチによって多言語化される名前解決用 API 関数の一覧を示します。
多言語化された API 関数は、従来の ASCII ドメイン名に加え、
非 ASCII ドメイン名を扱うことができます。
<ul>
<li>lwres_getaddrinfo()
<li>lwres_getnameinfo()
<li>lwres_gethostbyname()
<li>lwres_gethostbyname2()
<li>lwres_gethostbyname_r()
<li>lwres_gethostbyaddr()
<li>lwres_gethostbyaddr_r()
<li>lwres_getipnodebyname()
<li>lwres_getipnodebyaddr()
</ul>
<p>引数の型や返り値の型に変更はありません。
パッチを当てる前と同様の呼び出し方法で、従来の ASCII ドメイン名と、
非 ASCII ドメイン名の両方を扱うことができます。
<p>本パッチを適用した bind9 リゾルバは
<a href="../spec/library.html">MDN ライブラリ</a> を利用してエンコーディング
変換や正規化を行います。従って bind9 リゾルバを使用したクライアントを
コンパイルする場合、MDN のライブラリ <em>libmdn</em> をリンクする必要が
あります。もしあなたのシステムが <em>iconv()</em> をサポートしていない
場合には、<em>iconv()</em> のライブラリも合わせてリンクする必要があります。
<p>
<hr>
<h2><a name="dig">dig/host/nslookup</a></h2>
<p>bind9 には DNS の問い合わせツールとして dig、host、nslookup という
コマンドが付属します。bind9 パッチを適用することにより、これらはいずれも
多言語ドメイン名が扱えるようになります。具体的には以下の機能が
付加されます。
<ul>
<li>多言語ドメイン名の入力<br>
コマンド引数、あるいは標準入力で、ローカルエンコーディングで
表現された非 ASCII のドメイン名を指定することができるようになります。
ローカルエンコーディングで入力されたこれらのドメイン名は
自動的に DNS プロトコル上で用いられるエンコーディングに変換され、
DNS サーバへの問い合わせが行われます。エンコーディングの変換の際には
同時に正規化も行われます。
<li>多言語ドメイン名の表示<br>
DNS サーバからの返答に含まれる多言語ドメイン名がローカルエンコーディングに
変換され、表示されるようになります。
</ul>
<p>DNS プロトコル上で用いられるエンコーディングや使用する正規化方式の指定は
あらかじめコンフィギュレーションファイルで設定しておきます。
このファイルの設定方法については
<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
をご覧ください。
</body>
</html>

View file

@ -1,322 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: bindconfig.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>mDNkit BIND configuration guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>DNSサーバの設定</h1>
<p>DNSサーバにて多言語ドメイン名を扱うための設定方法について
解説します。とはいっても従来の ASCII ドメイン名の場合の設定方法と
大きく変わるわけではありません。注意すべき点は次の2点だけです。
<ul>
<li>DNS サーバにパッチを当てなければならない場合があること
<li>ゾーンマスタファイル等のエンコーディングを変換する必要があること
</ul>
<p>DNSサーバの設定の手順は、およそ以下の通りです。
<ol>
<li><a href="#encoding">エンコーディング・正規化方式を決める。</a>
<li><a href="#bind">DNS サーバを用意する。</a>
<li><a href="#file">named.conf、ゾーンマスタファイルを作成する。</a>
</ol>
<p>最後のファイル作成に関しては、エンコーディングとして UTF-5 を
使用したときに特有の問題があり、これを
<ul>
<li><a href="#utf5">UTF-5 特有の問題</a>
</ul>
としてまとめてあります。
<p>設定で使用するエンコーディング変換ツール <b>mdnconv</b> の外部仕様
および内部処理の詳細に関しては、
<a href="../spec/mdnconv.html">mdnconv の仕様書</a>をご覧ください。
<p>また、クライアントからこれらの DNS サーバにアクセスするためには、
<a href="bind9.html">多言語ドメイン名用パッチを当てた bind9</a>
<a href="runmdn.html">runmdn コマンド</a>
<a href="wrapper.html">mDN Wrapper</a> などを使用してクライアント側で
エンコーディング変換や正規化を行うか、あるいは
エンコーディング変換を行うプロキシサーバである dnsproxy を通す必要があります。
dnsproxy の設定については
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>で説明します。
<p>
<hr>
<h2><a name="encoding">エンコーディング・正規化方式の決定</a></h2>
<p>まず DNS の設定に先だって、DNS サーバで使用するドメイン名の
エンコーディングおよび正規化方式を決める必要があります。
<p>評価しようとする DNS の多言語化方式が決まっていれば、
その方式に合わせることになります。
現在提案されている方式の中から、使用するエンコーディング・正規化を
いくつか紹介します。これ以外の方式も多数提案されています。詳しくは
<a href="reference.html">参考文献</a>をご覧ください。
<ul>
<li><a href="../../reference/draft/draft-ietf-idn-race-02.txt">RACE: Row-based ASCII Compatible Encoding for IDN</a><br>
エンコーディングは <tt>RACE</tt> です。このプロポーザルはエンコーディング
のみのプロポーザルなので正規化方式は規定していません。
<p>
<li><a href="../../reference/draft/draft-skwan-utf8-dns-04.txt">Using the UTF-8 Character Set in the Domain Name System</a><br>
エンコーディングは <tt>UTF-8</tt> です。
正規化は ``locale-sensitive downcasing'' ですが、
この方式はロケール依存になるので mDNkit ではサポートされていません。
最も近いのはロケール非依存の大文字→小文字マッピングである
<tt>unicode-lowercase</tt> でしょう。
<p>
<li><a href="../../reference/draft/draft-ietf-idn-udns-01.txt">Using the Universal Character Set in the Domain Name System (UDNS)</a><br>
エンコーディングは <tt>UTF-8</tt>、正規化は <tt>unicode-form-c</tt> および
<tt>unicode-lowercase</tt> です。
<p>
<li><a href="../../reference/draft/draft-jseng-utf5-01.txt">UTF-5, a transformation format of Unicode and ISO 10646</a><br>
エンコーディングは <tt>UTF-5</tt> です。このプロポーザルもエンコーディング
のみのプロポーザルなので正規化方式は規定していません。
</ul>
<p>エンコーディングとして <tt>UTF-5</tt> を採用した場合には、
ZLD (zero level domain) を付けることで従来のドメイン名と区別する必要が
あります。したがって ZLD を何にするかも決定する必要があります。
<p>その他 mDNkit がサポートしているエンコーディング・正規化方式については
MDN ライブラリの仕様を参照してください。
<ul>
<li>エンコーディングについては
<a href="../spec/library.html#converter">converter モジュール</a>
<li>正規化方式については
<a href="../spec/library.html#normalizer">normalizer モジュール</a>
</ul>
<p>もちろん、1台の DNS サーバに複数のエンコーディングを持たせることも可能
です。この場合はゾーン毎に異なるエンコーディングを割り当てることになる
でしょう。ただし mDNkit を用いて多言語ドメイン名の扱いを可能にした
クライアントや dnsproxy は DNS サーバ側のエンコーディングが単一である
ことを仮定しているので、例えば dnsproxy の場合にはエンコーディング毎に
複数の dnsproxy を起動するなどのテクニックが必要です。
<p>
<hr>
<h2><a name="bind">DNS サーバの用意</a></h2>
<p>エンコーディングとして ASCII 互換エンコーディング (ACE: ASCII Compatible
Encoding) である RACE、UTF-5 を用いる場合には、エンコード結果は従来の
ホスト名として正当な文字列になるので、現在使用中の DNS サーバをそのまま
使うことができます。しかし ASCII 互換エンコーディング以外のエンコーディング、
特に UTF-8 を用いる場合には、多言語ドメイン処理を付加するパッチを当てた
bind9 の DNS サーバ (named) を使用するか、
8ビットスルーパッチを当てた bind8 の DNS サーバを用意する必要があります。
<p>それぞれのパッチの当て方およびインストールの方法については
<a href="install.html#bind9">bind9 用パッチの適用とインストール</a> および
<a href="install.html#bind">bind8 用パッチの適用とインストール</a>
ご覧ください。
<p>
<hr>
<h2><a name="file"><tt>named.conf</tt>、ゾーンマスタファイルの作成</a></h2>
<p><tt>named.conf</tt> やゾーンマスタファイル書き方自体は、
多言語ドメイン名と従来のドメイン名で変わるところはありません。
単にドメイン名に漢字などを含めることができるかどうかだけの違いです。
<p>DNS サーバ自体にエンコーディング変換機能は備わっていないので、
DNS の読み込む <tt>named.conf</tt> ファイルやゾーンマスタファイルの
エンコーディングは<a href="#encoding">エンコーディング・正規化方式の決定</a>
決定したエンコーディングに合わせる必要があります。
<b>mdnconv</b> はこのような目的のために設計されたコード変換ツールです。
<p>RACE や UTF-5 なら、ASCII 文字が編集できるエディタがあれば直接入力
することも可能ですが、例えば「こんにちは.世界.」と入力する代わりに
<tt>bq--gbjzg23bn4.bq--3bhbm5km.</tt>
などといった暗号のような文字列を (しかも正確に) 入力しなければならず、
変換ツールを使用するほうがはるかにに簡単です。
<p>UTF-8 ならばエディタによっては直接編集可能なものがあるので、それを
使うこともできます。しかしそのエディタも正規化までは多分してくれない
でしょうから、やはりツールでエンコーディング変換することをお勧めします。
<p>例えば次のようなコマンドを実行すると EUC-JP で書かれたゾーンマスタファイル
<tt>db.somezone.euc</tt> を RACE エンコーディングの <tt>db.somezone.race</tt>
に変換し、同時に Unicode Normalization Form C による正規化を適用する
ことができます。
<blockquote>
<pre>
% mdnconv -noconf -in EUC-JP -out RACE -normalize unicode-form-c \
db.foo.euc &gt; db.foo.race
</pre>
</blockquote>
<p><tt>-in</tt> オプションで入力テキストのエンコーディングを、
<tt>-out</tt> で出力テキストのエンコーディングを、
そして <tt>-normalize</tt> で正規化方式を指定します。
オプションの一覧とどのような値が指定できるかについては、
<a href="../spec/mdnconv.html">mdnconv の仕様書</a>をご覧ください。
<p>ではこの逆に RACE エンコーディングから EUC-JP への変換ができるかというと、
RACE エンコーディングの場合には可能です。ただしこれは mdnconv が
RACE エンコーディング専用の特別な処理を備えているためで、
一般的には ASCII 互換エンコーディングからローカルエンコーディングへの変換は
できないということを覚えておいてください。
これは、入力された文字列の中で ASCII 互換エンコーディングを用いて
表記されている個所とそうでない通常の ASCII 表記の場所を区別できないからです。
これについては mdnconv の仕様書の
<a href="../spec/mdnconv.html#detail">変換処理の詳細</a>を参照してください。
<p>以上のことから、ゾーンマスタファイル等 DNS サーバが読み込むファイル
の作成と管理には次のような方法をとるのがよいと考えられます。
まずローカルエンコーディングを用いて記述した版を用意して、これに対して
編集やバージョン管理を行います。
そして mdnconv を用いてエンコーディング変換と正規化を行い、
DNS サーバの使用するエンコーディング版のファイルを生成して、これを
DNS サーバが読み込むためのファイルとして使用します。
<p>とはいってもローカルエンコーディング版のファイルを改訂するたびに
mdnconv を実行してサーバエンコーディング版のファイルを作るのは面倒です。
この場合例えば make コマンドを使用すれば変換を自動化することができます。
<p>例えばローカルエンコーディング版のファイル名にサフィックス <tt>.lc</tt>
UTF-8 エンコーディング版にサフィックス <tt>.utf8</tt>
RACE エンコーディング版にサフィックス <tt>.race</tt> をつけるとします。
すると次のような Makefile を書くことにより、ローカルエンコーディング版を
更新したら make を実行するだけで変換を自動的に行うことができます。
<blockquote>
<pre>
.SUFFIXES: .lc .utf8 .race
.lc.utf8:
mdnconv -in $(LOCALCODE) -out UTF-8 $(NORMALIZE) $&lt; &gt; $@
.lc.race:
mdnconv -in $(LOCALCODE) -out RACE $(NORMALIZE) $&lt; &gt; $@
LOCALCODE = EUC-JP
NORMALIZE = -normalize unicode-form-c -normalize unicode-lowercase
TARGETS = db.foo.utf8 db.bar.race
all: $(TARGETS)
</pre>
</blockquote>
<p>1つの DNS サーバに異なるエンコーディングの複数のゾーンのマスタを
させようとした場合、<tt>named.conf</tt> に複数のエンコーディングを
混在させなくてはならない状況になることがあります。残念ながらこれは
mdnconv では無理なので、<tt>include</tt> ディレクティブ等を使って
ファイルを分割し、1つのファイルに複数のエンコーディングが
混在しないようにしてください。
<p>最後にもう1つ、UTF-5 特有の問題について説明します。
<p>
<hr>
<h2><a name="utf5">UTF-5 特有の問題</a></h2>
<p>DNS サーバで使用するドメイン名のエンコーディングを UTF-5 にした場合には
いくつかの問題が生じます。
<ul>
<li><a href="#zld">ZLD の指定</a>
<li><a href="#asciilabel">単独で出現する ASCII ラベル</a>
</ul>
<h3><a name="zld">ZLD の指定</a></h3>
<p>UTF-5 は ASCII 互換エンコーディングの一つなので、UTF-5 でエンコードされた
ドメイン名はそのままでは従来の ASCII のドメイン名と区別できません。
同じく ASCII 互換エンコーディングの一つである RACE では、ドメイン名の
各ラベルの先頭に特定のプリフィックス (<tt>bq--</tt>) をつけることによって
従来のドメイン名と (一応) 識別できるのですが、
UTF-5 にはこのような機構がないため、ZLD という概念を使用して従来のドメイン
名との識別を可能にしています。
<p>ZLD (zero level domain) とはドメイン名の最後につける
トップレベルドメインのことで、例えば <tt>utf5.</tt> という
トップレベルドメインを作り、
UTF-5 エンコーディングのドメイン名はすべてこのドメインのサブドメインとする
ことで、従来のドメイン名との区別を可能にします。実際には このトップレベル
ドメインはローカルエンコーディングから UTF-5 エンコーディングへの変換を行う
場所 (現在の mDNkit では dnsproxy) で自動的に付加され、また UTF-5 から
ローカルエンコーディングに戻すときに自動的に除去されるので
アプリケーションにはこのドメインは見えません。アプリケーションにとっての
トップレベルドメインよりさらに上位ドメインに位置するので zero level domain
なわけです。もちろん DNS サーバからは ZLD は隠されておらず、したがって
DNS サーバの設定では ZLD を意識しなければなりません。
<p>さて、このように UTF-5 エンコーディングでは ZLD が必須ですが、
mdnconv によるローカルエンコーディングから UTF-5 エンコーディングへの変換
の際には、ドメイン名の ZLD の部分とそうでない部分を明確に区別する
必要があります。例えば <tt>www.ニック.日本.utf5.</tt> というドメイン名を
UTF-5 に変換すると <tt>N7N7N7.J0CBJ0C3J0AF.M5E5M72C.utf5</tt> となります
(ただし ZLD は <tt>utf5.</tt> だとします)。先頭の <tt>www</tt>
UTF-5 に変換しますが、ZLD 部分は変換しません。このため mdnconv は
ZLD がなんであるかをあらかじめ知っておく必要があります。このために
<a href="../spec/mdnconv.html#zld-opt">-zld</a> というオプションが用意されています。
このオプションは、ゾーンマスタファイル等に書かれたドメイン名が
指定された ZLD にマッチした時に、マッチした部分を出力エンコーディングへの
変換対象から外すという働きをします。ただしドメイン名と ZLD がマッチするのは
<ol>
<li>ドメイン名の最後がピリオドで終わっていること
<li>ZLD がドメイン名の最後の部分と一致していること
</ol>
という条件を満たしているときだけです。例えば ZLD が <tt>utf5.</tt> だとすると
ZLD とマッチするのは次に示す3つのドメイン名の中で最初のものだけです。
<blockquote>
<pre>
www.ニック.日本.utf5.
www.ニック.日本
utf5.ニック.日本.
</pre>
</blockquote>
<p>さらに mdnconv の <a href="../spec/mdnconv.html#auto-opt">-auto</a> オプション
を併用するとある程度 ZLD を自動付加させることができ、
この場合ゾーンマスタファイルにいちいち ZLD を書く必要がなくなります。
ただし確実に付加できるわけではないので、このオプションには頼らない方が
よいでしょう。
<p>
<h3><a name="asciilabel">単独で出現する ASCII ラベル</a></h3>
<p>mdnconv は、デフォルトでは非 ASCII 文字を1文字以上含むドメイン名のみを
出力エンコーディングに変換します。つまり ASCII のみからなるドメイン名は
変換しません。これは従来の ASCII ドメイン名と多言語ドメイン名を混在させた
時に、ASCII ドメイン名までが UTF-5 などに変換されてしまうのを防ぐための
処置です。
<p>ところが多言語ドメイン名の中に ASCII 文字のみから構成されるラベルが
ある場合、それが単独でゾーンマスタファイルに出現するとこの処置のために
そのラベルが UTF-5 に変換されないという問題が生じます。
例えばドメイン名 <tt>www.ニック.日本.utf5.</tt> の A レコードを
ゾーンマスタファイルに記述するときに、次のように書いてしまうと
<tt>www</tt> の部分が UTF-5 に変換されません。
<blockquote>
<pre>
$ORIGIN ニック.日本.utf5.
...
www IN A 10.9.8.7
</pre>
</blockquote>
<p>このような場合、FQDN で記述するなどして、非 ASCII 文字が含まれる
ようにしてやる必要があります。
</body>
</html>

View file

@ -1,130 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: clientconfig.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>Configuring Your Clients</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1><a name="clientconfig">クライアント側の設定</a></h1>
<p>
DNS Proxy Server (dnsproxy) は、基本的には
多言語ドメイン名に対応していないクライアントから
多言語化対応したDNSサーバを利用できるようにするものです。
<blockquote>
ある手法の多言語ドメイン名に対応しているクライアントから
他の手法で多言語化対応したDNSサーバを利用するためにも使用できます。
</blockquote>
<p>
実際にあるクライアントで多言語ドメイン名を使うことができるかどうかは、
そのクライアントがドメイン名をどのように扱うかによります。
クライアントが、ドメイン名を、クライアント側のエンコーディングで
なにもチェック/加工しないで使用しているなら、
dnsproxyを経由することによって、多言語ドメイン名が利用可能になります。
しかし、クライアント側でドメイン名のシンタックスを厳密にチェックしていたり、
ある種の変換を行なっているような場合には、dnsproxyは役に立ちません。
<p>
ここでは、いくつかの代表的なクライアントについて、
dnsproxyによる多言語ドメイン名が使うことができるかどうか、
どうすれば多言語ドメイン名を使うことができるようになるか、
を説明します。
<p>
<hr>
<h2>UNIXのアプリケーション</h2>
<p>
<h3>resolverの問題</h3>
<p>
UNIXの場合、DNSへの要求は、多くの場合resolverを経由して送られます。
しかし、標準的なresolverはnon-ASCIIのドメイン名を受付けません。
この問題に対処するため、mDNkitにはbin8のresolver
(およびnslookup、named)を8-bit throughにするためのパッチが
付属しています。まずは、bind8にこのパッチを適用し、
8-bit throughのresolverを使って再リンクしてください。
詳しくは<a href="install.html">インストールガイド</a>
<a href="install.html#preparation">前準備</a>
<a href="install.html#bind">bind 用パッチの適用とインストール</a>
ご覧ください。
<p>
<h3>nslookup</h3>
<p>
標準的なnslookupはnon-ASCIIのドメイン名を受付けません。
mDNkitのbind8への8-bit throughパッチを適用して作成された
nslookupなら、多言語ドメイン名を使用することが可能になります。
詳しくは<a href="install.html">インストールガイド</a>
<a href="install.html#preparation">前準備</a>
<a href="install.html#bind">bind 用パッチの適用とインストール</a>
ご覧ください。
<h3>Squid</h3>
<p>
Squid経由でWebにアクセスするような場合には、non-ASCII文字を含む
ドメイン名はsquidによってエラーとされます。
mDNkitにはsquidを8-bit through にする
(シンタックスチェックを外す)パッチが含まれています。
これを適用したsquidであれば、多言語ドメイン名を受付けるようになります。
詳しくは<a href="install.html">インストールガイド</a>
<a href="install.html#preparation">前準備</a>
<a href="install.html#squid">squid 用パッチの適用とインストール</a>
ご覧ください。
<h3>Netscape</h3>
<p>
残念ながら、入力時点でnon-ASCII文字は拒否されてしまいます。
<p>
<hr>
<h2>Windowsのアプリケーション</h2>
<p>
Windowsのresolver(WINSOCK)は、non-ASCIIのドメイン名を通すようです。
クライアント内でのチェック、変換が行なわれなければ問題なく
多言語ドメイン名を使うことができます。通常は
<pre>
client-translation . Shift_JIS
</pre>
とすればOKです。
<p>
<h3>nslookup</h3>
<p>
残念ながら、ホスト名の入力時点で、non-ASCII文字を含むホスト名は
拒否されるようです。ls による一覧表示は動作します。
<h3>Netscape Communicator</h3>
<p>
Version 4.7 は問題なく動作しました。
<p>
ただ、HTTPプロキシサーバを使われている場合には、その
プロキシサーバが多言語ドメイン名に対応しているかどうかが
問題になりますのでご注意ください。
<p>
<h3>Internet Explrore</h3>
<p>
IEには多言語ドメイン名への対応が一部含まれています。
<pre>
ツール
インターネットオプション
いつもUTF-8としてURLを送信する
</pre>
しかし、これを使うと、余分なところまでUTF-8で
エンコードしてしまうようで、dnsproxyでは使用できません。
逆に、これをオフにして、
<pre>
client-translation . Shift_JIS
</pre>
とすれば、dnsproxy経由で多言語ドメイン名が使えるようになります。
<p>
ですが、IEの場合には、webページ内に埋め込まれたURLについては、
そのページのエンコーディングに合わせたエンコーディングに変換して
DNSの問合せを行なうようになっていますので、Shift_JIS以外で
記述されたWebページ上の多言語ドメイン名についてはクエリーが
失敗してしまいます。
</body>
</html>

View file

@ -1,122 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: dnsproxy.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>dnsproxy</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>dnsproxy</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#setup">設定</a>
<li><a href="#usage">使用法</a>
<li><a href="#limitation">制限事項</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<p><b>dnsproxy</b> は文字通り DNS のプロキシサーバとして動作する
プログラムです。クライアントと本物の DNS サーバの間で両者の間の
通信データ (DNS プロトコルメッセージ) の変換を行います。
<p>クライアントからローカルエンコードされた多言語ドメイン名を含む
DNS要求を受け取ると、DNSメッセージ中のドメイン名を
多言語化対応したDNS サーバが受付けられる標準エンコーディングに変換し、
DNS サーバに送出します。
エンコーディングの変換と同時に正規化も行います。
また逆に DNS サーバからの応答メッセージを受信すると、その中に
含まれる多言語ドメイン名をクライアント側で認識できるローカル
エンコーディングに変換し、クライアントに返します。
<p>dnsproxy はこのようなメカニズムによって一般のクライアントが
多言語ドメイン名を扱うことを可能にします。
<p>具体的には、
<ul>
<li>日本語など、非 ASCII 文字の入ったホスト名を名前解決できるようになります。
<li>非 ASCII 文字の入ったホスト名を名前解決の結果として受け取れるように
なります。
</ul>
<p>
<hr>
<h2><a name="setup">設定</a></h2>
<p>dnsproxy を使用するには、専用のコンフィギュレーションファイルで
使用するエンコーディングや正規化の方法を設定しておく必要があります。
このファイルの設定方法については
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
をご覧ください。
<p>
<hr>
<h2><a name="usage">使用法</a></h2>
<p>dnsproxy を使用するためにはあらかじめ設定が必要です。
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
をご覧ください。
<p>dnsproxy は以下のコマンド行オプションを受け付けます。
<dl>
<dt><tt>-daemon</tt>
<dd>dnsproxy をデーモンとして起動します。
<dt><tt>-config </tt><em>config-file</em>
<dd><em>config-file</em> をコンフィギュレーションファイルとして使用します。
このオプションを指定しなかった場合にはデフォルトのコンフィギュレーション
ファイル (通常は <tt>/usr/local/etc/dnsproxy.conf</tt>) が使用されます。
<dt><tt>-logfile </tt><em>log-file</em>
<dd>ログをファイル <em>log-file</em> に出力します。このオプションが
指定されなかった場合にはコンフィギュレーションファイルで指定された
ログファイル、またはデフォルトのログファイルに出力されます。
</dl>
<hr>
<h2><a name="limitation">制限事項</a></h2>
<p>dnsproxy は、エンコーディング変換や正規化の機能を持たない
一般のクライアントが多言語ドメイン名を扱うことを可能にします。
クライアントではローカルコードで記述されたドメイン名を、
そのまま多言語ドメイン名として使うことができるようになります。
<p>しかしそれにはクライアントがドメイン名に対して独自のチェックや変換を
行なっていなければ、という前提条件があります。
問題はこの点にあり、
クライアントによっては、ドメイン名のシンタックスを厳密にチェックしていたり、
独自の手法で部分的に多言語化していたりするものがあります。
このようなクライアントであれば、dnsproxyを使っても
多言語ドメイン名を使うことはできません。
<p>UNIXの場合は、DNSへの要求は通常リゾルバライブラリを経由して送られますが、
既存のリゾルバはドメイン名のシンタックスをチェックしていて、
ドメイン名にnon-ASCIIコードが含まれているとエラーとして
はじかれてしまいます。
この問題に対処するために、mDNkitには、bind8付属のリゾルバライブラリを
8ビット透過にするためのパッチが付属しています。このパッチを適用した
リゾルバライブラリを組み込めば、クライアントからのローカルコードによる
多言語ドメイン名がdnsproxyに渡されて、多言語化DNSサーバと組み合わせて
使用することができるようになります。
Windowsの場合には、リゾルバ(WINSOCK)は8ビット透過になっていますので、
この問題はありません。
<p>残る問題は、アプリケーションでのチェックや変換ですが、
これは対象となるクライアントが多数ありますし、また、
ソースが公開されていないものについては手の出しようがありませんので、
基本的には、mDNkitには含まれていません。しかし、
DNSのチェックに多用される<b>nslookup(in bind8)</b>と、
汎用のproxyとして使用されることの多い<b>squid</b>については、
ドメイン名のチェックを外すためのパッチが含まれています。
<p>dnsproxy を使用してどのようなアプリケーションが多言語ドメイン名を
扱えるようになるのかをまとめた
<a href="clientconfig.html">文書</a>を用意してありますので、
こちらをご覧ください。
</body>
</html>

View file

@ -1,320 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: guide.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>Introduction to mDNkit</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>ガイド一覧</h1>
<p>
mDNkitのガイドは以下のドキュメントから構成されています。
<ul>
<li>概要説明
<ul>
<li><a href="#intro">mDNkitの紹介</a>
</ul>
<li>mDNkit の提供する多言語ドメイン名処理方式
<ul>
<li><a href="bind9.html">bind9 パッチ</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="dnsproxy.html">dnsproxy</a>
</ul>
<li>インストールと設定
<ul>
<li><a href="install.html">インストール</a>
<li><a href="bindconfig.html">DNSサーバの設定</a>
<li><a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
<li><a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
</ul>
<li>その他
<ul>
<li><a href="reference.html">参考文献</a><br>
</ul>
</ul>
<p>
一般ユーザの方はまず<a href="#intro">mDNkitの紹介</a>をご覧ください。
そのあと、使用する多言語ドメイン処理方式 (あなたのシステムで
利用できる処理方式についてはシステム管理者にお尋ねください) に応じて
<a href="bind9.html">bind9 パッチ</a>
<a href="runmdn.html">runmdn</a>
<a href="wrapper.html">mDN Wrapper</a>
<a href="dnsproxy.html">dnsproxy</a> のいずれかをご覧ください。
<p>
本キットをインストールするシステム管理者の方はすべてのガイドに
一通り目を通しておくことをお勧めします。
<p>
本キットはフリーソフトウェアです。本キットの使用、再配布等に関する
条件については <a href="../../LICENSE.txt">LICENSE.txt</a>
ご覧ください。
<hr>
<h1><a name="intro">mDNkit の紹介</a></h1>
<p>
mDNkitは、既存のDNSサーバ(bind8/9)、既存のクライアントで、
多言語ドメイン名を使うために提案されている各種の方式を試験的に
評価してみることができるようにするための
パッチ、ツール、ライブラリをまとめたものです。
<p>
従来、ドメイン名には、英字、数字(およびハイフン)しか使えませんでした。
多言語化されたドメイン名とは、ドメイン名としてこれらに加えて日本語など
いろいろな言語の文字を使えるようにしたものです。
その実現方式として、現在インターネットドラフトでいくつかの
提案がなされています。(<a href="reference.html">参考文献</a> 参照)
<p>
<h2>エンコーディング変換</h2>
<p>
DNS で多言語ドメイン名を使えるようにするには、まず DNS サーバ間で
多言語ドメイン名として使用する標準エンコーディング (コードセット) を
決める必要があります。
現在提案されている方式は、いずれもISO10646 をベースとした
エンコーディングで、大きく次の2つに分けられます。
<ol>
<li>従来のドメイン名として使うことのできる文字だけを使ったエンコーディング
<li>UTF-8 のように、従来のドメイン名としては正しくない文字列となる
エンコーディング
</ol>
<p>
1. の方法は、エンコード結果が従来のドメイン名としても使える文字列になるので、
多言語ドメイン名を既存のDNSが受付けることができる文字列で
表現することができます。この場合、DNSサーバ自体は
既存のものがそのまま使えます。
<p>
2.の方法では、DNS サーバをそのエンコーディングに対応するように
改造する必要があります。
<p>
いずれの方式に関しても、DNS サーバの持つドメイン名のデータはあらかじめ
そのエンコーディングで用意する必要があります。
<p>
一方、アプリケーションは一般的には SJIS 等のローカルエンコーディングを
使用するので、多言語ドメイン名を使えるようにするためにはどこかで
エンコーディングの相互変換をする必要があります。
<p>
つまりアプリケーションは多言語ドメイン名をローカルエンコーディングで
扱い、DNS サーバは標準エンコーディングで扱うので、
クライアントと DNS サーバの間のどこかでアプリケーションの指定した
ローカルエンコーディングのドメイン名を標準エンコーディングのドメイン名へ
変換し、
また DNS サーバからの応答に含まれる標準エンコーディングのドメイン名を
クライアントで表示可能なローカルエンコーディングに戻さなければなりません。
<p>
このためには次の3種類の方法が考えられます。
<dl>
<dt>a. クライアントでの変換<dd>
クライアントでエンコーディングを変換する。
<img src="img/method_resolver.jpg" alt="client-side conversion">
<p>
<dt>b. DNS サーバでの変換<dd>
DNS サーバでエンコーディングを変換する。
<img src="img/method_named.jpg" alt="server-side conversion">
<p>
<dt>c. プロキシサーバでの変換<dd>
クライアントと DNS サーバの間にエンコーディング変換用の中継サーバを
設ける。
<img src="img/method_proxy.jpg" alt="proxy conversion">
</dl>
<p>
<a name="no-server-conversion">
ただし b. の方式は DNS サーバに不必要に複雑な機構を持ち込むこと、負
荷を高めることなどの問題があり好ましくないため、</a>本キットでは a. と
c. の2通りの方法を提供します。
<p>
mDNkitは、既存のDNSサーバ、クライアントを、最小限の改造で
複数の方式の多言語ドメイン名を
実際に試してみることができるようにするものです。
<p>
<h2>正規化</h2>
<p>多言語ドメイン名を扱うためには、エンコーディング変換の他にも重要な
機能があります。それはドメイン名の正規化です。
<p>すでに述べたように、DNS サーバ間で使用されるドメイン名のエンコーディング
として提案されている方式はいずれも ISO10646 をベースとしていますが、
ISO10646 では見かけ上全く同一の文字を表す方法が複数ある場合があります。
このような文字に対してその表現方法を1つに統一しないと、ユーザが
正しい (と思える) ドメイン名を入力したにも関わらず、名前解決ができない
という不都合が生じることになります。
<p>また、従来の ASCII ドメイン名では、ドメイン名のマッチングの際に大文字と
小文字は同一視されていました。これをそのまま多言語ドメイン名にも適用する
ことは、マッチングの処理効率などの点で問題があり、あらかじめすべて小文字
あるいは大文字に統一するのがより効率的だと考えられます。
<p>このようにドメイン名をあらかじめ設定した基準にしたがって標準形に変換するのが
正規化です。基本的には正規化はエンコーディング変換と同時に行われるので、
エンコーディング変換と同じく
<ul>
<li>クライアントでの正規化
<li>DNS サーバでの正規化
<li>プロキシサーバでの正規化
</ul>
の3種類の方法が考えられます。そして2番目の方式が好ましくないことも
エンコーディング変換と同じです。
<h2>クライアントでの変換・正規化</h2>
<p>多言語ドメイン名を扱う方法のあるべき姿は、クライアント側の
リゾルバライブラリなどにエンコーディングの変換や正規化の機能を
持たせることによって、DNS プロトコルにはローカルエンコーディングの
データを一切載せないことだと考えられます。
この処理方法を実現するために mDNkit ではいくつかの方式を提供しています。
<dl>
<dt><a href="bind9.html">bind9 に対するパッチ</a><dd>
このパッチは bind9 のリゾルバにエンコーディングの変換および
正規化の機能を持たせるものです。
アプリケーションはこのパッチを適用した bind9 のリゾルバライブラリを
リンクすることにより、多言語ドメイン名を扱うことが可能になります。
<blockquote>
<img src="img/method_bind9.jpg" alt="conversion/normalization by bind9 patch">
</blockquote>
<p>
<dt><a href="runmdn.html">runmdn コマンド</a><dd>
このコマンドは、bind4 あるいは bind8 ベースのリゾルバライブラリを持つ
Unix アプリケーションを、再コンパイルなしに多言語ドメイン名を扱えるように
します。これは共有ライブラリの動的リンク機構を利用して、リゾルバライブラリの
提供する一部の関数を多言語ドメイン名の処理を付加したバージョンに
動的に置き換えることで実現されます。
<blockquote>
<img src="img/method_runmdn.jpg" alt="conversion/normalization by runmdn">
</blockquote>
<p>
<dt><a href="wrapper.html">mDN Wrapper</a><dd>
これは Windows クライアントを、やはり再コンパイルなしに多言語ドメイン名を
扱えるようにするものです。DLL の機構を利用して、名前解決を行う WINSOCK
の一部の関数に多言語ドメイン名の処理を付加することで実現されています。
<blockquote>
<img src="img/method_wrapper.jpg" alt="conversion/normalization by winsock wrapper">
</blockquote>
</dl>
<p>runmdn コマンドと mDN Wrapper は、既存のアプリケーションを変更せずに
多言語ドメイン名の機能を付加しようとするものですが、実際にはいくつかの
制限事項があり、どのようなアプリケーションにも適用できるものではありません。
詳しくはそれぞれの解説をご覧ください。
<p>また bind9 パッチといえども、例えばアプリケーションが独自に
ドメイン名の文字チェックを実行して英数字とハイフン以外の文字を含む
ドメイン名をエラーにしていたりする場合には無力です。
<h2>プロキシサーバでの変換・正規化</h2>
<p>すでに述べたように、エンコーディング変換や正規化は
クライアント側で実行するのが理想的だと考えられますが、
実際問題としてソースが公開されていないためそのような改良のできない
クライアントや、特殊なリゾルバを持っていて runmdn が適用できないクライアントが
存在します。
<p>そこで mDNkit では、クライアントからローカルエンコードされた
多言語ドメイン名を含むDNS要求を受け取り、多言語化対応した
DNS サーバが受付けられる標準エンコーディングのドメイン名に変換し、
また逆に DNS サーバからの応答の多言語ドメイン名を
クライアント側で認識できる形式に戻す DNS proxy サーバを
用意しました。
<p><a href="dnsproxy.html">dnsproxy</a>を使うと、
クライアント側がドメイン名のチェックや変換を
行なっていなければ、クライアント側のローカルコードで記述された
ドメイン名を、そのまま多言語ドメイン名として使うことができる
ようになります。
<blockquote>
<img src="img/dnsproxy.jpg" alt="mDNkit - DNS Proxy Server">
</blockquote>
<p>
<h2>DNS側でのドメイン名の変換</h2>
<p>
DNS サーバ側のゾーンマスタファイルや named.conf ファイル上のドメイン名は、
あらかじめ、規定されたエンコーディングに変換されている必要があります
(<a href="#no-server-conversion">前述</a>の理由により
DNS サーバに変換機能を持たせる方法はここでは考えません)。
<p>
mDNkitでは、管理者はこれらのファイルをローカルエンコーディングで
作成して必要に応じて変換して使うものと想定し、
ローカルエンコーディングから
多言語ドメイン名で必要とするエンコーディングへの
変換ツール<b>mdnconv</b>を提供します。
<blockquote>
<img src="img/mdnconv.jpg" alt="mDNkit - mDN converter">
</blockquote>
<table>
<tr>
<td valign=top>注:</td>
<td>
ローカルエンコーディングで記述されたゾーンマスタ
ファイルを多言語エンコーディングへ変換することはできますが、
多言語エンコーディングによっては逆変換が
できないことがあります。
これは、エンコーディングによってはそのエンコーディングで
エンコードされた文字列と通常の ASCII 文字列が
区別できず、ファイルのどの部分を逆変換すべきか判定できない
ものがあるためです。
しかし、DNSの管理のためには、
逆方向の変換も必要になると思いますので、一部のエンコーディングに
対しては逆変換をサポートしています。
</td>
</tr>
</table>
<p>
<h2>DNS自体の多言語化</h2>
<p>
DNS サーバの使用するエンコーディングによっては、
DNSサーバ自体がドメイン名を8ビット透過で扱うことを
要求するものもあります。
このようなエンコーディングへの対処のために
mDNkitにはbind8を8ビット透過にするためのパッチが
含まれています。このパッチはbind8に含まれている
nslookup、resolverについても8ビット透過にします。
<p>bind9 の DNS サーバは本来8ビット透過になっていますが、
ドメイン名を内部形式からテキスト形式に変換する際、8ビット文字を
`\DDD' という表現に変換してしまうので、これを抑制して UTF-8 文字は
そのまま透過するようにする機能が bind9 パッチには含まれています。
<p>
<h2>補足</h2>
実際にmDNkitを使用するには、以下のドキュメントを参照してください。
<ul>
<li><a href="bind9.html">bind9 パッチ</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="dnsproxy.html">dnsproxy</a>
<li><a href="install.html">インストール</a>
<li><a href="bindconfig.html">DNSサーバの設定</a>
<li><a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
<li><a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
<li><a href="reference.html">参考文献</a><br>
</ul>
それぞれのプログラム、ライブラリ、および設定ファイルの仕様については
以下のドキュメントをご覧になってください。
<ul>
<li><a href="../spec/dnsproxy.html">dnsproxy</a>
<li><a href="../spec/mdnconv.html">mdnconv</a>
<li><a href="../spec/bind9.html">BIND-9 パッチ</a>
<li><a href="../spec/runmdn.html">runmdn</a>
<li><a href="../spec/library.html">MDN ライブラリ</a>
<li><a href="../spec/wrapper.html">mDN Wrapper</a>
<li><a href="../spec/clientconfig.html">クライアント設定ファイル</a>
</ul>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View file

@ -1,614 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: install.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>mDNkit installation guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>インストール</h1>
<p>mDNkit のコンパイルおよびインストール方法について解説します。
ここではソースからのインストール方法について説明します。
バイナリパッケージの配布も予定されていますが、
それらのインストール方法に関してはそれぞれのパッケージを参照してください。
<p>本ドキュメントでは Unix 用のコンパイルとインストール方法について
説明します。Windows 用の <a href="wrapper.html">mDN Wrapper</a> のインストール
方法に関しては mDN Wrapper の<a href="wrapper.html#setup">セットアップ</a>
項をご覧ください。
<p>ソース配布からのインストール手順はおよそ次のようになります。
<ol>
<li><a href="#preparation">前準備</a>
<li><a href="#extract">配布ソースの展開</a>
<li><a href="#configure"><tt>configure</tt> 実行</a>
<li><a href="#make">コンパイル</a>
<li><a href="#install">ファイルのインストール</a>
</ol>
<p>インストールの後は、<a href="bindconfig.html">DNS サーバの設定</a>
および <a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
、さらに dnsproxy を使用する場合には
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
を参照して設定を行ってください。
<p>ソース配布に含まれているパッチを適用する場合には、
それぞれ次の手順にしたがってください。
<ul>
<li><a href="#bind9">bind9 用パッチの適用とインストール</a>
<li><a href="#bind">bind8 用パッチの適用とインストール</a>
<li><a href="#squid">squid 用パッチの適用とインストール</a>
</ul>
<hr>
<h2><a name="preparation">前準備</a></h2>
<h3>iconv のインストール</h3>
<p><b>mDNkit</b> は EUC や SJIS など様々なローカルエンコーディングで記述された
ドメイン名のエンコーディングを変換するために、汎用のコードセット変換
ユーティリティである <em>iconv()</em> を使用します。
そこで、FreeBSD など <em>iconv()</em> が標準で組み込まれていないシステムでは、
<b>mDNkit</b> のインストールに先立って <em>iconv()</em> をインストール
しなければなりません。また、<b>mDNkit</b><em>iconv()</em>
UTF-8 エンコーディングをサポートしていることを要求します。システム付属の
<em>iconv()</em> が UTF-8 をサポートしていない場合にはやはり
外部のパッケージをインストールする必要があります。
<p><em>iconv()</em> のフリーな実装としては、例えば <em>libiconv</em>
<ul>
<li><a href="http://clisp.cons.org/~haible/packages-libiconv.html">http://clisp.cons.org/~haible/packages-libiconv.html</a>
</ul>
<p>があり、ソースを上記のページから入手することができます。
これは LGPL に基づいたフリーソフトウェアで、多くの Unix 系 OS の
もとで動作します。このパッケージのインストール方法については、上記ページか、
あるいはソース配布に含まれる <tt>INSTALL.generic</tt> ファイルをご覧ください。
<p>
<h3>bind9 ソースの入手</h3>
<p>mDNkit は bind9 に対するパッチを提供しており、これによって
多言語ドメイン名を扱うことのできる bind9 のリゾルバおよびサーバを
作成することができます。本キットに含まれるパッチは BIND 9.0.0 に
対するものです。ソースは以下の場所からダウンロードすることができます。
<ul>
<li><a href="http://www.isc.org/products/BIND/bind9.html">
http://www.isc.org/products/BIND/bind9.html</a>
</ul>
<p>
<h3>bind8 ソースの入手</h3>
<p>dnsproxy を利用してクライアントアプリケーションが
多言語ドメイン名を使用できるようにするためには、
名前解決を行うリゾルバライブラリを 8bit スルーにする必要があります。
また DNS サーバでも、多言語ドメイン名のエンコーディングとして
ASCII 互換エンコーディングである UTF-5 や RACE 以外の、
例えば UTF-8 などのエンコーディングを使用するためには、
8bit スルーの DNS サーバを使用する必要があります。
<p>mDNkit にはこのために
BIND 8.2.2-P7 および BIND 8.2.3-T6B を 8bit スルーにする
パッチが含まれています。パッチを適用した bind8 を使用したい場合には
あらかじめいずれかのバージョンのソースを用意してください。
ソースは以下の場所からダウンロードすることができます。
<ul>
<li><a href="http://www.isc.org/products/BIND/bind8.html">http://www.isc.org/products/BIND/bind8.html</a>
</ul>
<p>
<h3>Squid ソースの入手</h3>
<p>Web のキャッシュサーバである Squid は、そのままでは多言語
ドメイン名が入力されるとそれをエラーにしてしまい、使用することができません。
このため<b>mDNkit</b> には
<a href="http://www.squid-cache.org/Versions/v2/2.3/">Squid-2.3.STABLE3</a>
8bit スルーにするパッチが含まれています。Squid を多言語ドメイン名で使用
したい場合にはこのソースも用意してください。
<p>
<hr>
<h2><a name="extract">配布ソースの展開</a></h2>
<p><b>mDNkit</b> に関する最新情報は以下の場所から入手可能で、
最新の配布ソースのダウンロードもできます。
<ul>
<li><a href="http://www.nic.ad.jp/jp/research/idn/">http://www.nic.ad.jp/jp/research/idn/</a>
</ul>
<p>入手した <b>mDNkit</b> の配布ソースを展開します。
配布ソースのファイル名を <tt>mdnkit-<i>X.Y</i>.tar.gz</tt>とすると
次のようにして展開できます。
<blockquote>
<pre>
% <kbd>gunzip mdnkit-X.Y.tar.gz</kbd>
% <kbd>tar -xf mdnkit-X.Y.tar</kbd>
</pre>
</blockquote>
<p>展開すると、<tt>mdnkit-<i>X.Y</i></tt>というディレクトリが作られますので、
そこに移動してください。
<blockquote>
<pre>
% <kbd>cd mdnkit-X.Y</kbd>
</pre>
</blockquote>
<p>以降の説明では、このディレクトリを <tt>$MDNTOP</tt> という名前で
参照します。環境変数 <tt>$MDNTOP</tt> を設定しておくと便利でしょう。
<blockquote>
<pre>
% <kbd>setenv MDNTOP `pwd`</kbd> (csh 系のシェルの場合)
% <kbd>MDNTOP=`pwd`; export MDNTOP</kbd> (sh 系のシェルの場合)
</pre>
</blockquote>
<p>
<hr>
<h2><a name="configure"><tt>configure</tt> 実行</a></h2>
<p>まず <b>mDNkit</b> の本体である、
<ul>
<li>MDN ライブラリ (libmdn)
<li>DNS プロキシサーバ (dnsproxy)
<li>ゾーンマスタファイルコード変換ツール (mdnconv)
<li>runmdn コマンド
</ul>
<p>のコンパイルを実行します。
<p>まず、<b>mDNkit</b> のトップディレクトリ
(<tt>$MDNTOP</tt> の指すディレクトリ) に移動し、
<tt>configure</tt> スクリプトを実行します。
<tt>configure</tt> はヘッダファイルやライブラリの有無など、システム毎の
特徴を調べ、コンパイル環境を適切に設定するためのツールです。
<blockquote>
<pre>
% <kbd>cd $MDNTOP</kbd>
% <kbd>./configure</kbd>
</pre>
</blockquote>
<p>システムに <em>iconv()</em> が組み込まれていて、かつコンパイル時に
特別なオプションを使用しないなら上記のようになにも引数を指定せずに
実行すればよいのですが、そうではない場合、オプションや環境変数で
<tt>configure</tt> の動作を変えることができます。
<p><tt>configure</tt> に指定できるオプションの中で <b>mDNkit</b>
直接関係するものは以下の通りです。
<dl>
<dt><tt>--with-iconv=<i>LIB</i></tt>
<dd>システムに <em>iconv()</em> が組み込まれていない、あるいは
システムの <em>iconv()</em> を使いたくないなどの理由で新たに
<em>iconv()</em> のパッケージをインストールした場合に、このオプションを
用いて <em>iconv()</em> のライブラリを指定します。<i>LIB</i>
ライブラリを指定します。ライブラリファイルをフルパスで指定するか、
あるいは C コンパイラに与えるオプションの形式で指定してください。
<p>例えば<a href="#preparation">前準備</a>に挙げた
<em>iconv</em> のパッケージをインストールした場合、デフォルトでは
<tt>/usr/local/lib</tt><tt>libiconv</tt> にインストールされるので、
<blockquote>
<pre>
--with-iconv="-L/usr/local/lib -liconv"
</pre>
</blockquote>
と指定すればよいでしょう。<tt>libiconv</tt> が共有ライブラリの時には、
<tt>-R</tt> オプションも指定して
<blockquote>
<pre>
--with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
</pre>
</blockquote>
<p>とする必要があるかもしれません。
<p>
<dt><tt>--with-utf8=<i>NAME</i></tt>
<dd>UTF-8 エンコーディングを <em>iconv()</em> に指定する場合、
<b>mDNkit</b> はデフォルトで <tt>UTF-8</tt> というエンコーディング名称を
使用します。もし UTF-8 エンコーディングを指定するのに <tt>UTF-8</tt> 以外の
エンコーディング名称を使用する必要があれば、このオプションで <i>NAME</i>
にその名称を指定します。<a href="#preparation">前準備</a>にあげた
<em>iconv</em> のパッケージを使用する場合にはこのオプションの指定は
不要です。
<p>
<dt><a name="race-prefix"><tt>--with-race-prefix=<i>PREFIX</i></tt></a>
<dd>DNS プロトコル上で用いられる多言語ドメイン名のエンコーディング方式
として RACE という方式が提案されています。これは
<a href="../spec/library.html#ACE">ASCII 互換エンコーディング</a>
1つですが、ドメイン名に特定のプリフィックスを付けることで通常の
ASCII ドメイン名と区別することが可能になっています。このプリフィックスは
現在の<a href="../../reference/draft/draft-ietf-idn-race-02.txt">
インターネットドラフト</a>では <tt>"bq--"</tt> ですが、将来変更される
可能性があります。変更された場合にはこのオプションを用いて正しい
プリフィックスを指定してください。
<p>
<dt><a name="brace-suffix"><tt>--with-brace-suffix=<i>SUFFIX</i></tt></a>
<dd>RACE と同じく DNS プロトコル上で用いられる多言語ドメイン名の
エンコーディング方式として BRACE という方式が提案されています。これも
ASCII 互換エンコーディングの
1つですが、RACE と異なり、ドメイン名に特定のサフィックスを付けることで通常の
ASCII ドメイン名と区別することが可能になっています。このサフィックスは
現在の<a href="../../reference/draft/draft-ietf-idn-brace-00.txt">
インターネットドラフト</a>では <tt>"-8q9"</tt> ですが、将来変更された
場合にはこのオプションを用いて正しいサフィックスを指定してください。
<p>
<dt><a name="lace-prefix"><tt>--with-lace-prefix=<i>PREFIX</i></tt></a>
<dd>RACE や BRACE と同じような ASCII 互換エンコーディングの一つとして
LACE という方式が提案されています。RACE と同様、LACE も
通常の ASCII ドメイン名と区別ために特別なプリフィックスを使用します。
現在の<a href="../../reference/draft/draft-ietf-idn-lace-00.txt">
インターネットドラフト</a>では <tt>"bq--"</tt> ですが、将来これが
変更された場合にはこのオプションを用いて正しい
プリフィックスを指定してください。
<p>
<dt><a name="enable-zld"><tt>--enable-zld</tt></a>
<dd>ZLD (Zero Level Domain) 機能のサポートを追加します。
ZLD とは DNS サーバで用いられる一部のエンコーディングにおいて、
通常の ASCII ドメイン名と多言語ドメイン名とを区別するために用いられる
特殊なドメイン名です。
DNS プロトコル上で使用するエンコーディングとして ZLD を必要とする
エンコーディングを選択しなければ、このオプションの指定は不要です。
<p>なお、ZLD 機能のサポートの有無は dnsproxy や runmdn が設定ファイルを
読み込む際の振る舞い (ZLD の指定を無視するかどうか) に影響します。
mDNkit が提供する<a href="../spec/library.html">ライブラリ</a>自体は、
(設定ファイルを読み込むための一部のモジュールを除いて)
このオプションによって動作が変わることはなく、常に ZLD の処理を
行うようになっています。
<p>
<dt><tt><a name="sbindir">--sbindir=<i>DIR</i></a></tt>
<dd>DNS プロキシサーバ dnsproxy をインストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/sbin</tt> にインストールされます。
<p>
<dt><tt><a name="bindir">--bindir=<i>DIR</i></a></tt>
<dd>ゾーンマスタファイルコード変換ツール mdnconv および
クライアントに多言語ドメイン名処理を付加する runmdn コマンドを
インストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/bin</tt> にインストールされます。
<p>
<dt><tt><a name="libdir">--libdir=<i>DIR</i></a></tt>
<dd>dnsproxy や mdnconv 等が使用する mDNkit の基本ライブラリを
インストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/lib</tt> にインストールされます。
<p>
<dt><tt><a name="includedir">--includedir=<i>DIR</i></a></tt>
<dd>mDNkit の基本ライブラリを使用するのに必要なヘッダファイルを
インストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/include</tt> にインストールされます。
<p>
<dt><tt><a name="sysconfdir">--sysconfdir=<i>DIR</i></a></tt>
<dd>DNS プロキシサーバ dnsproxy の設定ファイル、および
mDNkit のクライアント共通設定ファイルを
インストールするディレクトリを指定します。
デフォルトでは <tt>/usr/local/etc</tt> にインストールされます。
<p>
<dt><tt><a name="mandir">--mandir=<i>DIR</i></a></tt>
<dd>オンラインマニュアルをインストールするベースディレクトリを指定します。
デフォルトでは <tt>/usr/local/man</tt> です。実際にはこのディレクトリの
サブディレクトリの <tt>man1</tt><tt>man8</tt> にインストールされます。
</dl>
<p>この他にも <tt>configure</tt> にはいろいろなオプションを指定することが
できます。
<blockquote>
<pre>
% <kbd>./configure --help</kbd>
</pre>
</blockquote>
<p>で指定可能なオプションの一覧を表示させることができます。
<p>また、関係する環境変数は次の通りです。
<dl>
<dt><tt>CFLAGS</tt>
<dd>C コンパイラに渡すオプションを指定します。例えば外部の
iconv パッケージをインストールしたときに、インクルードファイル
<tt>iconv.h</tt> が標準以外のディレクトリ、例えば
<tt>/usr/local/include</tt> にインストールされたとします。このような
場合には <tt>CFLAGS</tt><tt>-I/usr/local/include</tt>
設定する必要があります。具体的には、csh 系のシェルの場合には
<blockquote>
<pre>
% <kbd>setenv CFLAGS -I/usr/local/include</kbd>
</pre>
</blockquote>
<p>また sh 系のシェルの場合には
<blockquote>
<pre>
% <kbd>CFLAGS=-I/usr/local/include; export CFLAGS</kbd>
</pre>
</blockquote>
<p>とします。
<p><tt>CFLAGS</tt> はこの他にも C コンパイラの最適化オプションを
指定するためにも使えます。<tt>CFLAGS</tt><tt>-O</tt> を指定すれば
最適化ありでコンパイルされます。
</dl>
<p><tt>configure</tt> を実行することにより、あなたのシステム環境に合わせて
調整された Makefile その他のファイルが生成されます。
<p>
<hr>
<h2><a name="make">コンパイル</a></h2>
<p><a href="#configure"><tt>configure</tt> 実行</a>によって、システム環境に
合った Makefile が生成されているので、コンパイルはトップディレクトリ
(<tt>$MDNTOP</tt> の指すディレクトリ) で
<tt>make</tt> コマンドを実行するだけです。
<blockquote>
<pre>
% <kbd>make</kbd>
</pre>
</blockquote>
<p>
<hr>
<h2><a name="install">ファイルのインストール</a></h2>
<p>コンパイルが終了したら、実行ファイルなどのインストールを行います。
インストールの前にスーパーユーザになってください。
<blockquote>
<pre>
% <kbd>su</kbd>
</pre>
</blockquote>
<p>あとは <tt>make install</tt> を実行すれば、必要なファイルが
システムにインストールされます。
<blockquote>
<pre>
# <kbd>make install</kbd>
</pre>
</blockquote>
<p>インストールされるファイルは以下の通りです。
<dl>
<dt>実行ファイル
<dd>以下の実行ファイルがインストールされます。
<dl>
<dt><tt>dnsproxy</tt>
<dd>DNS プロキシサーバです。
<dt><tt>mdnconv</tt>
<dd>ゾーンマスタファイル用のコード変換ツールです。
<dt><tt>runmdn</tt>
<dd>クライアントを再コンパイルすることなしに多言語ドメイン名の名前解決
機能を付加するコマンドです。
デフォルトでは <tt>/usr/local/bin</tt> にインストールされます。
</dl>
<p><tt>dnsproxy</tt> は、デフォルトでは <tt>/usr/local/sbin</tt>
インストールされます。
インストール先を変えるには
<tt>configure</tt><tt><a href="#sysconfdir">--sysconfdir</a></tt>
オプションを使用します。
<p><tt>mdnconv</tt> および <tt>runmdn</tt> は、
デフォルトでは <tt>/usr/local/bin</tt> にインストールされます。
インストール先を変えるには
<tt>configure</tt><tt><a href="#bindir">--bindir</a></tt>
オプションを使用します。
<p>
<dt>オンラインマニュアル
<dd>以下のオンラインマニュアルがインストールされます。
<dl>
<dt><tt>dnsproxy.8</tt>
<dd>DNS プロキシサーバ dnsproxy のマニュアルです。
<dt><tt>mdnconv.1</tt>
<dd>ゾーンマスタファイル用のコード変換ツール mdnconv のマニュアルです。
<dt><tt>runmdn.1</tt>
<dd>runmdn コマンドのマニュアルです。
<dt><tt>mdnres.conf.5</tt>
<dd>クライアント共通設定ファイル mdnres.conf のオンラインマニュアルです。
</dl>
<p>デフォルトでは <tt>/usr/local/man/man8</tt> (<tt>dnsproxy.8</tt>)、
<tt>/usr/local/man/man1</tt> (<tt>mdnconv.1</tt><tt>runmdn.1</tt>)、
<tt>/usr/local/man/man5</tt> (<tt>mdnres.conf.5</tt>)
にそれぞれインストールされます。
インストール先を変えるには、<tt>configure</tt>
<tt><a href="#mandir">--mandir</a></tt> オプションを使用します。
<p>
<dt>設定ファイル
<dd>以下の設定ファイルあるいはそのサンプルファイルがインストールされます。
<dl>
<dt><tt>dnsproxy.conf</tt>
<dd>DNS プロキシサーバ dnsproxy の設定ファイルの設定例を記述した
サンプルファイルです。
このファイルがすでにインストールされている場合には、
上書きしてしまわないように <tt>dnsproxy.conf.sample</tt> という名前で
インストールされます。
<p>このファイルの設定方法に関しては
<a href="proxyconfig.html">DNS Proxy Server のコンフィギュレーション</a>
を参照してください。
<dt><tt>mdnres.conf.sample</tt>
<dd>クライアント共通設定ファイル mdnres.conf の設定例を記述した
サンプルファイルです。
<p>このファイルの設定方法に関しては
<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
を参照してください。
</dl>
<p>いずれもデフォルトでは <tt>/usr/local/etc</tt> にインストールされます。
インストール先を変えるには、<tt>configure</tt>
<tt><a href="#sysconfdir">--sysconfdir</a></tt> オプションを使用します。
<p>
<dt>ライブラリ
<dd>以下のライブラリがインストールされます。
<dl>
<dt><tt>libmdn</tt>
<dd>dnsproxy や mdnconv 等のコマンドが使用している
mDNkit の基本ライブラリです。
<dt><tt>libmdnres</tt>
<dd>runmdn コマンドによってクライアントに動的にリンクされる
ライブラリです。
</dl>
<p>いずれのライブラリもデフォルトでは <tt>/usr/local/lib</tt>
インストールされます。
インストール先を変えるには
<tt>configure</tt><tt><a href="#libdir">--libdir</a></tt>
オプションを使用します。
<p>
<dt>ヘッダファイル
<dd>libmdn のヘッダファイルがインストールされます。
デフォルトでは <tt>/usr/local/include</tt> の下に <tt>mdn</tt> という
ディレクトリが作られ、その下にインストールされます。
インストール先を変えるには、<tt>configure</tt>
<tt><a href="#includedir">--includedir</a></tt> オプションを使用します。
</dl>
<p>
<hr>
<h2><a name="bind9">bind9 用パッチの適用とインストール</a></h2>
<p>展開したソースの中の
<tt>$MDNTOP/patch/bind9/bind-9.0.0-patch</tt>
BIND 9.0.0 に多言語ドメイン名の処理機能を付加するパッチです。
パッチの当て方はこのファイルの先頭にも書いてありますが、簡単に紹介すると、
次のようになります。
<ol>
<li>BIND 9.0.0 のソースのトップディレクトリ
(<tt>README</tt> というファイルがあるディレクトリです) に移動します。
<blockquote>
<pre>
% <kbd>cd /somewhere/.../bind-9.0.0</kbd>
</pre>
</blockquote>
<li><tt>patch</tt> コマンドを使用してソースにパッチを当てます。
<blockquote>
<pre>
% <kbd>patch -p0 &lt; $MDNTOP/patch/bind9/bind-9.0.0-patch</kbd>
</pre>
</blockquote>
</ol>
<p>パッチを当てると、トップディレクトリに <tt>README.mdnkit</tt> という
ファイルが作られます。コンパイルの前にこのファイルを読んでください。
<p>そのあとコンパイルとインストールを行います。方法は <tt>README.mdnkit</tt>
に書かれています。このファイルにも書かれていますが、
<tt>configure</tt> コマンドの実行時に
<tt>--with-mdn</tt> オプションをつけることを忘れないでください。
このオプションをつけないと多言語ドメイン名の処理機能は付加されません。
<blockquote>
<pre>
% ./configure --with-mdn
</pre>
</blockquote>
<p>bind9 用のパッチは mDNkit の本体 (特にライブラリとヘッダファイル) がすでに
インストールされていることを前提としています。したがって、この作業は
mDNkit 本体のインストール終了後に実行してください。
<p>
<hr>
<h2><a name="bind">bind8 用パッチの適用とインストール</a></h2>
<p>展開したソースの中の
<tt>$MDNTOP/patch/bind8/bind-8.2.2-P7-patch</tt>
BIND 8.2.2-P7 に対する 8ビットスルーパッチ、また
<tt>$MDNTOP/patch/bind8/bind-8.2.3-T6B-patch</tt>
BIND 8.2.3-T6B に対する 8ビットスルーパッチです。
パッチの当て方はこれらのファイルの先頭にも書いてありますが、簡単に紹介すると、
次のようになります。
<ol>
<li>BIND 8.2.2-P7 あるいは BIND 8.2.3-T6B のソースのトップディレクトリ
(<tt>src</tt> というサブディレクトリがあるディレクトリです) に移動します。
<blockquote>
<pre>
% <kbd>cd /somewhere/.../bind-8.2.2-P7</kbd>
</pre>
</blockquote>
<li><tt>patch</tt> コマンドを使用してソースにパッチを当てます。
<blockquote>
<pre>
% <kbd>patch -p0 &lt; $MDNTOP/patch/bind8/bind-8.2.2-P7-patch</kbd>
</pre>
</blockquote>
</ol>
<p>パッチを当てたら、あとは通常の BIND のインストール方法にしたがって
コンパイルとインストールを行ってください。インストール方法は BIND の
ソース中の <tt>src/INSTALL</tt> に書かれています。
<p>bind8 用のパッチは BIND を単に 8ビットスルーにするだけで、mDNkit の
ライブラリ等は使用しません。したがって mDNkit 本体とは独立にコンパイルおよび
インストールすることができます。
<p>
<hr>
<h2><a name="squid">squid 用パッチの適用とインストール</a></h2>
<p>展開したソースの中の <tt>$MDNTOP/patch/squid/squid-2.3.STABLE3-patch</tt>
Squid 2.3.STABLE3 に対する 8ビットスルーパッチです。
パッチの当て方はこのファイルの先頭にも書いてありますが、簡単に紹介すると、
次のようになります。
<ol>
<li>Squid 2.3.STABLE3 のソースのトップディレクトリ (<tt>README</tt>
ファイルがあるディレクトリです) に移動します。
<blockquote>
<pre>
% <kbd>cd /somewhere/.../squid-2.3.STABLE3</kbd>
</pre>
</blockquote>
<li><tt>patch</tt> コマンドを使用してソースにパッチを当てます。
<blockquote>
<pre>
% <kbd>patch -p1 &lt; $MDNTOP/patch/squid/squid-2.3.STABLE3-patch</kbd>
</pre>
</blockquote>
</ol>
<p>パッチを当てたら、あとは通常の Squid のインストール方法にしたがって
コンパイルとインストールを行ってください。インストール方法は
Squid のソースに含まれる <tt>INSTALL</tt> ファイルに書かれています。
<p>Squid 用のパッチも bind8 用のパッチと同様単に 8ビットスルーにするだけで、
mDNkit のライブラリ等は使用しません。
したがって mDNkit 本体とは独立にコンパイルおよび
インストールすることができます。
</body>
</html>

View file

@ -1,332 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: proxyconfig.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>Configuring DNS Proxy Server</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1><a name="proxyconfig">DNS Proxy Server のコンフィギュレーション</a></h1>
<p>
DNS Proxy Server <b>dnsproxy</b>を使うには、
いくつかの情報を設定する必要があります。
ここでは、これらの情報の設定方法と意味とを説明します。
<ul>
<li><a href="#config-file">コンフィギュレーションファイル</a>
<li><a href="#config-data">コンフィギュレーションデータ</a>
<ul>
<li><a href="#listen">listen</a>
<li><a href="#forward">forward</a>
<li><a href="#log-file">log-file</a>
<li><a href="#log-level">log-level</a>
<li><a href="#client-translation">client-translation</a>
<li><a href="#alternate-encoding">alternate-encoding</a>
<li><a href="#normalize">normalize</a>
<li><a href="#server-translation">server-translation</a>
<li><a href="#user-id">user-id</a>
<li><a href="#group-id">group-id</a>
<li><a href="#root-directory">root-directory</a>
</ul>
</ul>
<hr>
<h2><a name="config-file">コンフィギュレーションファイル</a></h2>
<p>
設定情報はコンフィギュレーションファイルに記載されます。
コンフィギュレーションファイルは、
<b>dnsproxy</b>の起動時にコマンドラインで指示することができます。
<blockquote>
<pre>
% <kbd>dnsproxy -config &lt;config-file&gt;</kbd>
</pre>
</blockquote>
コマンドラインで指示しなかった場合には
デフォルトのコンフィギュレーションファイルが使用されます。
デフォルトのコンフィギュレーションファイルは、ディレクトリ
<pre>
/usr/local/etc
</pre>
の下の
<pre>
dnsproxy.conf
</pre>
です。ディレクトリは、mDNkit作成時に
<pre>
configure --sysconfdir=DIR
</pre>
で指示することもできます。
詳しくは、インストールガイドの
<a href="install.html#sysconfdir">configure 実行</a>
ところをご覧ください。
<hr>
<h2><a name="config-data">コンフィギュレーションデータ</a></h2>
<p>
コンフィギュレーションファイルはテキストファイルで、
以下のコンフィギュレーションデータを指定します。
<dl>
<dt><a name="listen">listen</a><dd>
<p>
dnsproxyがクライアントからの要求を受付ける
ネットワークアドレス、ポート番号を指定します。
<pre>
listen &lt;address&gt;
</pre>
&lt;address&gt;は以下のいずれかの形式で指示します。
<blockquote>
<table>
<tr><td>&lt;IP address&gt;:&lt;port number&gt;</td></tr>
<tr><td>:&lt;port number&gt;</td></tr>
<tr><td>&lt;IP address&gt;</td></tr>
</table>
</blockquote>
省略された場合には
<blockquote>
<table>
<tr><td>IP address</td><td>0.0.0.0</td><td># INADDR_ANY</td></tr>
<tr><td>port number</td><td>53</td></tr>
</table>
</blockquote>
が使用されます。
<p>
dnsproxy経由でDNSサーバを使用するクライアントは、
ここで指示したアドレス、ポートをDNSサーバとして設定します。
クライアント側ではポート番号を変更できないものが多いので
ポート番号はデフォルトの53をそのまま使った方がよいでしょう。
<p>
<dt><a name="forward">forward</a><dd>
<p>
dnsproxyが、DNS要求を転送し、応答を受け取る本来のDNSサーバの
ネットワークアドレス、ポート番号を指定します。
<pre>
forward &lt;address&gt; [ bind4compat ]
</pre>
&lt;address&gt;の形式は上の<a href="#listen">listen</a>のものと同じです。
<p>
オプションの <b>bind4compat</b>が指示された場合には、
UDPでリクエストを転送する時に、ソースアドレスとして、
listenで指示されたアドレス/ポートを使用します。
これはbind4にある機能で、UDPポートについての
アクセス制限下で運用することを想定したものです。
このオプションが指示されなかった場合には、
1024以上のソースポートが使用されます。
<p>
<dt><a name="log-file">log-file</a><dd>
<p>
dnsproxyが実行ログを出力するファイル名を指定します。
<pre>
log-file &lt;path&gt;
</pre>
ログファイル名は、
以下のコマンドラインオプションで指定することもできます。
両方指定した場合にはコマンドラインオプションの指定のほうが優先されます。
<pre>
dnsproxy -logfile &lt;address&gt;
</pre>
指定されなかった場合には、
<pre>
/tmp/dnsproxy.log
</pre>
に書き込まれます。
<p>
なお、実行ログは常に追記されていきますので、
適当な時を見計らって消すことをお勧めします。
<p>
また、dnsproxy にハングアップシグナル (SIGHUP) を送ると
いったんログファイルを閉じて、再度オープンするようになっています。
ログファイルをアーカイブする場合に便利な機能です。
<p>
<dt><a name="log-level">log-level</a><dd>
<p>
ログのレベルを設定します。
<pre>
log-level &lt;level&gt;
</pre>
レベルとして指定できる値は次の通りです。
<blockquote>
<dl>
<dt>none<dd>一切ログを記録しません。ログがないと不具合が生じた場合の
原因解明が難しくなりますので、できればこのレベルは指定しないでください。
<dt>fatal<dd>致命的なエラーが生じたときにのみログを出力します。
<dt>warn<dd>警告メッセージにもログに記録します。これがログレベルを
指定しなかったときのデフォルトです。
<dt>trace<dd>実行トレースメッセージもログに出力します。
このレベルを指定すると dnsproxy の動作がかなり詳細に記録されるので
障害が発生した場合の原因究明には便利ですが、大量のログが出力されるので
普段は指定しない方がよいでしょう。
</dl>
</blockquote>
<p>
<dt><a name="client-translation">client-translation</a><dd>
<p>
クライアント側でのドメイン名のエンコーディングを指示します。
<pre>
client-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
多言語ドメイン名に対応していないクライアントの場合には、
通常、クライアントのローカルエンコーディングになっています。
そのような場合には
<pre>
client-translation . Shift_JIS
</pre>
という形で、&lt;ZLD&gt;無しで指示します。
<p>
多言語ドメイン名の手法によっては、
クライアント側で多言語ドメイン名を通常のDNSでも
受付けられる形式にエンコードして、それを通常のドメイン名と
区別するために ZLD (Zero Level Domain) を付加するものがあります。
そのような場合には、付加されるZLDとその時のドメイン名の
エンコーディング方法とを対応付けることにより、
他の多言語ドメイン名手法のDNSサーバを利用することが
できるようになります。
<pre>
client-translation .i-dns.net UTF-5
</pre>
クライアント側のドメイン名のエンコーディングは、
ZLD が異なっていれば、複数指定することができます。
<p>
なお、mDNkit のデフォルトの設定では ZLD の指定はできないように
なっています。ZLD を使用するためには、mDNkit のコンパイルの際、
<tt>configure</tt> コマンドに
<a href="install.html#enable-zld"><tt>--enable-zld</tt></a>
を指定する必要があります。
この指定をせずに mDNkit をコンパイルした場合には、ZLD の指定は
すべて無視されます。
<p>
クライアントから送られてきたDNS要求のドメイン名は、
ここで指示したエンコーディングから、内部的に使用される
UTF-8エンコーディングに変換されます。
そして、後述の正規化、サーバ側エンコーディングへの変換が
行なわれてDNSサーバに送出されます。また、DNSサーバからの
応答は、逆に元のエンコデーィングに戻されてクライアントに
返されます。
<p>
ここで指定可能なエンコーディング名は、mDNkit付属のlibmdnおよび
使用するiconv ライブラリに依存します。
iconv ライブラリによって、エンコーディング名が異なっている
ことがありますので、ライブラリのマニュアルをご覧になって
使用可能なエンコーディング名を確認してください。
付属のlibmdnでは、iconvが提供するエンコーディングの他に、
多言語化DNS用に提案されている
<blockquote>
<table>
<tr><td>UTF-5</td>
<td><a href="../../reference/draft/draft-jseng-utf5-01.txt">draft-jseng-utf5-01.txt</a></td>
</tr>
<tr><td>RACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-race-02.txt">draft-ietf-idn-race-02.txt</a></td>
</tr>
<tr><td>BRACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-brace-00.txt">draft-ietf-idn-brace-00.txt</a></td>
</tr>
<tr><td>LACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-lace-00.txt">draft-ietf-idn-lace-00.txt</a></td>
</tr>
</table>
</blockquote>
をサポートしています。
<p>
<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
<p>DNS サーバから返されたドメイン名がクライアントのローカルエンコーディングに
変換できない文字を含んでいた場合に、ローカルエンコーディングの代わりに使用する
エンコーディングを指定します。
<pre>
alternate-encoding &lt;Encoding&gt;
</pre>
指定するエンコーディングは必ず「ASCII互換エンコーディング (ACE)」と呼ばれる、
変換結果が従来のドメイン名として使用可能な文字 (英数字およびハイフン) だけ
からなるエンコーディングでなければなりません。たとえば ASCII 互換
エンコーディングの一つである RACE を指定する場合には次のように指定します。
<pre>
alternate-encoding RACE
</pre>
<p>
<dt><a name="normalize">normalize</a><dd>
<p>
ドメイン名の正規化手法を指定します。
<pre>
normalize &lt;scheme&gt; ...
</pre>
正規化手法は複数指定可能で、左側から順に適用されていきます。
<p>
クライアントから送られてきたDNS要求のドメイン名は、
内部的に使用されるUTF-8エンコーディングに変換された上で、
ここで指示した正規化が適用されます。
使用可能な正規化手法はmDNkitに含まれるlibmdnに依存しています。
どのような正規化手法があるかは、
<a href="../spec/library.html">libmdnのマニュアル</a>
<a href="../spec/library.html#normalizer">normalizer モジュール</a>
に記載されています。
<p>
<dt><a name="server-translation">server-translation</a><dd>
<p>
DNSサーバ側のドメイン名エンコーディング方法を指示します。
<pre>
server-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
ZLDが不要なエンコーディングであれば、省略値として'.'を指示します。
<pre>
server-translation . UTF-8
</pre>
ZLDを必要するエンコーディングでは、ZLDとエンコーディング名の
両方を指定します。
<pre>
server-translation .i-dns.net UTF-5
</pre>
指定可能なエンコーディングは、前出のclient-translationでの
ものと同じです。
<p>
<dt><a name="user-id">user-id</a>
<dd>
<p>dnsproxy が動作するユーザを指定します。
<pre>
user-id &lt;user&gt;
</pre>
<p>通常、dnsproxy は特権ポートを使用するためルート権限で起動させる必要が
ありますが、ルート権限のままで動作させるのはセキュリティ上好ましくありません。
この指定により、dnsproxy は特権ポートを作成したあとサービスを開始する前に
指定したユーザの権限で動くようになります。
<p>&lt;user&gt; にはユーザ名あるいはユーザ ID 番号を指定することができます。
<p>
<dt><a name="group-id">group-id</a>
<dd>
<p>dnsproxy が動作するグループを指定します。
<pre>
group-id &lt;user&gt;
</pre>
これは <tt>user-id</tt> エントリと似ていますが、ユーザの代わりにグループを
指定する点が異なります。
<p>&lt;group&gt; にはグループ名あるいはグループ ID 番号を指定することが
できます。
<p>
<dt><a name="root-directory">root-directory</a>
<dd>
<p>dnsproxy が動作する際のルートディレクトリを指定します。
<pre>
root-directory &lt;path&gt;
</pre>
<p>これもセキュリティ対策の一つです。dnsproxy が動作する際のルートディレクトリ
を指定することで、そのディレクトリの外にはアクセスできないようにします。
この指定により、dnsproxy はサービスを開始する前に、<em>chroot()</em>
システムコールを用いて指定したディレクトリをルートディレクトリとして
設定します。
<p>&lt;path&gt; にはルートとして設定したいディレクトリ名を指定します。
</dl>
</body>
</html>

View file

@ -1,183 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: reference.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>mDNkit reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>参考文献</h1>
<p>多言語ドメイン名の方式の提案、関連 RFC、
ソフトウェア等、mDNkit に関連する参考文献の
リストです。
<ul>
<li><a href="#jpnic">JPNIC</a>
<li><a href="#rfc">RFC</a>
<li><a href="#draft">インターネットドラフト</a>
<li><a href="#otherpaper">その他文書</a>
<li><a href="#software">ソフトウェア</a>
</ul>
<p>JPNIC の多言語ドメイン名に関する技術解説のページにある
<a href="http://www.nic.ad.jp/jp/research/idn/reference/index.html">
関連資料</a>も合わせてご覧ください。
<p>&nbsp;<p>
<hr>
<h2><a name="jpnic">JPNIC</a></h2>
<dl>
<dt><a href="http://www.nic.ad.jp/jp/research/idn/">多言語ドメイン名に関する技術解説</a>
<dd><b>mDNkit</b> など、JPNIC の多言語ドメイン名に関する活動を
紹介したページ。
</dl>
<p>&nbsp;<p>
<h2><a name="rfc">RFC</a></h2>
<dl>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc1034.txt">DOMAIN NAMES - CONCEPTS AND FACILITIES</a> (RFC1034)
<dd>DNS の概要を示した RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc1035.txt">DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION</a> (RFC1035)
<dd>DNS プロトコルを規定した RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc1642.txt">UTF-7, A Mail-Safe Transformation Format of Unicode</a> (RFC1642)
<dd>Unicode/ISO10646 のエンコード方法の一つである UTF-7 について解説した
RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2044.txt">UTF-8, a transformation format of Unicode and ISO 10646</a> (RFC2044)
<dd>Unicode/ISO10646 のエンコード方法の一つである UTF-8 について解説した
RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2130.txt">The Report of the IAB Character Set Workshop held 29 February - 1 March, 1996</a> (RFC2130)
<dd>インターネット上でのキャラクタセットの仕様に関するワークショップの
レポート。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2277.txt">IETF Policy on Character Sets and Languages</a> (RFC2277)
<dd>インターネット上でのキャラクタセットおよび言語の指定に関する IETF
の方針を示した RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2671.txt">Extension Mechanisms for DNS (EDNS0)</a> (RFC2671)
<dd>DNS プロトコルの拡張方式である EDNS0 を定義した RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2781.txt">UTF-16, an encoding of ISO 10646</a> (RFC2781)
<dd>Unicode/ISO10646 のエンコード方法の一つである UTF-16 について解説した
RFC。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2825.txt">A Tangled Web: issues of I18N, domain names, and the other Internet protocols</a> (RFC2825)
<dd>ドメイン名やプロトコルの多言語化に関する問題等を示した文書。<p>
<dt><a href="ftp://ftp.nic.ad.jp/rfc/rfc2826.txt">IAB Technical Comment on the Unique DNS Root</a> (RFC2826)
<dd>DNS のルートのユニーク性に関する文書。
</dl>
<p>&nbsp;<p>
<h2><a name="draft">インターネットドラフト</a></h2>
<dl>
<dt><a href="../../reference/draft/draft-ietf-idn-requirements-03.txt">draft-ietf-idn-requirements-03.txt</a>
<dd>IETF の IDN ワーキンググループによる、多言語ドメイン名に関する
各種の要件 (requirement) をまとめた文書。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-compare-01.txt">draft-ietf-idn-compare-01.txt</a>
<dd>IETF の IDN ワーキンググループによる、現在提案されている
いくつかの方式の比較文書。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-race-02.txt">draft-ietf-idn-race-02.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 RACE のプロポーザル。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-sace-00.txt">draft-ietf-idn-sace-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 SACE のプロポーザル。
mDNkit では現在のところサポートされていない。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-brace-00.txt">draft-ietf-idn-brace-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 BRACE のプロポーザル。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-lace-00.txt">draft-ietf-idn-lace-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 LACE のプロポーザル。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-utf6-00.txt">draft-ietf-idn-utf6-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 UTF-6 のプロポーザル。
mDNkit では現在のところサポートされていない。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-dude-00.txt">draft-ietf-idn-dude-00.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 DUDE のプロポーザル。
mDNkit では現在のところサポートされていない。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-idne-01.txt">draft-ietf-idn-idne-01.txt</a>
<dd>多言語ドメイン名の実現方式のプロポーザル。EDNS0 を利用し、ドメイン名の
エンコーディングには UTF-8 を使用する。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-idnra-00.txt">draft-ietf-idn-idnra-00.txt</a>
<dd>多言語ドメイン名の処理方式のプロポーザル。アプリケーション、リゾルバ、
DNS サーバのインタフェースについて述べられている。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-nameprep-00.txt">draft-ietf-idn-nameprep-00.txt</a>
<dd>多言語ドメイン名の前処理 (正規化等) のプロポーザル。<p>
<dt><a href="../../reference/draft/draft-jseng-utf5-01.txt">draft-jseng-utf5-01.txt</a>
<dd>多言語ドメイン名のエンコーディング方式 UTF-5 のプロポーザル。<p>
<dt><a href="../../reference/draft/draft-ietf-idn-udns-01.txt">draft-ietf-idn-udns-01.txt</a>
<dd>多言語ドメイン名の実現方式 (DNS プロトコルの変更、エンコーディングなど)
のプロポーザル。ドメイン名のエンコーディングには基本的に
UTF-8 を使用する。<p>
<dt><a href="../../reference/draft/draft-skwan-utf8-dns-04.txt">draft-skwan-utf8-dns-04.txt</a>
<dd>多言語ドメイン名の実現方式のプロポーザル。ドメイン名の
エンコーディングには UTF-8 を使用する。<p>
<dt><a href="../../reference/draft/draft-duerst-dns-i18n-02.txt">draft-duerst-dns-i18n-02.txt</a>
<dd>多言語ドメイン名の実現方式に関する考察とプロポーザル。
ZLD (zero level domain) の導入など。<p>
<dt><a href="../../reference/draft/draft-duerst-i18n-norm-04.txt">draft-duerst-i18n-norm-04.txt</a>
<dd>多言語ドメイン名の正規化の方式としていくつかの提案で参照されている
Unicode Normalization Form C についての文書。
</dl>
<p>&nbsp;<p>
<h2><a name="otherpaper">その他文書</a></h2>
<dl>
<dt><a href="http://www.unicode.org/unicode/reports/tr15">Unicode Normalization Forms</a>
<dd>Unicode 文字列の正規化方式である Unicode Normalization Forms を
定義した文書。Form C、Form D、Form KC、Form KD について書かれている。<p>
<dt><a href="http://www.unicode.org/unicode/reports/tr21">Case Mappings</a>
<dd>Unicode 文字列の大文字小文字の変換方法や大文字小文字の区別をしない
比較の方法について述べた文書。<p>
<dt><a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt">UnicodeData.txt</a>
<dd>Unicode の文字属性を記述したデータファイル。上記
Unicode Normalization Forms などで使われる。<p>
<dt><a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.html">UnicodeData File Format</a>
<dd>上記 UnicodeData.txt のファイルフォーマットを記述した文書。
</dl>
<p>&nbsp;<p>
<h2><a name="software">ソフトウェア</a></h2>
<dl>
<dt><a href="http://www.isc.org/products/BIND/">ISC BIND</a>
<dd>DNS の実装である BIND 4.x, 8.x のページ<p>
<dt><a href="http://www.isc.org/products/BIND/bind9.html">ISC BIND 9</a>
<dd>DNS の実装である BIND 9.x のページ<p>
<dt><a href="http://www.squid-cache.org/">Squid Web Proxy Cache</a>
<dd>Web のキャッシュサーバである Squid のページ<p>
<dt><a href="http://clisp.cons.org/~haible/packages-libiconv.html">libiconv</a>
<dd>iconv のフリーな実装である libiconv のページ
</dl>
</body>
</html>

View file

@ -1,294 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: resolvconfig.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>Configuring mDNkit resolver</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1><a name="resolvconfig">mDNkit リゾルバのコンフィギュレーション</a></h1>
<p>mDNkit が提供するツール、コマンドのうち、dnsproxy 以外のもの、
つまり runmdn と mdnconv は共通の設定ファイルを参照します。
また bind9 パッチも同じ設定ファイルを参照します。
<p>このファイルには mDNkit を利用したクライアントあるいはリゾルバが
必要とするいくつかの情報を設定する必要があります。
例えば正規化の方式や DNS プロトコル上で用いられるドメイン名のエンコーディング
方法などをこのファイルで指定します。
ここでは、これらの情報の設定方法と意味とを説明します。
<p>また、アプリケーションの使用するローカルエンコーディングは
アプリケーションの動作するロケール情報から取得します。これについても
合わせて説明します。
<ul>
<li><a href="#config-file">コンフィギュレーションファイル</a>
<li><a href="#config-data">コンフィギュレーションデータ</a>
<ul>
<li><a href="#server-encoding">server-encoding</a>
<li><a href="#server-zld">server-zld</a>
<li><a href="#normalize">normalize</a>
<li><a href="#alternate-encoding">alternate-encoding</a>
<li><a href="#alias-file">alias-file</a>
</ul>
<li><a href="#local-encoding">ローカルエンコーディングについて</a>
</ul>
<hr>
<h2><a name="config-file">コンフィギュレーションファイル</a></h2>
<p>
mDNkit の設定は、コンフィギュレーションファイルによって行われます。
mDNkit をデフォルトの設定でコンパイルした場合には、
このコンフィギュレーションファイルのパス名は
<blockquote>
<pre>
/usr/local/etc/mdnres.conf
</pre>
</blockquote>
となります。ディレクトリ部分、つまり <tt>/usr/local/etc</tt>
mDNkit の設定時に<a href="install.html#sysconfdir">オプション</a>
変更が可能です。
<p>mDNkit をインストールすると、このファイルのサンプルファイルが
<blockquote>
<pre>
/usr/local/etc/mdnres.conf.sample
</pre>
</blockquote>
(デフォルトの設定の場合) にインストールされます。このサンプルファイルには
設定項目とその説明が書かれていますので、コンフィギュレーションファイル
作成の参考にしてください。
<p>
<hr>
<h2><a name="config-data">コンフィギュレーションデータ</a></h2>
<p>
コンフィギュレーションファイルは通常のテキストファイルで、
以下のコンフィギュレーションデータを指定します。
<dl>
<dt><a name="server-encoding">server-encoding</a>
<dd>
DNS プロトコルが使用するエンコーディングを指定します。
<blockquote>
<tt>server-encoding </tt><em>encoding</em>
</blockquote>
<em>encoding</em> にエンコーディング名を指定します。
<blockquote>
<dl>
<dt>[設定例]
<dd>
<pre>
server-encoding RACE
server-encoding UTF-8
</pre>
</dl>
</blockquote>
なお、アプリケーション側のローカルエンコーディングはロケールによって
決まるので、client-encoding というエントリはありません。
ローカルエンコーディングに関しては<a href="#local-encoding">後述</a>します。
<p>
<dt><a name="server-zld">server-zld</a>
<dd>
ZLD を指定します。ZLD とは <em>Zero Level Domain</em> の略で、
<tt>server-encoding</tt> に UTF-5 など特殊なエンコーディングを指定した場合に
必要となります。ZLD については
<a href="bindconfig.html">DNSサーバの設定</a>
<a href="bindconfig.html#zld">ZLD の指定</a>の記述が参考になるでしょう。
なお、mDNkit をデフォルトの設定でコンパイルした場合には ZLD は使えず、
このエントリを指定しても無視されます。
ZLD が使えるように mDNkit をコンパイルする方法については
<a href="install.html">インストール</a>ドキュメントの
<a href="install.html#enable-zld"><tt>--enable-zld</tt></a> の項を
ご覧ください。
<blockquote>
<tt>server-zld </tt><em>ZLD</em>
</blockquote>
<em>ZLD</em> で使用する ZLD を指定します。
<blockquote>
<dl>
<dt>[設定例]
<dd>
<pre>
server-zld zld.to.be.used
</pre>
</dl>
</blockquote>
<p>
<dt><a name="normalize">normalize</a>
<dd>
このエントリーでは正規化の方法を指定します。
2 つ以上の正規化の方法が指定された場合、順番通り (左から右に) 適用します。
<blockquote>
<tt>normalize </tt><em>scheme...</em>
</blockquote>
<em>scheme</em> で正規化の方式の名称を指定します。
<p>正規化の方式として以下のものが指定できます。
<blockquote>
<table>
<tr><td><i>ascii-lowercase</i></td>
<td>ASCII の大文字を小文字に正規化</td></tr>
<tr><td><i>ascii-uppercase</i></td>
<td>ASCII の小文字を大文字に正規化</td></tr>
<tr><td><i>unicode-lowercase</i></td>
<td>Unicode の大文字を小文字に正規化</td></tr>
<tr><td><i>unicode-uppercase</i></td>
<td>Unicode の小文字を大文字に正規化</td></tr>
<tr><td><i>unicode-form-c</i></td>
<td>Unicode normalization form C</td></tr>
<tr><td><i>unicode-form-kc</i></td>
<td>Unicode normalization form KC</td></tr>
<tr><td><i>ja-kana-fullwidth</i></td>
<td>半角カナ文字を全角カナ文字に正規化</td></tr>
<tr><td><i>ja-alnum-halfwidth</i></td>
<td>全角英数字およびマイナス記号を半角文字に正規化</td></tr>
<tr><td><i>ja-compose-voiced-sound</i></td>
<td>全角ひらがなカタカナとそれに続く濁点半濁点を1文字にまとめる正規化</td></tr>
<tr><td><i>ja-minus-hack</i></td>
<td>全角マイナス記号をハイフン ('-') に正規化</td></tr>
<tr><td><i>ja-delimiter-hack</i></td>
<td>全角ピリオドおよび句点を半角のピリオド ('.') に正規化</td></tr>
</table>
</blockquote>
<blockquote>
<dl>
<dt>[設定例]
<dd>
<pre>
normalize unicode-lowercase unicode-form-kc
</pre>
</dl>
</blockquote>
<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
このエントリーでは代替エンコーディングの形式を指定します。
代替エンコーディングとは、DNS プロトコル上のエンコーディングから
アプリケーション側のローカルエンコーディングへの変換に失敗した時に、
ローカルエンコーディングの代わりに使用されるエンコーディングです。
例えば日本語を扱うアプリケーションに DNS サーバから韓国のハングル文字を
含むドメイン名が返された場合には、日本語のローカルエンコーディングに
変換できないので、代わりにこの代替エンコーディングに変換された
結果が渡されます。
<blockquote>
<tt>alternate-encoding </tt><em>encoding</em>
</blockquote>
<em>encoding</em> に代替エンコーディングの名称を指定します。
<p>
代替エンコーディングは、<a href="../spec/library.html#ACE">
ASCII 互換エンコーディング</a>でなくてはなりません。
<p>
<blockquote>
<dl>
<dt>[設定例]
<dd>
<pre>
alternate-encoding RACE
</pre>
</dl>
</blockquote>
<dt><a name="alias-file">alias-file</a>
<dd>
エンコーディングのコードセット名を、別名として追加することができます。
ここでは、追加する別名の定義ファイルへのパス名を指定します。
<blockquote>
<tt>alias-file </tt><em>path</em>
</blockquote>
<em>path</em> に定義ファイルのパス名を指定します。
<blockquote>
<dl>
<dt>[設定例]
<dd>
<pre>
alias-file /some/where/mdnalias.txt
</pre>
</dl>
</blockquote>
別名の定義ファイルは通常のテキストファイルであり、1行に1つずつ
別名を定義します。各行の形式は次の通りです。
<blockquote>
<pre>
&lt;別名&gt; &lt;元の名前&gt;
</pre>
</blockquote>
エンコーディング名 &lt;元の名前&gt; の代わりに &lt;別名&gt;
使えるようになります。
</dl>
<hr>
<h2><a name="local-encoding">ローカルエンコーディングについて</a></h2>
<p>
ローカルエンコーディングについては、ロケールから推測して自動判定するため、
コンフィギュレーションファイルでは、
ローカルエンコーディングを設定するエントリはありません。
<p>
ただし、以下のようなケースのときには自動判定ができません。
<ul>
<li>setlocate 関数を使用していないアプリケーションを実行したとき
<li>C ロケールのままアプリケーションを実行したとき
<li>ロケールとエンコーディングの対応がわからないとき
</ul>
<p>
このような場合には環境変数 <b>MDN_LOCAL_CODESET</b> を設定することで、
ローカルエンコーディングの設定を行うことができます。
例えばローカルエンコーディングを EUC-JP に設定する場合には、
あらかじめ次のような設定をしておきます。
<blockquote>
<dl>
<dt>[設定例]
<dd>
<dl>
<dt>sh 系のとき
<dd>
<pre>
$ MDN_LOCAL_CODESET=EUC-JP
$ export MDN_LOCAL_CODESET
</pre>
<dt>csh 系のとき
<dd>
<pre>
% setenv MDN_LOCAL_CODESET EUC-JP
</pre>
</dl>
</dl>
</blockquote>
<p>指定する値はローカルエンコーディング名で、これはシステムの
<em>iconv()</em> 関数 (より正確には <em>iconv_open()</em>) が
受け付ける名前で指定します。この名前は <em>iconv</em> の実装によって
それぞれ異なりますので、具体的な値については <em>iconv</em>
ドキュメントを参照してください。
<p>もしあなたが単一のローカルエンコーディングしか使用していないのであれば、
このような設定を <tt>.profile</tt><tt>.cshrc</tt> 等に入れておくことを
お勧めします。
</body>
</html>

View file

@ -1,111 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: runmdn.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>runmdn</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>runmdn</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#setup">設定</a>
<li><a href="#usage">使用法</a>
<li><a href="#limitation">制限事項</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<p><b>runmdn</b> は bind4 あるいは bind8 をベースとした
リゾルバライブラリを持つ Unix クライアントを、
再コンパイルなしに多言語ドメイン名を扱えるようにするためのコマンドです。
具体的には、名前解決用の API (例えば <em>gethostbyname</em>) が
アプリケーションのローカルエンコーディング (EUC-JP 等) で表現された
ホスト名を受け付けるようになります。またこれらの API が多言語ホスト名を
ローカルエンコーディングで返すようになります。
<p><b>runmdn</b> を使用してクライアントが多言語ドメイン名を扱えるように
する方法は、mDNkit が提供する方法の中で最も手間がかからず簡単なものですが、
システムによっては使用できなかったり、コマンドによっては効果がなかったり
します。これらの制限に関しては<a href="#limitation">制限事項</a>の項を
ご覧ください。
<p>
<hr>
<h2><a name="setup">設定</a></h2>
<p>runmdn を使用するには、mDNkit のクライアント共通設定ファイル
で使用するエンコーディングや正規化の方法を設定しておく必要があります。
このファイルの設定方法については
<a href="resolvconfig.html">mDNkit リゾルバのコンフィギュレーション</a>
ご覧ください。
<p>また、runmdn はアプリケーションのローカルエンコーディングを自動的に
推測しますが、推測に失敗する場合もあります。そのような場合の対処方法は
<a href="resolvconfig.html#local-encoding">ローカルエンコーディングについて</a>をご覧ください。
<p>
<hr>
<h2><a name="usage">使用法</a></h2>
<p>runmdn の使い方は極めて簡単で、アプリケーションの起動コマンドの
先頭にコマンド名 <tt>runmdn</tt> をつけるだけです。
<blockquote>
<pre>
% runmdn <i>コマンド</i> [<i>引数...</i>]
</pre>
</blockquote>
<p>例えば <tt>telnet</tt> コマンドを使用してホスト「私の会社.jp」に
接続するには次のようにします。
<blockquote>
<pre>
% runmdn telnet 私の会社.jp
</pre>
</blockquote>
<hr>
<h2><a name="limitation">制限事項</a></h2>
<p>runmdn は、mDNkit が提供している方法の中で最も手軽にクライアントが
多言語ドメインを扱えるようにするものですが、どのようなクライアントにも
適用できるわけではありません。
<p>runmdn はシステムの持つ共有ライブラリの動的リンク機構
(ライブラリのプリロード機能) を利用し、
クライアントアプリケーションの実行時に、アプリケーションにリンクされている
リゾルバライブラリの一部の関数を多言語ドメイン名を扱う機能を持たせた
バージョンのものと置き換えてしまうことによって多言語ドメイン名の処理を
実現します。置き換える関数は bind4 および bind8 をベースとするリゾルバ
が内部で使用している関数です。
<p>したがって runmdn が動作するには次のようないくつかの制限があります。
<ol>
<li>共有ライブラリの動的リンク機構を用いているので、
共有ライブラリが使用できるシステムでなければなりません
<li>環境変数 <var>LD_PRELOAD</var> または類似の機構による
ライブラリのプリロード機能を持つシステムでなければなりません
<li>runmdn の対象となるコマンドはリゾルバライブラリをスタティックリンク
していてはなりません
<li>システムのライブラリが <em>iconv()</em> 関数を提供していない場合、外部の
ライブラリを用いることになりますが、そのライブラリも共有ライブラリで
なければなりません。
<li>システムのリゾルバライブラリは bind4 あるいは bind8 ベースのものでなければ
なりません。
<li>セキュリティ上の理由から一般に setuid されたコマンドはプリロード機能が
使えないようになっているので、setuid されたコマンドであってはなりません。
</ol>
<p>これらの制限により runmdn が使用できない場合は、mDNkit が提供する他の
方法 (<em>dnsproxy</em><em>bind9 パッチ</em> など) をご利用ください。
</body>
</html>

View file

@ -1,412 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: wrapper.html,v 1.1 2001/03/05 12:58:04 tale Exp $ -->
<html>
<head>
<title>mDN Wrapper - User's Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDN Wrapper</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#setup">セットアップ</a>
<li><a href="#config">コンフィギュレーションプログラム</a>
<li><a href="#limitations">制限事項</a>
<li><a href="#upgrade">バージョンアップ時の注意</a>
</ul>
<p>
<hr>
<h2><a name="overview">概要</a></h2>
<p>
Windows で多言語ドメイン名を扱えるようにするためには、
Windows 上のクライアントアプリケーションにおいて、
解決しようとする名前のエンコーディングを、
DNS サーバが受付ける形式のものに変換する必要があります。
これは、Windows 上のアプリケーションが、
きちんと多言語ドメイン名を扱えるようになっていなければならない、
ということであり、本来はそれぞれのプログラムの作成者が行なうべきことです。
<p>
しかし、標準が決まっていない現状では、
プログラム作成者にこのような対応を期待するのは無理なので、
既存のアプリケーションを多言語ドメイン名対応させるための
トリックが必要になります。
mDNkitに含まれるdnsproxyサーバはそのための一つの方法です。
ここでは、もう一つの方法、mDN Wrapper を提示します。
<p>
Windows において、多くの場合、ドメイン名解決の要求はWINSOCK DLL
に渡されます。そこで、WINSOCK DLL を多言語ドメイン名対応のものに置き
換えてやれば、既存のプログラムからでも多言語ドメイン名を使うことがで
きるようになります。
<p>
<hr>
<h2><a name="setup">セットアップ</a></h2>
<p>
<b>*注意*</b>
もし古いバージョンの mDN Wrapper がすでにインストールされているマシンに
新しいバージョンをインストールする場合には、まず
<a href="#upgrade">バージョンアップ時の注意</a>をご覧ください。
<p>
mDN Wrapper をインストールするには"setup.exe" を実行します。
セットアッププログラムは次のような処理を行います。
<dl>
<dt>ファイルのインストール
<p>
<dd>
ディレクトリ「\Program Files\JPNIC\mDN Wrapper」
(セットアップで変更可能)以下に、
mDN Wrapper を構成するファイルをコピーします。
<p>
<dt>レジストリの設定
<p>
<dd>
HKEY_LOCAL_MACHINE\Software\JPNIC\MDN 以下に必要なレジストリキー、
レジストリ値を作成、設定します。主なものは次の通りです。
<p>
<dl>
<dt>Encoding&nbsp;REG_SZ
<dd>
DNS サーバ側のエンコーディング名です。
デフォルト値は <tt>"RACE"</tt> で、これは現時点での有力候補である
RACEエンコーディングの指定です。
エンコーディング名は <a href="#config">コンフィギュレーションプログラム</a>
変更することができます。
<p>
<dt>Normalize&nbsp;REG_SZ
<dd>
ドメイン名の正規化の方式です。使用する正規化の名称 (複数指定する場合には
スペースで区切る) を指定します。
デフォルトは日本語ドメイン名の正規化として適当だと思われる値になっています。
これも <a href="#config">コンフィギュレーションプログラム</a>
変更することができます。
<p>
<dt>PerProg&nbsp;キー
<dd>
プログラム毎の設定値を格納するためのキーです。
この下に、プログラムの実行モジュール名をキーとして
プログラム個別の設定が記録されます。
設定される情報は以下の二つです。
<table>
<tr>
<td>PerProg\&lt;progname&gt;\Where</td><td>REG_DWORD</td><td>変換位置</td>
</tr>
<tr>
<td>PerProg\&lt;progname&gt;\Encoding</td><td>REG_SZ</td><td>エンコーディング名</td>
</tr>
</table>
<p>
エンコーディング名は通常コンフィギュレーションプログラムによって設定されます。
変換位置の指定は、標準インストールでは不要です。
システムディレクトリへのインストールを行なった場合には、
レジストリエディタで環境に合わせて設定する必要があります。
</dl>
<p>
<dt>アイコンの作成
<p>
<dd>
コンフィギュレーションプログラムのアイコンを作成し、
スタートメニューに登録します。
これによってコンフィギュレーションプログラムを起動することができます。
</dl>
<p>
アンインストールするには、コントロールパネルの「アプリケーションの追
加と削除」で、「mDN Wrapper」を選択して削除「追加と削除」ボタン
します。
<p>
<hr>
<h2><a name="config">コンフィギュレーションプログラム</a></h2>
<p>
コンフィギュレーションプログラムは、
アプリケーションを特定して mDN Wrapper を適用したり、
適用を解除するためのツールです。
<p>
起動すると以下のような画面が表示されます。
<p>
<center>
<img src="img/wrapper_config1.jpg" alt="Configuration Startup" align=top>
</center>
<p>
リストボックスには、その時点で mDN Wrapper が適用されているプログラムが
表示されます。
最初に実行した場合には空になっています。右側のボタンを押すことにより、
操作を行うことができます。
<h3>mDN Wrapper の適用</h3>
プログラムに mDN Wrapper を適用するには、"Wrap.."ボタンを押します。
"Wrap.."ボタンを押すと以下のようなダイアログが表示されます。
<p>
<center>
<img src="img/wrapper_config2.jpg" alt="Configuration Wrap" align=top>
</center>
<p>
最初に、mDN Wrapper を適用したいプログラムの実行ファイル名を設定します。
直接入力するか、ブラウズボタンでファイルを探してください。
<p>
<center>
<img src="img/wrapper_config3.jpg" alt="Configuration Browse" align=top>
</center>
<p>
次にそのプログラムのローカルエンコーディングを指定します。
通常は「Default」 でかまいません。
プログラムが国際化エンコーディングに従っている場合にのみ
「UTF-8」 を指示します。
<p>
<center>
<img src="img/wrapper_config4.jpg" alt="Configuration Encoding" align=top>
</center>
<p>
最後に "Wrap" ボタンを押せば、そのプログラムに対して
指定されたエンコーディングで mDN Wrapper が適用されます。
適用されたプログラムは、最初のウィンドウのリストボックスに反映されます。
<p>
<center>
<img src="img/wrapper_config5.jpg" alt="Configuration Wrapped" align=top>
</center>
<h3>mDN Wrapper の解除</h3>
プログラムに対する mDN Wrapper の適用を解除するには、
リストボックスで解除するプログラムを選択して、
"Unwrap.." ボタンを押します。
以下の確認用のダイアログが表示されますので、
間違いがなければ "Unwrap" ボタンを押してください。
<p>
<center>
<img src="img/wrapper_config6.jpg" alt="Configuration Unwrap" align=top>
</center>
<p>
mDN Wrapper の適用が解除されると、そのプログラムは最初のウィンドウの
リストボックスからも削除されます。
<p>
<center>
<img src="img/wrapper_config7.jpg" alt="Configuration Unwraped" align=top>
</center>
<p>
"Unwrap All" ボタンを押すことによって、
現在適用されているすべてのプログラムに対して mDN Wrapper の適用を
解除することもできます。
<h3>ログ設定</h3>
"Log.." ボタンを押すことによってログレベルやログファイルを設定することが
できます。
このボタンを押すと次のようなダイアログが現れます。
<p>
<center>
<img src="img/wrapper_config8.jpg" alt="Configuration Log" align=top>
</center>
<p>
ログレベルは次の中から選ぶことができます。
<dl>
<dt>None<dd>ログを一切出力しません。これがデフォルトです。
<dt>Fatal<dd>致命的エラーのみ出力します。
<dt>Error<dd>致命的でないエラーも出力します。
<dt>Warning<dd>警告メッセージも出力します。
<dt>Info<dd>エラー以外の情報も出力します。
<dt>Trace<dd>プログラムのトレース情報も出力します。このレベルを選択すると
大量のログが出力されるので気をつけてください。
</dl>
なお、このログレベルは <a href="../spec/library.html">MDN ライブラリ</a>
出力するログに対するものです。mDN Wrapper 自体が出力するログについては
ON/OFF 以外のレベルを指定することはできず、None を指定すればオフに、
それ以外のレベルを指定すればオンになります。
<p>
ログファイルを指定することも可能です。デフォルトでは mDN Wrapper を
インストールしたディレクトリの "mdn_wrapper.log" になっています。
"Browse.." ボタンを押せばブラウズ用のダイアログを利用して選択することが
できます。
<p>
また、このダイアログではログファイルの内容を見ることと、ログファイルを
削除することが可能です。それぞれ "View"、"Delete" ボタンを押してください。
"View" ボタンを押すとメモ帳が起動して、ログファイルの内容を表示します。
<p>
"OK" ボタンを押すとダイアログの設定が有効になります。設定を変えたくない
場合には "Cancel" ボタンを押してください。
<h3>詳細パラメータ設定</h3>
"Advanced.." ボタンを押すことにより、次のようなダイアログが表示されます。
これは上級ユーザのためのもので、適切なデフォルトが設定されているので
通常ユーザが変更する必要のないような基本的なパラメータを
変更することができます。
<p>
<center>
<img src="img/wrapper_config9.jpg" alt="Configuration Advanced" align=top>
</center>
<p>
ダイアログ最上部のパネルでプログラムに対する mDN Wrapper の適用モードを
指定することができます。選択できる値とその意味は次の通りです。
<dl>
<dt>Wrap both WINSOCK 1.1 and WINSOCK 2.0
<dd>WINSOCK 1.1 と 2.0 の両方の呼び出しについて mDN Wrapper を適用し、
ドメイン名のエンコーディング変換や正規化を行います。
通常はこのモードで使えば正しく動くはずです。
<dt>Wrap only WINSOCK 1.1
<dd>WINSOCK 1.1 の呼び出しについては mDN Wrapper を適用しますが、
WINSOCK 2.0 の呼び出しについては適用しません。
<dt>Wrap only WINSOCK 2.0
<dd>WINSOCK 2.0 の呼び出しについては mDN Wrapper を適用しますが、
WINSOCK 1.1 の呼び出しについては適用しません。
<dt>Wrap only WINSOCK 2.0 if it exists. Otherwise wrap only WINSOCK 1.1
<dd>WINSOCK 2.0 が存在すれば WINSOCK 2.0 の呼び出しについてのみ mDN Wrapper を
適用します。存在しない場合には WINSOCK 1.1 の呼び出しについて適用します。
WINSOCK のバージョンによってはデフォルトでは正しく動かず、このモードを
指定しなければならないかもしれません。
</dl>
<p>
中段のパネルでは正規化の方式を設定することができます。左側のリストボックスに
使用する正規化の名称が入っており、右側のリストボックスには使用可能な
正規化の名称が入っています。右側のリストボックスから追加したい正規化を
選択し、"Add" ボタンを押すと左側のリストボックスに追加されます。
また、左側のリストボックスで削除したい正規化を選択して "Remove" ボタンを
押せば削除することができます。"Clear" ボタンを押すとすべての正規化が
削除され、また "Reset" ボタンによりデフォルトの設定に戻すことができます。
<p>
3段目のパネルでは DNS サーバ側のエンコーディング名を指定することができます。
デフォルトは "RACE" ですが、他のエンコーディングを使用したい場合には
ここで指定してください。
<p>
以上の設定は "OK" ボタンを押すことにより有効になります。設定を変えずに
ダイアログを終了したい場合には "Cancel" ボタンを押してください。
<p>
<hr>
<h2><a name="limitations">制限事項</a></h2>
<dl>
<dt>DLL バージョン
<dd><p>
ラッパーDLL は、元のWINSOCK のDLL のバージョンに強く依存します。
これは、非公開のエントリも含めて
すべてのエントリを提供する必要があるためです。
このためWINSOCK DLL のバージョンが変わると、
mDN Wrapper が動作しなくなる可能性があります。
<p>
今回作成されたmDN Wrapper は、
<blockquote>
<table>
<tr><td>WinNT4.0 SP6a</td><td>(WINSOCK 1.1 + 2.0)</td></tr>
<tr><td>Win98 </td><td>(WINSOCK 1.1 + 2.0)</td></tr>
<tr><td>Win95 OSR2 </td><td>(WINSOCK 1.1) </td></tr>
</table>
</blockquote>
で動作を確認しています。ただ、将来にわたって動作する保証はありません。
<p>
<dt>DNS, WINS, LMHOSTS
<dd><p>
Windows では、DNS だけではなく、
WINSやLMHOSTS によってもドメイン名、ホスト名の解決が行なわれます。
mDN Wrapper を使った場合には、ドメイン名の変換が、
これらの方式へのディスパッチを行なう場所よりも上位層で行なわれるので、
これらのすべての方式について、
ドメイン名、ホスト名の変換が行なわれることになります。
このため、Windows が、WINSやLMHOSTS を使っている場合には、
予期しない問題が発生する可能性があります。
これについては、mDN Wrapper を使う場合には、
名前解決にDNS だけを使用することをお勧めします。
<p>
<dt>ドメイン名以外の名前の解決
<dd><p>
WINSOCK 2.0 の名前解決API
<blockquote>
<table>
<tr><td>WSALookupServiceBeginW</td></tr>
<tr><td>WSALookupServiceNextW </td></tr>
<tr><td>WSALookupServiceEnd </td></tr>
</table>
</blockquote>
は、ドメイン名以外でも使用できる、
汎用の名前解決用のAPI として定義されています。
現時点では、これらはもっぱらドメイン名の解決で使用されていますが、
他の名前(例えばサービス名)の解決にも使用できることになっています。
<p>
mDN Wrapper は、名前の対象の如何にかかわらず、
名前のエンコーディングを変換してしまうので、
これらのAPI が、ドメイン名以外の解決に使われている場合には、
問題を引き起こす可能性があります。
<p>
<dt>名前解決API を使わないプログラム
<dd><p>
アプリケーションによっては、
ドメイン名の解決にこれらのAPI を使用しないものもあります。
例えば、'nslookup'は、これらのAPI を使用しないで、
直接DNS サーバと通信してしまいます。
このようなアプリケーションについては、
mDN Wrapper は役に立ちません。
<p>
<dt>特定WINSOCK DLL にバインドされたアプリケーション
<dd><p>
アプリケーションによっては、標準のDLL サーチパスに従わないで、
特定のパスのDLL にバインドされているものがあります。
よく使われるプログラムの中では、Netscape Communicator がそうなっています。
このようなプログラムについては、
標準のインストール/コンフィギュレーションでは mDN Wrapper を適用することは
できません。
<p>
このようなプログラムについて、どうしても mDN Wrapper を適用する必要があるなら、
システムディレクトリへのインストールを行なうことができます。
ただし、このインストールは大変危険で、
場合によってはシステムを再起動不能にしてしまう可能性もあります。
<p>
<dt>代替手段としての'dnsproxy'
<dd><p>
これらの制限事項が問題になる場合には、
代替手段として'dnsproxy'を使うこともできます。
これは、DNS サーバとのトランザクションを中継するので、
上で問題になったようなことを回避することができます。
<p>
ただし、'dnsproxy'は、ラッパーよりも複雑な設定が必要ですし、
また、呼び元のプログラムを特定することができませんので、
プログラム固有のローカルエンコーディングを取り扱うことはできません。
しかし、上記の制限事項が問題になるようなケースでは、
ラッパーの代わりに使用するといいかもしれません。
</dl>
<hr>
<h2><a name="upgrade">バージョンアップ時の注意</a></h2>
<p>古いバージョンの mDN Wrapper がすでにインストールされているマシンに
新しいバージョンをインストールする際には、次のことに気をつけてください。
<ol>
<li>インストールする前に古いバージョンをアンインストールする<br>
新しいバージョンをインストールする前に、古いバージョンをアンインストール
してください。そうしないと、新しいバージョンをインストールしても
いくつかのファイルが更新されず、古いまま残ってしまいます。
アンインストールするには、コントロールパネルの
「アプリケーションの追加と削除」を実行し、「mDN Wrapper」を選択して削除
を実行してください。<br>
もしアンインストールせずに新しいバージョンをインストールしてしまった場合には、
一度それをアンインストールしてから再度インストールを行ってください。<p>
<li>すべてのファイルを再度ラップする<br>
mDN Wrapper はその動作原理上、mDN Wrapper を適用するプログラムが存在する
ディレクトリにDLL をコピーします。
コピーされた DLL は新しいバージョンをインストールしても
更新されないので、そのままでは新しいバージョンが使われません。
このため、新しいバージョンをインストールしたら、一度 mDN Wrapper の適用を
すべて解除し、改めて適用し直してください。すべてのプログラムに対する適用を
解除するには、コンフィギュレーションプログラムの "Unwrap All" ボタンを
使用するのが便利です。
</ol>
</body>
</html>

View file

@ -1,42 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: index.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>
<head>
<title>mDNkit Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDNkit ドキュメント</h1>
<p>mDNkit のドキュメントは以下のような3部構成となっています。
<ul>
<li><a href="guide/guide.html">mDNkit ユーザーズガイド</a><br>
システム管理者および一般ユーザ向けのマニュアルです。
<p>
<li><a href="spec/spec.html">mDNkit 仕様書</a><br>
本キットの各コンポーネントの仕様書です。
<p>
<li><a href="http://www.nic.ad.jp/jp/research/idn/mdnkit/html/ja/faq/index.html">mDNkit Frequently Asked Questions</a><br>
本キットの FAQ (JPNIC Web ページへのリンク)です。
FAQ は随時更新されるため、このパッケージには含まれていません。
ご了承ください。
</ul>
<p>mDNkit ユーザーズガイドおよび mDNkit 仕様書の内容は
mDNkit バージョン 1.2 に対応しています。
<p>関連するドキュメントおよび関連ソフトウェアなどへのポインタをまとめた
<a href="guide/reference.html">参考文献</a>のページもご覧ください。
<p>本キットに関するコメントは
<a href="mailto:idn-cmt@nic.ad.jp">idn-cmt@nic.ad.jp</a>
に、またバグレポートは
<a href="mailto:mdnkit-bugs@nic.ad.jp">mdnkit-bugs@nic.ad.jp</a>
にそれぞれお送りください。
</body>
</html>

View file

@ -1,476 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: bind9.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>bind-9 patch</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>BIND-9 パッチ</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#arch">アーキテクチャ</a>
<li><a href="#named">named 修正</a>
<li><a href="#lwresd">lwresd 修正</a>
<li><a href="#client">クライアントライブラリ修正</a>
<li><a href="#dig">dig/host/nslookup 修正</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<p>
mDNkit に含まれる BIND-9 用のパッチファイルを適用することにより、
BIND-9 において従来の ASCII 文字によるドメイン名に加え、
非 ASCII 文字による多言語ドメイン名を扱うことが可能になります。
<p>
具体的には、このパッチは BIND-9 に次のような機能を追加します。
<ul>
<li>lightweight resolver API (lwres_gethostbyname など) で、
ローカルエンコーディングで表現されたホスト名を名前解決する
<li>同じく名前解決結果としてローカルエンコーディングで表現された
ホスト名を返す
<li>dig、host、nslookup コマンドがローカルエンコーディングのドメイン名を
受け付け、また問い合わせ結果に含まれるドメイン名をローカルエンコーディングで
表示する
</ul>
<p>
BIND-9 へのパッチの適用方法は、パッチファイルの先頭に記載してあります。
なおパッチファイルについては、
対応する BIND のバージョンをよく確認してから、使用してください。
<p>
<hr>
<h2><a name="arch">アーキテクチャ</a></h2>
<p>BIND-9 はそれまでの BIND-8 とはリゾルバの構成が全く異なっています。
BIND-8 まではリゾルバはアプリケーションにリンクされるライブラリとして
実装されていましたが、
BIND-9 ではリゾルバの機能の大部分が
<b>lwresd</b> (lightweight resolver daemon) というサーバに移され、
アプリケーションにリンクされるのはlightweight resolver と呼ばれる
<b>lwresd</b> との通信を行うためのライブラリとなっています。
<p>本パッチはこのアーキテクチャに合わせ、多言語ドメイン名の各処理を
それぞれのコンポーネントに分散させました。以下に各コンポーネントで
実装される機能とコンポーネント間のインタフェースで用いるエンコーディングを
表した図を示します。
<blockquote>
<img src="img/bind9_arch.jpg" alt="bind9 resolver architecture">
</blockquote>
<hr>
<h2><a name="named">named 修正</a></h2>
<p>named における修正は次の一点のみです。
<h3><a name="named-utf8">UTF-8 文字の透過</a></h3>
<p>BIND-9 の named ではドメイン名の処理はほとんど8ビットスルーになっており、
UTF-8 等の MSB のセットされたバイトもそのまま透過します。
しかし named 内で処理に使用されているドメイン名の内部表現 (<em>dns_name_t</em>)
からテキスト表現への変換部分は8ビットスルーになっておらず、ASCII 文字以外
はバックスラッシュでクォートされ、<tt>\DDD</tt> という形式の表現に
変換されてしまいます。
DNS プロトコル上で用いられるエンコーディングが RACE などの ASCII 互換
エンコーディングであれば ASCII 以外の文字がドメイン名に現れることはないので
問題ないのですが、UTF-8 を使用する場合には問題となります。
<p>BIND-9 パッチは、この処理を修正し、変換しようとする文字がUTF-8 文字の
場合にはバックスラッシュによるクォートをしないようにします。
この動作は named の設定ファイル (named.conf) で切り替え可能であり、
設定ファイルの options セクションの <tt>allow-utf8</tt> パラメータで
指定します。DNS プロトコル上で用いるエンコーディングとして UTF-8 を
使用する際には次のように記述してください。
<blockquote>
<pre>
options {
...
allow-utf8 yes;
...
};
</pre>
</blockquote>
<hr>
<h2><a name="lwresd">lwresd 修正</a></h2>
<p>lwresd に対しては次のような修正を加えてあります。
<dl>
<dt>UTF-8 文字の透過<dd>
<p>これは named に対する修正と同じで、ドメイン名を内部表現から
テキスト表現に変換する際のバックスラッシュによるクォーティングを
行わないようにするものです。
<p>named の場合、これは設定ファイル named.conf のオプションで
切り替えられるようになっていますが、lwresd の場合には自動切り替えに
なっています。lwresd が読み込む
<a name="clientconfig.html">クライアント設定ファイル</a>
サーバエンコーディングエントリに設定されているコードセット名を参照し、
それが ASCII 互換エンコーディングでない場合にはバックスラッシュによる
クォートをしないようにします。
<dt>エンコーディング変換<dd>
<p>lwresd は多言語ドメイン名のエンコーディングとして、クライアント
つまり lightweight resolver ライブラリとの間の通信には UTF-8 を、
また named との通信には DNS プロトコル上のエンコーディングをそれぞれ
使用します。したがって両者の間のエンコーディング変換を行います。
<p>エンコーディング変換には MDN ライブラリの
<a href="library.html#res">res モジュール</a> を使用しています。
DNS プロトコル上のエンコーディングの指定は
<a href="clientconfig.html">クライアント設定ファイル</a>で行います。
</dl>
<p>
<hr>
<h2><a name="client">クライアント側ライブラリ修正</a></h2>
<p>クライアント側のライブラリは、
<ul>
<li>エンコーディング変換
<li>正規化
</ul>
を行うように修正されています。これらの処理には MDN ライブラリの
<a href="library.html#res">res モジュール</a> を使用しています。
設定は<a href="clientconfig.html">クライアント設定ファイル</a>で行います。
<p>名前解決用の API 関数はローカルエンコーディングで表された
多言語ドメイン名が扱えるように修正されています。
また内部実装は、将来 UTF-8 エンコーディングのドメイン名を扱える
API の追加が容易にできるように設計されています。これらについて
この後説明します。
<ul>
<li><a href="#api-func">多言語化された API 関数</a>
<li><a href="#internal-func">追加された内部関数</a>
</ul>
<p>
<h3><a name="api-func">多言語化された API 関数</a></h3>
<p>
パッチによって多言語化される API 関数の一覧です。
<ul>
<li>lwres_getaddrinfo()
<li>lwres_getnameinfo()
<li>lwres_gethostbyname()
<li>lwres_gethostbyname2()
<li>lwres_gethostbyname_r()
<li>lwres_gethostbyaddr()
<li>lwres_gethostbyaddr_r()
<li>lwres_getipnodebyname()
<li>lwres_getipnodebyaddr()
</ul>
<p>
多言語化された API 関数は、従来の ASCII ドメイン名に加え、
非 ASCII ドメイン名を扱うことができます。非 ASCII ドメイン名として、
<a href="clientconfig.html">クライアント設定ファイル</a>の内容に応じて、
新たに以下のようなドメイン名を取り扱うことができるようになります。
<ul>
<li>ホスト.会社.jp
<li>www.別の会社.com
</ul>
<p>
引数の型や返り値の型に変更はありません。
パッチを当てる前と同様の呼び出し方法で、従来の ASCII ドメイン名と、
非 ASCII ドメイン名の両方を扱うことができます。
非 ASCII ドメイン名については、
ローカルエンコーディングのドメイン名を引数として受け取ることができます。
<p>
これまで上記の API 関数で行なわれていた処理は、
以降で説明する<a href="#internal-func">それぞれの内部関数</a>に移行し、API
関数は、ドメイン名のエンコーディング情報をこの内部関数に渡す役割をしています。
<p>
<h3><a name="internal-func">追加された内部関数</a></h3>
<p>
多言語化された API 関数に関連して、以下の内部関数が追加されました。
<dl>
<dt><a href="#getaddrinfo">lwres_getaddrinfo_enc()</a>
<dd>lwres_getaddrinfo() の内部関数
<dt><a href="#getnameinfo">lwres_getnameinfo_enc()</a>
<dd>lwres_getnameinfo() の内部関数
<dt><a href="#gethostbyname">lwres_gethostbyname_enc()</a>
<dd>lwres_gethostbyname() の内部関数
<dt><a href="#gethostbyname2">lwres_gethostbyname2_enc()</a>
<dd>lwres_gethostbyname2() の内部関数
<dt><a href="#gethostbyname_r">lwres_gethostbyname_r_enc()</a>
<dd>lwres_gethostbyname_r() の内部関数
<dt><a href="#gethostbyaddr">lwres_gethostbyaddr_enc()</a>
<dd>lwres_gethostbyaddr() の内部関数
<dt><a href="#gethostbyaddr_r">lwres_gethostbyaddr_r_enc()</a>
<dd>lwres_gethostbyaddr_r() の内部関数
<dt><a href="#getipnodebyname">lwres_getipnodebyname_enc()</a>
<dd>lwres_getipnodebyname() の内部関数
<dt><a href="#getipnodebyaddr">lwres_getipnodebyaddr_enc()</a>
<dd>lwres_getipnodebyaddr() の内部関数
</dl>
<p>
追加された内部関数についての仕様は、以下の通りです。
<dl>
<dt><a name="getaddrinfo">lwres_getaddrinfo_enc</a>
<dd>
<pre>
int
lwres_getaddrinfo_enc(const char *, const char *, const struct addrinfo *,
struct addrinfo **, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getaddrinfo() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getaddrinfo() との違いは、static 関数である set_order()
関数にエンコードタイプの判定フラグを渡している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getaddrinfo() 関数から lwres_getaddrinfo_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
返される値は
<tt>EAI_NONAME</tt><tt>EAI_BADFLAGS</tt><tt>EAI_SYSTEM</tt>
<tt>EAI_FAMILY</tt><tt>EAI_SOCKTYPE</tt><tt>EAI_SERVICE</tt>
<tt>EAI_MEMORY</tt><tt>0</tt>
のいずれかです。
<p>
<dt><a name="getnameinfo">lwres_getnameinfo_enc</a>
<dd>
<pre>
int
lwres_getnameinfo_enc(const struct sockaddr *, size_t, char *, size_t, char *,
size_t, int, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getnameinfo() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getnameinfo() との違いは、lwres_getnamebyaddr() 関数の呼び出し部を
lwres_getnamebyaddr_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getnameinfo() 関数から lwres_getnameinfo_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
返される値は
<tt>ENI_NOSOCKET</tt><tt>ENI_SALEN</tt><tt>ENI_FAMILY</tt>
<tt>ENI_MEMORY</tt><tt>ENI_SYSTEM</tt><tt>ENI_NOHOSTNAME</tt>
<tt>SUCCESS</tt>
のいずれかです。
<p>
<dt><a name="gethostbyname">lwres_gethostbyname_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyname_enc(const char *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyname() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyname() との違いは、lwres_getipnodebyname()
関数の呼び出し部を lwres_getipnodebyname_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyname() 関数から lwres_gethostbyname_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
lwres_getipnodebyname_enc() から返って来た hostent
構造体へのポインタを返します。
<p>
<dt><a name="gethostbyname2">lwres_gethostbyname2_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyname2_enc(const char *, int, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyname2() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyname2() との違いは、lwres_getipnodebyname()
関数の呼び出し部を lwres_getipnodebyname_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyname2() 関数から
lwres_gethostbyname2_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
lwres_getipnodebyname_enc() から返って来た hostent
構造体へのポインタを返します。
<p>
<dt><a name="gethostbyname_r">lwres_gethostbyname_r_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyname_r_enc(const char *, struct hostent *, char *,
int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyname_r() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyname_r() との違いは、lwres_getipnodebyname()
関数の呼び出し部を lwres_getipnodebyname_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyname_r() 関数から
lwres_gethostbyname_r_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
<dt><a name="gethostbyaddr">lwres_gethostbyaddr_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyaddr_enc(const char *, int, int, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyaddr() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyaddr() との違いは、lwres_getipnodebyaddr()
関数の呼び出し部を lwres_getipnodebyaddr_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyaddr() 関数から lwres_gethostbyaddr_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
lwres_getipnodebyaddr_enc() から返って来た hostent
構造体へのポインタを返します。
<p>
<dt><a name="gethostbyaddr_r">lwres_gethostbyaddr_r_enc</a>
<dd>
<pre>
struct hostent *
lwres_gethostbyaddr_r_enc(const char *, int, int, struct hostent *,
char *, int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_gethostbyaddr_r() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_gethostbyaddr_r() との違いは、lwres_getipnodebyaddr()
関数の呼び出し部を lwres_getipnodebyaddr_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_gethostbyaddr_r() 関数から
lwres_gethostbyaddr_r_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
<dt><a name="getipnodebyname">lwres_getipnodebyname_enc</a>
<dd>
<pre>
struct hostent *
lwres_getipnodebyname_enc(const char *, int, int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getipnodebyname() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getipnodebyname() との違いは、lwres_getaddrsbyname()
関数の呼び出し部を lwres_getaddrsbyname_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getipnodebyname() 関数から
lwres_getipnodebyname_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
<p>
<dt><a name="getipnodebyaddr">lwres_getipnodebyaddr_enc</a>
<dd>
<pre>
struct hostent *
lwres_getipnodebyaddr_enc(const void *, size_t, int, int *, int)
</pre>
<p>
lwres ライブラリの関数 lwres_getipnodebyaddr() に、
ローカルエンコーディングか否かの判定フラグのエントリを追加したものです。
lwres_getipnodebyaddr() との違いは、lwres_getnamebyaddr()
関数の呼び出し部を lwres_getnamebyaddr_enc() 関数に変更している点のみです。
<p>
関数の最後の引数がエンコードタイプの判定フラグで、
ローカルエンコーディングのときには<tt>LWRES_ENCODING_LOCAL</tt>
UTF-8 エンコーディングのときには<tt>LWRES_ENCODING_UCS</tt>が指定可能です。
lwres_getipnodebyaddr() 関数から
lwres_getipnodebyaddr_enc() 関数を呼び出すときは、
エンコードタイプの判定フラグに<tt>LWRES_ENCODING_LOCAL</tt>を指定しています。
<p>
エラーのときは NULL、正常のときは値が格納された hostent
構造体へのポインタを返します。
</dl>
<hr>
<h2><a name="dig">dig/host/nslookup 修正</a></h2>
<p>BIND-9 には DNS の問い合わせツールとして dig、host、nslookup という
コマンドが付属します。mDNkit の BIND-9 パッチにより、これらはいずれも
多言語ドメイン名が扱えるようになります。具体的には以下の機能が
付加されます。
<ul>
<li>エンコーディング変換<br>
コマンド引数、あるいは標準入力から入力された、ローカルエンコーディングで
表現されたドメイン名を、DNS プロトコル上で用いられるエンコーディングに変換し、
DNS の問い合わせを発行します。
<p>また DNS の返答に含まれる多言語ドメイン名をローカルエンコーディングに
変換し、表示します。
<p>
<li>正規化<br>
DNS の問い合わせで、ローカルエンコーディングで表現されたドメイン名を
DNS プロトコル上で用いられるエンコーディングに変換する際、ドメイン名の
正規化を行います。
</ul>
これらの処理には MDN ライブラリの
<a href="library.html#res">res モジュール</a> を使用しています。
設定は<a href="clientconfig.html">クライアント設定ファイル</a>で行います。
</body>
</html>

View file

@ -1,281 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: clientconfig.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>client configuration specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>クライアント設定ファイル</h1>
<ul>
<li><a href="#overview">概要</a>
<li><a href="#server-encoding">サーバエンコーディングエントリ</a>
<li><a href="#server-zld">サーバ ZLD エントリ</a>
<li><a href="#normalization">正規化エントリ</a>
<li><a href="#alternate-encoding">代替エンコーディングエントリ</a>
<li><a href="#alias-file">エンコーディングエイリアスエントリ</a>
<li><a href="#local-codeset">ローカルコードセット</a>
<li><a href="#sample">コンフィギュレーションファイル記述例</a>
</ul>
<hr>
<h2><a name="overview">概要</a></h2>
<p>
クライアント設定ファイルは、多言語ドメイン名のための各種の設定が
記述されているファイルで、mDNkit を使用して多言語化 (国際化)
したクライアント側のリゾルバが読み込むファイルです。
このファイルは MDN ライブラリの
<a href="library.html#resconf">resconf モジュール</a> によって読み込まれ、
多言語ドメインに関する以下のような設定ができます。
<ul>
<li>DNS プロトコル上のドメイン名のエンコーディング
<li>正規化形式
<li>DNS の返答メッセージ中のドメイン名がローカルエンコーディングに
変換できなかった時に使用される、代替エンコーディング
<li>エンコーディング名のエイリアス
</ul>
<p>
このファイルは通常のテキストファイルで、ファイルの各行 (#
で始まるコメント行と、空行を除いて) は、
次のような単純なフォーマットで構成されます。
<blockquote>
<pre>
キーワード 値...
</pre>
</blockquote>
<p>
クライアント設定ファイルは、mDNkit をデフォルトの設定でコンパイルした
場合には以下に配置されます。
<blockquote>
<pre>
/usr/local/etc/mdnres.conf
</pre>
</blockquote>
<p>以降、各キーワードごとに設定内容を記述します。
<p>
<h2><a name="server-encoding">サーバエンコーディングエントリ</a></h2>
<p>
DNS プロトコル上の多言語ドメイン名のエンコーディングとして使用する
エンコーディング (コードセット名) を指定します。
<dl>
<dt>[構文]
<dd><tt>server-encoding</tt> <em>encoding</em>
</dl>
<p><em>encoding</em> には、使用するエンコーディング名を記述し、
次のものが指定できます。
<ul>
<li>UTF-8
<li>RACE
<li>BRACE
<li>LACE
<li>UTF-5
<li>iconv_open() ライブラリ関数で許可されているコードセット名
(使用できるコードセット名については、iconv() のドキュメントを
御覧ください)
<li>後述のエイリアスファイルで定義されたエイリアス名
(<a href="#alias-file">「エンコーディングエイリアス」</a>
の項を御覧ください)
</ul>
<p>
このエントリは必須エントリであり、必ず記述しなければなりません。
<h2><a name="server-zld">サーバ ZLD エントリ</a></h2>
<P>
DNS プロトコル上で使用される多言語ドメイン名のエンコーディング
(<a href="#server-encoding">server-encoding エントリ</a>で指定されたもの)
の中には、多言語ドメイン名と従来の ASCII ドメイン名とを区別するために
ZLD (zero-level domain) というドメインを必要とするものがあります。
ZLD は通常のトップレベルドメインのさらに上位ドメインに相当します。
ただしこれは DNS のシステム内部でのみ使われるドメインであり、
一般ユーザやアプリケーションからは見えないようになっています。
<dl>
<dt>[構文]
<dd><tt>server-zld</tt> <em>ZLD</em>
</dl>
<p>mDNkit のデフォルトの設定では、ZLD は使用できないようになっており、
設定ファイル中にこのエントリがあると警告メッセージが表示されます。
このエントリの指定を有効にするには、mDNkit の configure 実行時に
<tt>--enable-zld</tt> オプションによって ZLD サポートを有効にしておく
必要があります。
<p>
<h2><a name="normalization">正規化エントリ</a></h2>
<p>
正規化エントリでは、DNS サーバに送る前にドメイン名に適用すべき
正規化の方式を指定します。
<dl>
<dt>[構文]
<dd><tt>normalize</tt> <em>scheme [scheme..]</em>
</dl>
<p>
<em>scheme</em> には、正規化形式を記述します。
以下のものが記述できます。
<dl>
<dt><tt>ascii-lowercase</tt>
<dd>ASCII 大文字を小文字に変換
<dt><tt>ascii-uppercase</tt>
<dd>ASCII 小文字を大文字に変換
<dt><tt>unicode-lowercase</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr21">
<cite>Unicode Technical Report #21: Case Mappings</cite></a>
に基づいて、Unicode 大文字を小文字に変換
<dt><tt>unicode-uppercase</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr21">
<cite>Unicode Technical Report #21: Case Mappings</cite></a>
に基づいて、Unicode 小文字を大文字に変換
<dt><tt>unicode-form-c</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr15">
<cite>Unicode Technical Report #15: Unicode Normalization Forms</cite></a>
の「Form C」による正規化
<dt><tt>unicode-form-kc</tt>
<dd><a href="http://www.unicode.org/unicode/reports/tr15">
<cite>Unicode Technical Report #15: Unicode Normalization Forms</cite></a>
の「Form KC」による正規化
<dt><tt>ja-kana-fullwidth</tt>
<dd>日本語半角カナを全角カナに変換
<dt><tt>ja-alnum-halfwidth</tt>
<dd>日本語の全角英数字および全角マイナス記号を半角文字に変換
<dt><tt>ja-compose-voiced-sound</tt>
<dd>日本語の全角かなとそれに続く濁点(゛)半濁点(゜)を
濁点・半濁点つきのかな1文字に変換
<dt><tt>ja-minus-hack</tt>
<dd>日本語の全角マイナス記号()をハイフン(<tt>-</tt>)に変換
<dt><tt>ja-delimiter-hack</tt>
<dd>日本語の句点(。)および全角ピリオド()をピリオド(<tt>.</tt>)に変換
</dl>
<p>
正規化形式には複数の形式が指定可能です。複数の形式が指定された場合、
順序通りに (左から右に) 適用されます。
<p>
<h2><a name="alternate-encoding">代替エンコーディングエントリ</a></h2>
<p>
mDNkit で多言語化されたリゾルバライブラリは、
アプリケーションが使用しているローカルコードセットを自動的に決定し、
DNS の応答メッセージ中のドメイン名を、そのコードセットに変換しようとします。
しかし、ドメイン名に使用されているある文字がローカルコードセットに
マップされていないために、変換に失敗することもあり得ます。
例えば日本語コードセットを使用している日本語のアプリケーションが、
日本語の文字セットに含まれていない中国語の文字を含んだ DNS
応答を受信したような時にこのようなことが起こります。
<p>
代替エンコーディングエントリは、上記のような問題が生じた時に
ローカルコードセットの代わりに使用するコードセットを指定します。
<dl>
<dt>[構文]
<dd><tt>alternate-encoding</tt> <em>encoding</em>
</dl>
<p>
<em>encoding</em> はコードセット名で、RACE のような
<a href="library.html#ACE">ASCII 互換エンコーディング</a>
を使用しなければなりません。
<p>
<h2><a name="alias-file">エンコーディングエイリアスエントリ</a></h2>
<p>
エンコーディングエイリアスエントリでは、コードセット名のエイリアスを
記述したファイルのパス名を記述します。
<dl>
<dt>[構文]
<dd><tt>alias-file</tt> <em>pathname</em>
</dl>
<p>
<em>pathname</em> には、エイリアスファイルへのパス名を指定します。
このエイリアスファイルは通常のテキストファイルで、
以下のような形式の行から構成されます。
<blockquote>
<pre>
<em>alias-name</em> <em>name</em>
</pre>
</blockquote>
<p>
<em>alias-name</em> は定義されるエイリアス名で、<em>name</em>
実際のコードセット名か、定義済のエイリアス名です。
<p>
<h2><a name="local-codeset">ローカルコードセット</a></h2>
<p>
クライアント設定ファイルにはローカルコードセットを指定するエントリは
存在しません。
ローカルコードセットはアプリケーションがそのときに使用している
ロケールの情報から決定されるからです。
ですから、それぞれのアプリケーションがそれぞれ異なるローカルコードセットを
使用することができますし、同一アプリケーションが複数のローカルコードセットを
切り替えながら使用することも可能です。
<p>
mDNkit はロケール情報からアプリケーションの使用しているローカルコードセットを
推測しようとしますが、時には失敗することもあります。
例えば、C ロケールで動作しているにも関わらず
非 ASCII コードセットを使用しているアプリケーションではロケール情報から
ローカルコードセットを判定することは不可能ですし、mDNkit が知らない
ロケールで動作するアプリケーションの場合にも推測に失敗するでしょう。
<p>
このような場合のために、環境変数 <tt>MDN_LOCAL_CODESET</tt> によって
アプリケーションのローカルコードセットを強制指定することができるように
なっています。
この変数にコードセット名 (もしくはそのエイリアス名)
を指定すると、mDNkit はロケールの設定に関わらず、指定したコードセットを
ローカルコードセットとして動作します。
<p>
<h2><a name="sample">コンフィギュレーションファイル記述例</a></h2>
<p>
以下に、コンフィギュレーションファイルの記述例を示します。
<blockquote>
<pre>
#
# a sample configuration.
#
# DNS プロトコル上のエンコーディングとして RACE を使用する
server-encoding RACE
# 正規化の手順として、小文字に変換した後、KC 正規化法を使用する
normalize unicode-lowercase unicode-form-kc
# 代替エンコーディングとして RACE を使用する
alternate-encoding RACE
</pre>
</blockquote>
</body>
</html>

View file

@ -1,379 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: dnsproxy.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>dnsproxy specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>dnsproxy</h1>
<p>
<h2><a name="overview">概要</a></h2>
<p>
dnsproxyは、クライアントからのローカルコードベースの多言語ドメイン名を
含むDNS要求を受け取り、多言語化対応したDNSが受付けられるドメイン名に
変換し、また逆に、DNSからの応答の多言語ドメイン名を、
クライアント側で認識できる形式に戻します。
<p>
これによって、クライアントは何も改造することなく
各種の多言語ドメイン名を使うことができるようになります。
また、DNSサーバから見た場合には、クライアント+dnsproxyによって
多言語ドメイン名に対応したクライアントとして動作しているように
見えることになります。
<p>
ただし、dnsproxy が正しく動作するには、クライアントのリゾルバライブラリが
ローカルエンコーディングのドメイン名をそのまま透過させ、エラーにならない
ようになっている必要があります。残念ながら現在 UNIX のリゾルバライブラリの
多くは 8ビットスルーではないので、そのままでは dnsproxy を用いても
多言語ドメイン名を扱えるようにはなりません。この場合には
<ul>
<li><a href="spec.html#eightbitthru-patch">BIND-8 の8ビットスルーパッチ</a>
を当てたリゾルバライブラリを使用する
<li>dnsproxy の代わりに <a href="runmdn.html">runmdn</a>
<a href="bind9.html">BIND-9 パッチ</a> を使用する
</ul>
というような方法をとる必要があります。
<h2><a name="invoke">起動</a></h2>
<blockquote>
<pre>
$ dnsproxy [<i>オプション...</i>]
</pre>
</blockquote>
<p>
<h2><a name="options">オプション</a></h2>
<dl>
<dt><a name="opt-daemon">-daemon</a>
<dd>
<p>
dnsproxyをデーモンとして起動します。
<p>
<dt><a name="opt-config">-config <i>config-file</i></a>
<dd>
<p>
コンフィギュレーションファイルを指示します。
コマンドラインで指示しなかった場合には
デフォルトのコンフィギュレーションファイルが使用されます。
詳しくは<a href="#config">コンフィギュレーション</a>
項で説明します。
<p>
<dt><a name="opt-logfile">-logfile <i>log-file</i></a>
<dd>
<p>
dnsproxyが実行ログを出力するファイル名を指定します。
特に指定されなかった場合には、コンフィギュレーションファイルで
指示されたログファイル、あるいはデフォルトのログファイルに
出力されます。
</dl>
<p>
<h2><a name="config">コンフィギュレーション</a></h2>
<p>
設定情報はコンフィギュレーションファイルに記載されます。
コンフィギュレーションファイルは、
<b>dnsproxy</b>の起動時にコマンドラインで指示することができます。
<blockquote>
<pre>
% <kbd>dnsproxy -config &lt;config-file&gt;</kbd>
</pre>
</blockquote>
コマンドラインで指示しなかった場合には
デフォルトのコンフィギュレーションファイルが使用されます。
デフォルトのコンフィギュレーションファイルは、ディレクトリ
<pre>
/usr/local/etc
</pre>
の下の
<pre>
dnsproxy.conf
</pre>
です。ディレクトリは、mDNkit作成時に
<pre>
configure --sysconfdir=DIR
</pre>
で指示することもできます。
<p>
コンフィギュレーションファイルはテキストファイルで、
以下のコンフィギュレーションデータを指定します。
<dl>
<dt><a name="listen">listen</a><dd>
<p>
dnsproxyがクライアントからの要求を受付ける
ネットワークアドレス、ポート番号を指定します。
<pre>
listen &lt;address&gt;
</pre>
&lt;address&gt;は以下のいずれかの形式で指示します。
<blockquote>
<table>
<tr><td>&lt;IP address&gt;:&lt;port number&gt;</td></tr>
<tr><td>:&lt;port number&gt;</td></tr>
<tr><td>&lt;IP address&gt;</td></tr>
</table>
</blockquote>
省略された場合には
<blockquote>
<table>
<tr><td>IP address</td><td>0.0.0.0 # INADDR_ANY</td></tr>
<tr><td>port number</td><td>53</td></tr>
</table>
</blockquote>
が使用されます。
<p>
<dt><a name="forward">forward</a><dd>
<p>
dnsproxyが、DNS要求を転送し、応答を受け取る本来のDNSサーバの
ネットワークアドレス、ポート番号を指定します。
<pre>
forward &lt;address&gt; [ bind4compat ]
</pre>
&lt;address&gt;の形式は上の<a href="#listen">listen</a>のものと同じです。
<p>
オプションの <b>bind4compat</b>が指示された場合には、
UDPでリクエストを転送する時に、ソースアドレスとして、
listenで指示されたアドレス/ポートを使用します。
<p>
<dt><a name="log-file">log-file</a><dd>
<p>
dnsproxyが実行ログを出力するファイル名を指定します。
<pre>
log-file &lt;path&gt;
</pre>
ログファイル名は、
以下のコマンドラインオプションで指定することもできます。
両方指定した場合にはコマンドラインオプションの指定のほうが優先されます。
<pre>
dnsproxy -logfile &lt;address&gt;
</pre>
指定されなかった場合には、
<pre>
/tmp/dnsproxy.log
</pre>
に書き込まれます。
<p>
<dt><a name="log-level">log-level</a><dd>
<p>
ログのレベルを設定します。
<pre>
log-level &lt;level&gt;
</pre>
レベルとして指定できる値は次の通りです。
<blockquote>
<dl>
<dt>none<dd>一切ログを記録しません。
<dt>fatal<dd>致命的なエラーのみ記録します。
<dt>warn<dd>警告メッセージも記録します
<dt>trace<dd>実行トレースメッセージも記録します。
</dl>
</blockquote>
<p>指定しなかった場合のデフォルトは warn です。
<p>none を指定した場合、ログファイルは作成されません。
<p>trace レベルを指定すると大量のログが出力されるので、短時間で
ログファイルが巨大になる可能性があります。注意してください。
<p>
<dt><a name="client-translation">client-translation</a><dd>
<p>
クライアント側でのドメイン名のエンコーディングを指示します。
<pre>
client-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
多言語ドメイン名に対応していないクライアントの場合には、
通常、クライアントのローカルエンコーディングになっています。
そのような場合には
<pre>
client-translation . Shift_JIS
</pre>
という形で、&lt;ZLD&gt;無しで指示します。
<p>
多言語ドメイン名の手法によっては、
クライアント側で多言語ドメイン名を通常のDNSでも
受付けられる形式にエンコードして、それを通常のドメイン名と
区別するために ZLD (Zero Level Domain) を付加するものがあります。
そのような場合には、付加されるZLDとその時のドメイン名の
エンコーディング方法とを対応付けることにより、
他の多言語ドメイン名の手法のDNSサーバを利用することが
できるようになります。
<pre>
client-translation .i-dns.net UTF-5
</pre>
クライアント側のドメイン名のエンコーディングは、
ZLD が異なっていれば、複数指定することができます。
<p>
ただし、mDNkit のデフォルトの設定では ZLD の指定はできないように
なっています。ZLD を使用するためには、mDNkit のコンパイルの際、
<tt>configure</tt> コマンドに
<a href="../guide/install.html#enable-zld"><tt>--enable-zld</tt></a>
を指定する必要があります。
この指定をせずに mDNkit をコンパイルした場合には、ZLD の指定は
すべて無視されます。
<p>
クライアントから送られてきたDNS要求のドメイン名は、
ここで指示したエンコーディングから、内部的に使用される
UTF-8エンコーディングに変換されます。
そして、後述の正規化、サーバ側エンコーディングへの変換が
行なわれてDNSサーバに送出されます。また、DNSサーバからの
応答は、逆に元のエンコデーィングに戻されてクライアントに
返されます。
<p>
ここで指定可能なエンコーディング名は、mDNkit付属のlibmdnおよび
使用するiconv ライブラリに依存します。
iconv ライブラリによって、エンコーディング名が異なっている
ことがありますので、ライブラリのマニュアルをご覧になって
使用可能なエンコーディング名を確認してください。
付属のlibmdnでは、iconvが提供するエンコーディングの他に、
多言語化DNS用に提案されている
<blockquote>
<table>
<tr><td>UTF-5</td>
<td><a href="../../reference/draft/draft-jseng-utf5-01.txt">draft-jseng-utf5-01.txt</a></td>
</tr>
<tr><td>RACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-race-02.txt">draft-ietf-idn-race-02.txt</a></td>
</tr>
<tr><td>BRACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-brace-00.txt">draft-ietf-idn-brace-00.txt</a></td>
</tr>
<tr><td>LACE</td>
<td><a href="../../reference/draft/draft-ietf-idn-lace-00.txt">draft-ietf-idn-lace-00.txt</a></td>
</tr>
</table>
</blockquote>
をサポートしています。
<p>
<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
<p>DNS サーバから返されたドメイン名がクライアントのローカルエンコーディングに
変換できない文字を含んでいた場合に、ローカルエンコーディングの代わりに使用する
エンコーディングを指定します。
<pre>
alternate-encoding &lt;Encoding&gt;
</pre>
指定するエンコーディングは必ず「ASCII互換エンコーディング (ACE)」と呼ばれる、
変換結果が従来のドメイン名として使用可能な文字 (英数字およびハイフン) だけ
からなるエンコーディングでなければなりません。たとえば ASCII 互換
エンコーディングの一つである RACE を指定する場合には次のように指定します。
<pre>
alternate-encoding RACE
</pre>
<p>
<dt><a name="normalize">normalize</a><dd>
<p>
ドメイン名の正規化手法を指定します。
<pre>
normalize &lt;scheme&gt; ...
</pre>
正規化手法は複数指定可能で、左側から順に適用されていきます。
<p>
クライアントから送られてきたDNS要求のドメイン名は、
内部的に使用されるUTF-8エンコーディングに変換された上で、
ここで指示した正規化が適用されます。
<p>
次に示す正規化手法を指定することができます。
<p>
<ul>
<li>ascii-uppercase
<li>ascii-lowercase
<li>unicode-uppercase
<li>unicode-lowercase
<li>unicode-form-c
<li>unicode-form-kc
<li>ja-kana-fullwidth
<li>ja-alnum-halfwidth
<li>ja-compose-voiced-sound
<li>ja-minus-hack
<li>ja-delimiter-hack
</ul>
<p>それぞれの内容については
<a href="../spec/library.html">libmdnのマニュアル</a>
<a href="../spec/library.html#normalizer">normalizer モジュール</a>
を参照してください。
<p>
<dt><a name="server-translation">server-translation</a><dd>
<p>
DNSサーバ側のドメイン名エンコーディング方法を指示します。
<pre>
server-translation &lt;ZLD&gt; &lt;Encoding&gt;
</pre>
ZLDが不要なエンコーディングであれば、<tt>&lt;ZLD&gt;</tt> の部分には
<tt>'.'</tt> を指示します。
<pre>
server-translation . UTF-8
</pre>
ZLDを必要するエンコーディングでは、ZLDとエンコーディング名の
両方を指定します。
<pre>
server-translation .i-dns.net UTF-5
</pre>
ZLD の指定を有効にするには、mDNkit のコンパイル時の設定が必要です。
<a href="#client-translation"><tt>client-translation</tt></a>の項を
ご覧ください。
<p>
指定可能なエンコーディングは、前出の <a href="#client-translation">
<tt>client-translation</tt></a> でのものと同じです。
<p>
<dt><a name="user-id">user-id</a>
<dd>
<p>dnsproxy が動作するユーザを指定します。
<pre>
user-id &lt;user&gt;
</pre>
<p>通常、dnsproxy は特権ポートを使用するためルート権限で起動させる必要が
ありますが、ルート権限のままで動作させるのはセキュリティ上好ましくありません。
この指定により、dnsproxy は特権ポートを作成したあとサービスを開始する前に
指定したユーザの権限で動くようになります。
<p>&lt;user&gt; にはユーザ名あるいはユーザ ID 番号を指定することができます。
<p>
<dt><a name="group-id">group-id</a>
<dd>
<p>dnsproxy が動作するグループを指定します。
<pre>
group-id &lt;user&gt;
</pre>
これは <tt>user-id</tt> エントリと似ていますが、ユーザの代わりにグループを
指定する点が異なります。
<p>&lt;group&gt; にはグループ名あるいはグループ ID 番号を指定することが
できます。
<p>
<dt><a name="root-directory">root-directory</a>
<dd>
<p>dnsproxy が動作する際のルートディレクトリを指定します。
<pre>
root-directory &lt;path&gt;
</pre>
<p>これもセキュリティ対策の一つです。dnsproxy が動作する際のルートディレクトリ
を指定することで、そのディレクトリの外にはアクセスできないようにします。
この指定により、dnsproxy はサービスを開始する前に、<em>chroot()</em>
システムコールを用いて指定したディレクトリをルートディレクトリとして
設定します。
<p>&lt;path&gt; にはルートとして設定したいディレクトリ名を指定します。
</dl>
<p>
<h2><a name="signal">シグナル</a></h2>
<p>dnsproxy に SIGHUP シグナルを送ると、ログファイルをいったん閉じ、
再度オープンするという動作を行います。これは次のような手順で
ログをアーカイブできるようにするためです。
<ol>
<li><tt>mv</tt> コマンド等を用いてログファイルを別の名前にする。
<li>dnsproxy に SIGHUP を送り、新たなログファイルをオープンさせる。
</ol>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because it is too large Load diff

View file

@ -1,218 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: mdnconv.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>mdnconv specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mdnconv</h1>
<p>&nbsp;<p>
<h2><a name="overview">概要</a></h2>
<p><b>mdnconv</b> はネームサーバの設定ファイル <tt>named.conf</tt>
ゾーンマスタファイルのためのコードセット (エンコーディング) 変換ツールです。
<p><b>mdnconv</b> は引数で指定されたファイル、あるいは標準入力から
テキストを入力し、オプションで指定されたコードセット変換および正規化を
実行し、結果を標準出力に書き出します。
<p>具体的な使い方に関しては利用者ガイドの
<a href="../guide/bindconfig.html#file"><tt>named.conf</tt>
ゾーンマスタファイルの作成</a>の項をご覧ください。
<p>
<h2><a name="invoke">起動</a></h2>
<blockquote>
<pre>
% mdnconv [<i>オプション...</i>] [<i>ファイル...</i>]
</pre>
</blockquote>
<h2><a name="options">オプション</a></h2>
<dl>
<dt><a name="in-opt">-in</a> <i>in-code</i>
<dd>入力テキストのコードセット名 <i>in-code</i> を指定します。
<i>in-code</i> に指定できるコードセット名は、次のいずれかです。
<ul>
<li><em>iconv_open()</em> が受け付けるコードセット名
<li><tt>UTF-5</tt>
<li><tt>RACE</tt>
<li><tt>BRACE</tt>
<li><tt>LACE</tt>
<li>上記のコードセット名の別名 (<a href="#alias-opt">-alias</a> オプション参照)
</ul>
<p>指定しなかった場合には現在のロケールからデフォルトのコードセットを
求めます。
<p>
<dt>-out <i>out-code</i>
<dd>出力テキストのコードセット名 <i>out-code</i> を指定します。
<i>out-code</i> に指定できるコードセット名は
<a href="#in-opt">-in</a> オプションの <i>in-code</i> と同じです。
<p>指定しなかった場合には
<a href="clientconfig.html">クライアント設定ファイル</a>
<a href="clientconfig.html#server-encoding">
サーバエンコーディングエントリ</a>
に設定されているコードセットが使用されます。
<p>
<dt>-normalize <i>scheme</i>
<dd>正規化の方式を指定します。<i>scheme</i>に指定できる方式は
次のいずれかです。
<ul>
<li>ascii-uppercase
<li>ascii-lowercase
<li>unicode-uppercase
<li>unicode-lowercase
<li>unicode-form-c
<li>unicode-form-kc
<li>ja-kana-fullwidth
<li>ja-alnum-halfwidth
<li>ja-compose-voiced-sound
<li>ja-minus-hack
<li>ja-delimiter-hack
</ul>
個々の正規化方式については MDN ライブラリの
<a href="library.html#normalizer">normalizer モジュール</a>をご覧ください。
<p>このオプションは複数指定することが可能です。複数指定した場合には、
指定した順に正規化が行われます。
<p>このオプションを指定しなかった場合には
<a href="clientconfig.html">クライアント設定ファイル</a>
<a href="clientconfig.html#normalization">正規化エントリ</a>
指定されている正規化方式が使用されます。
<p>
<dt><a name="zld-opt">-zld</a> <i>ZLD</i>
<dd>使用する ZLD を指定します。変換されるドメイン名が
ピリオドで終わる FQDN で、かつ最後が <i>ZLD</i>
一致した場合には、一致した部分は変換対象から外されます。
これは UTF-5 など一部の ASCII互換エンコーディングにおいて、ZLD 部分が
変換されないようにするためにするために必要な処理です。
<p>このオプションを指定しなかった場合には
<a href="clientconfig.html">クライアント設定ファイル</a>
<a href="clientconfig.html#server-zld">サーバ ZLD エントリ</a>
指定されている値が使用されます。
<p>
<dt><a name="auto-opt">-auto</a>
<dd><a href="#zld-opt">-zld</a> オプションと組み合わせて使用します。
もし変換対象である、非ASCII文字を含むドメイン名の最後が
ピリオドで終わっていた場合に、-zld オプションで指定した ZLD
がそのあとに自動的に付加されます。
これによってゾーンマスタファイル等に ZLD を明示的に書く必要が
少なくなりますが、この補完機能は完全ではないので、明示的に ZLD を
書かなければならない場合もあります。一般的にはこの機能に
頼らない方がよいでしょう。
<p>
<dt>-whole
<dd>正規化とターゲットコードセットへの変換を
入力されたテキスト全体に対して行います。このオプションを指定しなければ
非ASCII文字を含むドメイン名だと判断された部分のみが変換対象と
なります。詳細は<a href="#detail">変換処理の詳細</a>をご覧ください。
<p>
<dt>-alias <i>path</i>
<dd>コードセット名の別名を定義したファイル <i>path</i> を指定します。
このファイルはテキストファイル形式で、1行に一組ずつ
コードセット名の別名と正式名とを一つ以上のスペースで区切って書いた
ものです。例えば次の例は <tt>Shift_JIS</tt><tt>EUC-JP</tt>
別名としてそれぞれ <tt>sjis</tt><tt>euc-jp</tt> を定義するものです。
<blockquote>
<pre>
# "#" で始まる行はコメント
sjis Shift_JIS
euc-jp EUC-JP
</pre>
</blockquote>
<dt>-noconf
<dd><a href="clientconfig.html">クライアント設定ファイル</a>
読み込まないようにします。
<p>
<dt>-flush
<dd>行ごとに出力をフラッシュします。mdnconv はファイルやパイプへの
出力の場合、通常は複数行のデータをまとめて書き出しますが、この
オプションを指定すると1行ごとに変換結果を書き出します。
通常はこのオプションを指定する必要はありませんが、
mdnconv をフィルタプログラムとして他のプログラムから利用する場合などに
便利なことがあります。
</dl>
<h2><a name="detail">変換処理の詳細</a></h2>
<p><b>mdnconv</b> が行う変換処理をステップごとに記述します。
<ol>
<li>ファイルあるいは標準入力からテキストを1行読み込みます。
<p>
<li>行末の改行コードを取り除きます。
これは -whole オプションをつけて <b>mdnconv</b> を実行し、かつ
出力エンコーディングが UTF-5 や RACE など ASCII 互換
エンコーディングの場合に、改行コードも UTF-5 や RACE で
エンコードされてしまい、改行がなくなってしまうのを避けるためです。
<p>
<li>行を UTF-8 エンコーディングに変換します。変換には
MDN ライブラリの <a href="library.html#converter">converter モジュール</a>
を使用します。
<p>通常は行全体を UTF-8 に変換しますが、入力コードセットが
"RACE" の場合には、RACE エンコーディングを識別するプリフィックスを用いて
RACE エンコードされた部分のみを取り出して UTF-8 に変換します。
<p>
<li>変換結果が UTF-8 として正しいエンコーディングであるかをチェックします。
これには MDN ライブラリの <a href="library.html#utf8">utf8 モジュール</a>
を使用します。本来この処理は不要なはずですが、コード変換の実装に
バグがあった場合に早い段階で検出できるよう、ここでチェックをするように
してあります。
<p>
<li>-whole オプションが指定されていれば次の処理対象の取り出しを飛ばし、
行全体を処理対象として 7. に飛びます。
<p>
<li>UTF-8に変換された行の中から多言語ドメイン名の部分を取り出します。
これには MDN ライブラリの
<a href="library.html#selectiveencode">selectiveencode モジュール</a>
を使用します。取り出されるのは次のような部分文字列です。
<ul>
<li>1文字以上の非ASCII文字を含むこと。
<li>従来のドメイン名に許される文字 (アルファベット、数字、ハイフン)、
非ASCII文字、ピリオドだけから構成されていること
</ul>
<p>取り出された部分のみを以降の正規化等の処理対象とします。
<p>
<li>正規化を行います。
これには MDN ライブラリの
<a href="library.html#normalizer">normalizer モジュール</a>
を使用します。
<p>
<li>再度変換結果が UTF-8 として正しいエンコーディングであるかをチェックします。
本来この処理は不要なはずですが、正規化の実装に
バグがあった場合を考えてチェックを入れてあります。
<p>
<li>正規化された文字列の最後がピリオドで終わっており、かつ
-zld オプションで指定された ZLD と文字列がマッチすれば、ZLD の部分を
次のコードセット変換の対象から外します。これは ZLD の部分まで
(UTF-5 などに) 変換されてしまうのを防ぐためです。
<p>
<li>UTF-8 エンコーディングから -out で指定された出力エンコーディングに
変換します。変換には
MDN ライブラリの <a href="library.html#converter">converter モジュール</a>
を使用します。
<p>
<li>出力エンコーディングに変換する前の文字列がピリオドで終わっており、
かつ -auto オプションが指定されていれば、文字列の後に ZLD を付加します。
<p>
<li>-whole オプションが指定されていた場合には変換された文字列をそのまま
標準出力に出力します。
指定されていなかった場合には、変換された文字列と 6. で処理対象と
ならなかった部分とをマージしてからやはり標準出力に出力します。
どちらの場合も最後に改行コードを出力します。
<p>
<li>すべての入力行を処理し終われば終了します。そうでなければ 1. に
戻ります。
</ol>
</body>
</html>

View file

@ -1,127 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: runmdn.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>runmdn specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>runmdn</h1>
<p>&nbsp;<p>
<h2><a name="overview">概要</a></h2>
<p><b>runmdn</b> は BIND-4 あるいは BIND-8 をベースとした
リゾルバライブラリを持つクライアントを、
再コンパイルなしに多言語ドメイン名を扱えるようにするためのコマンドです。
<p>
<h2><a name="invoke">起動</a></h2>
<blockquote>
<pre>
% runmdn <i>コマンド</i> [<i>引数...</i>]
</pre>
</blockquote>
<p>例えば <tt>telnet</tt> コマンドで多言語ドメイン名を扱うためには
次のようにします。
<blockquote>
<pre>
% runmdn telnet ログイン.どこかの会社.jp
</pre>
</blockquote>
<h2><a name="invoke">実装</a></h2>
<p><b>runmdn</b> は共有ライブラリのプリロード機構を用いて、標準の
リゾルバライブラリに含まれる関数の一部を、多言語ドメイン名の処理機能を持つ
別のバージョンに動的に置換えることで、クライアントでの多言語ドメイン名の
処理を実現します。
<p>多くのシステムでは共有ライブラリのプリロードは環境変数
<em>LD_PRELOAD</em> を用いて実現されています。この環境変数にプリロードしたい
共有ライブラリファイルのパス名を指定すると、クライアントの実行時に、
アプリケーションに標準の共有ライブラリがリンクされる前に
指定したライブラリがリンクされます。これによって標準のライブラリ関数を
置換えることができます。
<p>したがって、<b>runmdn</b> の実体は、この環境変数を設定し、引数で
指定されたコマンドを起動するだけのシェルスクリプトであり、実際に
多言語ドメイン名の処理を行うのはアプリケーションにリンクされる
共有ライブラリ <b>libmdnresolv</b> です。
<p><b>libmdnresolv</b> をリンクすることにより、BIND4 あるいは BIND8 ベースの
リゾルバライブラリで用いられている次の関数が置き換わります。
<blockquote>
<pre>
dn_comp
dn_expand
res_hnok
res_ownok
res_mailok
res_dnok
</pre>
</blockquote>
<p>それぞれの変更点を簡単に記述します。
<dl>
<dt>dn_comp<dd>
指定されたドメイン名を DNS プロトコルで用いられるドメインデータに変換する前に、
ローカルコードセットから DNS プロトコル上で用いられるエンコーディングへの
変換および正規化、(必要ならば) ZLDの付加を行います。
<dt>dn_expand<dd>
DNS プロトコルで用いられるドメインデータをドメイン名文字列に変換した後、
(必要なら) ZLD を削除し、ローカルコードセットへの変換を行います。
また通常この関数はドメイン名に含まれる ASCII 以外の文字を
バックスラッシュエスケープする処理をしますが、これを抑制します。
<dt>res_hnok<dd>
どんな文字でも正当な文字であると判断するようにします。
<dt>res_ownok<dd>
どんな文字でも正当な文字であると判断するようにします。
<dt>res_mailok<dd>
どんな文字でも正当な文字であると判断するようにします。
<dt>res_dnok<dd>
どんな文字でも正当な文字であると判断するようにします。
</dl>
<p>エンコーディング変換や正規化、ZLD の処理等はすべて
<a href="library.html">MDN ライブラリ</a> (libmdn) の
<a href="library.html#res">res モジュール</a>を使用しています。
<blockquote>
現在の実装では <b>libmdnresolv</b> は MDN ライブラリ (libmdn) を
呼び出すのではなく、libmdn 自体を内部に抱え込むような形態になっていますが、
これは単なる実装上の都合からそうなっているだけで、論理的には MDN
ライブラリの機能を呼び出しているといってよいでしょう。
</blockquote>
<p>また使用するエンコーディングや正規化の設定は
<a href="clientconfig.html">クライアント設定ファイル</a>の設定を
利用します。
<h2><a name="invoke">制限</a></h2>
<p><b>runmdn</b> にはいくつかの制限があり、どんなシステムでも使えるわけでは
ありません。
<ul>
<li>runmdn は共有ライブラリの動的リンク機構を用いているので、
共有ライブラリが使用できるシステムでなければなりません。
<li>また環境変数 <em>LD_PRELOAD</em> または類似の機構による
ライブラリのプリロード機能を持つシステムでなければなりません。
<li>runmdn の対象となるコマンドはリゾルバライブラリをスタティックリンク
していてはなりません。
<li>システムのライブラリが iconv() 関数を提供していない場合、外部の
ライブラリを用いることになりますが、そのライブラリも共有ライブラリで
なければなりません。
<li>システムのリゾルバライブラリは BIND4 あるいは BIND8 ベースのものでなければ
なりません。
<li>セキュリティ上の理由から一般に setuid されたコマンドはプリロード機能が
使えないようになっているので、setuid されたコマンドであってはなりません。
</ul>
</body>
</html>

View file

@ -1,136 +0,0 @@
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: spec.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>mDNkit specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDNkit 仕様書</h1>
<ul>
<li><a href="#overview">全体構成</a>
<li><a href="dnsproxy.html">dnsproxy</a>
<li><a href="mdnconv.html">mdnconv</a>
<li><a href="bind9.html">BIND-9 パッチ</a>
<li><a href="runmdn.html">runmdn</a>
<li><a href="wrapper.html">mDN Wrapper</a>
<li><a href="library.html">MDN ライブラリ</a>
<li><a href="clientconfig.html">クライアント設定ファイル</a>
</ul>
<hr>
<h2><a name="overview">全体構成</a></h2>
<h3><a name="components">キットを構成するコンポーネント</a></h3>
<p>mDNkit は次のようなコンポーネントから構成されます。
<ul>
<li><a href="dnsproxy.html">dnsproxy</a><br>
DNS サーバのプロキシサーバとして動作し、クライアントからの DNS
メッセージを DNS サーバに中継し、また DNS サーバから返される
DNS メッセージをクライアントに中継します。<br>
クライアントから送られてきた DNS メッセージを中継する際には、
メッセージ中のドメイン名を、クライアントの使用する
ローカルエンコーディングから、多言語化された DNS サーバの使用する
DNS プロトコル上のエンコーディングに変換するとともに
正規化や ZLD の除去・付加を行います。<br>
また DNS サーバから返された DNS メッセージを中継する際には、
メッセージ中のドメイン名を、DNS プロトコル上のエンコーディングから
ローカルエンコーディングに変換し、同時に ZLD の除去・付加を行います。<br>
<p>
<li><a href="mdnconv.html">mdnconv</a><br>
ゾーンマスタファイルや <tt>named.conf</tt> ファイルのエンコーディング
変換用ツールです。ローカルエンコーディングで記述されたこれらのファイルを、
多言語化された DNS サーバが使用するDNS プロトコル上のエンコーディングに
変換し、同時に正規化も行います。
<p>
<li><a href="bind9.html">BIND-9 パッチ</a><br>
BIND-9 で多言語ドメイン名を扱えるようにするためのパッチです。
このパッチを適用することにより、BIND-9 のリゾルバに多言語ドメイン名の
エンコーディング変換や正規化の機能が付加されます。これにより
dnsproxy を使用することなく、多言語ドメイン名が扱えるようになります。
また dig 等のツールでも多言語ドメイン名を扱えるようになります。
<p>
<li><a href="runmdn.html">runmdn</a><br>
BIND-4 あるいは BIND-8 ベースのアプリケーションを再コンパイルすることなしに
多言語ドメイン名を扱えるようにするためのコマンドです。
アプリケーションの実行時に MDN ライブラリを動的にリンクすることにより
アプリケーションにリンクされているリゾルバに多言語ドメイン名の
エンコーディング変換や正規化の機能が付加されます。これにより
dnsproxy を使用することなく、多言語ドメイン名が扱えるようになります。
<p>
<li><a href="wrapper.html">mDN Wrapper</a><br>
Windows ベースのアプリケーションで多言語ドメイン名を扱えるようにするための、
WINSOCK に対するWrapper DLL です。
通常、WindowsアプリケーションはWINSOCK によってドメイン名を解決します。
mDN Wrapper は、WINSOCK の呼び出しをフックして、
多言語ドメイン名のエンコーディングの変換や正規化を行ないます。
同じようなことはdnsproxyでもできますが、
mDN Wrapper を使った場合には、
アプリケーション毎に異なったローカルエンコーディングを受付けることもできます。
<p>
<li><a href="library.html">MDN ライブラリ</a><br>
上記のコンポーネントが使用するライブラリです。多言語ドメイン名の変換に
関わる
<ul>
<li>エンコーディング変換
<li>文字列の正規化
<li>DNS メッセージの解析と組み立て
<li>ZLD の削除、追加
</ul>
という機能を提供します。
<p>
<li><a name="eightbitthru-patch">8ビットスルーパッチ</a><br>
dnsproxy を用いて多言語ドメイン名のエンコーディング変換や正規化等を
行う場合、DNS サーバやリゾルバライブラリにはこれらの機能は必要ありません。
ただし DNS プロトコル上のエンコーディングとして
UTF-8 等の 8 ビットコードを使用する場合、
従来の DNS サーバは使用することができず、8ビットコードをエラーにせずに
通すような改造が必要です。<br>
またローカルエンコーディングが SJIS 等の 8 ビットコードを使用する場合、
やはりリゾルバライブラリにも 8 ビットコードをそのまま通し、
エラーにしないようにするための改造が必要です。<br>
さらにアプリケーションの中には、独自にドメイン名の検査を行い、
8 ビットコードを通さないものがあります。<br>
このため、本キットでは
<ul>
<li>BIND-8 のネームサーバ、リゾルバを 8 ビットスルーにするためのパッチ
<li>Web のキャッシュサーバである Squid の URL 解析部分を 8 ビットスルー
にするためのパッチ
</ul>
を提供します。<br>
これらの 8 ビットスルーパッチに関しては特に仕様の記述は行いません。
</ul>
<h3><a name="comp-relation">コンポーネント構成図</a></h3>
<p>各コンポーネントがどこでどのように使われるのかを示したのが次の2枚の図です。
<p>1枚目は多言語ドメイン名の処理を dnsproxy を利用して行う場合の構成図です。
<p>
<blockquote>
<img src="img/components.jpg" alt="mDNkit components #1">
</blockquote>
<p>2枚目は dnsproxy を使用せず、クライアント側のリゾルバで多言語ドメイン名の
処理を行う場合の構成図です。
<p>
<blockquote>
<img src="img/components2.jpg" alt="mDNkit components #2">
</blockquote>
<p>図中、イタリック体の部分が本キットに含まれるコンポーネントです。
<p>図の上半分は SJIS など、ローカルエンコーディングが使用される
世界で、下半分が UTF-8 など、多言語化された DNS が使用する
DNS プロトコル上のエンコーディングが使用される世界です。
本キットが提供するコンポーネントはこれらの世界をつなぐためのものです。
</body>
</html>

View file

@ -1,518 +0,0 @@
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: wrapper.html,v 1.1 2001/03/05 12:58:07 tale Exp $ -->
<html>
<head>
<title>mDN Wrapper - Program Specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>
<body>
<h1>mDN Wrapper</h1>
<p>&nbsp;<p>
<h2>実現方法 - Wrapper DLL</h2>
<p>
ラッパーDLL は、アプリケーションと元のDLL との間に割り込んで、
アプリケーションからのDLL の呼び出しを横取りして、
本来のDLL とは異なった処理をさせるものです。
<blockquote>
<img src="img/wrapper.jpg" alt="how wrapper DLL works">
</blockquote>
<p>
アプリケーションからのDLL の呼び出しはラッパーに渡されます。
ラッパーはそこで、付加的な処理を行なって、
元のDLL のエントリを呼び出します。
また、元のDLL の処理結果は一旦ラッパーに返され、
ここでも付加的な処理を行なって、
最終的な結果がアプリケーションに返されることになります。
<p>
mDN wrapper では、WINSOCK DLLの
<blockquote>
<table>
<tr><td>WSOCK32.DLL</td><td>WINSOCK V1.1</td></tr>
<tr><td>WS2_32.DLL </td><td>WINSOCK V2.0</td></tr>
</table>
</blockquote>
に対するラッパーDLL を提供して、
多言語ドメイン名の名前解決ができるようにします。
<blockquote>
<table>
<tr><td valign=top></td><td valign=top>:</td>
<td>
16ビット版のWINSOCK (WINSOCK.DLL) は対象外です。
</td></tr>
</table>
</blockquote>
<p>
<h2>処理対象のAPI</h2>
<p>
mDN Wrapper はWINSOCK の名前解決に関連したAPI についてのみ
付加的な処理を行ないます。
処理の対象となるWINSOCK APIは以下のものです。
<dl>
<dt>WINSOCK 1.1, WINSOCK 2.0 の両方にあるもの
<dd>
<table>
<tr><td>gethostbyaddr</td></tr>
<tr><td>gethostbyname</td></tr>
<tr><td>WSAAsyncGetHostByAddr</td></tr>
<tr><td>WSAAsyncGetHostByName</td></tr>
</table>
<p>
<dt>WINSOCK 2.0 だけにあるもの
<dd>
<table>
<tr><td>WSALookupServiceBeginA</td></tr>
<tr><td>WSALookupServiceNextA</td></tr>
<tr><td>WSALookupServiceEnd</td></tr>
</table>
</dl>
<p>
アプリケーションによっては、
これらのAPI を使わないで独自にドメイン名の解決を行なうものもあります。
例えば、nslookupは、これらのAPI を使わないで、
内部で独自にDNS リクエストの生成、解釈を行なっています。
当然のことながら、これらのアプリケーションについては、
mDN Wrapper では多言語化対応させることはできません。
<blockquote>
<table>
<tr><td valign=top></td><td valign=top>:</td>
<td>
dnsproxyはネットワーク上でDNS のリクエスト、
レスポンスについて多言語化しますので、
これらのアプリケーションについても多言語化させることができます。
必要に応じて適時使い分けるといいでしょう。
</td></tr>
<tr><td valign=top></td><td valign=top>:</td>
<td>
WINSOCK 2.0 には、WIDE CHARACTER ベースの名前解決のAPI として
<table>
<tr><td>WSALookupServiceBeginW</td></tr>
<tr><td>WSALookupServiceNextW</td></tr>
</table>
もありますが、これらについてはラップしません。
これらのAPI はマイクロソフト仕様による国際化に対応したものですから、
そのフレームワーク上で使うべきものです。
これらについてはmDN Kit によって他の多言語フレームワークに
変換してしまうのは危険ではないか、と判断しました。
</td>
</table>
</blockquote>
<p>
<h2>処理対象外のAPI</h2>
<p>
上記以外のWINSOCK API については、mDN Wrapper はなにもしないで、
元のWINSOCK API を呼び出します。
WINSOCK DLL にはドキュメントされていないエントリも含まれています。
それらのエントリについては、呼び出しパラメタ等が判らないので、
ラッパー内のコードから元のDLL のエントリを呼び出すことができません。
そこで、mDN Wrapper は上記以外のエントリについては、
function forwarding によって、
DLL の呼び出しが元のDLL にフォワードされるようにしています。
<p>
'function forwarding' を使う場合には、
ラッパーDLL 作成時にフォワード先のDLL 名を明示的に指定する必要があり、
そのDLL 名はラッパー自身とは別の名前、
すなわち元のDLL とも別の名前、になっていなければなりません。
mDN wrapper では、元のWINSOCK DLL を名前を変えてコピーし、
それをフォワード先のDLL として使用するものとします。
<blockquote>
<table>
<tr><td>wsock32.dll</td><td>-&gt;</td><td>wsock32o.dll</td></tr>
<tr><td>ws2_32.dll </td><td>-&gt;</td><td>ws2_32o.dll </td></tr>
</table>
</blockquote>
<p>
ラッパーDLL は元のWINSOCK DLL と同じ名前で作成されます。
従ってmDN wrapper がインストールされた状態では、
<blockquote>
<table>
<tr><td>wsock32.dll </td><td>mDN Wrapper for WINSOCK V1.1</td></tr>
<tr><td>ws2_32.dll </td><td>mDN Wrapper for WINSOCK V2.0</td></tr>
<tr><td>wsock32o.dll</td><td>Original WINSOCK V1.1 DLL</td></tr>
<tr><td>ws2_32o.dll </td><td>Original WINSOCK V2.0 DLL</td></tr>
</table>
</blockquote>
となります。
<p>
<h2>非同期 API</h2>
<p>
ドメイン名の変換は、以下のタイミングで行なわれる必要があります。
<p>
<blockquote>
<dl>
<dt>DNS へのリクエスト時
<dd>
<table>
<tr><td>ローカルエンコーディング</td><td>-&gt;</td><td>DNS エンコーディング</td></tr>
</table>
<dt>DNS からの応答受信時
<dd>
<table>
<tr><td>DNS エンコーディング</td><td>-&gt;</td><td>ローカルエンコーディング</td></tr>
</table>
</dl>
</blockquote>
<p>
同期API においては、
ローカルエンコーディングからDNS エンコーディングへの変換は、
元のAPI を呼び出す前に行われ、
DNS エンコーディングからローカルエンコーディングへの変換は、
元のAPI から復帰してきたところで行なわれます。
<p>
しかし、WINSOCK の以下のAPI は非同期API で、
DNS からの応答受信前に復帰してしまいます。
<blockquote>
<dl>
<dt>WSAAsyncGetHostByAddr
<dt>WSAAsyncGetHostByName
</dl>
</blockquote>
<p>
これらのAPI においては、名前解決の完了は、
Windows へのメッセージによって通知されます。
このため、
DNS エンコーディングからローカルエンコーディングへの変換を行なうには、
ラッパーは通知先のウィンドウプロシジャのメッセージキューをフックして、
この完了メッセージを捕獲する必要があります。
<p>
そこで、非同期API が呼び出された場合には、mDN Wrapper は、
通知先のウィンドウプロシジャこれはAPI のパラメタで指示されます)に
フックを設定します。
フックが完了メッセージこれもAPI のパラメタで指示されます)を検出したなら、
フックは結果の格納領域これもAPI のパラメタで指示されています)のドメイン名を、
DNS 側のエンコーディングからローカルエンコーディングに変換するものとします。
<p>
<h2>Wrapper DLL のインストール</h2>
<p>
WINSOCK DLL はWindows のシステムディレクトリに置かれています。
WINSOCK を確実にラップするには、システムディレクトリにおいて
<blockquote>
<dl>
<dt>オリジナルWINSOCK DLL の名前の変更
<dd>
<pre>
ren wsock32.dll wsock32o.dll
ren ws2_32.dll ws2_32o.dll
</pre>
<dt>ラッパーDLL の導入
<dd>
<pre>
copy somewhere\wsock32.dll wsock32.dll
copy somewhere\ws2_32.dll ws2_32.dll
copy another DLLs also
</pre>
</dl>
</blockquote>
を行なう必要があります。
<p>
しかし、システムディレクトリでこのようなDLL の置き換えを行なうのは
大変危険な操作になります。
<blockquote>
<table>
<tr><td valign=top>a)</td>
<td>
DLL を入れ替えた状態で、もういちど同じ操作を行なうと、
オリジナルのWINSOCK DLL が失われてしまうことになります。
</td></tr>
<tr><td valign=top>b)</td>
<td>
サービスパックやアプリケーションなどで、
WINSOCK DLL を再導入するものがありますが、
これによってもWINSOCK が利用不能になることがあります。
</td></tr>
</table>
</blockquote>
<p>
このような状態になると、ネットワーク機能が全く使えなくなったり、
最悪はWindows の起動すらできなくなる可能性があります。
<p>
そこで、mDN Wrapper では、上のようなシステムレベルのラップではなく、
アプリケーションに対するラップを基本機能として提供するものとします。
<p>
Windows において、DLL は、基本的には
<blockquote>
<table>
<tr><td>アプリケーションのロードディレクトリ</td></tr>
<tr><td>%SystemRoot%\System32</td></tr>
<tr><td>%SystemRoot%</td></tr>
<tr><td>PATH で指示されるディレクトリ</td></tr>
</table>
</blockquote>
<p>
の順序で検索されて、最初に見つかったものがロードされます。
ですから、一般的には、
DLL をアプリケーションのロードディレクトリにインストールすれば、
そのアプリケーションからのWINSOCK の呼び出しをラップすることができます。
<p>
ただし、いくつかのアプリケーション、DLL では、
検索パスを経由せずに特定のDLL をリンクするようになっているものがあります。
このような構成のアプリケーション、DLL が使われた場合には
mDN Wrapper では対処することはできません。
<blockquote>
<table>
<tr><td valign=top></td><td valign=top>:</td>
<td>
Netscapeは特定DLL にバインドされているようで、
アプリケーションディレクトリへのインストールではラップできません。
WINSOCK DLL 自体もシステムディレクトリの関連DLL に
バインドされているようです。
一方、Internet ExploreやWindows Media Playerは
標準のサーチパスに従っているので、
ラップすることができます。
</td></tr>
</table>
</blockquote>
<p>
<h2>エンコーディングの変換位置</h2>
<p>
WINSOCK 2.0 をサポートしているWindows には、
WINSOCK の1.1 と2.0 のそれぞれに対応するDLL があり、
WINSOCK 1.1 のAPI の呼び出しは
2.0 の同じエントリにリダイレクトされるようになっています。
<blockquote>
<img src="img/winsock2.jpg" alt="calling winsock2.0 through winsock1.1">
</blockquote>
<p>
この場合には1.1 に対する呼び出しも2.0 に対する呼び出しも、
ともにV2.0用のDLL に渡されるので、
2.0用のラッパーDLL 側だけで
エンコーディングの変換を行なうようにするべきでしょう。
<p>
一方、WINSOCK 1.1 しかサポートしていない場合(Win95)には、
1.1 に対応したDLL しかありません。
<blockquote>
<img src="img/winsock1.jpg" alt="calling only winsock1.1">
</blockquote>
<p>
この場合には必然的に1.1 用のラッパーDLL で
エンコーディングを変換しなければなりません。
<p>
mDN Wrapepr がwindows のシステムディレクトリにインストールされた場合には、
上の通りに動作するので、
<blockquote>
<table>
<tr><td>WINSOCK 2.0 あり</td><td>2.0 ラッパーで変換</td></tr>
<tr><td>WINSOCK 1.1 のみ</td><td>1.1 ラッパーで変換</td></tr>
</table>
</blockquote>
する必要があります。
<p>
しかし、
アプリケーションディレクトリにインストールされた場合には動作が変わってきます。
Windows 付属の WINSOCK 1.1 DLLは、
システムディレクトリのWINSOCK 2.0 にバインドされているため、
アプリケーションディレクトリ側のWINSOCK 2.0 ラッパーDLL には
リダイレクトされてきません。
このため、アプリケーションディレクトリへのインストールにおいては、
1.1DLL、2.0DLLの両方でエンコーディングを変換する必要があります。
<p>
このようなDLL 間のバインディングはドキュメントされていませんので、
環境、バージョンによっては異なった動作をするかも知れません。
そこでmDN Wrapper では、レジストリ値によって、
ラッパーDLL のどこで変換を行なうかを決定するようにして、
インストール先による差異、あるいはバージョンによる差異を吸収するようにします。
<p>
mDN Wrapper 用のレジストリ設定は
<blockquote>
<table>
<tr><td>HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN</td></tr>
<tr><td>HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN </td></tr>
</table>
</blockquote>
以下に配置されます。エンコーディング変換を行なう位置については、
この直下のレジストリ値 WhereREG_DWORD によって決定します。
有効な値は、
<blockquote>
<b>レジストリ Where (REG_DWORD)</b>
<table>
<tr><td>0</td><td></td><td>WINSOCK 1.1、WINSOCK 2.0 の両方で変換する</td></tr>
<tr><td>1</td><td></td><td>WINSOCK 2.0 があれば、WINSOCK 2.0だけで変換する</td></tr>
<tr><td> </td><td></td><td>WINSOCK 1.1 だけの場合には WINSOCK 1.1 で変換する</td></tr>
<tr><td>2</td><td></td><td>WINSOCK 1.1 だけで変換する</td></tr>
<tr><td>3</td><td></td><td>WINSOCK 2.0 だけで変換する</td></tr>
</table>
</blockquote>
の4通りです。
アプリケーションディレクトリにインストールする場合には「0」を、
システムディレクトリにインストールする場合には「1」を設定する必要があります。
レジストリ値が存在しない場合には「0」を想定します。
これはアプリケーションディレクトリへのインストールを標準としたものです。
<p>
<h2>変換元/先のエンコーディング</h2>
<p>
ラッパーDLL では、解決しようとするドメイン名を、
マシンのローカルエンコーディングからDNS サーバのエンコーディングに変換し、
また、DNS が返してきたドメイン名(DNS サーバのエンコーディング)を
マシンのローカルエンコーディングに戻します。
<p>
現在、DNS 側の多言語化エンコーディングについては、
いくつもの方式が提案されています。
ラッパーDLL はそれらのDNS 側エンコーディングのどれかひとつに
変換するように構成されます。
このDNS 側エンコーディングはレジストリで指示されます。
このレジストリには、mDN Wrapper のインストール時に
デフォルトエンコーディング現時点ではRACEが設定されます。
当然、このレジストリは、後で他のものに変更することもできます。
<p>
mDN Wrapper 用のレジストリ設定は
<blockquote>
<table>
<tr><td>HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN</td></tr>
<tr><td>HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN </td></tr>
</table>
</blockquote>
以下に配置されます。
DNS 側のエンコーディングはレジストリ値 Encoding REG_SZで指示されます。
このエンコーディング名は、libmdnで認識されるものでなければなりません。
<blockquote>
<b>レジストリ Encoding (REG_SZ)</b>
<blockquote>
DNS サーバ側のエンコーディング名を設定します
</blockquote>
</blockquote>
<p>
一方、アプリケーションが使用しているローカルエンコーディングは、
通常はプロセスのコードページから求めます。
ラッパーDLL が使用する 'iconv' ライブラリは、
windows のコードページ名を
エンコーディング名として受付けることができるので、
コードページ名をそのままローカルエンコーディング名として使用します。
<p>
しかし、アプリケーションによっては、
特定の多言語化エンコーディングで
ドメイン名をエンコーディングしてしまうものもあります。
例えば、IEではドメイン名をUTF-8 で表記するように
指示することができるようになっています。
UTF-8 によるエンコーディングは、
提案されている多言語化方式のひとつですが、
多言語化されたDNS サーバは他のエンコーディングしか受付けないかも知れません。
<p>
このような状況に対処するため、mDN Wrapper は、
ローカルエンコーディングとして
プログラム特有のエンコーディングも受付けることができるようにします。
このようなプログラム特有のローカルエンコーディングは
レジストリ記載されるものとします。
<p>
mDN Wrapper 用のプログラム特有のレジストリ設定は
<blockquote>
<table>
<tr><td>HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg</td></tr>
<tr><td>HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg</td></tr>
</table>
</blockquote>
以下に、
プログラム名(実行モジュールファイル名)をキーとして
配置されます。
例えば、Internet Explore の場合には、
実行モジュール名のIEXPLOREをキーとして
<blockquote>
HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE
</blockquote>
以下に置かれます。
ローカルエンコーディング名は、レジストリ値Encoding REG_SZで指示します。
これもlibmdnで認識されるものでなければなりません。
<blockquote>
<b>レジストリ Encoding (REG_SZ)</b>
<blockquote>
アプリケーションプログラム特有のエンコーディング名
(デフォルトのエンコーディング以外を必要とする場合)を指定します。
</blockquote>
</blockquote>
<h2>ログ</h2>
mDN Wrapper が期待した動作をしない場合、動作のログは問題解決に非常に
役立ちます。mDN Wrapper では、レジストリの設定により、以下の設定が
可能です。
<ul>
<li>ログレベル
<li>ログファイル
</ul>
<p>
ログレベル、ログファイルともに次のレジストリの下で設定されます。
<blockquote>
HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN<br>
HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
</blockquote>
<p>
ログレベルはレジストリ値 LogLevel (REG_DWORD) で指定します。定義されている
値は次の通りです。
<dl>
<dt>-1 (0xFFFFFFFF) <dd>[None] ログを一切出力しない
<dt>0<dd>[Fatal] 致命的エラーのみ出力
<dt>1<dd>[Error] 致命的でないエラーも出力
<dt>2<dd>[Warning] 警告メッセージも出力
<dt>3<dd>[Info] エラー以外の情報も出力
<dt>4<dd>[Trace] プログラムのトレース情報も出力
</dl>
なお、このレベル指定は mDN Wrapper が使用している
<a href="library.html">MDN ライブラリ</a> の出力するログのレベル指定です。
ログにはこの他 mDN Wrapper 自身が出力するものがありますが、こちらは
レベル指定はできず、単にオン・オフを切り替えるだけです。-1 を指定した場合には
オフ、それ以外の値を指定した場合にはオンになります。
デフォルトは -1 です。
<p>
ログファイルはログを出力するファイルのパス名を指定するもので、
レジストリ値 LogFile (REG_SZ) で指定します。デフォルトは
mDN Wrapper をインストールしたディレクトリの下の "mdn_wrapper.log" です。
<p>
なお、ログレベルとログファイルはコンフィギュレーションプログラムを使用しても
設定することができます。
<p>
<h2>レジストリ設定 - まとめ</h2>
<p>
<h3>レジストリの優先順位</h3>
<p>
mDN Wrapper の設定情報は、HKEY_LOCAL_MACHINE、HKEY_CURRENT_USERの
<blockquote>
Software\JPNIC\MDN
</blockquote>
以下に格納されます。
mDN Wrapperは最初にHKEY_LOCAL_MACHINEの設定を読み込み、
HKEY_CURRENT_USER側にも設定があれば、これで上書きします。
通常は、HKEY_LOCAL_MACHINE 側だけを設定します。
ユーザ個別に異なった設定を使いたい場合のみ、
HKEY_CURRENT_USERを設定するようにしてください。
<p>
特に、コンフィギュレーションプログラムは常に HKEY_LOCAL_MACHINE の
設定しか読み書きしません。コンフィギュレーションファイルを使用して
設定を行う場合には気をつけてください。
<p>
<h3>レジストリキー</h3>
<p>
全体の共通の設定と、プログラム個別設定とがあります。
<h4>共通定義</h4>
<pre>
Software\JPNIC\MDN\Where 変換位置
0:WINSOCK1.1 WINSOCK2.0の両方で
1:WINSOCK2.0 があればそちらで
2:WINSOCK1.1 だけで
3:WINSOCK2.0 だけで
Software\JPNIC\MDN\Encoding DNS側エンコーディング名
Software\JPNIC\MDN\Normalize 正規化の方式
Software\JPNIC\MDN\LogLevel ログレベル
Software\JPNIC\MDN\LogFile ログファイル
</pre>
<h4>プログラム個別設定</h4>
<p>
変換位置、およびプログラム側のエンコーディングは
プログラム毎に特定することもできます。
これらは、以下のキーハイブの下に、
プログラム名をキーとする値で設定します。
<blockquote>
Software\JPNIC\MDN\PerProg\&lt;name&gt;\Where
Software\JPNIC\MDN\PerProg\&lt;name&gt;\Encoding
</blockquote>
指定されていない場合には、
<blockquote>
<table>
<tr><td>Where </td><td>0</td><td>1.1、2.0 の両方で変換 </td></tr>
<tr><td>Encoding</td><td> </td><td>プロセスのコードページ</td></tr>
</table>
</blockquote>
とみなします。
</body>
</html>

View file

@ -1,75 +0,0 @@
# $Id: Makefile.in,v 1.1 2002/01/02 02:46:25 marka Exp $
# Copyright (c) 2000 Japan Network Information Center. All rights reserved.
#
# By using this file, you agree to the terms and conditions set forth bellow.
#
# LICENSE TERMS AND CONDITIONS
#
# The following License Terms and Conditions apply, unless a different
# license is obtained from Japan Network Information Center ("JPNIC"),
# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
# Chiyoda-ku, Tokyo 101-0047, Japan.
#
# 1. Use, Modification and Redistribution (including distribution of any
# modified or derived work) in source and/or binary forms is permitted
# under this License Terms and Conditions.
#
# 2. Redistribution of source code must retain the copyright notices as they
# appear in each source code file, this License Terms and Conditions.
#
# 3. Redistribution in binary form must reproduce the Copyright Notice,
# this License Terms and Conditions, in the documentation and/or other
# materials provided with the distribution. For the purposes of binary
# distribution the "Copyright Notice" refers to the following language:
# "Copyright (c) Japan Network Information Center. All rights reserved."
#
# 4. Neither the name of JPNIC may be used to endorse or promote products
# derived from this Software without specific prior written approval of
# JPNIC.
#
# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#
# 6. Indemnification by Licensee
# Any person or entities using and/or redistributing this Software under
# this License Terms and Conditions shall defend indemnify and hold
# harmless JPNIC from and against any and all judgements damages,
# expenses, settlement liabilities, cost and other liabilities of any
# kind as a result of use and redistribution of this Software or any
# claim, suite, action, litigation or proceeding by any third party
# arising out of or relates to this License Terms and Conditions.
#
# 7. Governing Law, Jurisdiction and Venue
# This License Terms and Conditions shall be governed by and and
# construed in accordance with the law of Japan. Any person or entities
# using and/or redistributing this Software under this License Terms and
# Conditions hereby agrees and consent to the personal and exclusive
# jurisdiction and venue of Tokyo District Court of Japan.
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
SHELL = @SHELL@
SUBDIRS = mdn
all:
for d in $(SUBDIRS); do (cd $$d; $(MAKE) all); done
install:
for d in $(SUBDIRS); do (cd $$d; $(MAKE) install); done
clean:
for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done

View file

@ -1,245 +0,0 @@
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
/* $Id: config.h.in,v 1.1 2002/01/02 02:46:25 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define as an appropriate type (ex. int) if your system doesn't have. */
#undef BOOL
/* Define if you have the bcopy function. */
#undef HAVE_BCOPY
/* Define if you have the dlopen function. */
#undef HAVE_DLOPEN
/* Define if you have the dlsym function. */
#undef HAVE_DLSYM
/* Define if you have the freeaddrinfo function. */
#undef HAVE_FREEADDRINFO
/* Define if you have the freehostent function. */
#undef HAVE_FREEHOSTENT
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO
/* Define if you have the gethostbyaddr function. */
#undef HAVE_GETHOSTBYADDR
/* Define if you have the gethostbyaddr_r function. */
#undef HAVE_GETHOSTBYADDR_R
/* Define if you have the gethostbyname function. */
#undef HAVE_GETHOSTBYNAME
/* Define if you have the gethostbyname2 function. */
#undef HAVE_GETHOSTBYNAME2
/* Define if you have the gethostbyname2_r function. */
#undef HAVE_GETHOSTBYNAME2_R
/* Define if you have the gethostbyname_r function. */
#undef HAVE_GETHOSTBYNAME_R
/* Define if you have the getipnodebyaddr function. */
#undef HAVE_GETIPNODEBYADDR
/* Define if you have the getipnodebyname function. */
#undef HAVE_GETIPNODEBYNAME
/* Define if you have the getnameinfo function. */
#undef HAVE_GETNAMEINFO
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
/* Define if you have the nl_langinfo function. */
#undef HAVE_NL_LANGINFO
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the setvbuf function. */
#undef HAVE_SETVBUF
/* Define if you have the syslog function. */
#undef HAVE_SYSLOG
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
/* Define if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the nsl library (-lnsl). */
#undef HAVE_LIBNSL
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define if you want additional ACE converters compiled in. */
#undef MDN_EXTRA_ACE
/* Define if your iconv() does not accept UTF-8 as the codeset name for utf-8. */
#undef MDN_UTF8_ENCODING_NAME
/* Define if the prefix of RACE encoding differs from 'bq--'. */
#undef MDN_RACE_PREFIX
/* Define if the suffix of BRACE encoding differs from '-8q9'. */
#undef MDN_BRACE_SUFFIX
/* Define if the prefix of LACE encoding differs from 'lq--'. */
#undef MDN_LACE_PREFIX
/* Define if the prefix of UTF-6 encoding differs from 'wq--'. */
#undef MDN_UTF6_PREFIX
/* Define if the prefix of DUDE encoding differs from 'dq--'. */
#undef MDN_DUDE_PREFIX
/* Define if the prefix of AltDUDE encoding differs from 'a---'. */
#undef MDN_ALTDUDE_PREFIX
/* Define if the suffix of AltDUDE encoding differs from ''. */
#undef MDN_ALTDUDE_SUFFIX
/* Define if the prefix of AMC-ACE-M encoding differs from ''. */
#undef MDN_AMCACEM_PREFIX
/* Define if the suffix of AMC-ACE-M encoding differs from '-amc1'. */
#undef MDN_AMCACEM_SUFFIX
/* Define if the prefix of AMC-ACE-O encoding differs from ''. */
#undef MDN_AMCACEO_PREFIX
/* Define if the suffix of AMC-ACE-O encoding differs from '-amc2'. */
#undef MDN_AMCACEO_SUFFIX
/* Define if the prefix of AMC-ACE-R encoding differs from 'amc3-'. */
#undef MDN_AMCACER_PREFIX
/* Define if the prefix of AMC-ACE-V encoding differs from 'amc4-'. */
#undef MDN_AMCACEV_PREFIX
/* Define if the prefix of AMC-ACE-W encoding differs from 'amc5-'. */
#undef MDN_AMCACEW_PREFIX
/* Define if the prefix of AMC-ACE-Z encoding differs from 'zq--'. */
#undef MDN_AMCACEZ_PREFIX
/* Define if the prefix of MACE encoding differs from 'mq--'. */
#undef MDN_MACE_PREFIX
/* Define if you have the dl library (-ldl). */
#undef HAVE_LIBDL
/* Define as the type of the 1st argument of gethostbyaddr. */
#undef GHBA_ADDR_T
/* Define as the type of the 2nd argument of gethostbyaddr. */
#undef GHBA_ADDRLEN_T
/* Define as the type of the 2nd argument of getnameinfo. */
#undef GNI_SALEN_T
/* Define as the type of the 4th argument of getnameinfo. */
#undef GNI_HOSTLEN_T
/* Define as the type of the 6th argument of getnameinfo. */
#undef GNI_SERVLEN_T
/* Define as the type of the 7th argument of getnameinfo. */
#undef GNI_FLAGS_T
/* Define if the prototype of gethost*_r is glibc flavor. */
#undef GETHOST_R_GLIBC_FLAVOR
/* Define as the pathname of the shared libc object if your system has one. */
#undef SOPATH_LIBC
/* Define as the pathname of the shared libnsl object if your system has one. */
#undef SOPATH_LIBNSL

View file

@ -1,85 +0,0 @@
/* $Id: config.h.win,v 1.1 2002/01/02 02:46:26 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
/* Define if you have the setvbuf function. */
#undef HAVE_SETVBUF
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the nl_langinfo function. */
#undef HAVE_NL_LANGINFO
/* Define if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if your iconv() does not accept "UTF-8" as the codeset name for utf-8. */
#undef MDN_UTF8_ENCODING_NAME
/* Define if you want ZLD feature compiled in. */
#undef MDN_SUPPORT_ZLD

View file

@ -1,129 +0,0 @@
# $Id: Makefile.in,v 1.1 2002/01/02 02:46:26 marka Exp $
# Copyright (c) 2000 Japan Network Information Center. All rights reserved.
#
# By using this file, you agree to the terms and conditions set forth bellow.
#
# LICENSE TERMS AND CONDITIONS
#
# The following License Terms and Conditions apply, unless a different
# license is obtained from Japan Network Information Center ("JPNIC"),
# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
# Chiyoda-ku, Tokyo 101-0047, Japan.
#
# 1. Use, Modification and Redistribution (including distribution of any
# modified or derived work) in source and/or binary forms is permitted
# under this License Terms and Conditions.
#
# 2. Redistribution of source code must retain the copyright notices as they
# appear in each source code file, this License Terms and Conditions.
#
# 3. Redistribution in binary form must reproduce the Copyright Notice,
# this License Terms and Conditions, in the documentation and/or other
# materials provided with the distribution. For the purposes of binary
# distribution the "Copyright Notice" refers to the following language:
# "Copyright (c) Japan Network Information Center. All rights reserved."
#
# 4. Neither the name of JPNIC may be used to endorse or promote products
# derived from this Software without specific prior written approval of
# JPNIC.
#
# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#
# 6. Indemnification by Licensee
# Any person or entities using and/or redistributing this Software under
# this License Terms and Conditions shall defend indemnify and hold
# harmless JPNIC from and against any and all judgements damages,
# expenses, settlement liabilities, cost and other liabilities of any
# kind as a result of use and redistribution of this Software or any
# claim, suite, action, litigation or proceeding by any third party
# arising out of or relates to this License Terms and Conditions.
#
# 7. Governing Law, Jurisdiction and Venue
# This License Terms and Conditions shall be governed by and and
# construed in accordance with the law of Japan. Any person or entities
# using and/or redistributing this Software under this License Terms and
# Conditions hereby agrees and consent to the personal and exclusive
# jurisdiction and venue of Tokyo District Court of Japan.
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
mdnincludedir = $(includedir)/mdn
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @top_srcdir@/mkinstalldirs
SHELL = @SHELL@
HDRS = \
ace.h \
altdude.h \
amcacem.h \
amcaceo.h \
amcacer.h \
amcacev.h \
amcacew.h \
amcacez.h \
api.h \
assert.h \
brace.h \
checker.h \
converter.h \
debug.h \
delimitermap.h \
dude.h \
dn.h \
filechecker.h \
filemapper.h \
lace.h \
localencoding.h \
log.h \
logmacro.h \
mace.h \
mapper.h \
mapselector.h \
msgheader.h \
msgtrans.h \
nameprep.h \
normalizer.h \
race.h \
res.h \
resconf.h \
result.h \
selectiveencode.h \
strhash.h \
ucsmap.h \
ucsset.h \
unicode.h \
unormalize.h \
utf5.h \
utf6.h \
utf8.h \
util.h \
version.h
all:
install:
$(MKINSTALLDIRS) $(mdnincludedir)
for hdr in $(HDRS); \
do $(INSTALL_DATA) $(srcdir)/$$hdr $(mdnincludedir); done
clean:
rm -f *~

View file

@ -1,130 +0,0 @@
/* $Id: ace.h,v 1.2 2002/02/08 05:38:53 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_ACE_H
#define MDN_ACE_H 1
/*
* ACE converter utility module.
*/
#include <mdn/result.h>
/*
* ACE identifier type -- prefix or suffix.
*/
enum {
mdn__ace_prefix,
mdn__ace_suffix
};
/*
* ACE encoding/decode procedure.
*
* This prototype applies to both encode and decode procedure. Both
* of which converts a domain label (i.e. contains no dots) pointed by
* 'from', whose length is 'fromlen', and stores the result to 'to',
* whose size is 'tolen'.
* the ACE string must not have ACE prefix/suffix, as it is automatically
* handled by 'mdn__ace_convert'.
*/
typedef mdn_result_t (*mdn__ace_proc_t)(const char *from, size_t fromlen,
char *to, size_t tolen);
/*
* ACE converter property.
*
* 'id_type' shows the type of ACE identifier, which is either
* 'mdn__ace_prefix' or 'mdn__ace_suffix'. 'id_str' is the ACE
* identifier itself. 'encoder' and 'decode' are pointers to the
* encode and decode procedures.
* Encode procedure converts a domain name label in UTF-8 to
* ACE-encoded one, and decode procedure converts ACE-encoded label to
* UTF-8 encoded one.
*/
typedef struct {
int id_type; /* mdn__ace_prefix/mdn__ace_suffix */
const char *id_str; /* prefix/suffix string */
mdn__ace_proc_t encoder; /* encode procedure */
mdn__ace_proc_t decoder; /* decode procedure */
} mdn__ace_t;
/*
* Utility for ACE converter.
*
* Convert a domain name given by 'from' and stores the result to
* 'to', whose length is 'tolen'. If 'dir' is 'mdn_convert_u2l',
* 'from' points UTF-8 string which is converted to ACE encoding. If
* 'dir' is 'mdn_convert_l2u', 'from' points ACE string which is
* converted to UTF-8.
* This function first breaks down the given name into labels,
* and encode/decode each label. When encoding, conversion of
* STD13 conforming labels (i.e. valid ASCII labels) is skipped.
* When decoding, if the decoding failed but the label is a legitimate
* ASCII label, those labels are copied verbatim. To reject illegally
* encoded labels, the decoding process performs two kinds of checks:
* 1. check that the decoded string does NOT comform to STD13.
* 2. try encoding the decoded string, and see if the result matches
* to the original string.
*/
extern mdn_result_t
mdn__ace_convert(mdn__ace_t *ctx, mdn_converter_dir_t dir,
const char *from, char *to, size_t tolen);
#endif /* MDN_ACE_H */

View file

@ -1,88 +0,0 @@
/* $Id: altdude.h,v 1.2 2002/02/08 05:38:55 marka Exp $ */
/*
* Copyright (c) 2000,2001 Japan Network Information Center.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_ALTDUDE_H
#define MDN_ALTDUDE_H 1
/*
* AltDUDE Converter.
*
* See Internet Draft draft-ietf-idn-altdude-00.txt for details. Note
* that this implementation does not support "case preservation"
* option.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__altdude_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__altdude_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__altdude_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir,
const char *from, char *to, size_t tolen);
#endif /* MDN_ALTDUDE_H */

View file

@ -1,85 +0,0 @@
/* $Id: amcacem.h,v 1.2 2002/02/08 05:38:56 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_AMCACEM_H
#define MDN_AMCACEM_H 1
/*
* AMC-ACE-M Converter.
*
* See Internet Draft draft-ietf-idn-amc-ace-m-00.txt for details.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__amcacem_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__amcacem_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__amcacem_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_AMCACEM_H */

View file

@ -1,85 +0,0 @@
/* $Id: amcaceo.h,v 1.2 2002/02/08 05:38:57 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_AMCACEO_H
#define MDN_AMCACEO_H 1
/*
* AMC-ACE-O Converter.
*
* See Internet Draft draft-ietf-idn-amc-ace-o-00.txt for details.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__amcaceo_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__amcaceo_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__amcaceo_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_AMCACEO_H */

View file

@ -1,86 +0,0 @@
/* $Id: amcacer.h,v 1.2 2002/02/08 05:38:58 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_AMCACER_H
#define MDN_AMCACER_H 1
/*
* AMC-ACE-R Converter.
*
* See Internet Draft draft-ietf-idn-amc-ace-r-01.txt for details.
* Note that -01 has some imcompatible changes over -00 spec.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__amcacer_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__amcacer_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__amcacer_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_AMCACER_H */

View file

@ -1,85 +0,0 @@
/* $Id: amcacev.h,v 1.1 2002/02/08 05:38:59 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_AMCACEV_H
#define MDN_AMCACEV_H 1
/*
* AMC-ACE-V Converter.
*
* See Internet Draft draft-ietf-idn-amc-ace-v-00.txt for details.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__amcacev_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__amcacev_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__amcacev_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_AMCACEV_H */

View file

@ -1,85 +0,0 @@
/* $Id: amcacew.h,v 1.1 2002/02/08 05:39:00 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_AMCACEW_H
#define MDN_AMCACEW_H 1
/*
* AMC-ACE-W Converter.
*
* See Internet Draft draft-ietf-idn-amc-ace-w-00.txt for details.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__amcacew_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__amcacew_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__amcacew_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_AMCACEW_H */

View file

@ -1,86 +0,0 @@
/* $Id: amcacez.h,v 1.1 2002/02/08 05:39:00 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_AMCACEZ_H
#define MDN_AMCACEZ_H 1
/*
* AMC-ACE-Z (version 0.3.1) Converter.
*
* See Internet Draft draft-ietf-idn-amc-ace-z-01.txt
* for details.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__amcacez_open(mdn_converter_t ctx, mdn_converter_dir_t dir,
void **privdata);
extern mdn_result_t
mdn__amcacez_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__amcacez_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_AMCACEZ_H */

View file

@ -1,229 +0,0 @@
/* $Id: api.h,v 1.2 2002/02/08 05:39:00 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_API_H
#define MDN_API_H 1
#include <mdn/result.h>
/*
* Application Programming Interface for Multilingual Domain Name Handling.
* This module provides high-level APIs for ordinary applications.
* Low-level APIs are also available. See "res.h" for details.
*/
/*
* Actions
*/
#define MDN_LOCALCONV 0x0001 /* Local encoding <-> UTF-8 conversion */
#define MDN_IDNCONV 0x0002 /* UTF-8 <-> IDN encoding (ACE) conversion */
#define MDN_NAMEPREP 0x0004 /* NAMEPREP */
#define MDN_UNASCHECK 0x0008 /* Unassigned code point check */
#define MDN_DELIMMAP 0x0100 /* Delimiter mapping */
#define MDN_LOCALMAP 0x0200 /* Local mapping */
/*
* Actions needed for ordinary applications.
*/
#define MDN_ENCODE_APP \
(MDN_LOCALCONV|MDN_DELIMMAP|MDN_LOCALMAP|MDN_NAMEPREP|MDN_IDNCONV)
#define MDN_DECODE_APP (MDN_IDNCONV|MDN_NAMEPREP|MDN_LOCALCONV)
/*
* Initialize the whole library, and load configuration from the default
* configuration file (mdn.conf).
*
* Initialization of the library will be done only once when this function
* is called first, while loading of the configuration file will be done
* every time it is called.
*
* If 'mdn_encodename' or 'mdn_decodename' is called without calling this
* function, implicit initialization will be done prior to encoding/decoding
* process.
*
* Returns:
* mdn_success -- ok.
* mdn_nofile -- cannot open the configuration file.
* mdn_invalid_syntax -- syntax error found in the file.
* mdn_invalid_name -- there are invalid names (encoding,
* normalization etc.).
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_nameinit(void);
/*
* Encode multilingual domain name for name resolution.
*
* The encoding process consists of the following 5 steps.
*
* 1. local encoding (such as Shift-JIS or Big5) to UTF-8 conversion.
* 2. delimiter mapping, which maps certain characters to period
* (U+002E, FULL STOP) character.
* 3. non-standard local mapping, whose exact rule is determined by
* the TLD of the domain name to be encoded. This allows
* locale-specific mapping for each ccTLD.
* 4. NAMEPREP, as described in the Internet Draft
* (draft-ietf-idn-nameprep-XX). This step has an option of
* prohibiting use of unassigned code points in the domain name.
* 5. UTF-8 to IDN encoding (ACE) conversion.
*
* Some steps can be skipped according to the application's needs.
* For example, if the application holds the multilingual domain names in
* UTF-8, step 1 above won't be necessary.
*
* 'actions' specifies what actions to take when encoding, and is
* a bitwise-or of the following flags:
*
* MDN_LOCALCONV -- perform local encoding to UTF-8 conversion (step 1)
* MDN_DELIMMAP -- perform delimiter mapping (step 2)
* MDN_LOCALMAP -- perform local mapping (step 3)
* MDN_NAMEPREP -- perform NAMEPREP (step 4)
* MDN_UNASCHECK -- perform optional unassigned codepoint check
* (also step 4)
* MDN_IDNCONV -- perform UTF-8 to IDN encoding conversion (step 5)
*
* Note that if no flags are specified, 'mdn_encodename' does nothing
* fancy, just copies the given name verbatim.
*
* Returns:
* mdn_success -- ok.
* mdn_invalid_action -- invalid action flag specified.
* mdn_invalid_encoding -- the given string has invalid/illegal
* byte sequence.
* mdn_prohibited -- prohibited/unassigned code point found.
* mdn_buffer_overflow -- 'tolen' is too small.
* mdn_nomemory -- malloc failed.
*
* Also, if this function is called without calling 'mdn_nameinit',
* the following error codes might be returned.
* mdn_nofile -- cannot open the configuration file.
* mdn_invalid_syntax -- syntax error found in the file.
* mdn_invalid_name -- there are invalid names (encoding,
* normalization etc.).
*/
extern mdn_result_t
mdn_encodename(int actions, const char *from, char *to, size_t tolen);
/*
* Decode multilingual domain name returned from resolver.
*
* The decoding process consists of the following 2 steps. It is much
* simpler than the encoding process because no name preparation is
* necessary.
*
* 1. server encoding (ACE) to UTF-8 conversion.
* 2. UTF-8 to local encoding conversion.
*
* 'actions' specifies what actions to take when decoding, and is
* a bitwise-or of the following flags:
*
* MDN_IDNCONV -- perform IDN encoding to UTF-8 conversion (step 1)
* MDN_NAMEPREP -- perform NAMEPREP for verification (step 2)
* MDN_UNASCHECK -- perform optional unassigned codepoint check for
* verification (also step 2)
* MDN_LOCALCONV -- perform UTF-8 to local encoding conversion (step 3)
*
* Note that if no flags are specified, 'mdn_decodename' does nothing
* but copying the given name verbatim.
*
* Returns:
* mdn_success -- ok.
* mdn_invalid_action -- invalid action flag specified.
* mdn_invalid_encoding -- the given string has invalid/illegal
* byte sequence.
* mdn_buffer_overflow -- 'tolen' is too small.
* mdn_nomemory -- malloc failed.
*
* Also, if this function is called without calling 'mdn_nameinit',
* the following error codes might be returned.
* mdn_nofile -- cannot open the configuration file.
* mdn_invalid_syntax -- syntax error found in the file.
* mdn_invalid_name -- there are invalid names (encoding,
* normalization etc.).
*/
extern mdn_result_t
mdn_decodename(int actions, const char *from, char *to, size_t tolen);
/*
* For convenience.
*/
#define mdn_localtoutf8(from, to, tolen) \
mdn_encodename(MDN_LOCALCONV, from, to, len)
#define mdn_delimitermap(from, to, tolen) \
mdn_encodename(MDN_DELIMMAP, from, to, len)
#define mdn_localmap(from, to, tolen) \
mdn_encodename(MDN_LOCALMAP, from, to, len)
#define mdn_nameprep(from, to, tolen) \
mdn_encodename(MDN_NAMEPREP, from, to, len)
#define mdn_utf8toidn(from, to, tolen) \
mdn_encodename(MDN_IDNCONV, from, to, len)
#define mdn_idntoutf8(from, to, tolen) \
mdn_decodename(MDN_IDNCONV, from, to, tolen)
#define mdn_utf8tolocal(from, to, tolen) \
mdn_decodename(MDN_LOCALCONV, from, to, tolen)
#define mdn_nameprepcheck(from, to, tolen) \
mdn_decodename(MDN_NAMEPREP, from, to, tolen)
#define mdn_localtoidn(from, to, tolen) \
mdn_encodename(MDN_ENCODE_APP, from, to, tolen)
#define mdn_idntolocal(from, to, tolen) \
mdn_decodename(MDN_DECODE_APP, from, to, tolen)
#endif /* MDN_API_H */

View file

@ -1,69 +0,0 @@
/* $Id: assert.h,v 1.1 2002/01/02 02:46:29 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_ASSERT_H
#define MDN_ASSERT_H 1
#ifndef DEBUG
#define NDEBUG
#endif
#include <assert.h>
# endif /* MDN_ASSERT_H */

View file

@ -1,84 +0,0 @@
/* $Id: brace.h,v 1.1 2002/01/02 02:46:29 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_BRACE_H
#define MDN_BRACE_H 1
/*
* BRACE Converter.
*
* See Internet Draft draft-ietf-idn-brace-00.txt for details.
*/
#include <mdn/result.h>
#include <mdn/converter.h>
extern mdn_result_t
mdn__brace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata);
extern mdn_result_t
mdn__brace_close(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir);
extern mdn_result_t
mdn__brace_convert(mdn_converter_t ctx, void *privdata,
mdn_converter_dir_t dir, const char *from, char *to,
size_t tolen);
#endif /* MDN_BRACE_H */

View file

@ -1,178 +0,0 @@
/* $Id: checker.h,v 1.2 2002/02/08 05:39:04 marka Exp $ */
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_CHECKER_H
#define MDN_CHECKER_H 1
/*
* Character Checker.
*
* Perfom checking characters in the specified domain name.
*/
#include <mdn/result.h>
#include <mdn/filechecker.h>
#include <mdn/nameprep.h>
/*
* Schems name prefixes for the standard nameprep prohibit/unassigned
* checks.
*
* If you'd like to add the unassigned check scheme of "nameprep-XX"
* to a checker context, MDN_CHECKER_UNASSIGNED_PREFIX + "nameprep-XX"
* (i.e. "unassigned#nameprep-XX") is the scheme name passed to
* mdn_checker_add().
*/
#define MDN_CHECKER_PROHIBIT_PREFIX "prohibit#"
#define MDN_CHECKER_UNASSIGNED_PREFIX "unassigned#"
/*
* Checker object type.
*/
typedef struct mdn_checker *mdn_checker_t;
/*
* Initialize module. Must be called before any other calls of
* the functions of this module.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_checker_initialize(void);
/*
* Create a checker context.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_checker_create(mdn_checker_t *ctxp);
/*
* Decrement reference count of the checker `ctx' created by
* 'mdn_checker_create', if it is still refered by another object.
* Otherwise, release all the memory allocated to the checker.
*/
extern void
mdn_checker_destroy(mdn_checker_t ctx);
/*
* Increment reference count of the checker `ctx' created by
* 'mdn_checker_create'.
*/
extern void
mdn_checker_incrref(mdn_checker_t ctx);
/*
* Add checking scheme `name' to the checker to `ctx'.
*
* Returns:
* mdn_success -- ok.
* mdn_invalid_name -- the given name is not valid.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_checker_add(mdn_checker_t ctx, const char *name);
extern mdn_result_t
mdn_checker_addall(mdn_checker_t ctx, const char **names, int nnames);
/*
* Check an UTF-8 name. All checking schemes regsitered in `ctx'
* are applied in the regisration order.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
* mdn_buffer_overflow -- output buffer is too small.
* mdn_invalid_encoding -- the input string has invalid/illegal
* UTF-8 sequence.
*/
extern mdn_result_t
mdn_checker_lookup(mdn_checker_t ctx, const char *utf8, const char **found);
/*
* Checking procedure type.
*/
typedef mdn_result_t (*mdn_checker_createproc_t)(const char *parameter,
void **ctxp);
typedef void (*mdn_checker_destroyproc_t)(void *ctx);
typedef mdn_result_t (*mdn_checker_lookupproc_t)(void *ctx, const char *utf8,
const char **found);
/*
* Register a new checking scheme.
*
* You can override the default normalization schemes, if you want.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_checker_register(const char *prefix,
mdn_checker_createproc_t create,
mdn_checker_destroyproc_t destroy,
mdn_checker_lookupproc_t lookup);
#endif /* MDN_CHECKER_H */

View file

@ -1,262 +0,0 @@
/* $Id: converter.h,v 1.1 2002/01/02 02:46:30 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_CONVERTER_H
#define MDN_CONVERTER_H 1
/*
* Codeset converter.
*
* This module provides conversions from some local codeset to UTF-8
* and vice versa.
*/
#include <mdn/result.h>
/*
* Converter context type (opaque).
*/
typedef struct mdn_converter *mdn_converter_t;
/*
* Conversion direction (local codeset -> UTF-8 or the opposite)
*/
typedef enum {
mdn_converter_l2u, /* local-to-utf8 */
mdn_converter_u2l /* utf8-to-local */
} mdn_converter_dir_t;
/*
* Conversion flags.
*/
#define MDN_CONVERTER_DELAYEDOPEN 1
#define MDN_CONVERTER_RTCHECK 2
/*
* Encoding types.
*/
#define MDN_NONACE 0
#define MDN_ACE_STRICTCASE 1
#define MDN_ACE_LOOSECASE 2
/*
* Initialize module. Must be called before any other calls of
* the functions of this module.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_converter_initialize(void);
/*
* Create a conversion context.
*
* Returns:
* mdn_success -- ok.
* mdn_invalid_name -- specified codeset is not supported.
* mdn_nomemory -- malloc failed.
* mdn_failure -- other failure (unknown cause).
*/
extern mdn_result_t
mdn_converter_create(const char *name, mdn_converter_t *ctxp,
int flags);
/*
* Decrement reference count of the converter `ctx' created by
* 'mdn_converter_create', if it is still refered by another object.
* Otherwise, release all the memory allocated to the converter.
*/
extern void
mdn_converter_destroy(mdn_converter_t ctx);
/*
* Increment reference count of the converter `ctx' created by
* 'mdn_converter_create'.
*/
extern void
mdn_converter_incrref(mdn_converter_t ctx);
/*
* Convert between local codeset and UTF-8. Note that each conversion
* is started with initial state.
*
* Returns:
* mdn_success -- ok.
* mdn_buffer_overflow -- output buffer is too small.
* mdn_invalid_encoding -- the input string has invalid/illegal
* byte sequence.
* mdn_invalid_name -- codeset is not supported (this error
* should happen only if 'delayedopen'
* flag was set when mdn_converter_create
* was called)
* mdn_failure -- other failure.
*/
extern mdn_result_t
mdn_converter_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
const char *from, char *to, size_t tolen);
/*
* Macros for convenience.
*/
#define mdn_converter_localtoutf8(ctx, from, to, tolen) \
mdn_converter_convert((ctx), mdn_converter_l2u, (from), (to), (tolen))
#define mdn_converter_utf8tolocal(ctx, from, to, tolen) \
mdn_converter_convert((ctx), mdn_converter_u2l, (from), (to), (tolen))
/*
* Get the name of local codeset. The returned name may be different from
* the one specified to mdn_converter_create, if the specified one was an
* alias.
*
* Returns:
* the local codeset name.
*/
extern char *
mdn_converter_localencoding(mdn_converter_t ctx);
/*
* Return the encoding type of this local encoding.
*
* Returns:
* MDN_NOACE -- encoding is not ACE.
* MDN_ACE_STRICTCASE -- encoding is ACE.
* decoder of this ACE preserve letter case.
* MDN_ACE_LOOSECASE -- encoding type is ACE.
* decoder cannot preserve letter case.
*/
extern int
mdn_converter_encodingtype(mdn_converter_t ctx);
/*
* Return if this local encoding is ACE (Ascii Compatible Encoding).
*
* Returns:
* 1 -- yes, it is ACE.
* 0 -- no.
*/
extern int
mdn_converter_isasciicompatible(mdn_converter_t ctx);
/*
* Register an alias for a codeset name.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_converter_addalias(const char *alias_name, const char *real_name);
/*
* Register aliases defined by the specified file.
*
* Returns:
* mdn_success -- ok.
* mdn_nofile -- no such file.
* mdn_invalid_syntax -- file is malformed.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_converter_aliasfile(const char *path);
/*
* Unregister all the aliases.
*/
extern mdn_result_t
mdn_converter_resetalias(void);
/*
* New converter registration.
*/
/*
* Conversion operation functions.
*/
typedef mdn_result_t (*mdn_converter_openproc_t)(mdn_converter_t ctx,
mdn_converter_dir_t dir,
void **privdata);
typedef mdn_result_t (*mdn_converter_closeproc_t)(mdn_converter_t ctx,
void *privdata,
mdn_converter_dir_t dir);
typedef mdn_result_t (*mdn_converter_convertproc_t)(mdn_converter_t ctx,
void *privdata,
mdn_converter_dir_t dir,
const char *from,
char *to, size_t tolen);
/*
* Register a new converter.
* 'encoding_type' is a value which mdn_converter_encodingtype() returns.
*
* Returns:
* mdn_success -- ok.
* mdn_nomemory -- malloc failed.
*/
extern mdn_result_t
mdn_converter_register(const char *name,
mdn_converter_openproc_t open,
mdn_converter_closeproc_t close,
mdn_converter_convertproc_t convert,
int encoding_type);
#endif /* MDN_CONVERTER_H */

View file

@ -1,72 +0,0 @@
/* $Id: debug.h,v 1.1 2002/01/02 02:46:30 marka Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* modified or derived work) in source and/or binary forms is permitted
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* this License Terms and Conditions, in the documentation and/or other
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) Japan Network Information Center. All rights reserved."
*
* 4. Neither the name of JPNIC may be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* 6. Indemnification by Licensee
* Any person or entities using and/or redistributing this Software under
* this License Terms and Conditions shall defend indemnify and hold
* harmless JPNIC from and against any and all judgements damages,
* expenses, settlement liabilities, cost and other liabilities of any
* kind as a result of use and redistribution of this Software or any
* claim, suite, action, litigation or proceeding by any third party
* arising out of or relates to this License Terms and Conditions.
*
* 7. Governing Law, Jurisdiction and Venue
* This License Terms and Conditions shall be governed by and and
* construed in accordance with the law of Japan. Any person or entities
* using and/or redistributing this Software under this License Terms and
* Conditions hereby agrees and consent to the personal and exclusive
* jurisdiction and venue of Tokyo District Court of Japan.
*/
#ifndef MDN_DEBUG_H
#define MDN_DEBUG_H 1
/*
* Debug utility
*/
extern char *mdn_debug_hexstring(const char *s, int maxbytes);
extern char *mdn_debug_xstring(const char *s, int maxbytes);
extern char *mdn_debug_hexdata(const char *s, int length, int maxlength);
extern void mdn_debug_hexdump(const char *s, int length);
#endif /* MDN_DEBUG_H */

Some files were not shown because too many files have changed in this diff Show more