1GAI.CONF(5)                Linux Programmer's Manual               GAI.CONF(5)
2
3
4

NAME

6       gai.conf - getaddrinfo(3) configuration file
7

DESCRIPTION

9       A  call  to getaddrinfo(3) might return multiple answers.  According to
10       RFC 3484 these answers must be sorted so that the answer with the high‐
11       est  success  rate is first in the list.  The RFC provides an algorithm
12       for the sorting.  The static rules are  not  always  adequate,  though.
13       For  this  reason,  the  RFC  also  requires that system administrators
14       should have the possibility to dynamically change the sorting.  For the
15       glibc implementation, this can be achieved with the /etc/gai.conf file.
16
17       Each  line  in  the  configuration  file  consists of a keyword and its
18       parameters.  White spaces in any place  are  ignored.   Lines  starting
19       with '#' are comments and are ignored.
20
21       The keywords currently recognized are:
22
23       label netmask precedence
24              The value is added to the label table used in the RFC 3484 sort‐
25              ing.  If any label definition is present  in  the  configuration
26              file  is  present, the default table is not used.  All the label
27              definitions of the default table which are to be maintained have
28              to  be  duplicated.  Following the keyword, the line has to con‐
29              tain a network mask and a label value.
30
31       precedence netmask precedence
32              This  keyword is similar to label,  but  instead  the  value  is
33              added  to  the  precedence table as specified in RFC 3484.  Once
34              again, the presence of a single precedence line in the  configu‐
35              ration file causes the default table to not be used.
36
37       reload <yes|no>
38              This  keyword controls whether a process checks whether the con‐
39              figuration file has been changed since  the  last  time  it  was
40              read.   If  the  value is "yes" the file is re-read.  This might
41              cause problems in multithreaded applications and is generally  a
42              bad idea.  The default is "no".
43
44       scopev4 mask value
45              Add  another  rule to the RFC 3484 scope table for IPv4 address.
46              By default, the scope IDs described in section 3.2  in  RFC 3438
47              are  used.  Changing these defaults should hardly ever be neces‐
48              sary.
49

FILES

51       /etc/gai.conf
52

EXAMPLE

54       The default table according to RFC 3484 would  be  specified  with  the
55       following configuration file:
56
57       label  ::1/128       0
58       label  ::/0          1
59       label  2002::/16     2
60       label ::/96          3
61       label ::ffff:0:0/96  4
62       precedence  ::1/128       50
63       precedence  ::/0          40
64       precedence  2002::/16     30
65       precedence ::/96          20
66       precedence ::ffff:0:0/96  10
67

SEE ALSO

69       getaddrinfo(3), RFC 3484
70

COLOPHON

72       This  page  is  part of release 3.53 of the Linux man-pages project.  A
73       description of the project, and information about reporting  bugs,  can
74       be found at http://www.kernel.org/doc/man-pages/.
75
76
77
78Linux                             2013-02-13                       GAI.CONF(5)
Impressum