.\"
.TH SOCKET 2 2015\-02\-01 Linux "Linux Programmer's Manual"
.SH 名前
-socket \- 通信のための端点(endpoint)を作成する
+socket \- 通信のための端点 (endpoint) を作成する
.SH 書式
\fB#include <sys/types.h>\fP /* 「注意」参照 */
.br
.sp
\fBint socket(int \fP\fIdomain\fP\fB, int \fP\fItype\fP\fB, int \fP\fIprotocol\fP\fB);\fP
.SH 説明
-\fBsocket\fP() は通信のための端点(endpoint)を作成し、ディスクリプター(descriptor)を返す。
+\fBsocket\fP() は通信のための端点 (endpoint) を作成し、 ディスクリプターを返す。
.PP
-\fIdomain\fP 引数は通信を行なうドメインを指定する; これはどの プロトコルファミリー(protocol
-family)を通信に使用するかを指定する。 これらのファミリーは \fI<sys/socket.h>\fP に定義されている。
+\fIdomain\fP 引数は通信を行なうドメインを指定する; これはどの プロトコルファミリー (protocol family)
+を通信に使用するかを指定する。 これらのファミリーは \fI<sys/socket.h>\fP に定義されている。
現在、理解できるフォーマットは以下の通り。
.TS
tab(:);
T{
\fBAF_ALG\fP
T}:T{
-Interface to kernel crypto API
+カーネルの暗号 API へのインターフェース
T}
.TE
.PP
-ソケットは \fItype\fP で指定される型を持ち、それは通信方式(semantics)を指定する。 定義されている型は現在以下の通り。
+ソケットは \fItype\fP で指定される型を持ち、それは通信方式 (semantics) を指定する。 定義されている型は現在以下の通り。
.TP 16
\fBSOCK_STREAM\fP
-順序性と信頼性があり、双方向の、接続された バイトストリーム(byte stream)を提供する。
-帯域外(out\-of\-band)データ転送メカニズムもサポートされる。
+順序性と信頼性があり、双方向の、接続された バイトストリーム (byte stream) を提供する。 帯域外 (out\-of\-band)
+データ転送メカニズムもサポートされる。
.TP
\fBSOCK_DGRAM\fP
データグラム (コネクションレス、信頼性無し、固定最大長メッセージ) をサポートする。
アドレスファミリーと同じものである。」 と保証している。
それ以外の規格では全ての場所で AF_* が使用されている。
-The \fBAF_ALG\fP protocol type was added in Linux 2.6.38. More information on
-this interface is provided in the kernel source file,
-\fIDocumentation/crypto/crypto\-API\-userspace.txt\fP.
+\fBAF_ALG\fP プロトコル種別は Linux 2.6.38 で追加された。 このインターフェースの詳しい情報は、 カーネルのソースファイル
+\fIDocumentation/crypto/crypto\-API\-userspace.txt\fP に書かれている。
.SH 例
\fBsocket\fP() の利用例が \fBgetaddrinfo\fP(3) に記載されている。
.SH 関連項目
(UTC からの西向きの秒数) と \fIdaylight\fP (このタイムゾーンにサマータイムに関するルールがなければ 0、
サマータイム期間が一年のどこかにあれば 0 以外) も設定する。
.PP
-If the \fBTZ\fP variable does not appear in the environment, the system
-timezone is used. The system timezone is configured by copying, or linking,
-a file in the \fBtzfile\fP(5) format to \fI/etc/localtime\fP. A timezone database
-of these files may be located in the system timezone directory (see the
-\fBFILES\fP section below).
+\fBTZ\fP 環境変数が設定されていない場合には、 システムのタイムゾーンが使用される。 ステムのタイムゾーンを設定するには、 \fBtzfile\fP(5)
+形式のファイルを \fI/etc/localtime\fP にコピーしたりリンクしたりする。
+これらのファイルがあるタイムゾーンデータベースはシステムのタイムゾーンディレクトリ (\fBファイル\fP の節を参照) に置かれている。
.PP
\fBTZ\fP 環境変数が存在しているが、その値が空だったり、 以下に示す形式のどれにもあてはまらない場合は、 協定世界時 (Coordinated
Universal Time: UTC) が用いられる。
.PP
-The value of \fBTZ\fP can be one of two formats. The first format is a string
-of characters that directly represent the timezone to be used:
+\fBTZ\fP の値は以下の 2 つの形式のいずれかを取ることができる。 最初の形式は、 使用するタイムゾーンを表す文字列を直接指定する方法である。
.sp
.RS
std offset \fIdst\fP[\fIoffset\fP][,\fIstart\fP[\fI/time\fP],\fIend\fP[\fI/time\fP]]
.RE
.sp
-There are no spaces in the specification. The \fIstd\fP string specifies the
-name of the timezone and must be three or more alphabetic characters. The
-\fIoffset\fP string immediately follows \fIstd\fP and specifies the time value to
-be added to the local time to get Coordinated Universal Time (UTC). The
-\fIoffset\fP is positive if the local timezone is west of the Prime Meridian
-and negative if it is east. The hour must be between 0 and 24, and the
-minutes and seconds 0 and 59.
+この指定方法ではスペースは一切使用しない。 \fIstd\fP 文字列はタイムゾーンの名前を指定する。 アルファベットからなる 3
+文字以上の文字列でなければならない。 \fIoffset\fP 文字列は \fIstd\fP の直後に続き、 協定世界時 (UTC) を得るために
+ローカルな時刻に加えなければならない時間を指定する。 \fIoffset\fP は、ローカルタイムゾーンがグリニッジ子午線 (Prime Meridian)
+の西なら正の値、東なら負の値を取る。 時間 (hour) は 0 から 24 の間でなければならない。 分 (minute) と秒 (second) は
+0 から 59 の間でなければならない。
.PP
-The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
-corresponding daylight saving timezone. If the offset is omitted, it
-defaults to one hour ahead of standard time.
+\fIdst\fP 文字列と \fIoffset\fP は、 対応するサマータイムゾーンの名前とオフセットを指定する。
+オフセットが省略されると、デフォルトでは標準の一時間前となる。
.PP
\fIstart\fP フィールドはサマータイムが有効になる時刻、 \fIend\fP フィールドは標準に戻る時刻である。
これらのフィールドは以下の形式で指定する。
TZ="NZST\-12:00:00NZDT\-13:00:00,M10.1.0,M3.3.0"
.fi
.PP
-The second format specifies that the timezone information should be read
-from a file:
+2 番目の形式は、タイムゾーンの情報をファイルから読み込むように指定する。
.sp
.RS
:[filespec]
.RE
.sp
-If the file specification \fIfilespec\fP is omitted, or its value cannot be
-interpreted, then Coordinated Universal Time (UTC) is used. If \fIfilespec\fP
-is given, it specifies another \fBtzfile\fP(5)\-format file to read the timezone
-information from. If \fIfilespec\fP does not begin with a \(aq/\(aq, the file
-specification is relative to the system timezone directory. If the colon is
-omitted each of the above \fBTZ\fP formats will be tried.
+ファイルの指定 \fIfilespec\fP が省略された場合、 もしくは指定された値が解釈できない場合、 協定標準時 (UTC; Coordinated
+Universal Time) が使用される。 指定された場合、 \fIfilespec\fP はタイムゾーン情報を読み出す \fBtzfile\fP(5)
+形式のファイルを指定する。 \fIfilespec\fP が \(aq/\(aq で始まっていない場合には、 システムタイムゾーンディレクトリからの相対パスで
+ファイルが指定されたことになる。 コロンが省略された場合には、 上記の \fBTZ\fP の各形式での解釈を試みる。
.PP
例を挙げておく。もう一度ニュージーランドの例である。
.nf
.SH 環境変数
.TP
\fBTZ\fP
-If this variable is set its value takes precedence over the system
-configured timezone.
+この変数が設定された場合、 その値がシステムで設定されたタイムゾーンより優先して使用される。
.TP
\fBTZDIR\fP
-If this variable is set its value takes precedence over the system
-configured timezone database directory path.
+この変数が設定された場合、 その値がシステムで設定されたタイムゾーンデータベースのディレクトリパスより優先して使用される。
.SH ファイル
.TP
\fB/etc/localtime\fP
システムのタイムゾーンファイル。
.TP
\fB/usr/share/zoneinfo/\fP
-The system timezone database directory.
+システムのタイムゾーンデータベースのディレクトリ。
.TP
\fB/usr/share/zoneinfo/posixrules\fP
-When a TZ string includes a dst timezone without anything following it, then
-this file is used for the start/end rules. It is in the \fBtzfile\fP(5)
-format. By default, the zoneinfo Makefile hard links it to the
-\fIAmerica/New_York\fP tzfile.
+TZ 文字列で dst タイムゾーンが他に何の指定なしで単独で指定された場合、 このファイルが start/end のルールに使用される。
+このファイルは \fBtzfile\fP(5) 形式である。 デフォルトでは、 ゾーン情報の Makefile でこのファイルは
+\fIAmerica/New_York\fP にハードリンクされる。
.PP
-Above are the current standard file locations, but they are configurable
-when glibc is compiled.
+上記は現在の標準のファイルの場所だが、 glibc のコンパイル時に変更できる。
.SH 準拠
SVr4, POSIX.1\-2001, 4.3BSD.
.SH 注意
@:LDP man-pages:3.79:2003/07/14:pciconfig_write:2:pciconfig_read:2:
×:LDP man-pages:3.79:2015/01/10:perf_event_open:2:::::
○:LDP man-pages:3.79:2013/02/13:perfmonctl:2:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
-â\98\86:LDP man-pages:3.78=>3.79:2015/02/01:personality:2:2015/01/24::argrath@ub32.org:Kentaro Shirakata:
+â\97\8b:LDP man-pages:3.79:2015/02/01:personality:2:2015/02/06::argrath@ub32.org:Kentaro Shirakata:
@:LDP man-pages:3.79:2013/02/12:phys:2:unimplemented:2:
○:LDP man-pages:3.79:2014/07/08:pipe:2:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
@:LDP man-pages:3.79:2014/07/08:pipe2:2:pipe:2:
○:LDP man-pages:3.79:2013/04/19:sigsuspend:2:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
@:LDP man-pages:3.79:2014/08/19:sigtimedwait:2:sigwaitinfo:2:
○:LDP man-pages:3.79:2014/08/19:sigwaitinfo:2:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
-â\98\86:LDP man-pages:3.78=>3.79:2015/02/01:socket:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
+â\97\8b:LDP man-pages:3.79:2015/02/01:socket:2:2015/02/06::amotoki@gmail.com:Akihiro Motoki:
○:LDP man-pages:3.79:2012/10/16:socketcall:2:2015/02/05::hanataka@abyss.rim.or.jp:HANATAKA Shinya:
○:LDP man-pages:3.79:2008/10/11:socketpair:2:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
○:LDP man-pages:3.79:2014/12/31:splice:2:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
@:LDP man-pages:3.79:2014/04/01:fetestexcept:3:fenv:3:
@:LDP man-pages:3.79:2014/04/01:feupdateenv:3:fenv:3:
○:LDP man-pages:3.79:2015/01/22:fexecve:3:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
-â\98\86:LDP man-pages:3.78=>3.79:2015/02/01:fflush:3:2015/01/24::argrath@ub32.org:Kentaro Shirakata:
+â\97\8b:LDP man-pages:3.79:2015/02/01:fflush:3:2015/02/06::argrath@ub32.org:Kentaro Shirakata:
@:LDP man-pages:3.79:2008/08/29:fflush_unlocked:3:unlocked_stdio:3:
○:LDP man-pages:3.79:2014/04/14:ffs:3:2015/02/05::argrath@ub32.org:Kentaro Shirakata:
@:LDP man-pages:3.79:2014/04/14:ffsl:3:ffs:3:
○:LDP man-pages:3.79:2013/07/22:ttyslot:3:2015/02/05::ysato444@yahoo.co.jp:Yuichi SATO:
@:LDP man-pages:3.79:2014/05/28:twalk:3:tsearch:3:
@:LDP man-pages:3.79:2015/01/30:tzname:3:tzset:3:
-â\98\86:LDP man-pages:3.78=>3.79:2015/01/30:tzset:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
+â\97\8b:LDP man-pages:3.79:2015/01/30:tzset:3:2015/02/06::amotoki@gmail.com:Akihiro Motoki:
○:LDP man-pages:3.79:2013/12/23:ualarm:3:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
@:LDP man-pages:3.79:2015/01/22:ulckpwdf:3:getspnam:3:
○:LDP man-pages:3.79:2008/08/06:ulimit:3:2015/02/05::nakano@apm.seikei.ac.jp:NAKANO Takeo: