]>
Commit | Line | Data |
---|---|---|
1 | .\" Copyright (C) 2006 Red Hat, Inc. All rights reserved. | |
2 | .\" Author: Ulrich Drepper <drepper@redhat.com> | |
3 | .\" | |
4 | .\" %%%LICENSE_START(GPLv2_MISC) | |
5 | .\" This copyrighted material is made available to anyone wishing to use, | |
6 | .\" modify, copy, or redistribute it subject to the terms and conditions of the | |
7 | .\" GNU General Public License v.2. | |
8 | .\" | |
9 | .\" This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | .\" more details. | |
13 | .\" | |
14 | .\" You should have received a copy of the GNU General Public | |
15 | .\" License along with this manual; if not, see | |
16 | .\" <http://www.gnu.org/licenses/>. | |
17 | .\" %%%LICENSE_END | |
18 | .\" | |
19 | .TH GAI.CONF 5 2016-03-15 "Linux" "Linux Programmer's Manual" | |
20 | .SH NAME | |
21 | gai.conf \- getaddrinfo(3) configuration file | |
22 | .SH DESCRIPTION | |
23 | A call to | |
24 | .BR getaddrinfo (3) | |
25 | might return multiple answers. | |
26 | According to RFC\ 3484 these answers must be sorted so that | |
27 | the answer with the highest success rate is first in the list. | |
28 | The RFC provides an algorithm for the sorting. | |
29 | The static rules are not always adequate, though. | |
30 | For this reason, | |
31 | the RFC also requires that system administrators should have the possibility | |
32 | to dynamically change the sorting. | |
33 | For the glibc implementation, this can be achieved with the | |
34 | .I /etc/gai.conf | |
35 | file. | |
36 | .PP | |
37 | Each line in the configuration file consists of a keyword and its parameters. | |
38 | White spaces in any place are ignored. | |
39 | Lines starting with \(aq#\(aq are comments and are ignored. | |
40 | .PP | |
41 | The keywords currently recognized are: | |
42 | .TP | |
43 | \fBlabel\fR \fInetmask\fR \fIprecedence\fR | |
44 | The value is added to the label table used in the RFC\ 3484 sorting. | |
45 | If any \fBlabel\fR definition is present in the configuration file, | |
46 | the default table is not used. | |
47 | All the label definitions | |
48 | of the default table which are to be maintained have to be duplicated. | |
49 | Following the keyword, | |
50 | the line has to contain a network mask and a precedence value. | |
51 | .TP | |
52 | \fBprecedence\fR \fInetmask\fR \fIprecedence\fR | |
53 | This keyword is similar to \fBlabel\fR, but instead the value is added | |
54 | to the precedence table as specified in RFC\ 3484. | |
55 | Once again, the | |
56 | presence of a single \fBprecedence\fR line in the configuration file | |
57 | causes the default table to not be used. | |
58 | .TP | |
59 | \fBreload\fR <\fByes\fR|\fBno\fR> | |
60 | This keyword controls whether a process checks whether the configuration | |
61 | file has been changed since the last time it was read. | |
62 | If the value is | |
63 | "\fByes\fR", the file is reread. | |
64 | This might cause problems in multithreaded | |
65 | applications and is generally a bad idea. | |
66 | The default is "\fBno\fR". | |
67 | .TP | |
68 | \fBscopev4\fR \fImask\fR \fIvalue\fR | |
69 | Add another rule to the RFC\ 3484 scope table for IPv4 address. | |
70 | By default, the scope IDs described in section 3.2 in RFC\ 3438 are used. | |
71 | Changing these defaults should hardly ever be necessary. | |
72 | .SH FILES | |
73 | \fI/etc/gai.conf\fR | |
74 | .SH VERSIONS | |
75 | The | |
76 | .I gai.conf | |
77 | .\" Added in 2006 | |
78 | file is supported by glibc since version 2.5. | |
79 | .SH EXAMPLE | |
80 | The default table according to RFC\ 3484 would be specified with the | |
81 | following configuration file: | |
82 | .PP | |
83 | .in +4n | |
84 | .EX | |
85 | label ::1/128 0 | |
86 | label ::/0 1 | |
87 | label 2002::/16 2 | |
88 | label ::/96 3 | |
89 | label ::ffff:0:0/96 4 | |
90 | precedence ::1/128 50 | |
91 | precedence ::/0 40 | |
92 | precedence 2002::/16 30 | |
93 | precedence ::/96 20 | |
94 | precedence ::ffff:0:0/96 10 | |
95 | .EE | |
96 | .in | |
97 | .\" .SH AUTHOR | |
98 | .\" Ulrich Drepper <drepper@redhat.com> | |
99 | .\" | |
100 | .SH SEE ALSO | |
101 | .BR getaddrinfo (3), | |
102 | RFC\ 3484 |