{"id":4349,"date":"2022-12-20T17:49:02","date_gmt":"2022-12-20T20:49:02","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/gai-conf-man5\/"},"modified":"2022-12-20T17:49:02","modified_gmt":"2022-12-20T20:49:02","slug":"gai-conf-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/gai-conf-man5\/","title":{"rendered":"GAI.CONF (man5)"},"content":{"rendered":"<h1 align=\"center\">GAI.CONF<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#VERSIONS\">VERSIONS<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">gai.conf \u2212 getaddrinfo(3) configuration file<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">A call to <b>getaddrinfo<\/b>(3) might return multiple answers. According to RFC\u00a03484 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>\n<p style=\"margin-left:11%; margin-top: 1em\">Each line in the configuration file consists of a keyword and its parameters. White spaces in any place are ignored. Lines starting with &#8216;#&#8217; are comments and are ignored.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The keywords currently recognized are: <b><br \/> label<\/b> <i>netmask precedence<\/i><\/p>\n<p style=\"margin-left:22%;\">The value is added to the label table used in the RFC\u00a03484 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.<\/p>\n<p style=\"margin-left:11%;\"><b>precedence<\/b> <i>netmask precedence<\/i><\/p>\n<p style=\"margin-left:22%;\">This keyword is similar to <b>label<\/b>, but instead the value is added to the precedence table as specified in RFC\u00a03484. Once again, the presence of a single <b>precedence<\/b> line in the configuration file causes the default table to not be used.<\/p>\n<p style=\"margin-left:11%;\"><b>reload<\/b> <<b>yes<\/b>|<b>no<\/b>><\/p>\n<p style=\"margin-left:22%;\">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 &#8220;<b>yes<\/b>&#8220;, the file is reread. This might cause problems in multithreaded applications and is generally a bad idea. The default is &#8220;<b>no<\/b>&#8220;.<\/p>\n<p style=\"margin-left:11%;\"><b>scopev4<\/b> <i>mask value<\/i><\/p>\n<p style=\"margin-left:22%;\">Add another rule to the RFC\u00a03484 scope table for IPv4 address. By default, the scope IDs described in section 3.2 in RFC\u00a03438 are used. Changing these defaults should hardly ever be necessary.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/gai.conf<\/i><\/p>\n<h2>VERSIONS <a name=\"VERSIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>gai.conf<\/i> file is supported by glibc since version 2.5.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The default table according to RFC\u00a03484 would be specified with the following configuration file:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">label ::1\/128 0 <br \/> label ::\/0 1 <br \/> label 2002::\/16 2 <br \/> label ::\/96 3 <br \/> label ::ffff:0:0\/96 4 <br \/> precedence ::1\/128 50 <br \/> precedence ::\/0 40 <br \/> precedence 2002::\/16 30 <br \/> precedence ::\/96 20 <br \/> precedence ::ffff:0:0\/96 10<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>getaddrinfo<\/b>(3), RFC\u00a03484<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 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 https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  gai.conf \u2212 getaddrinfo(3) configuration file <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1362,1291],"class_list":["post-4349","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-gai","tag-man5"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4349"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4349\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}