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