.\" Copyright (C) 2006 Red Hat, Inc. All rights reserved. .\" Author: Ulrich Drepper .\" .\" %%%LICENSE_START(GPLv2_MISC) .\" This copyrighted material is made available to anyone wishing to use, .\" modify, copy, or redistribute it subject to the terms and conditions of the .\" GNU General Public License v.2. .\" .\" This program is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for .\" more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, see .\" . .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2013 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2013-07-31, Akihiro MOTOKI .\" .TH GAI.CONF 5 2020\-06\-09 Linux "Linux Programmer's Manual" .SH 名前 gai.conf \- getaddrinfo(3) 設定ファイル .SH 説明 \fBgetaddrinfo\fP(3) の呼び出しでは、複数の答えが返る場合がある。 RFC\ 3484 によれば、 これらの答えは、 最も成功の可能性が高い答えがリストの先頭になるような順番に並び替えなければならない。 RFC には、 並び替えのアルゴリズムが書かれている。 しかしながら、 静的なルールが常に適切という訳ではない。 この理由から、 RFC では、 並び替え方法をシステム管理者が動的に変更できるようにすることも要求している。 glibc の実装では、 \fI/etc/gai.conf\fP ファイルでこれが実現できるようになっている。 .PP 設定ファイルの各行は、キーワードとそのパラメーターで構成される。 ホワイトスペースはどこにあっても全て無視される。 \(aq#\(aq で始まる行はコメントで、 無視される。 .PP 現在のところ、認識されるキーワードは以下の通りである。 .TP \fBlabel\fP \fInetmask\fP \fIprecedence\fP The value is added to the label table used in the RFC\ 3484 sorting. If any \fBlabel\fP 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. .TP \fBprecedence\fP \fInetmask\fP \fIprecedence\fP このキーワードは \fBlabel\fP に似ているが、 指定された値を RFC\ 3484 で規定された優先度テーブルに追加する点が異なる。 繰り返しになるが、 設定ファイルに \fBprecedence\fP が一つでもあれば、デフォルトテーブルは使用されない。 .TP \fBreload\fP <\fByes\fP|\fBno\fP> このキーワードは、 設定ファイルが前回の読み出し以降に変更されているかをプロセスが確認するかを制御する。 値が "\fByes\fP" であれば、 ファイルが再読み込みされる。 再読み込みはマルチスレッドアプリケーションで問題を起こす可能性があり、 一般にはよい考えとは言えない。 デフォルトは "\fBno\fP" である。 .TP \fBscopev4\fP \fImask\fP \fIvalue\fP IPv4 アドレス用の RFC\ 3484 スコープテーブルに別のルールを追加する。 デフォルトでは、 RFC\ 3438 のセクション 3.2 で説明されているスコープ ID が使用される。 これらのデフォルト値の変更が必要になることはまずないだろう。 .SH ファイル \fI/etc/gai.conf\fP .SH バージョン .\" Added in 2006 \fIgai.conf\fP ファイルは glibc バージョン 2.5 以降でサポートされている。 .SH 例 RFC\ 3484 で規定されているデフォルトテーブルは、 以下の設定ファイルを指定するのと同じである。 .PP .in +4n .EX 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 .EE .in .\" .SH AUTHOR .\" Ulrich Drepper .\" .SH 関連項目 \fBgetaddrinfo\fP(3), RFC\ 3484 .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。