]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/gai.conf.5
hypot.3: srcfix: add some notes about the underflow case
[thirdparty/man-pages.git] / man5 / gai.conf.5
CommitLineData
d97d06f7 1.\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
4016e7fb 2.\" Author: Ulrich Drepper <drepper@redhat.com>
d97d06f7 3.\"
ef06249a 4.\" %%%LICENSE_START(GPLv2_MISC)
d97d06f7
UD
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.\"
c715f741
MK
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/>.
8ff7380d 17.\" %%%LICENSE_END
d97d06f7 18.\"
97986708 19.TH GAI.CONF 5 2016-03-15 "Linux" "Linux Programmer's Manual"
d97d06f7
UD
20.SH NAME
21gai.conf \- getaddrinfo(3) configuration file
d97d06f7
UD
22.SH DESCRIPTION
23A call to
24.BR getaddrinfo (3)
5f86385e
MK
25might return multiple answers.
26According to RFC\ 3484 these answers must be sorted so that
27the answer with the highest success rate is first in the list.
28The RFC provides an algorithm for the sorting.
29The static rules are not always adequate, though.
30For this reason,
31the RFC also requires that system administrators should have the possibility
32to dynamically change the sorting.
33For the glibc implementation, this can be achieved with the
b100ab55 34.I /etc/gai.conf
d97d06f7
UD
35file.
36.PP
5f86385e
MK
37Each line in the configuration file consists of a keyword and its parameters.
38White spaces in any place are ignored.
39Lines starting with \(aq#\(aq are comments and are ignored.
d97d06f7
UD
40.PP
41The keywords currently recognized are:
42.TP
43\fBlabel\fR \fInetmask\fR \fIprecedence\fR
5f86385e 44The value is added to the label table used in the RFC\ 3484 sorting.
e23f2a23
RI
45If any \fBlabel\fR definition is present in the configuration file,
46the default table is not used.
5f86385e 47All the label definitions
d97d06f7 48of the default table which are to be maintained have to be duplicated.
5f86385e 49Following the keyword,
e23f2a23 50the line has to contain a network mask and a precedence value.
d97d06f7
UD
51.TP
52\fBprecedence\fR \fInetmask\fR \fIprecedence\fR
3d1ee497 53This keyword is similar to \fBlabel\fR, but instead the value is added
5f86385e
MK
54to the precedence table as specified in RFC\ 3484.
55Once again, the
d97d06f7
UD
56presence of a single \fBprecedence\fR line in the configuration file
57causes the default table to not be used.
d97d06f7
UD
58.TP
59\fBreload\fR <\fByes\fR|\fBno\fR>
5f86385e
MK
60This keyword controls whether a process checks whether the configuration
61file has been changed since the last time it was read.
62If the value is
62418352 63"\fByes\fR", the file is reread.
a2e992fe 64This might cause problems in multithreaded
5f86385e
MK
65applications and is generally a bad idea.
66The default is "\fBno\fR".
d97d06f7
UD
67.TP
68\fBscopev4\fR \fImask\fR \fIvalue\fR
5f86385e
MK
69Add another rule to the RFC\ 3484 scope table for IPv4 address.
70By default, the scope IDs described in section 3.2 in RFC\ 3438 are used.
d97d06f7 71Changing these defaults should hardly ever be necessary.
5f86385e
MK
72.SH FILES
73\fI/etc/gai.conf\fR
c33920dc
MK
74.SH VERSIONS
75The
76.I gai.conf
77.\" Added in 2006
78file is supported by glibc since version 2.5.
d97d06f7 79.SH EXAMPLE
5f86385e 80The default table according to RFC\ 3484 would be specified with the
d97d06f7 81following configuration file:
2dad4c59 82.PP
9c40f2b9
MK
83.in +4n
84.EX
d97d06f7
UD
85label ::1/128 0
86label ::/0 1
87label 2002::/16 2
88label ::/96 3
89label ::ffff:0:0/96 4
90precedence ::1/128 50
91precedence ::/0 40
92precedence 2002::/16 30
93precedence ::/96 20
94precedence ::ffff:0:0/96 10
9c40f2b9
MK
95.EE
96.in
5f86385e
MK
97.\" .SH AUTHOR
98.\" Ulrich Drepper <drepper@redhat.com>
b072a788 99.\"
d97d06f7 100.SH SEE ALSO
5dbf5d5b 101.BR getaddrinfo (3),
5f86385e 102RFC\ 3484