141 lines
4.1 KiB
HTML
141 lines
4.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of GAI.CONF</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>GAI.CONF</H1>
|
|
Section: Linux Programmer's Manual (5)<BR>Updated: 2016-03-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
gai.conf - <A HREF="/cgi-bin/man/man2html?3+getaddrinfo">getaddrinfo</A>(3) configuration file
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
A call to
|
|
<B><A HREF="/cgi-bin/man/man2html?3+getaddrinfo">getaddrinfo</A></B>(3)
|
|
|
|
might return multiple answers.
|
|
According to RFC 3484 these answers must be sorted so that
|
|
the answer with the highest success rate is first in the list.
|
|
The RFC provides an algorithm for the sorting.
|
|
The static rules are not always adequate, though.
|
|
For this reason,
|
|
the RFC also requires that system administrators should have the possibility
|
|
to dynamically change the sorting.
|
|
For the glibc implementation, this can be achieved with the
|
|
<I>/etc/gai.conf</I>
|
|
|
|
file.
|
|
<P>
|
|
|
|
Each line in the configuration file consists of a keyword and its parameters.
|
|
White spaces in any place are ignored.
|
|
Lines starting with '#' are comments and are ignored.
|
|
<P>
|
|
|
|
The keywords currently recognized are:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>label</B> <I>netmask</I> <I>precedence</I><DD>
|
|
The value is added to the label table used in the RFC 3484 sorting.
|
|
If any <B>label</B> definition is present in the configuration file,
|
|
the default table is not used.
|
|
All the label definitions
|
|
of the default table which are to be maintained have to be duplicated.
|
|
Following the keyword,
|
|
the line has to contain a network mask and a precedence value.
|
|
<DT id="2"><B>precedence</B> <I>netmask</I> <I>precedence</I><DD>
|
|
This keyword is similar to <B>label</B>, but instead the value is added
|
|
to the precedence table as specified in RFC 3484.
|
|
Once again, the
|
|
presence of a single <B>precedence</B> line in the configuration file
|
|
causes the default table to not be used.
|
|
<DT id="3"><B>reload</B> <<B>yes</B>|<B>no</B>><DD>
|
|
This keyword controls whether a process checks whether the configuration
|
|
file has been changed since the last time it was read.
|
|
If the value is
|
|
"<B>yes</B>", the file is reread.
|
|
This might cause problems in multithreaded
|
|
applications and is generally a bad idea.
|
|
The default is "<B>no</B>".
|
|
<DT id="4"><B>scopev4</B> <I>mask</I> <I>value</I><DD>
|
|
Add another rule to the RFC 3484 scope table for IPv4 address.
|
|
By default, the scope IDs described in section 3.2 in RFC 3438 are used.
|
|
Changing these defaults should hardly ever be necessary.
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<I>/etc/gai.conf</I>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>VERSIONS</H2>
|
|
|
|
The
|
|
<I>gai.conf</I>
|
|
|
|
|
|
file is supported by glibc since version 2.5.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLE</H2>
|
|
|
|
The default table according to RFC 3484 would be specified with the
|
|
following configuration file:
|
|
<P>
|
|
|
|
|
|
|
|
label ::1/128 0
|
|
label ::/0 1
|
|
label 2002::/16 2
|
|
label ::/96 3
|
|
label ::ffff:0:0/96 4
|
|
precedence ::1/128 50
|
|
precedence ::/0 40
|
|
precedence 2002::/16 30
|
|
precedence ::/96 20
|
|
precedence ::ffff:0:0/96 10
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+getaddrinfo">getaddrinfo</A></B>(3),
|
|
|
|
RFC 3484
|
|
<A NAME="lbAH"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="6"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="7"><A HREF="#lbAD">FILES</A><DD>
|
|
<DT id="8"><A HREF="#lbAE">VERSIONS</A><DD>
|
|
<DT id="9"><A HREF="#lbAF">EXAMPLE</A><DD>
|
|
<DT id="10"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="11"><A HREF="#lbAH">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:03 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|