Blame man5/gai.conf.5

Packit 7cfc04
.\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
Packit 7cfc04
.\" Author: Ulrich Drepper <drepper@redhat.com>
Packit 7cfc04
.\"
Packit 7cfc04
.\" %%%LICENSE_START(GPLv2_MISC)
Packit 7cfc04
.\" This copyrighted material is made available to anyone wishing to use,
Packit 7cfc04
.\" modify, copy, or redistribute it subject to the terms and conditions of the
Packit 7cfc04
.\" GNU General Public License v.2.
Packit 7cfc04
.\"
Packit 7cfc04
.\" This program is distributed in the hope that it will be useful, but WITHOUT
Packit 7cfc04
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Packit 7cfc04
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
Packit 7cfc04
.\" more details.
Packit 7cfc04
.\"
Packit 7cfc04
.\" You should have received a copy of the GNU General Public
Packit 7cfc04
.\" License along with this manual; if not, see
Packit 7cfc04
.\" <http://www.gnu.org/licenses/>.
Packit 7cfc04
.\" %%%LICENSE_END
Packit 7cfc04
.\"
Packit 7cfc04
.TH GAI.CONF 5 2016-03-15 "Linux" "Linux Programmer's Manual"
Packit 7cfc04
.SH NAME
Packit 7cfc04
gai.conf \- getaddrinfo(3) configuration file
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
A call to
Packit 7cfc04
.BR getaddrinfo (3)
Packit 7cfc04
might return multiple answers.
Packit 7cfc04
According to RFC\ 3484 these answers must be sorted so that
Packit 7cfc04
the answer with the highest success rate is first in the list.
Packit 7cfc04
The RFC provides an algorithm for the sorting.
Packit 7cfc04
The static rules are not always adequate, though.
Packit 7cfc04
For this reason,
Packit 7cfc04
the RFC also requires that system administrators should have the possibility
Packit 7cfc04
to dynamically change the sorting.
Packit 7cfc04
For the glibc implementation, this can be achieved with the
Packit 7cfc04
.IR /etc/gai.conf
Packit 7cfc04
file.
Packit 7cfc04
.PP
Packit 7cfc04
Each line in the configuration file consists of a keyword and its parameters.
Packit 7cfc04
White spaces in any place are ignored.
Packit 7cfc04
Lines starting with \(aq#\(aq are comments and are ignored.
Packit 7cfc04
.PP
Packit 7cfc04
The keywords currently recognized are:
Packit 7cfc04
.TP
Packit 7cfc04
\fBlabel\fR \fInetmask\fR \fIprecedence\fR
Packit 7cfc04
The value is added to the label table used in the RFC\ 3484 sorting.
Packit 7cfc04
If any \fBlabel\fR definition is present in the configuration file,
Packit 7cfc04
the default table is not used.
Packit 7cfc04
All the label definitions
Packit 7cfc04
of the default table which are to be maintained have to be duplicated.
Packit 7cfc04
Following the keyword,
Packit 7cfc04
the line has to contain a network mask and a precedence value.
Packit 7cfc04
.TP
Packit 7cfc04
\fBprecedence\fR \fInetmask\fR \fIprecedence\fR
Packit 7cfc04
This keyword is similar to \fBlabel\fR, but instead the value is added
Packit 7cfc04
to the precedence table as specified in RFC\ 3484.
Packit 7cfc04
Once again, the
Packit 7cfc04
presence of a single \fBprecedence\fR line in the configuration file
Packit 7cfc04
causes the default table to not be used.
Packit 7cfc04
.TP
Packit 7cfc04
\fBreload\fR <\fByes\fR|\fBno\fR>
Packit 7cfc04
This keyword controls whether a process checks whether the configuration
Packit 7cfc04
file has been changed since the last time it was read.
Packit 7cfc04
If the value is
Packit 7cfc04
"\fByes\fR", the file is reread.
Packit 7cfc04
This might cause problems in multithreaded
Packit 7cfc04
applications and is generally a bad idea.
Packit 7cfc04
The default is "\fBno\fR".
Packit 7cfc04
.TP
Packit 7cfc04
\fBscopev4\fR \fImask\fR \fIvalue\fR
Packit 7cfc04
Add another rule to the RFC\ 3484 scope table for IPv4 address.
Packit 7cfc04
By default, the scope IDs described in section 3.2 in RFC\ 3438 are used.
Packit 7cfc04
Changing these defaults should hardly ever be necessary.
Packit 7cfc04
.SH FILES
Packit 7cfc04
\fI/etc/gai.conf\fR
Packit 7cfc04
.SH VERSIONS
Packit 7cfc04
The
Packit 7cfc04
.I gai.conf
Packit 7cfc04
.\" Added in 2006
Packit 7cfc04
file is supported by glibc since version 2.5.
Packit 7cfc04
.SH EXAMPLE
Packit 7cfc04
The default table according to RFC\ 3484 would be specified with the
Packit 7cfc04
following configuration file:
Packit 7cfc04
.PP
Packit 7cfc04
.in +4n
Packit 7cfc04
.EX
Packit 7cfc04
label  ::1/128       0
Packit 7cfc04
label  ::/0          1
Packit 7cfc04
label  2002::/16     2
Packit 7cfc04
label ::/96          3
Packit 7cfc04
label ::ffff:0:0/96  4
Packit 7cfc04
precedence  ::1/128       50
Packit 7cfc04
precedence  ::/0          40
Packit 7cfc04
precedence  2002::/16     30
Packit 7cfc04
precedence ::/96          20
Packit 7cfc04
precedence ::ffff:0:0/96  10
Packit 7cfc04
.EE
Packit 7cfc04
.in
Packit 7cfc04
.\" .SH AUTHOR
Packit 7cfc04
.\" Ulrich Drepper <drepper@redhat.com>
Packit 7cfc04
.\"
Packit 7cfc04
.SH SEE ALSO
Packit 7cfc04
.BR getaddrinfo (3),
Packit 7cfc04
RFC\ 3484
Packit 7cfc04
.SH COLOPHON
Packit 7cfc04
This page is part of release 4.15 of the Linux
Packit 7cfc04
.I man-pages
Packit 7cfc04
project.
Packit 7cfc04
A description of the project,
Packit 7cfc04
information about reporting bugs,
Packit 7cfc04
and the latest version of this page,
Packit 7cfc04
can be found at
Packit 7cfc04
\%https://www.kernel.org/doc/man\-pages/.