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