OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / gethostbyname.3
index 9075b18..9439eee 100644 (file)
 .\" Modified 2002-08-05, Michael Kerrisk
 .\" Modified 2004-10-31, Andries Brouwer
 .\"
-.\" Japanese Version Copyright (c) 1998-2000 NAKANO Takeo all rights reserved.
-.\" Translated 1998-04-30, NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Modified 1998-12-06, NAKANO Takeo
-.\" Updated & Modified 1999-10-12, NAKANO Takeo
-.\" Updated & Modified 2001-07-01, Yuichi SATO <ysato@h4.dion.ne.jp>
-.\" Updated & Modified 2002-01-03, Yuichi SATO
-.\" Updated & Modified 2003-11-27, Yuichi SATO <ysato444@yahoo.co.jp>
-.\" Updated & Modified 2005-01-10, Yuichi SATO
-.\" Updated 2006-01-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2007-06-11, Akihiro MOTOKI, LDP v2.54
-.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
+.\"*******************************************************************
 .\"
-.TH GETHOSTBYNAME 3 2010-10-04 "" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent,
-.\"O h_errno,
-.\"O herror, hstrerror,
-.\"O gethostbyaddr_r,
-.\"O gethostbyname2, gethostbyname2_r, gethostbyname_r,
-.\"O gethostent_r \- get network host entry
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETHOSTBYNAME 3 2010\-10\-04 "" "Linux Programmer's Manual"
 .SH 名前
-gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent,
-h_errno,
-herror, hstrerror,
-gethostbyaddr_r,
-gethostbyname2, gethostbyname2_r, gethostbyname_r,
-gethostent_r \- ネットワーク上のホストのエントリを取得する
-.\"O .SH SYNOPSIS
+gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno,
+herror, hstrerror, gethostbyaddr_r, gethostbyname2, gethostbyname2_r,
+gethostbyname_r, gethostent_r \- ネットワーク上のホストのエントリを取得する
 .SH 書式
 .nf
-.B #include <netdb.h>
-.B extern int h_errno;
+\fB#include <netdb.h>\fP
+\fBextern int h_errno;\fP
 .sp
-.BI "struct hostent *gethostbyname(const char *" name );
+\fBstruct hostent *gethostbyname(const char *\fP\fIname\fP\fB);\fP
 .sp
-.\"O .BR "#include <sys/socket.h>" "       /* for AF_INET */"
-.BR "#include <sys/socket.h>" "       /* AF_INET を使う場合 */"
-.BI "struct hostent *gethostbyaddr(const void *" addr ,
-.BI "                              socklen_t " len ", int " type );
+\fB#include <sys/socket.h>\fP       /* AF_INET を使う場合 */
+\fBstruct hostent *gethostbyaddr(const void *\fP\fIaddr\fP\fB,\fP
+\fB                              socklen_t \fP\fIlen\fP\fB, int \fP\fItype\fP\fB);\fP
 .sp
-.BI "void sethostent(int " stayopen );
+\fBvoid sethostent(int \fP\fIstayopen\fP\fB);\fP
 .sp
-.B void endhostent(void);
+\fBvoid endhostent(void);\fP
 .sp
-.BI "void herror(const char *" s );
+\fBvoid herror(const char *\fP\fIs\fP\fB);\fP
 .sp
-.BI "const char *hstrerror(int " err );
+\fBconst char *hstrerror(int \fP\fIerr\fP\fB);\fP
 .sp
-.\"O /* System V/POSIX extension */
 /* System V/POSIX 拡張 */
 .br
-.B struct hostent *gethostent(void);
+\fBstruct hostent *gethostent(void);\fP
 .sp
-.\"O /* GNU extensions */
 /* GNU 拡張 */
 .br
-.BI "struct hostent *gethostbyname2(const char *" name ", int " af );
+\fBstruct hostent *gethostbyname2(const char *\fP\fIname\fP\fB, int \fP\fIaf\fP\fB);\fP
 .sp
-.B "int gethostent_r("
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+\fBint gethostent_r(\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
 .sp
-.BI "int gethostbyaddr_r(const void *" addr ", socklen_t " len ", int " type ,
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+\fBint gethostbyaddr_r(const void *\fP\fIaddr\fP\fB, socklen_t \fP\fIlen\fP\fB, int \fP\fItype\fP\fB,\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
 .sp
-.BI "int gethostbyname_r(const char *" name ,
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+\fBint gethostbyname_r(const char *\fP\fIname\fP\fB,\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
 .sp
-.BI "int gethostbyname2_r(const char *" name ", int " af,
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+\fBint gethostbyname2_r(const char *\fP\fIname\fP\fB, int \fP\fIaf,\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
 .fi
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .PD 0
 .ad l
-.BR gethostbyname2 (),
-.BR gethostent_r (),
-.BR gethostbyaddr_r (),
-.BR gethostbyname_r (),
-.BR gethostbyname2_r ():
+\fBgethostbyname2\fP(), \fBgethostent_r\fP(), \fBgethostbyaddr_r\fP(),
+\fBgethostbyname_r\fP(), \fBgethostbyname2_r\fP():
 .RS 4
 _BSD_SOURCE || _SVID_SOURCE
 .RE
 
-.BR herror (),
-.BR hstrerror ():
+\fBherror\fP(), \fBhstrerror\fP():
 .RS 4
-.TP 4
-.\"O Since glibc 2.8:
+.TP  4
 glibc 2.8 以降:
 _BSD_SOURCE || _SVID_SOURCE || _GNU_SOURCE
-.TP
-.\"O Before glibc 2.8:
-.\"O none
+.TP 
 glibc 2.8 より前:
 なし
 .RE
 .ad b
 .PD
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O The
-.\"O .BR gethostbyname* ()
-.\"O and
-.\"O .BR gethostbyaddr* ()
-.\"O functions are obsolete.
-.\"O Applications should use
-.\"O .BR getaddrinfo (3)
-.\"O and
-.\"O .BR getnameinfo (3)
-.\"O instead.
-.BR gethostbyname* ()
-と
-.BR gethostbyaddr* ()
-は過去のものである。
-アプリケーションでは、代わりに
-.BR getaddrinfo (3)
-と
-.BR getnameinfo (3)
-を使用すること。
+\fBgethostbyname*\fP()  と \fBgethostbyaddr*\fP()  は過去のものである。 アプリケーションでは、代わりに
+\fBgetaddrinfo\fP(3)  と \fBgetnameinfo\fP(3)  を使用すること。
 
-.\"O The
-.\"O .BR gethostbyname ()
-.\"O function returns a structure of type
-.\"O .I hostent
-.\"O for the given host
-.\"O .IR name .
-.\"O Here
-.\"O .I name
-.\"O is either a hostname, or an IPv4 address in standard dot notation (as for
-.\"O .BR inet_addr (3)),
-.\"O or an IPv6 address in colon (and possibly dot) notation.
-.\"O (See RFC\ 1884 for the description of IPv6 addresses.)
-.BR gethostbyname ()
-関数は与えられたホスト名
-.I name
-に対応する構造体
-.I hostent
-を返す。
-.I name
-にはホスト名、ドット区切りの IPv4 アドレス
-.RB ( inet_addr (3)
-参照)、コロン区切りの IPv6 アドレス (おそらくドット区切りでも大丈夫)
-のいずれかを指定する
-(IPv6 アドレスの記述方法については RFC\ 1884 を参考にしてほしい)。
-.\"O If
-.\"O .I name
-.\"O is an IPv4 or IPv6 address, no lookup is performed and
-.\"O .BR gethostbyname ()
-.\"O simply copies
-.\"O .I name
-.\"O into the
-.\"O .I h_name
-.\"O field and its
-.\"O .I struct in_addr
-.\"O equivalent into the
-.\"O .I h_addr_list[0]
-.\"O field of the returned
-.\"O .I hostent
-.\"O structure.
-.I name
-が IPv4 か IPv6 のアドレスだった場合、
-名前解決 (lookup) は行われない。その場合には、
-.BR gethostbyname ()
-は
-.I name
-をそのまま
-.I hostent
-構造体の
-.I h_name
-フィールドにコピーし、
-さらに
-.I name
-を
-.I struct in_addr
-形式で表したデータを
-.I hostent
-構造体の
-.I h_addr_list[0]
-フィールドに入れて、その
-.I hostent
-構造体を返す。
-.\"O If
-.\"O .I name
-.\"O doesn't end in a dot and the environment variable
-.\"O .B HOSTALIASES
-.\"O is set, the alias file pointed to by
-.\"O .B HOSTALIASES
-.\"O will first be searched for
-.\"O .I name
-.\"O (see
-.\"O .BR hostname (7)
-.\"O for the file format).
-.I name
-がドットで終了していて、かつ環境変数
-.B HOSTALIASES
-が設定されている場合、まず
-.B HOSTALIASES
-で指定されているエイリアスファイルから
-.I name
-のエントリが検索される (ファイルのフォーマットについては
-.BR hostname (7)
-を参照のこと)。
-.\"O The current domain and its parents are searched unless \fIname\fP
-.\"O ends in a dot.
-.I name
+\fBgethostbyname\fP()  関数は与えられたホスト名 \fIname\fP に対応する構造体 \fIhostent\fP を返す。 \fIname\fP
+にはホスト名、ドット区切りの IPv4 アドレス (\fBinet_addr\fP(3)  参照)、コロン区切りの IPv6 アドレス
+(おそらくドット区切りでも大丈夫)  のいずれかを指定する (IPv6 アドレスの記述方法については RFC\ 1884 を参考にしてほしい)。
+\fIname\fP が IPv4 か IPv6 のアドレスだった場合、 名前解決 (lookup) は行われない。その場合には、
+\fBgethostbyname\fP()  は \fIname\fP をそのまま \fIhostent\fP 構造体の \fIh_name\fP フィールドにコピーし、
+さらに \fIname\fP を \fIstruct in_addr\fP 形式で表したデータを \fIhostent\fP 構造体の \fIh_addr_list[0]\fP
+フィールドに入れて、その \fIhostent\fP 構造体を返す。 \fIname\fP がドットで終了していて、かつ環境変数 \fBHOSTALIASES\fP
+が設定されている場合、まず \fBHOSTALIASES\fP で指定されているエイリアスファイルから \fIname\fP のエントリが検索される
+(ファイルのフォーマットについては \fBhostname\fP(7)  を参照のこと)。 \fIname\fP
 がドットで終了していなければ、現在のドメインとその親ドメインが検索される。
 .PP
-.\"O The
-.\"O .BR gethostbyaddr ()
-.\"O function returns a structure of type \fIhostent\fP
-.\"O for the given host address \fIaddr\fP of length \fIlen\fP and address type
-.\"O \fItype\fP.
-.\"O Valid address types are
-.\"O .B AF_INET
-.\"O and
-.\"O .BR AF_INET6 .
-.BR gethostbyaddr ()
-関数は与えられたホストアドレス
-.I addr
-(長さ \fIlen\fP、 タイプ \fItype\fP) に対応する構造体
-.I hostent
-を返す。
-用いることのできるタイプは
-.B AF_INET
-と
-.B AF_INET6
-である。
-.\"O The host address argument is a pointer to a struct of a type depending
-.\"O on the address type, for example a \fIstruct in_addr *\fP (probably
-.\"O obtained via a call to
-.\"O .BR inet_addr (3))
-.\"O for address type
-.\"O .BR AF_INET .
-ホストアドレス引き数はアドレスタイプに依存した
-構造体へのポインタである。
-例えば、アドレスタイプ
-.B AF_INET
-に対しては
-.RB ( inet_addr (3)
-の呼び出しで得られる)
-\fIstruct in_addr *\fP である。
+\fBgethostbyaddr\fP()  関数は与えられたホストアドレス \fIaddr\fP (長さ \fIlen\fP、 タイプ \fItype\fP)
+に対応する構造体 \fIhostent\fP を返す。 用いることのできるタイプは \fBAF_INET\fP と \fBAF_INET6\fP である。
+ホストアドレス引き数はアドレスタイプに依存した 構造体へのポインタである。 例えば、アドレスタイプ \fBAF_INET\fP に対しては
+(\fBinet_addr\fP(3)  の呼び出しで得られる)  \fIstruct in_addr *\fP である。
 .PP
-.\"O The
-.\"O .BR sethostent ()
-.\"O function specifies, if \fIstayopen\fP is true (1),
-.\"O that a connected TCP socket should be used for the name server queries and
-.\"O that the connection should remain open during successive queries.
-.\"O Otherwise, name server queries will use UDP datagrams.
-.BR sethostent ()
-関数は、ネームサーバへの接続形態を指定する。
-.I stayopen
-が真 (1) ならば、ネームサーバへの問い合わせには、
-接続された TCP ソケットを用い、連続した問い合わせの間に接続を維持する。
+\fBsethostent\fP()  関数は、ネームサーバへの接続形態を指定する。 \fIstayopen\fP が真 (1)
+ならば、ネームサーバへの問い合わせには、 接続された TCP ソケットを用い、連続した問い合わせの間に接続を維持する。
 偽ならばネームサーバへの問い合わせに UDP データグラムを用いる。
 .PP
-.\"O The
-.\"O .BR endhostent ()
-.\"O function ends the use of a TCP connection for name
-.\"O server queries.
-.BR endhostent ()
-関数はネームサーバへの問い合わせに用いた TCP 接続の利用を終了する。
+\fBendhostent\fP()  関数はネームサーバへの問い合わせに用いた TCP 接続の利用を終了する。
 .PP
-.\"O The (obsolete)
-.\"O .BR herror ()
-.\"O function prints the error message associated
-.\"O with the current value of \fIh_errno\fP on \fIstderr\fP.
-(廃止予定の)
-.BR herror ()
-関数は現在の
-.I h_errno
-に対応するエラーメッセージを標準エラー \fIstderr\fP に出力する。
+(廃止予定の)  \fBherror\fP()  関数は現在の \fIh_errno\fP に対応するエラーメッセージを標準エラー \fIstderr\fP に出力する。
 .PP
-.\"O The (obsolete)
-.\"O .BR hstrerror ()
-.\"O function takes an error number
-.\"O (typically \fIh_errno\fP) and returns the corresponding message string.
-(廃止予定の)
-.BR hstrerror ()
-関数はエラー番号 (通常は \fIh_errno\fP) を引き数に取り、
+(廃止予定の)  \fBhstrerror\fP()  関数はエラー番号 (通常は \fIh_errno\fP) を引き数に取り、
 対応するエラーメッセージ文字列を返す。
 .PP
-.\"O The domain name queries carried out by
-.\"O .BR gethostbyname ()
-.\"O and
-.\"O .BR gethostbyaddr ()
-.\"O use a combination of any or all of the name server
-.\"O .BR named (8),
-.\"O a broken out line from \fI/etc/hosts\fP, and the Network
-.\"O Information Service (NIS or YP), depending upon the contents of the
-.\"O \fIorder\fP line in
-.\"O .IR /etc/host.conf .
-.\"O .\" (See
-.\"O .\" .BR resolv+ (8)).
-.\"O The default action is to query
-.\"O .BR named (8),
-.\"O followed by
-.\"O .IR /etc/hosts .
-.BR gethostbyname ()
-と
-.BR gethostbyaddr ()
-によって実行されるドメイン名の問い合わせでは、ネームサーバ
-.BR named (8)、
-.I /etc/hosts
-のデータ行、および
-Network Information Service (NIS または YP)
-が組み合わせて使用される。何が使用されるかは、
-.I /etc/host.conf
-の
-.I order
-行の内容により決まる。
-.\" (詳しくは
-.\" .BR resolv+ (8)
-.\" を参照)。
-デフォルトでは、まず
-.BR named (8)
-に問い合わせを行い、次いで
-.I /etc/hosts
-を参照する。
+.\" (See
+.\" .BR resolv+ (8)).
+\fBgethostbyname\fP()  と \fBgethostbyaddr\fP()  によって実行されるドメイン名の問い合わせでは、ネームサーバ
+\fBnamed\fP(8)、 \fI/etc/hosts\fP のデータ行、および Network Information Service (NIS または
+YP)  が組み合わせて使用される。何が使用されるかは、 \fI/etc/host.conf\fP の \fIorder\fP 行の内容により決まる。
+デフォルトでは、まず \fBnamed\fP(8)  に問い合わせを行い、次いで \fI/etc/hosts\fP を参照する。
 .PP
-.\"O The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows:
-.I hostent
-構造体は
-.I <netdb.h>
-で以下のように定義されている:
+\fIhostent\fP 構造体は \fI<netdb.h>\fP で以下のように定義されている:
 .sp
 .in +4n
 .nf
@@ -379,372 +160,101 @@ struct hostent {
     int    h_length;          /* length of address */
     char **h_addr_list;       /* list of addresses */
 }
-.\"O #define h_addr h_addr_list[0] /* for backward compatibility */
 #define h_addr h_addr_list[0] /* 過去との互換性のため */
 .fi
 .in
 .PP
-.\"O The members of the \fIhostent\fP structure are:
-.I hostent
-構造体のメンバは以下の通り。
-.TP
-.I h_name
-.\"O The official name of the host.
+\fIhostent\fP 構造体のメンバは以下の通り。
+.TP 
+\fIh_name\fP
 ホストの正式名 (official name)。
-.TP
-.I h_aliases
-.\"O An array of alternative names for the host, terminated by a NULL pointer.
+.TP 
+\fIh_aliases\fP
 ホストの別名の配列。配列は NULL ポインタで終端される。
-.TP
-.I h_addrtype
-.\"O The type of address; always
-.\"O .B AF_INET
-.\"O or
-.\"O .B AF_INET6
-.\"O at present.
-アドレスのタイプ。現在はすべて
-.B AF_INET
-または
-.B AF_INET6
-である。
-.TP
-.I h_length
-.\"O The length of the address in bytes.
+.TP 
+\fIh_addrtype\fP
+アドレスのタイプ。現在はすべて \fBAF_INET\fP または \fBAF_INET6\fP である。
+.TP 
+\fIh_length\fP
 バイト単位で表したアドレスの長さ。
-.TP
-.I h_addr_list
-.\"O An array of pointers to network addresses for the host (in network byte
-.\"O order), terminated by a NULL pointer.
-ホストのネットワークアドレスへのポインタの配列。
-配列は NULL ポインタで終端される。
-ネットワークアドレスはネットワークバイトオーダ形式である。
-.TP
-.I h_addr
-.\"O The first address in \fIh_addr_list\fP for backward compatibility.
-.I h_addr_list
-の最初のアドレス。過去との互換性を保つためのものである。
-.\"O .SH "RETURN VALUE"
+.TP 
+\fIh_addr_list\fP
+ホストのネットワークアドレスへのポインタの配列。 配列は NULL ポインタで終端される。 ネットワークアドレスはネットワークバイトオーダ形式である。
+.TP 
+\fIh_addr\fP
+\fIh_addr_list\fP の最初のアドレス。過去との互換性を保つためのものである。
 .SH 返り値
-.\"O The
-.\"O .BR gethostbyname ()
-.\"O and
-.\"O .BR gethostbyaddr ()
-.\"O functions return the
-.\"O .I hostent
-.\"O structure or a NULL pointer if an error occurs.
-.\"O On error, the
-.\"O .I h_errno
-.\"O variable holds an error number.
-.BR gethostbyname ()
-および
-.BR gethostbyaddr ()
-関数は
-.I hostent
-構造体を返す。エラーが起こったら NULL ポインタを返す。エラーの際には
-.I h_errno
-変数がエラーの番号を保持する。
-.\"O When non-NULL, the return value may point at static data, see the notes below.
-返り値が NULL でない場合、静的データをポインタで指していることもある。
-以下の「注意」を参照すること。
-.\"O .SH "ERRORS"
+\fBgethostbyname\fP()  および \fBgethostbyaddr\fP()  関数は \fIhostent\fP 構造体を返す。エラーが起こったら
+NULL ポインタを返す。エラーの際には \fIh_errno\fP 変数がエラーの番号を保持する。 返り値が NULL
+でない場合、静的データをポインタで指していることもある。 以下の「注意」を参照すること。
 .SH エラー
-.\"O The variable \fIh_errno\fP can have the following values:
-.I h_errno
-変数は以下の値を取りうる。
-.TP
-.B HOST_NOT_FOUND
-.\"O The specified host is unknown.
+\fIh_errno\fP 変数は以下の値を取りうる。
+.TP 
+\fBHOST_NOT_FOUND\fP
 指定したホストが見つからない。
-.TP
-.\"O .B NO_ADDRESS " or " NO_DATA
-.B NO_ADDRESS " または " NO_DATA
-.\"O The requested name is valid but does not have an IP address.
+.TP 
+\fBNO_ADDRESS  または  NO_DATA\fP
 指定した名前は有効だが IP アドレスを持っていない。
-.TP
-.B NO_RECOVERY
-.\"O A nonrecoverable name server error occurred.
+.TP 
+\fBNO_RECOVERY\fP
 ネームサーバの復旧不能なエラーが起こった。
-.TP
-.B TRY_AGAIN
-.\"O A temporary error occurred on an authoritative name server.
-.\"O Try again later.
-authoritative なネームサーバで一時的なエラーが起こった。
-時間をおいてもう一度試すこと。
-.\"O .SH FILES
+.TP 
+\fBTRY_AGAIN\fP
+authoritative なネームサーバで一時的なエラーが起こった。 時間をおいてもう一度試すこと。
 .SH ファイル
-.TP
-.I /etc/host.conf
-.\"O resolver configuration file
+.TP 
+\fI/etc/host.conf\fP
 名前解決の設定ファイル
-.TP
-.I /etc/hosts
-.\"O host database file
+.TP 
+\fI/etc/hosts\fP
 ホストのデータベースファイル
-.TP
-.I /etc/nsswitch.conf
-.\"O name service switch configuration
+.TP 
+\fI/etc/nsswitch.conf\fP
 ネームサービス切替設定
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-.\"O POSIX.1-2001 specifies
-.\"O .BR gethostbyname (),
-.\"O .BR gethostbyaddr (),
-.\"O .BR sethostent (),
-.\"O .BR endhostent (),
-.\"O .BR gethostent (),
-.\"O and
-.\"O .IR h_errno ;
-.\"O .BR gethostbyname (),
-.\"O .BR gethostbyaddr (),
-.\"O and
-.\"O .IR h_errno
-.\"O are marked obsolescent in that standard.
-POSIX.1-2001 では、
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-.BR sethostent (),
-.BR endhostent (),
-.BR gethostent (),
-.I h_errno
-が規定されており、
-.BR gethostbyaddr ()
-と
-.BR gethostbyname ()
-は廃止予定であるとされている。
-.\"O POSIX.1-2008 removes the specifications of
-.\"O .BR gethostbyname (),
-.\"O .BR gethostbyaddr (),
-.\"O and
-.\"O .IR h_errno ,
-.\"O recommending the use of
-.\"O .BR getaddrinfo (3)
-.\"O and
-.\"O .BR getnameinfo (3)
-.\"O instead.
-POSIX.1-2008 では
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-.I h_errno
-の仕様が削除されている。
-代わりに、
-.BR getaddrinfo (3)
-と
-.BR getnameinfo (3)
-の使用が推奨されている。
-.\"O .SH NOTES
+POSIX.1\-2001 では、 \fBgethostbyname\fP(), \fBgethostbyaddr\fP(), \fBsethostent\fP(),
+\fBendhostent\fP(), \fBgethostent\fP(), \fIh_errno\fP が規定されており、 \fBgethostbyaddr\fP()  と
+\fBgethostbyname\fP()  は廃止予定であるとされている。 POSIX.1\-2008 では \fBgethostbyname\fP(),
+\fBgethostbyaddr\fP(), \fIh_errno\fP の仕様が削除されている。 代わりに、 \fBgetaddrinfo\fP(3)  と
+\fBgetnameinfo\fP(3)  の使用が推奨されている。
 .SH 注意
-.\"O The functions
-.\"O .BR gethostbyname ()
-.\"O and
-.\"O .BR gethostbyaddr ()
-.\"O may return pointers to static data, which may be overwritten by
-.\"O later calls.
-.\"O Copying the
-.\"O .I struct hostent
-.\"O does not suffice, since it contains pointers; a deep copy is required.
-.BR gethostbyname ()
-および
-.BR gethostbyaddr ()
-関数は静的データへのポインタを返す。
-このポインタは、その後の呼び出しで上書きされるかもしれない。
-.I hostent
-構造体はポインタを含んでいるので、構造体のコピーだけでは不十分である;
-より深いコピーが必要である。
+\fBgethostbyname\fP()  および \fBgethostbyaddr\fP()  関数は静的データへのポインタを返す。
+このポインタは、その後の呼び出しで上書きされるかもしれない。 \fIhostent\fP
+構造体はポインタを含んでいるので、構造体のコピーだけでは不十分である; より深いコピーが必要である。
 .LP
-.\"O In the original BSD implementation the
-.\"O .I len
-.\"O argument
-.\"O of
-.\"O .BR gethostbyname ()
-.\"O was an
-.\"O .IR int .
-オリジナルの BSD の実装では、
-.BR gethostbyname ()
-の
-.I len
-引き数は
-.I int
-であった。
-.\"O The SUSv2 standard is buggy and declares the
-.\"O .I len
-.\"O argument of
-.\"O .BR gethostbyaddr ()
-.\"O to be of type
-.\"O .IR size_t .
-.\"O (That is wrong, because it has to be
-.\"O .IR int ,
-.\"O and
-.\"O .I size_t
-.\"O is not.
-.\"O POSIX.1-2001 makes it
-.\"O .IR socklen_t ,
-.\"O which is OK.)
-.\"O See also
-.\"O .BR accept (2).
-SUSv2 標準はバグが多く、
-.BR gethostbyaddr ()
-の
-.I len
-パラメータを
-.I size_t
-型として宣言している。
-(これは誤りで、
-.I size_t
-型ではなく
-.I int
-型でなければならない。
-POSIX.1-2001 ではこれを
-.I socklen_t
-としているが、これは OK。)
-.BR accept (2)
-も参照。
+オリジナルの BSD の実装では、 \fBgethostbyname\fP()  の \fIlen\fP 引き数は \fIint\fP であった。 SUSv2
+標準はバグが多く、 \fBgethostbyaddr\fP()  の \fIlen\fP パラメータを \fIsize_t\fP 型として宣言している。 (これは誤りで、
+\fIsize_t\fP 型ではなく \fIint\fP 型でなければならない。 POSIX.1\-2001 ではこれを \fIsocklen_t\fP
+としているが、これは OK。)  \fBaccept\fP(2)  も参照。
 .LP
-.\"O The BSD prototype for
-.\"O .BR gethostbyaddr ()
-.\"O uses
-.\"O .I const char *
-.\"O for the first argument.
-.BR gethostbyaddr ()
-の BSD のプロトタイプは、最初の引き数として
-.I const char *
-を使う。
-.\"O .SS "System V/POSIX Extension"
+\fBgethostbyaddr\fP()  の BSD のプロトタイプは、最初の引き数として \fIconst char *\fP を使う。
 .SS "System V/POSIX 拡張"
-.\"O POSIX requires the
-.\"O .BR gethostent ()
-.\"O call, that should return the next entry in the host data base.
-POSIX では、
-.BR gethostent ()
-が必須とされている。
-この関数はホストデータベースの次のエントリを返す。
-.\"O When using DNS/BIND this does not make much sense, but it may
-.\"O be reasonable if the host data base is a file that can be read
-.\"O line by line.
-.\"O On many systems a routine of this name reads
-.\"O from the file
-.\"O .IR /etc/hosts .
-DNS/BIND を使う場合はあまり意味を持たないが、
-ホストデータベースが 1 行ずつ読み込まれるファイルである場合は意味がある。
-多くのシステムでは、この名前のルーチンはファイル
-.I /etc/hosts
-を読み込む。
-.\"O .\" e.g., Linux, FreeBSD, UnixWare, HP-UX
-.\"O It may be available only when the library was built without DNS support.
-.\"O .\" e.g., FreeBSD, AIX
-.\"O The glibc version will ignore ipv6 entries.
-.\"O This function is not reentrant,
-.\"O and glibc adds a reentrant version
-.\"O .BR gethostent_r ().
-.\" 例えば、Linux, FreeBSD, UnixWare, HP-UX
-DNS サポートなしでライブラリがビルドされた場合にのみ利用可能である。
-.\" 例えば、FreeBSD, AIX
-glibc 版は ipv6 エントリを無視する。
-この関数はリエントラント (reentrant) ではなく、
-glibc にはリエントラント版の
-.BR gethostent_r ()
-が追加された。
-.\"O .SS "GNU Extensions"
+.\" e.g., Linux, FreeBSD, UnixWare, HP-UX
+.\" e.g., FreeBSD, AIX
+POSIX では、 \fBgethostent\fP()  が必須とされている。 この関数はホストデータベースの次のエントリを返す。 DNS/BIND
+を使う場合はあまり意味を持たないが、 ホストデータベースが 1 行ずつ読み込まれるファイルである場合は意味がある。
+多くのシステムでは、この名前のルーチンはファイル \fI/etc/hosts\fP を読み込む。 DNS
+サポートなしでライブラリがビルドされた場合にのみ利用可能である。 glibc 版は ipv6 エントリを無視する。 この関数はリエントラント
+(reentrant) ではなく、 glibc にはリエントラント版の \fBgethostent_r\fP()  が追加された。
 .SS "GNU 拡張"
-.\"O Glibc2 also has a
-.\"O .BR gethostbyname2 ()
-.\"O that works like
-.\"O .BR gethostbyname (),
-.\"O but permits to specify the address family to which the address must belong.
-glibc2 には
-.BR gethostbyname2 ()
-もあり、
-.BR gethostbyname ()
-と同じように動作するが、
+glibc2 には \fBgethostbyname2\fP()  もあり、 \fBgethostbyname\fP()  と同じように動作するが、
 こちらはアドレスが属するアドレスファミリーを指定することができる。
 .LP
-.\"O Glibc2 also has reentrant versions
-.\"O .BR gethostent_r (),
-.\"O .BR gethostbyaddr_r (),
-.\"O .BR gethostbyname_r ()
-.\"O and
-.\"O .BR gethostbyname2_r ().
-glibc2 にはリエントラントな
-.BR gethostent_r (),
-.BR gethostbyaddr_r (),
-.BR gethostbyname_r ()
-と
-.BR gethostbyname2_r ()
-もある。
-.\"O The caller supplies a
-.\"O .I hostent
-.\"O structure
-.\"O .I ret
-.\"O which will be filled in on success, and a temporary work buffer
-.\"O .I buf
-.\"O of size
-.\"O .IR buflen .
-呼び出し側は、成功時に結果が格納される
-.I hostent
-構造体
-.I ret
-と、大きさ
-.I buflen
-の一時的な作業バッファ
-.I buf
-を提供する。
-.\"O After the call,
-.\"O .I result
-.\"O will point to the result on success.
-.\"O In case of an error
-.\"O or if no entry is found
-.\"O .I result
-.\"O will be NULL.
-コール終了後、成功した場合
-.I result
-は結果を指している。
-エラーの場合、またはエントリが見つからなかった場合、
-.I result
-は NULL になる。
-.\"O The functions return 0 on success and a nonzero error number on failure.
-.\"O In addition to the errors returned by the nonreentrant
-.\"O versions of these functions, if
-.\"O .I buf
-.\"O is too small, the functions will return
-.\"O .BR ERANGE ,
-.\"O and the call should be retried with a larger buffer.
-これらの関数は、成功した場合 0 を返し、失敗の場合は 0 以外のエラー番号を返す。
-これらの関数のリエントラントでないバージョンが返すエラーに加えて、
-これらの関数は、
-.I buf
-が小さすぎた場合に
-.B ERANGE
-を返す。この場合はもっと大きなバッファを用意して
-関数呼び出しを再度行うべきである。
-.\"O The global variable
-.\"O .I h_errno
-.\"O is not modified, but the address of a variable in which to store error numbers
-.\"O is passed in
-.\"O .IR h_errnop .
-大域変数
-.I h_errno
-は変更されないが、エラー番号を格納する変数のアドレスが
-.I h_errnop
-に渡される。
-.\"O .SH BUGS
+glibc2 にはリエントラントな \fBgethostent_r\fP(), \fBgethostbyaddr_r\fP(),
+\fBgethostbyname_r\fP()  と \fBgethostbyname2_r\fP()  もある。 呼び出し側は、成功時に結果が格納される
+\fIhostent\fP 構造体 \fIret\fP と、大きさ \fIbuflen\fP の一時的な作業バッファ \fIbuf\fP を提供する。
+コール終了後、成功した場合 \fIresult\fP は結果を指している。 エラーの場合、またはエントリが見つからなかった場合、 \fIresult\fP は
+NULL になる。 これらの関数は、成功した場合 0 を返し、失敗の場合は 0 以外のエラー番号を返す。
+これらの関数のリエントラントでないバージョンが返すエラーに加えて、 これらの関数は、 \fIbuf\fP が小さすぎた場合に \fBERANGE\fP
+を返す。この場合はもっと大きなバッファを用意して 関数呼び出しを再度行うべきである。 大域変数 \fIh_errno\fP
+は変更されないが、エラー番号を格納する変数のアドレスが \fIh_errnop\fP に渡される。
 .SH バグ
-.\"O .BR gethostbyname ()
-.\"O does not recognize components of a dotted IPv4 address string
-.\"O that are expressed in hexadecimal.
-.BR gethostbyname ()
-は、16進数表現のドット区切りの IPv4 アドレス文字列の要素を認識しない。
 .\" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973
-.\"O .SH "SEE ALSO"
+\fBgethostbyname\fP()  は、16進数表現のドット区切りの IPv4 アドレス文字列の要素を認識しない。
 .SH 関連項目
-.BR getaddrinfo (3),
 .\" .BR getipnodebyaddr (3),
 .\" .BR getipnodebyname (3),
-.BR getnameinfo (3),
-.BR inet (3),
-.BR inet_ntop (3),
-.BR inet_pton (3),
-.BR resolver (3),
-.BR hosts (5),
-.BR nsswitch.conf (5),
-.BR hostname (7),
-.BR named (8)
+\fBgetaddrinfo\fP(3), \fBgetnameinfo\fP(3), \fBinet\fP(3), \fBinet_ntop\fP(3),
+\fBinet_pton\fP(3), \fBresolver\fP(3), \fBhosts\fP(5), \fBnsswitch.conf\fP(5),
+\fBhostname\fP(7), \fBnamed\fP(8)
 .\" .BR resolv+ (8)