OSDN Git Service

(split) LDP: Update drafts based on LDP 3.52 release
[linuxjm/LDP_man-pages.git] / draft / man3 / getipnodebyname.3
index f770919..4fef8d6 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 2000 Sam Varshavchik <mrsam@courier-mta.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References: RFC 2553
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
-.\" Translated Sun Jan 14 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Updated Tue Nov 26 2002 by Kentaro Shirakata <argrath@ub32.org>
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.\"WORD:       null pointer    ¥Ì¥ë¡¦¥Ý¥¤¥ó¥¿¡¼
-.\"
-.TH GETIPNODEBYNAME 3 2010-09-04 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O getipnodebyname, getipnodebyaddr, freehostent \- get network
-.\"O hostnames and addresses
-.SH Ì¾Á°
-getipnodebyname, getipnodebyaddr, freehostent \- ¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤Î̾Á°¤È¥¢¥É¥ì¥¹¤Î¼èÆÀ
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH GETIPNODEBYNAME 3 2010\-09\-04 Linux "Linux Programmer's Manual"
+.SH 名前
+getipnodebyname, getipnodebyaddr, freehostent \- ネットワークホストの名前とアドレスの取得
+.SH 書式
 .nf
-.B #include <sys/types.h>
-.B #include <sys/socket.h>
-.B #include <netdb.h>
+\fB#include <sys/types.h>\fP
+\fB#include <sys/socket.h>\fP
+\fB#include <netdb.h>\fP
 .sp
-.BI "struct hostent *getipnodebyname(const char *" name ", int " af ,
-.BI "                                int " flags ", int *" error_num );
+\fBstruct hostent *getipnodebyname(const char *\fP\fIname\fP\fB, int \fP\fIaf\fP\fB,\fP
+\fB                                int \fP\fIflags\fP\fB, int *\fP\fIerror_num\fP\fB);\fP
 .sp
-.BI "struct hostent *getipnodebyaddr(const void *" addr ", size_t " len ,
-.BI "                                int " af ", int *" "error_num" );
+\fBstruct hostent *getipnodebyaddr(const void *\fP\fIaddr\fP\fB, size_t \fP\fIlen\fP\fB,\fP
+\fB                                int \fP\fIaf\fP\fB, int *\fP\fIerror_num\fP\fB);\fP
 .sp
-.BI "void freehostent(struct hostent *" "ip" );
+\fBvoid freehostent(struct hostent *\fP\fIip\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O These functions are deprecated (and unavailable in glibc).
-.\"O Use
-.\"O .BR getaddrinfo (3)
-.\"O and
-.\"O .BR getnameinfo (3)
-.\"O instead.
-¤³¤ì¤é¤Î´Ø¿ô¤ÏÈó¿ä¾©¤Ç¤¢¤ë (glibc ¤Ç¤ÏÍøÍѤǤ­¤Ê¤¤)¡£
-Âå¤ï¤ê¤Ë
-.BR getaddrinfo (3)
-¤È
-.BR getnameinfo (3)
-¤ò»È¤¦¤³¤È¡£
+.SH 説明
+これらの関数は非推奨である (glibc では利用できない)。 代わりに \fBgetaddrinfo\fP(3)  と \fBgetnameinfo\fP(3)
+を使うこと。
 .LP
-.\"O The
-.\"O .BR getipnodebyname ()
-.\"O and
-.\"O .BR getipnodebyaddr ()
-.\"O functions return the names and addresses of a network host.
-.\"O These functions return a pointer to the
-.\"O following structure:
-.BR getipnodebyname ()
-¤È
-.BR getipnodebyaddr ()
-¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤Î̾Á°¤È¥¢¥É¥ì¥¹¤òÊÖ¤¹¡£
-¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢°Ê²¼¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
+\fBgetipnodebyname\fP()  と \fBgetipnodebyaddr\fP()  は、ネットワークホストの名前とアドレスを返す。
+これらの関数は、以下の構造体へのポインタを返す。
 .sp
 .in +4n
 .nf
@@ -86,353 +61,99 @@ struct hostent {
     int    h_length;
     char **h_addr_list;
 };
-.fi
 .in
+.fi
 .PP
-.\"O These functions replace the
-.\"O .BR gethostbyname (3)
-.\"O and
-.\"O .BR gethostbyaddr (3)
-.\"O functions, which could only access the IPv4 network address family.
-.\"O The
-.\"O .BR getipnodebyname ()
-.\"O and
-.\"O .BR getipnodebyaddr ()
-.\"O functions can access multiple network address families.
-¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢ IPv4 ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¤Ë¤·¤«¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤
-.BR gethostbyname (3)
-¤ä
-.BR gethostbyaddr (3)
-¤òÃÖ¤­´¹¤¨¤ë¤â¤Î¤Ç¤¢¤ë¡£
-.BR getipnodebyname ()
-´Ø¿ô¤È
-.BR getipnodebyaddr ()
-´Ø¿ô¤ÏÊ£¿ô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤Ë¥¢¥¯¥»¥¹²Äǽ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
+これらの関数は、 IPv4 ネットワークアドレスファミリにしかアクセスできない \fBgethostbyname\fP(3)  や
+\fBgethostbyaddr\fP(3)  を置き換えるものである。 \fBgetipnodebyname\fP()  関数と
+\fBgetipnodebyaddr\fP()  関数は複数のネットワークアドレスファミリーにアクセス可能になっている。
 .PP
-.\"O Unlike the
-.\"O .B gethostby
-.\"O functions,
-.\"O these functions return pointers to dynamically allocated memory.
-.\"O The
-.\"O .BR freehostent ()
-.\"O function is used to release the dynamically allocated memory
-.\"O after the caller no longer needs the
-.\"O .I hostent
-.\"O structure.
-¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢
-.B gethostby
-¤Î´Ø¿ô·²¤È°Û¤Ê¤ê¡¢Æ°Åª¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥á¥â¥ê¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
-¸Æ¤Ó½Ð¤·¸µ¤¬¤³¤ì¤é¤Î
-.I hostent
-¹½Â¤ÂΤòɬÍפȤ·¤Ê¤¯¤Ê¤Ã¤¿¸å¤Ï¡¢
-.BR freehostent ()
-´Ø¿ô¤òÍѤ¤¤ì¤ÐưŪ¤Ê³ä¤êÅö¤Æ¥á¥â¥ê¤ò²òÊü¤Ç¤­¤ë¡£
-.\"O .SS getipnodebyname() arguments
-.SS getipnodebyname() ¤Î°ú¤­¿ô
-.\"O The
-.\"O .BR getipnodebyname ()
-.\"O function
-.\"O looks up network addresses for the host
-.\"O specified by the
-.\"O .I name
-.\"O argument.
-.\"O The
-.\"O .I af
-.\"O argument specifies one of the following values:
-.BR getipnodebyname ()
-´Ø¿ô¤Ï
-.I name
-°ú¤­¿ô¤Ç»ØÄꤵ¤ì¤¿¥Û¥¹¥È¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤ò°ú¤¯¡£
-.I af
-°ú¤­¿ô¤Ë¤Ï°Ê²¼¤ÎÃͤΤ¤¤º¤ì¤«¤ò»ØÄꤹ¤ë¡£
-.TP
-.B AF_INET
-.\"O The
-.\"O .I name
-.\"O argument points to a dotted-quad IPv4 address or a name
-.\"O of an IPv4 network host.
-.I name
-°ú¤­¿ô¤Ï¡¢¥É¥Ã¥È¤Ç 4 ¤Ä¤Ë¶èÀÚ¤é¤ì¤¿ IPv4 ¥¢¥É¥ì¥¹¤«¡¢
-IPv4 ¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤Î̾Á°¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
-.TP
-.B AF_INET6
-.\"O The
-.\"O .I name
-.\"O argument points to a hexadecimal IPv6 address or a name
-.\"O of an IPv6 network host.
-.I name
-°ú¤­¿ô¤Ï¡¢16 ¿Ê¤Î IPv6 ¥¢¥É¥ì¥¹¤«¡¢
-IPv6 ¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤Î̾Á°¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
+これらの関数は、 \fBgethostby\fP の関数群と異なり、動的に割り当てられたメモリへのポインタを返す。 呼び出し元がこれらの \fIhostent\fP
+構造体を必要としなくなった後は、 \fBfreehostent\fP()  関数を用いれば動的な割り当てメモリを解放できる。
+.SS "getipnodebyname() の引き数"
+\fBgetipnodebyname\fP()  関数は \fIname\fP 引き数で指定されたホストのネットワークアドレスを引く。 \fIaf\fP
+引き数には以下の値のいずれかを指定する。
+.TP 
+\fBAF_INET\fP
+\fIname\fP 引き数は、ドットで 4 つに区切られた IPv4 アドレスか、 IPv4 ネットワークホストの名前へのポインタである。
+.TP 
+\fBAF_INET6\fP
+\fIname\fP 引き数は、16 進の IPv6 アドレスか、 IPv6 ネットワークホストの名前へのポインタである。
 .PP
-.\"O The
-.\"O .I flags
-.\"O argument specifies additional options.
-.\"O More than one option can be specified by bitwise OR-ing
-.\"O them together.
-.\"O .I flags
-.\"O should be set to 0
-.\"O if no options are desired.
-.I flags
-¥Ñ¥é¥á¡¼¥¿¤Ë¤ÏÄɲäΥª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¡£
-Ê£¿ô¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤Ë¤Ï¡¢¤½¤ì¤é¤Î¥Ó¥Ã¥Èñ°Ì¤Î OR ¤ò¤È¤Ã¤Æ»ØÄꤹ¤ì¤Ð¤è¤¤¡£
-¥ª¥×¥·¥ç¥ó¤ò¤Ò¤È¤Ä¤â»ØÄꤷ¤¿¤¯¤Ê¤¤¤È¤­¤Ë¤Ï¡¢
-.I flags
-¤Ë 0 ¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ë¡£
-.TP
-.B AI_V4MAPPED
-.\"O This flag is used with
-.\"O .B AF_INET6
-.\"O to request a query for IPv4 addresses instead of
-.\"O IPv6 addresses; the IPv4 addresses will
-.\"O be mapped to IPv6 addresses.
-¤³¤Î¥Õ¥é¥°¤Ï
-.B AF_INET6
-¤È¶¦¤ËÍѤ¤¤é¤ì¡¢IPv6 ¥¢¥É¥ì¥¹¤ÎÂå¤ï¤ê¤Ë IPv4 ¥¢¥É¥ì¥¹¤òÌ䤤¹ç¤ï¤»¤ë¡£
-Ì䤤¹ç¤ï¤»¤ë IPv4 ¥¢¥É¥ì¥¹¤Ï IPv6 ¥¢¥É¥ì¥¹¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£
-.TP
-.B AI_ALL
-.\"O This flag is used with
-.\"O .B AI_V4MAPPED
-.\"O to request a query for both IPv4 and IPv6 addresses.
-.\"O Any IPv4 address found will be mapped to an IPv6 address.
-¤³¤Î¥Õ¥é¥°¤Ï
-.B AI_V4MAPPED
-¤È¶¦¤ËÍѤ¤¤é¤ì¡¢IPv4 ¥¢¥É¥ì¥¹¤È IPv6 ¥¢¥É¥ì¥¹¤ÎξÊý¤òÌ䤤¹ç¤ï¤»¤ë¡£
-¸«¤Ä¤«¤Ã¤¿ IPv4 ¥¢¥É¥ì¥¹¤Ï¡¢¤¹¤Ù¤Æ IPv6 ¥¢¥É¥ì¥¹¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£
-.TP
-.B AI_ADDRCONFIG
-.\"O This flag is used with
-.\"O .B AF_INET6
-.\"O to
-.\"O further request that queries for IPv6 addresses should not be made unless
-.\"O the system has at least one IPv6 address assigned to a network interface,
-.\"O and that queries for IPv4 addresses should not be made unless the
-.\"O system has at least one IPv4 address assigned to a network interface.
-.\"O This flag may be used by itself or with the
-.\"O .B AI_V4MAPPED
-.\"O flag.
-¤³¤Î¥Õ¥é¥°¤Ï
-.B AF_INET6
-¤È¶¦¤ËÍѤ¤¤é¤ì¡¢
-IPv6 ¤¬³ä¤êÅö¤Æ¤é¤ì¤¿¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬
-¥·¥¹¥Æ¥à¤Ë¤Ò¤È¤Ä¤â¤Ê¤±¤ì¤Ð IPv6 ¥¢¥É¥ì¥¹¤ÎÌ䤤¹ç¤ï¤»¤ò¹Ô¤ï¤º¡¢
-IPv4 ¤¬³ä¤êÅö¤Æ¤é¤ì¤¿¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬
-¥·¥¹¥Æ¥à¤Ë¤Ò¤È¤Ä¤â¤Ê¤±¤ì¤Ð IPv4 ¥¢¥É¥ì¥¹¤ÎÌ䤤¹ç¤ï¤»¤ò¹Ô¤ï¤Ê¤¤¤è¤¦¤ËÍ׵᤹¤ë¡£
-¤³¤Î¥Õ¥é¥°¤ÏñÆȤǤ⡢¤¢¤ë¤¤¤Ï
-.B AI_V4MAPPED
-¥Õ¥é¥°¤È¶¦¤Ë¤Ç¤âÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-.TP
-.B AI_DEFAULT
-.\"O This flag is equivalent to
-.\"O .BR "(AI_ADDRCONFIG | AI_V4MAPPED)" .
-¤³¤Î¥Õ¥é¥°¤Ï
-.BR (AI_ADDRCONFIG | AI_V4MAPPED)
-¤ÈÅù²Á¤Ç¤¢¤ë¡£
-.\"O .SS getipnodebyaddr() arguments
-.SS "getipnodebyaddr() ¤Î°ú¤­¿ô"
-.\"O The
-.\"O .BR getipnodebyaddr ()
-.\"O function
-.\"O looks up the name of the host whose
-.\"O network address is
-.\"O specified by the
-.\"O .I addr
-.\"O argument.
-.\"O The
-.\"O .I af
-.\"O argument specifies one of the following values:
-.BR getipnodebyaddr ()
-´Ø¿ô¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤¬
-.I addr
-°ú¤­¿ô¤Ç»ØÄꤵ¤ì¤¿¥Û¥¹¥È¤Î̾Á°¤ò°ú¤¯¡£
-.I af
-°ú¤­¿ô¤Ë¤Ï°Ê²¼¤ÎÃͤΤ¤¤º¤ì¤«¤ò»ØÄꤹ¤ë¡£
-.TP
-.B AF_INET
-.\"O The
-.\"O .I addr
-.\"O argument points to a
-.\"O .I struct in_addr
-.\"O and
-.\"O .I len
-.\"O must be set to
-.\"O .IR "sizeof(struct in_addr)" .
-.I addr
-°ú¤­¿ô¤Ï
-.I struct in_addr
-¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤Ç¤¢¤ê¡¢
-.I len
-°ú¤­¿ô¤Ï
-.I sizeof(struct in_addr)
-¤ËÀßÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.TP
-.B AF_INET6
-.\"O The
-.\"O .I addr
-.\"O argument points to a
-.\"O .I struct in6_addr
-.\"O and
-.\"O .I len
-.\"O must be set to
-.\"O .IR "sizeof(struct in6_addr)" .
-.I addr
-°ú¤­¿ô¤Ï
-.I struct in6_addr
-¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤Ç¤¢¤ê¡¢
-.I len
-°ú¤­¿ô¤Ï
-.I sizeof(struct in6_addr)
-¤ËÀßÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O A NULL pointer is returned if an error occurred, and
-.\"O .I error_num
-.\"O will contain an error code from the following list:
-¥¨¥é¡¼¤¬µ¯¤³¤ë¤È¥Ì¥ë¡¦¥Ý¥¤¥ó¥¿¡¼¤¬ÊÖ¤µ¤ì¡¢
-.I error_num
-¤Ë°Ê²¼¤Ë¥ê¥¹¥È¤µ¤ì¤¿¥¨¥é¡¼¥³¡¼¥É¤Î¤¤¤º¤ì¤«¤¬ÀßÄꤵ¤ì¤ë¡£
-.TP
-.B HOST_NOT_FOUND
-.\"O The hostname or network address was not found.
-¥Û¥¹¥È̾¤Þ¤¿¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¡£
-.TP
-.B NO_ADDRESS
-.\"O The domain name server recognized the network address or name,
-.\"O but no answer was returned.
-.\"O This can happen if the network host has only IPv4 addresses and
-.\"O a request has been made for IPv6 information only, or vice versa.
-¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤Ï
-¤½¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤Þ¤¿¤Ï¥Í¥Ã¥È¥ï¡¼¥¯Ì¾¤òǧ¼±¤·¤¿¤¬¡¢
-ÊÖ»ö¤¬Ê֤äƤ³¤Ê¤«¤Ã¤¿¡£¸¶°ø¤È¤·¤Æ¤Ï¡¢
-Î㤨¤Ð IPv4 ¥¢¥É¥ì¥¹¤·¤«»ý¤¿¤Ê¤¤¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤ËÂФ·¤Æ
-IPv6 ¤Î¾ðÊó¤ÎÌ䤤¹ç¤ï¤»¤¬¹Ô¤ï¤ì¤¿ (¤ª¤è¤Ó¤½¤ÎµÕ) ¤Ê¤É¤¬¹Í¤¨¤é¤ì¤ë¡£
-.TP
-.B NO_RECOVERY
-.\"O The domain name server returned a permanent failure response.
-¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤«¤é¹±µ×Ū¤Ê¼ºÇÔ (permanent failure)
-¤ò°ÕÌ£¤¹¤ëÊÖ»ö¤¬ÊÖ¤µ¤ì¤¿¡£
-.TP
-.B TRY_AGAIN
-.\"O The domain name server returned a temporary failure response.
-.\"O You might have better luck next time.
-¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤«¤é°ì»þŪ¤Ê¼ºÇÔ (temporary failure)
-¤ò°ÕÌ£¤¹¤ëÊÖ»ö¤¬ÊÖ¤µ¤ì¤¿¡£¼¡¤Ë¤Ï¤â¤¦¤Á¤ç¤Ã¤È±¿¤¬É¬Íפ«¤â¡£
+\fIflags\fP パラメータには追加のオプションを指定する。 複数のフラグを指定するには、それらのビット単位の OR をとって指定すればよい。
+オプションをひとつも指定したくないときには、 \fIflags\fP に 0 を設定する必要がある。
+.TP 
+\fBAI_V4MAPPED\fP
+このフラグは \fBAF_INET6\fP と共に用いられ、IPv6 アドレスの代わりに IPv4 アドレスを問い合わせる。 問い合わせる IPv4
+アドレスは IPv6 アドレスにマップされる。
+.TP 
+\fBAI_ALL\fP
+このフラグは \fBAI_V4MAPPED\fP と共に用いられ、IPv4 アドレスと IPv6 アドレスの両方を問い合わせる。 見つかった IPv4
+アドレスは、すべて IPv6 アドレスにマップされる。
+.TP 
+\fBAI_ADDRCONFIG\fP
+このフラグは \fBAF_INET6\fP と共に用いられ、 IPv6 が割り当てられたネットワークインターフェースが システムにひとつもなければ IPv6
+アドレスの問い合わせを行わず、 IPv4 が割り当てられたネットワークインターフェースが システムにひとつもなければ IPv4
+アドレスの問い合わせを行わないように要求する。 このフラグは単独でも、あるいは \fBAI_V4MAPPED\fP フラグと共にでも用いることができる。
+.TP 
+\fBAI_DEFAULT\fP
+このフラグは \fB(AI_ADDRCONFIG\fP|\fBAI_V4MAPPED)\fP と等価である。
+.SS "getipnodebyaddr() の引き数"
+\fBgetipnodebyaddr\fP()  関数は、ネットワークアドレスが \fIaddr\fP 引き数で指定されたホストの名前を引く。 \fIaf\fP
+引き数には以下の値のいずれかを指定する。
+.TP 
+\fBAF_INET\fP
+\fIaddr\fP 引き数は \fIstruct in_addr\fP へのポインターであり、 \fIlen\fP 引き数は \fIsizeof(struct
+in_addr)\fP に設定しなければならない。
+.TP 
+\fBAF_INET6\fP
+\fIaddr\fP 引き数は \fIstruct in6_addr\fP へのポインターであり、 \fIlen\fP 引き数は \fIsizeof(struct
+in6_addr)\fP に設定しなければならない。
+.SH 返り値
+エラーが起こるとヌル・ポインターが返され、 \fIerror_num\fP に以下にリストされたエラーコードのいずれかが設定される。
+.TP 
+\fBHOST_NOT_FOUND\fP
+ホスト名またはネットワークアドレスが見つからなかった。
+.TP 
+\fBNO_ADDRESS\fP
+ドメインネームサーバーは そのネットワークアドレスまたはネットワーク名を認識したが、 返事が返ってこなかった。原因としては、 例えば IPv4
+アドレスしか持たないネットワークホストに対して IPv6 の情報の問い合わせが行われた (およびその逆) などが考えられる。
+.TP 
+\fBNO_RECOVERY\fP
+ドメインネームサーバーから恒久的な失敗 (permanent failure)  を意味する返事が返された。
+.TP 
+\fBTRY_AGAIN\fP
+ネームサーバーから一時的な失敗 (temporary failure)  を意味する返事が返された。次にはもうちょっと運が必要かも。
 .PP
-.\"O A successful query returns a pointer to a
-.\"O .I hostent
-.\"O structure that contains the following fields:
-Ì䤤¹ç¤ï¤»¤ËÀ®¸ù¤¹¤ë¤È¡¢
-.I hostent
-¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤¬ÊÖ¤µ¤ì¤ë¡£
-¤³¤Î¹½Â¤ÂΤϰʲ¼¤Î¥Õ¥£¡¼¥ë¥É¤«¤é¤Ê¤ë¡£
-.TP
-.I h_name
-.\"O This is the official name of this network host.
-¤³¤ì¤Ï¤³¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤Î¥ª¥Õ¥£¥·¥ã¥ë¤Ê̾Á°¤Ç¤¢¤ë¡£
-.TP
-.I h_aliases
-.\"O This is an array of pointers to unofficial aliases for the same host.
-.\"O The array is terminated by a NULL pointer.
-¤³¤ì¤Ï¡¢¤½¤Î¥Û¥¹¥È¤Î¥ª¥Õ¥£¥·¥ã¥ë¤Ç¤Ê¤¤ÊÌ̾¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤ÎÇÛÎó¤Ç¤¢¤ë¡£
-ÇÛÎó¤Ï¥Ì¥ë¡¦¥Ý¥¤¥ó¥¿¡¼¤Ç½ªÃ¼¤¹¤ë¡£
-.TP
-.I h_addrtype
-.\"O This is a copy of the
-.\"O .I af
-.\"O argument to
-.\"O .BR getipnodebyname ()
-.\"O or
-.\"O .BR getipnodebyaddr ().
-.\"O .I h_addrtype
-.\"O will always be
-.\"O .B AF_INET
-.\"O if the
-.\"O .I af
-.\"O argument was
-.\"O .BR AF_INET .
-.\"O .I h_addrtype
-.\"O will always be
-.\"O .B AF_INET6
-.\"O if the
-.\"O .I af
-.\"O argument was
-.\"O .BR AF_INET6 .
-¤³¤ì¤Ï
-.BR getipnodebyname ()
-¤Þ¤¿¤Ï
-.BR getipnodebyaddr ()
-¤ËÍ¿¤¨¤é¤ì¤¿
-.I af
-°ú¤­¿ô¤Î¥³¥Ô¡¼¤Ç¤¢¤ë¡£
-.I af
-°ú¤­¿ô¤¬
-.B AF_INET
-¤Ê¤é
-.I h_addrtype
-¤Ï¾ï¤Ë
-.B AF_INET
-¤Ë¤Ê¤ê¡¢
-.I af
-°ú¤­¿ô¤¬
-.B AF_INET6
-¤Ê¤é
-.I h_addrtype
-¤â¾ï¤Ë
-.B AF_INET6
-¤Ë¤Ê¤ë¡£
-.TP
-.I h_length
-.\"O This field will be set to
-.\"O .I sizeof(struct in_addr)
-.\"O if
-.\"O .I h_addrtype
-.\"O is
-.\"O .BR AF_INET ,
-.\"O and to
-.\"O .I sizeof(struct in6_addr)
-.\"O if
-.\"O .I h_addrtype
-.\"O is
-.\"O .BR AF_INET6 .
-¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢
-.I h_addrtype
-¤¬
-.B AF_INET
-¤Ê¤é
-.I sizeof(struct in_addr)
-¤Ë¡¢
-.I h_addrtype
-¤¬
-.B AF_INET6
-¤Ê¤é
-.I sizeof(struct in6_addr)
-¤ËÀßÄꤵ¤ì¤ë¡£
-.TP
-.I h_addr_list
-.\"O This is an array of one or more pointers to network address structures for the
-.\"O network host.
-.\"O The array is terminated by a NULL pointer.
-¤³¤ì¤Ï¤Ò¤È¤Ä°Ê¾å¤Î¥Ý¥¤¥ó¥¿¡¼¤ÎÇÛÎó¤Ç¡¢
-¤½¤ì¤¾¤ì¤Î¥Ý¥¤¥ó¥¿¡¼¤Ï¡¢
-¤½¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥Û¥¹¥È¤ËÂбþ¤¹¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¹½Â¤ÂΤò»Ø¤¹¡£
-¤³¤ÎÇÛÎó¤Ï¥Ì¥ë¡¦¥Ý¥¤¥ó¥¿¡¼¤Ç½ªÃ¼¤¹¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
+問い合わせに成功すると、 \fIhostent\fP 構造体へのポインタが返される。 この構造体は以下のフィールドからなる。
+.TP 
+\fIh_name\fP
+これはこのネットワークホストのオフィシャルな名前である。
+.TP 
+\fIh_aliases\fP
+これは、そのホストのオフィシャルでない別名へのポインターの配列である。 配列はヌル・ポインターで終端する。
+.TP 
+\fIh_addrtype\fP
+これは \fBgetipnodebyname\fP()  または \fBgetipnodebyaddr\fP()  に与えられた \fIaf\fP 引き数のコピーである。
+\fIaf\fP 引き数が \fBAF_INET\fP なら \fIh_addrtype\fP は常に \fBAF_INET\fP になり、 \fIaf\fP 引き数が
+\fBAF_INET6\fP なら \fIh_addrtype\fP も常に \fBAF_INET6\fP になる。
+.TP 
+\fIh_length\fP
+このフィールドは、 \fIh_addrtype\fP が \fBAF_INET\fP なら \fIsizeof(struct in_addr)\fP に、
+\fIh_addrtype\fP が \fBAF_INET6\fP なら \fIsizeof(struct in6_addr)\fP に設定される。
+.TP 
+\fIh_addr_list\fP
+これはひとつ以上のポインターの配列で、 それぞれのポインターは、 そのネットワークホストに対応するネットワークアドレス構造体を指す。
+この配列はヌル・ポインターで終端する。
+.SH 準拠
+.\" Not in POSIX.1-2001.
 RFC\ 2553.
-.\"O .\" Not in POSIX.1-2001.
-.\" POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O These functions were present in glibc 2.1.91-95, but were
-.\"O removed again.
-.\"O Several UNIX-like systems support them, but all
-.\"O call them deprecated.
-¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc 2.1.91-95 ¤Ë¸ºß¤·¤¿¤¬¡¢ºÆ¤Óºï½ü¤µ¤ì¤¿¡£
-¤¤¤¯¤Ä¤«¤Î UNIX É÷¥·¥¹¥Æ¥à¤Ï¤³¤ì¤é¤Î´Ø¿ô¤ËÂбþ¤·¤Æ¤¤¤ë¤¬¡¢
-¤³¤ì¤é¤Î´Ø¿ô¤ÏÁ´¤Æ¿ä¾©¤µ¤ì¤Ê¤¤¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR getaddrinfo (3),
-.BR getnameinfo (3),
-.BR inet_ntop (3),
-.BR inet_pton (3)
+.SH 注意
+これらの関数は glibc 2.1.91\-95 に存在したが、再び削除された。 いくつかの UNIX 風システムはこれらの関数に対応しているが、
+これらの関数は全て推奨されない。
+.SH 関連項目
+\fBgetaddrinfo\fP(3), \fBgetnameinfo\fP(3), \fBinet_ntop\fP(3), \fBinet_pton\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。