summaryrefslogtreecommitdiff
path: root/contrib/idn/mdnkit/man/mdn.conf.5.in
blob: bb0c9fd2443cc75210bd6e80037419fe3d992aff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
.\" $Id: mdn.conf.5.in,v 1.1 2001/06/09 00:30:33 tale 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, 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.
.\"
.TH mdn.conf 5 "Mar 1, 2001"
.\"
.SH NAME
mdn.conf \- configuration file for internationalized domain name handling
.\"
.SH SYNOPSIS
@sysconfdir@/mdn.conf
.\"
.SH DESCRIPTION
.B mdn.conf
is a configuration file for mDNkit,
which is a toolkit for handling internationalized/multilingualized
domain names.
.PP
To use internationalized domain names in DNS or other protocols, they
must be converted to an appropriate format before further processing.
In mDNkit, this conversion process is comprised of the following tasks.
.IP 1. 3
Convert the given domain name in application's local codeset to Unicode,
and vice versa.
.IP 2. 3
Map certain characters in the name to period character so that they are
treated as the domain name
delimiter (\fIdelimiter mapping\fR).
.IP 3. 3
Map certain characters in the name to other characters or chracter sequences,
according to a mapping rule determined by its top level domain (TLD).
.IP 4. 3
Perform NAMEPREP, which is a starndard name preparation process for
internationalized domain names.  This process is composed of
the tree steps called mapping, normalization and prohibited character
checking.
.IP 5. 3
Convert the nameprepped name to IDN encoding, which is the standard encoding
for internationalized domain names (also known as ASCII-compatible encoding,
ACE), and vice versa.
.PP
.B mdn.conf
specifies the parameters for these tasks, such as:
.RS 2
.IP \- 2
the encoding of internationalized domain names (IDN encoding).
.IP \- 2
NAMEPREP schemes.
.IP \- 2
the alternative encoding which is used in case the domain name in
the IDN encoding cannot be convertible to the local encoding.
.RE
.\"
.SH SYNTAX
.B mdn.conf
is a simple text file, and each line in the file
(other than comment lines, which begin with ``#'', and empty lines)
forms an entry of the following format:
.PP
.RS 4
.nf
\fIkeyword\fP\ \fIvalue..\fP
.fi
.RE
\."
.SH "IDN-ENCODING ENTRY"
IDN encoding entry specifies the encoding name (codeset name) which
is used as the encoding of multilingualized domain names by resolvers and DNS
servers.
.PP
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWidn-encoding \fP\fIencoding\fP
.fi
.RE
.PP
\fIencoding\fP is the encoding name to be used, and any of the following
names can be specified.
.RS 2
.IP "\(bu" 2
``RACE''
.IP "\(bu" 2
``BRACE''
.IP "\(bu" 2
``LACE''
.IP "\(bu" 2
``DUDE''
.IP "\(bu" 2
``UTF-6''
.IP "\(bu" 2
``AltDUDE''
.IP "\(bu" 2
``AMC-ACE-M''
.IP "\(bu" 2
``AMC-ACE-O''
.IP "\(bu" 2
``AMC-ACE-R''
.IP "\(bu" 2
``UTF-8''
.IP "\(bu" 2
Codeset names which iconv_open() library function accepts.  Please
consult iconv() documentation for the available codesets.
.IP "\(bu" 2
Any alias names for the above, defined by the alias file.
(See section ``ENCODING-ALIAS-FILE ENTRY'')
.RE
.PP
The standard encoding is being discussed by IETF IDN working group.
.\"
.SH "NAMEPREP ENTRY"
Nameprep entry specifies the version of NAMEPREP, which is a specification
of ``canonicalization'' process of multilingual domain name before
it is converted to the IDN encoding.
It is also being discussed by IETF IDN working group.
.PP
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWnameprep \fP\fIversion\fP
.fi
.RE
.PP
.I version
is the version name of NAMEPREP specification, and currently
the following 
.IR version s
can be specified.
.RS 2
.IP "\(bu" 2
``nameprep-02''
.br
This version refers to Internet Draft ``draft-ietf-idn-nameprep-02.txt''.
.IP "\(bu" 2
``nameprep-03''
.br
This version refers to Internet Draft ``draft-ietf-idn-nameprep-03.txt''.
.RE
.PP
The NAMEPREP process consists of the following 3 subprocesses.
.IP 1. 3
mapping, which maps certain characters in a name to other characters,
possibly none.
.IP 2. 3
normalization, which replaces character variants in a name to
a unique one.
.IP 3. 3
prohibited/unassigned character checking, which detects invalid
characters in a name.
.PP
This entry is a shorthand for specifying all of them at once.
Actually,
.PP
.RS 4
\f(CWnameprep \fP\fIversion\fP
.RE
.PP
has the same effect of specifying following 4 entries.
.PP
.RS 4
.nf
\f(CWnameprep-map \fP\fIversion\fP
\f(CWnameprep-normalize \fP\fIversion\fP
\f(CWnameprep-prohibit \fP\fIversion\fP
\f(CWnameprep-unassigned \fP\fIversion\fP
.fi
.RE
.PP
If both this entry and more-specific entries above are specified,
more-specific ones take precedence.
.\"
.SH "NAMEPREP-MAP ENTRY"
Mapping entry specifies the mapping scheme of NAMEPREP process.
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWnameprep-map \fP\fIscheme\fP [\fIscheme\fP..]
.fi
.RE
.PP
.I scheme
specifies the mapping scheme, and currently available schemes are:
.RS 2
.TP 4
\f(CWnameprep-02\fP
Specify mapping defined by NAMEPREP-02 draft.
.TP 4
\f(CWnameprep-03\fP
Specify mapping defined by NAMEPREP-03 draft.
.TP 4
\f(CWfilemap:\fP\fIpathname\fP
Specify mapping defined by the file \fIpathname\fP.
See ``MAPFILE FORMAT'' for the format of this file.
.RE
.PP
More than one \fIscheme\fP can be specified.
If multiple schemes are specified, they are applied in turn.
.\"
.SH "NAMEPREP-NORMALIZE ENTRY"
Normalization entry specifies the normalization schemes which should be
applied to the domain names before sending them to name servers.
.\"
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWnameprep-normalize \fP\fIscheme\fP [\fIscheme\fP..]
.fi
.RE
.PP
.I scheme
is the normalization scheme, and following shows the currently available
schemes:
.RS 2
.TP 4
\f(CWnameprep-02\fP
Synonim for \f(CWunicode-form-kc\fR.
.TP 4
\f(CWnameprep-03\fP
Synonim for \f(CWunicode-form-kc\fR.
.TP 4
\f(CWascii-lowercase\fP
Convert ASCII uppercase letters to lowercase.
.TP 4
\f(CWascii-uppercase\fP
Convert ASCII lowercase letters to uppercase.
.TP 4
\f(CWunicode-lowercase\fP
Convert Unicode uppercase letters to lowercase, based on ``Unicode
Technical Report #21: Case Mappings''.
Note that only locale-independent conversion is supported.
.TP 4
\f(CWunicode-uppercase\fP
Convert Unicode lowercase letters to uppercase, based on ``Unicode
Technical Report #21: Case Mappings''.
Note that only locale-independent conversion is supported.
.TP 4
\f(CWunicode-foldcase\fP
Perform Unicode case-folding for case-less string matching,
which is also defined by ``Unicode Technical Report #21: Case Mappings''.
.TP 4
\f(CWunicode-form-c\fP
Perform Unicode normalization called ``Unicode Normalization Form C''.
.TP 4
\f(CWunicode-form-kc\fP
Perform Unicode normalization called ``Unicode Normalization Form KC''.
.RE
.PP
More than one
.IR scheme s
can be specified.
If multiple schemes are specified, they are applied in turn.
.\"
.SH "NAMEPREP-PROHIBIT ENTRY"
Prohibit entry specifies the prohibited characters in the NAMEPREP
process. The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWnameprep-prohibit \fP\fIset\fP [\fIset\fP..]
.fi
.RE
.PP
.I set
specifies the set of prohibited characters.  Currently following sets
can be specified.
.RS 2
.TP 4
\f(CWnameprep-02\fP
Specify set of prohibited characters defined by NAMEPREP-02 draft.
.TP 4
\f(CWnameprep-03\fP
Specify set of prohibited characters defined by NAMEPREP-03 draft.
.TP 4
\f(CWfileset:\fP\fIpathname\fP
Specify set of prohibited characters defined by the file \fIpathname\fP.
See ``SETFILE FORMAT '' for the format of this file.
.RE
.PP
When more than one 
.IR set s
are specified, a character is considered prohibited if it belongs to
any of those sets.
.\"
.SH "NAMEPREP-UNASSIGNED ENTRY"
Unassigned entry specifies the unassigned codepoints in the NAMEPREP
process. The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWnameprep-unassigned \fP\fIset\fP [\fIset\fP..]
.fi
.RE
.PP
.I set
specifies the set of unassigned characters.  Currently following sets
can be specified.
.RS 2
.TP 4
\f(CWnameprep-02\fP
Specify set of unassigned characters defined by NAMEPREP-02 draft.
.TP 4
\f(CWnameprep-03\fP
Specify set of unassigned characters defined by NAMEPREP-03 draft.
.TP 4
\f(CWfileset:\fP\fIpathname\fP
Specify set of unassigned characters defined by the file \fIpathname\fP.
See ``SETFILE FORMAT '' for the format of this file.
.RE
.PP
When more than one 
.IR set s
are specified, a character is considered unassigned if it belongs to
any one of those sets.
.\"
.SH "ALTERNATE-ENCODING ENTRY"
mDNkit provides local codeset coversion feature, and in domain name
decoding process, multilingual domain names are converted to the
local codeset the application is using.
However, it is possible that the conversion fails because some
characters in the domain names have no mapping to the local codeset.
This occurs, for example, when a Japanese application using Japanese
codeset receives a DNS reply containing Chinese characters which
are not included in the Japanese character set.
.PP
Alternative encoding entry specifies the codeset name to be used
instead of the local codeset in case the above problem happens.
.PP
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWalternate-encoding \fP\fIencoding\fP
.fi
.RE
.PP
.I encoding
is the name of the codeset.  It must be an ASCII-compatible
encoding (ACE) such as ``RACE''.
.\"
.SH "ENCODING-ALIAS-FILE ENTRY"
Encoding alias entry specifies the file containing codeset name aliases.
The aliases can be used just as the real names.
.PP
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWencoding-alias-file \fP\fIpathname\fP
.fi
.RE
.PP
.I pathname
specifies the path name of the alias file.
The alias file is a simple text file, consisting of lines of the form:
.PP
.RS 4
.nf
\fIalias-name\fP\ \fIname\fP
.fi
.RE
.PP
.I alias-name
is the alias name to be defined, and
.I name
is the real name or another alias name.
.\"
.SH "LOCAL-MAP ENTRY"
This entry specifies localized mapping phase before NAMEPREP takes place.
Different mapping rules can be specified for each TLD (top-level domain).
For example, you can have one mapping for ``.tw'' domain, and another for
``.jp'' domain.
.PP
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWlocal-map \fItld\f(CW \fIscheme\fR [\fIscheme\fR..]
.fi
.RE
.PP
.I tld
specifies the TLD to which the mapping rule is to be applied, and
.I scheme
specifies the mapping scheme.  Available schemes are same as
\f(CWnameprep-map\fR entry.  See ``NAMEPREP-MAP ENTRY'' for details.
.PP
There are two special
.IR tld s
for specifying the mapping rule for local domain names (domain names
without any dots in them), and the default mapping rule.
If
.I tld
is ``-'', it matches domain names which do not contain any dots.
If
.I tld
is ``.'', it matches any domain names which don't match to any other
mapping rules specified by ``local-map'' entries.
.\"
.SH "DELIMITER-MAP ENTRY"
This entry specifies characters to be regarded as the domain name delimiter,
which is period (``.'').
.PP
The syntax of this entry is:
.PP
.RS 4
.nf
\f(CWdelimiter-map \fIcodepoint\fR [\fIcodepoint\fR..]
.fi
.RE
.PP
.I codepoint
specifies the Unicode codepoint value (in hexadecimal format) for the
character to be regarded as a delimiter.
.\"
.SH "MAPFILE FORMAT"
A mapfile defines a set of character mapping rules.  It can define
unconditional one-character to N-character-sequence (N can be 0, 1 or more)
mappings.
.PP
A mapfile is a simple text file, and each line specifies a single mapping.
Each line is of the form:
.PP
.RS 4
.nf
\fIsrc-codepoint\fR\f(CW; \fImapped-codepoint-seq\fR\f(CW;\fR
.fi
.RE
.PP
.I src-codepoint
indicates source character of the mapping, and must be a Unicode codepoint
value in hexadecimal string.
.I mapped-codepoint-seq
is a sequence of characters which is the outcome of the mapping, and must
be a (possibly empty) list of Unicode codepoint values in hexadecimal string,
separated by spaces.
.PP
Lines which begin with ``#'' are treated as comments and ignored.
.PP
A sample mapfile is shown below.
.PP
.RS 4
.nf
.ft CW
# map "A" to "a"
0041; 0061;
# map "#" to nothing
0023; ;
# map "@" to "at"
0040; 0061 0074;
.ft R
.fi
.RE
.\"
.SH "SETFILE FORMAT"
A setfile defines a set of characters, and is used for specifying
prohibited/unasssigned characters.  The set is specified by
enumerating either individual character codepoints or ranges of
character codepoints.
.PP
A setfile is also a simple text file, and each line specifies a single
character codepoint, or a range of codepoints as follows:
.PP
.RS 4
.nf
\fIcodepoint\fP
\fIcodepoint-start\fR\f(CW-\fR\fIcodepoint-end\fR
.fi
.RE
.PP
.IR codepoint ,
.I codepoint-start
and
.I codepoint-end
are Unicode codepoint values in hexadecimal format.
.PP
Lines which begin with ``#'' are treated as comments and ignored.
.PP
A sample setfile is shown below.
.PP
.RS 4
.nf
.ft CW
# Prohibit tilde
007E
# Prohibit control characters
0000-001F
007F-000F
# Prohibit all the Unicode characters beyond BMP
10000-10FFFF
.ft R
.fi
.RE
.\"
.SH "LOCAL CODESET"
.B mdn.conf
does not have an entry to specify the local codeset, since
it is determined from the application's current locale information.
So each application can use different local codeset.
.PP
Although mDNkit tries hard to find out the local codeset, sometimes it
fails.  For example, there are applications which use non-ASCII codeset
but work in C locale.  In this case, you can specify the application's
local codeset by an environment variable ``\fBMDN_LOCAL_CODESET\fR''.
Just set the codeset name (or its alias name) to the variable, and
mDNkit will use the codeset as the local one, regardless of the locale
setting.
.\"
.SH "SAMPLE CONFIGURATION"
The following shows a sample configuration file.
.PP
.RS 4
.ft CW
.nf
#
# a sample configuration.
#

# Use RACE as the IDN encoding.
idn-encoding RACE

# Use draft-ietf-idn-nameprep-03.txt as NAMEPREP.
nameprep nameprep-03

# Use BRACE as the alternative encoding.
alternate-encoding BRACE

# Regard U+3002 (IDEOGRAPHIC FULL STOP) and U+FF0E
# (FULLWIDTH FULL STOP) as the domain component delimiter
# as well as ``.''.
delimiter-map U+3002 U+FF0E

# Perform Japanese-specific mapping for .jp domain.
# assuming /usr/local/lib/mdnkit/jp-map contains the mapping.
local-map .jp filemap:/usr/local/lib/mdnkit/jp-map
.fi
.ft R
.RE
.\"
.SH FILES
.I @sysconfdir@/mdn.conf
.br
.I @sysconfdir@/mdn.conf.sample
\- sample configuration with comments
.\"
.SH "SEE ALSO"
iconv(3), mdnsproxy(8)