mDNkit Resolver Configuration
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.
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.
The local encoding used by the application is acquired from the locale information of the application.
Configuration File
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.
The directory, /usr/local/etc, can be changed using option when setting up the mDNkit./usr/local/etc/mdnres.conf
When mDNkit is installed, a sample file of this file is installed (when the default setting is used).
This sample file contains the setting items and their descriptions. Use this information as reference in generating the configuration file./usr/local/etc/mdnres.conf.sample
Configuration Data
The configuration file is a text file, and specifies the following configuration data.
- server-encoding
-
Specifies the encoding used by a DNS protocol.
server-encoding encoding
encoding specifies the encoding name.- [Setting example]
-
server-encoding RACE server-encoding UTF-8
- server-zld
-
Specifies ZLD. ZLD, which is short for Zero Level Domain, is required when UTF-5 or other special encoding is used in the server-encoding. Refer to ZLD Settings in DNS Server Setup 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 --enable-zldin the Install for instructions on how to compile mDNkit so that ZLD can be used.
server-zld ZLD
ZLD is used to specify ZLD.- [Setting example]
-
server-zld zld.to.be.used
- normalize
-
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.
normalize scheme...
scheme specifies the normalization scheme to be used.The normalization schemes listed below can be specified.
ascii-lowercase Normalizes upper case ASCII as lower case ascii-uppercase Normalizes lower case ASCII as upper case unicode-lowercase Normalizes Unicode upper case as lower case unicode-uppercase Normalizes Unicode lower case as upper case unicode-form-c Unicode normalization form C unicode-form-kc Unicode normalization form KC ja-kana-fullwidth Normalizes half-width kana as full-width kana ja-alnum-halfwidth Normalizes full-width alphanumerics and minus symbol as half-width characters ja-compose-voiced-sound Normalizes full-width hiragana, katakana with voicing and aspirating signs as one character. ja-minus-hack Normalizes full-width minus symbol as a hyphen ('-'). ja-delimiter-hack Normalizes full-width periods and punctuation marks as half-width period ('.'). - [Setting example]
-
normalize unicode-lowercase unicode-form-kc
- alternate-encoding
-
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.
alternate-encoding encoding
Enter the name of the alternate encoding in encoding.The alternate encoding must be an ASCII-compatible encoding.
- [Setting example]
-
alternate-encoding RACE
- alias-file
-
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.
alias-file path
Enter the definition file path in path.- [Setting example]
-
alias-file /some/where/mdnalias.txt
<alias> <original name>
Local Encoding
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.
However, the following cases cannot be automatically sensed.
- When an application that does not use the setlocate function is executed
- When an application is executed as a C locale
- When the relationship between locale and enconding is not known
Specify the MDN_LOCAL_CODESET environment variable to set local encoding. For example, to set local encoding to EUC-JP, make the following setting beforehand.
- [Setting example]
- sh(Shell) Series.
$ MDN_LOCAL_CODESET=EUC-JP $ export MDN_LOCAL_CODESET- csh(C-Shell) Series.
% setenv MDN_LOCAL_CODESET EUC-JP
The value to be specified is a local encoding name that must be specified using a name that is accepted by the iconv() function in the system (or more precisely iconv_open()). This name differs with the iconv implementation, refer to the iconv document for details.
If you only use a single type of local encoding, it is recommended that you save this setting in .profile or .cshrc.