1gai.conf(5) File Formats Manual gai.conf(5)
2
3
4
6 gai.conf - getaddrinfo(3) configuration file
7
8
10 A call to getaddrinfo(3) might return multiple answers. According to
11 RFC 3484 these answers must be sorted so that the answer with the high‐
12 est success rate is first in the list. The RFC provides and algorithm
13 for the sorting. The static rules are not always adequate, though.
14 For this reason the RFC also requires that system administrators get
15 the chance to dynamically change the sorting. For the glibc implemen‐
16 tation this can be achieved with the /etc/gai.conf file.
17
18 Each line in the configuration file consists of a keyword and its
19 parameters. White spaces in any place are ignored. Lines starting
20 with `#' are comments and are ignored.
21
22 The keywords currently recognized are:
23
24 label netmask precedence
25 The value is added to the label table used in the RFC 3484 sort‐
26 ing. If any label definition is present in the configuration
27 file is present the default table is not used. All the label
28 definitions of the default table which are to be maintained have
29 to be duplicated. Following the keyword the line has to contain
30 a network mask and a label value.
31
32
33 precedence netmask precedence
34 This keyword is similar to label but instead the value is added
35 to the precedence table as specified in RFC 3484. Once again,
36 the presence of a single precedence line in the configuration
37 file causes the default table to not be used.
38
39
40 reload <yes|no>
41 This keyword control whether a process checks whether the con‐
42 figuration file has been changes since the last time it was
43 read. If the value is `yes' the file is re-read. This might
44 cause problems in multi-threaded applications and is generally a
45 bad idea. The default is `no'.
46
47
48 scopev4 mask value
49 Add another rule to the RFC 3484 scope table for IPv4 address.
50 By default the scope IDs described in section 3.2 in RFC 3438
51 are used. Changing these defaults should hardly ever be neces‐
52 sary.
53
54
56 The default table according to RFC 3484 would be specified with the
57 following configuration file:
58
59 label ::1/128 0
60 label ::/0 1
61 label 2002::/16 2
62 label ::/96 3
63 label ::ffff:0:0/96 4
64 precedence ::1/128 50
65 precedence ::/0 40
66 precedence 2002::/16 30
67 precedence ::/96 20
68 precedence ::ffff:0:0/96 10
69
70
71
73 /etc/gai.conf
74
75
77 Ulrich Drepper <drepper@redhat.com>
78
79
81 getaddrinfo(3), RFC 3484
82
83
84
85gai.conf May 2006 gai.conf(5)