OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / inet_ntop.3
index a0a9639..e7b9008 100644 (file)
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
 .\" References: RFC 2553
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
-.\" Translated 2001-01-14, NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH INET_NTOP 3 2008-11-11 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form
-inet_ntop \- IPv4/IPv6 ¥¢¥É¥ì¥¹¤ò¥Ð¥¤¥Ê¥ê·Á¼°¤«¤é¥Æ¥­¥¹¥È·Á¼°¤ËÊÑ´¹¤¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH INET_NTOP 3 2008\-11\-11 Linux "Linux Programmer's Manual"
+.SH 名前
+inet_ntop \- IPv4/IPv6 アドレスをバイナリ形式からテキスト形式に変換する
+.SH 書式
 .nf
-.B #include <arpa/inet.h>
+\fB#include <arpa/inet.h>\fP
 .sp
-.BI "const char *inet_ntop(int " "af" ", const void *" "src" ,
-.BI "                      char *" "dst" ", socklen_t " "size" );
+\fBconst char *inet_ntop(int \fP\fIaf\fP\fB, const void *\fP\fIsrc\fP\fB,\fP
+\fB                      char *\fP\fIdst\fP\fB, socklen_t \fP\fIsize\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O This function converts the network address structure
-.\"O .I src
-.\"O in the
-.\"O .I af
-.\"O address family into a character string.
-.\"O The resulting string is copied to the buffer pointed to by
-.\"O .IR dst ,
-.\"O which must be a non-NULL pointer.
-.\"O The caller specifies the number of bytes available in this buffer in
-.\"O the argument
-.\"O .IR size .
-¤³¤Î´Ø¿ô¤Ï¡¢
-.I af
-¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¹½Â¤ÂÎ
-.I src
-¤òʸ»úÎó¤ËÊÑ´¹¤¹¤ë¡£
-ÊÑ´¹·ë²Ì¤Îʸ»úÎó¤Ï¡¢
-.I dst
-¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤Ë¥³¥Ô¡¼¤µ¤ì¤ë¡£
-.I dst
-¤Ï NULL ¤Ç¤Ê¤¤¥Ý¥¤¥ó¥¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-¸Æ¤Ó½Ð¤·»þ¤Ë¡¢¤³¤Î¥Ð¥Ã¥Õ¥¡¤ÇÍøÍѤǤ­¤ë¥Ð¥¤¥È¿ô¤ò
-°ú¤­¿ô
-.I size
-¤Ë»ØÄꤹ¤ë¡£
+.SH 説明
+この関数は、 \fIaf\fP アドレスファミリーのネットワークアドレス構造体 \fIsrc\fP を文字列に変換する。 変換結果の文字列は、 \fIdst\fP
+が指すバッファにコピーされる。 \fIdst\fP は NULL でないポインタでなければならない。 呼び出し時に、このバッファで利用できるバイト数を 引き数
+\fIsize\fP に指定する。
 .PP
-.\"O .BR inet_ntop ()
-.\"O extends the
-.\"O .BR inet_ntoa (3)
-.\"O function to support multiple address families,
-.\"O .BR inet_ntoa (3)
-.\"O is now considered to be deprecated in favor of
-.\"O .BR inet_ntop ().
-.\"O The following address families are currently supported:
-.BR inet_ntop ()
-¤Ï
-.BR inet_ntoa (3)
-´Ø¿ô¤ò³ÈÄ¥¤·¤ÆÊ£¿ô¤Î¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤ò°·¤¨¤ë¤è¤¦¤Ë¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£
-º£¸å¤Ï
-.BR inet_ntoa (3)
-¤Ï»È¤ï¤º¡¢
-.BR inet_ntop ()
-¤ò»È¤¦¤è¤¦¤Ë¤¹¤ë¤ÈÎɤ¤¤À¤í¤¦¡£
-¸½ºß¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤Ï°Ê²¼¤ÎÄ̤ê:
-.TP
-.B AF_INET
-.\"O .I src
-.\"O points to a
-.\"O .I struct in_addr
-.\"O (in network byte order)
-.\"O which is converted to an IPv4 network address in
-.\"O the dotted-decimal format, "\fIddd.ddd.ddd.ddd\fP".
-.\"O The buffer
-.\"O .I dst
-.\"O must be at least
-.\"O .B INET_ADDRSTRLEN
-.\"O bytes long.
-¤³¤Î¾ì¹ç
-.I src
-¤Ï (¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î)
-.I "struct in_addr"
-¤Ø¤Î¥Ý¥¤¥ó¥¿¤È¤ß¤Ê¤µ¤ì¡¢¤³¤Î¹½Â¤ÂΤÎÆâÍƤ¬
-¥É¥Ã¥È¶èÀÚ¤ê¤Î 10 ¿Ê¿ô·Á¼° "\fIddd.ddd.ddd.ddd\fP" ¤Î
-IPv4 ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤ËÊÑ´¹¤µ¤ì¤ë¡£
-¥Ð¥Ã¥Õ¥¡
-.I dst
-¤Ï¾¯¤Ê¤¯¤È¤â
-.B INET_ADDRSTRLEN
-¥Ð¥¤¥È¤ÎŤµ¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.TP
-.B AF_INET6
-.\"O .I src
-.\"O points to a
-.\"O .I struct in6_addr
-.\"O (in network byte order)
-.\"O which is converted to a representation of this address in the
-.\"O most appropriate IPv6 network address format for this address.
-.\"O The buffer
-.\"O .I dst
-.\"O must be at least
-.\"O .B INET6_ADDRSTRLEN
-.\"O bytes long.
-¤³¤Î¾ì¹ç
-.I src
-¤Ï (¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î)
-.I "struct in6_addr"
-¤Ø¤Î¥Ý¥¤¥ó¥¿¤È¤ß¤Ê¤µ¤ì¡¢¤³¤Î¹½Â¤ÂΤÎÆâÍƤ¬¡¢
-(¤³¤Î¥¢¥É¥ì¥¹¤ËÂФ·¤Æ¤â¤Ã¤È¤âŬÀÚ¤Ê)
-IPv6 ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤Îɽ¼¨·Á¼°¤ËÊÑ´¹¤µ¤ì¤ë¡£
-¥Ð¥Ã¥Õ¥¡
-.I dst
-¤Ï¾¯¤Ê¤¯¤È¤â
-.B INET6_ADDRSTRLEN
-¥Ð¥¤¥È¤ÎŤµ¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O On success,
-.\"O .BR inet_ntop ()
-.\"O returns a non-NULL pointer to
-.\"O .IR dst .
-.\"O NULL is returned if there was an error, with
-.\"O .I errno
-.\"O set to indicate the error.
-À®¸ù¤¹¤ë¤È¡¢
-.BR inet_ntop ()
-¤Ï
-.I dst
-¤Ø¤Î (NULL ¤Ç¤Ê¤¤) ¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤¬¤¢¤Ã¤¿¾ì¹ç¤Ï NULL ¤òÊÖ¤·¡¢
-.I errno
-¤ò¥¨¥é¡¼¤ò¼¨¤¹ÃͤËŬÀÚ¤ËÀßÄꤹ¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EAFNOSUPPORT
-.\"O .I af
-.\"O was not a valid address family.
-.I af
-¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤Ç¤Ê¤«¤Ã¤¿¡£
-.TP
-.B ENOSPC
-.\"O The converted address string would exceed the size given by
-.\"O .IR size .
-ÊÑ´¹¤µ¤ì¤¿¥¢¥É¥ì¥¹Ê¸»úÎó¤ÎŤµ¤¬
-.I size
-¤Ç»ØÄꤵ¤ì¤¿¥µ¥¤¥º¤òĶ²á¤·¤Æ¤·¤Þ¤¦¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-POSIX.1-2001.
-.\"O Note that RFC\ 2553 defines a prototype where the last argument
-.\"O .I size
-.\"O is of type
-.\"O .IR size_t .
-.\"O Many systems follow RFC\ 2553.
-.\"O Glibc 2.0 and 2.1 have
-.\"O .IR size_t ,
-.\"O but 2.2 and later have
-.\"O .IR socklen_t .
-.\"O .\" 2.1.3: size_t, 2.1.91: socklen_t
-RFC\ 2553 ¤Ç¤ÏºÇ¸å¤Î°ú¤­¿ô
-.I size
-¤Î¥×¥í¥È¥¿¥¤¥×¤ò
-.I size_t
-·¿¤ÈÄêµÁ¤·¤Æ¤¤¤ë¡£Â¿¤¯¤Î¥·¥¹¥Æ¥à¤Ç¤Ï RFC\ 2553 ¤Ë¤·¤¿¤¬¤Ã¤Æ¤¤¤ë¡£
-glibc 2.0 ¤È 2.1 ¤Ç¤Ï
-.I size_t
-¤À¤¬¡¢
-glibc 2.2 °Ê¹ß¤Ç¤Ï
-.I socklen_t
-¤È¤Ê¤Ã¤Æ¤¤¤ë¡£
+\fBinet_ntop\fP()  は \fBinet_ntoa\fP(3)  関数を拡張して複数のアドレスファミリーを扱えるようにしたものである。 今後は
+\fBinet_ntoa\fP(3)  は使わず、 \fBinet_ntop\fP()  を使うようにすると良いだろう。
+現在サポートされているアドレスファミリーは以下の通り:
+.TP 
+\fBAF_INET\fP
+この場合 \fIsrc\fP は (ネットワークバイトオーダーの)  \fIstruct in_addr\fP へのポインタとみなされ、この構造体の内容が
+ドット区切りの 10 進数形式 "\fIddd.ddd.ddd.ddd\fP" の IPv4 ネットワークアドレスに変換される。 バッファ \fIdst\fP
+は少なくとも \fBINET_ADDRSTRLEN\fP バイトの長さを持たなければならない。
+.TP 
+\fBAF_INET6\fP
+この場合 \fIsrc\fP は (ネットワークバイトオーダーの)  \fIstruct in6_addr\fP へのポインタとみなされ、この構造体の内容が、
+(このアドレスに対してもっとも適切な)  IPv6 ネットワークアドレスの表示形式に変換される。 バッファ \fIdst\fP は少なくとも
+\fBINET6_ADDRSTRLEN\fP バイトの長さを持たなければならない。
+.SH 返り値
+成功すると、 \fBinet_ntop\fP()  は \fIdst\fP への (NULL でない) ポインタを返す。 エラーがあった場合は NULL を返し、
+\fIerrno\fP をエラーを示す値に適切に設定する。
+.SH エラー
+.TP 
+\fBEAFNOSUPPORT\fP
+\fIaf\fP がサポートされているアドレスファミリーでなかった。
+.TP 
+\fBENOSPC\fP
+変換されたアドレス文字列の長さが \fIsize\fP で指定されたサイズを超過してしまう。
+.SH 準拠
 .\" 2.1.3: size_t, 2.1.91: socklen_t
-.\"O .SH BUGS
-.SH ¥Ð¥°
-.\"O .B AF_INET6
-.\"O converts IPv6-mapped IPv4 addresses into an IPv6 format.
-.B AF_INET6
-¤Ï IPv4 ¤¬¥Þ¥Ã¥×¤µ¤ì¤¿ IPv6 ¥¢¥É¥ì¥¹¤ò
-IPv6 ·Á¼°¤ËÊÑ´¹¤·¤Æ¤·¤Þ¤¦¡£
-.\"O .SH EXAMPLE
-.SH Îã
-.\"O See
-.\"O .BR inet_pton (3).
-.BR inet_pton (3)
-¤ò»²¾È¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR getnameinfo (3),
-.BR inet (3),
-.BR inet_pton (3)
+POSIX.1\-2001.  RFC\ 2553 では最後の引き数 \fIsize\fP のプロトタイプを \fIsize_t\fP
+型と定義している。多くのシステムでは RFC\ 2553 にしたがっている。 glibc 2.0 と 2.1 では \fIsize_t\fP だが、
+glibc 2.2 以降では \fIsocklen_t\fP となっている。
+.SH バグ
+\fBAF_INET6\fP は IPv4 がマップされた IPv6 アドレスを IPv6 形式に変換してしまう。
+.SH 例
+\fBinet_pton\fP(3)  を参照。
+.SH 関連項目
+\fBgetnameinfo\fP(3), \fBinet\fP(3), \fBinet_pton\fP(3)