gai.conf(5) | File Formats Manual | gai.conf(5) |
gai.conf - getaddrinfo(3) configuration file
A call to getaddrinfo(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 /etc/gai.conf file.
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.
The keywords currently recognized are:
/etc/gai.conf
The gai.conf file is supported since glibc 2.5.
The default table according to RFC 3484 would be specified with the following configuration file:
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
getaddrinfo(3), RFC 3484
2023-10-31 | Linux man-pages 6.7 |