OSDN Git Service

Update draft for LDP 3.67
[linuxjm/LDP_man-pages.git] / draft / man2 / bind.2
index 44d35ba..ac4e709 100644 (file)
@@ -1,9 +1,8 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
 .\" Portions extracted from /usr/include/sys/socket.h, which does not have
 .\" any authorship information in it.  It is probably available under the GPL.
 .\"
+.\" %%%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.
@@ -23,6 +22,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\"
 .\" Other portions are from the 6.9 (Berkeley) 3/10/91 man page:
@@ -30,6 +30,7 @@
 .\" Copyright (c) 1983 The Regents of the University of California.
 .\" All rights reserved.
 .\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
+.\" %%%LICENSE_END
 .\"
 .\" Modified Mon Oct 21 23:05:29 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
 .\" Modified 1998 by Andi Kleen
 .\" $Id: bind.2,v 1.3 1999/04/23 19:56:07 freitag Exp $
 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 1996 Yosiaki Yanagihara
 .\"         all rights reserved.
 .\" Translated 1996-06-25, Yosiaki Yanagihara <yosiaki@bsd2.kbnes.nec.co.jp>
 .\" Updated 2007-06-13, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.55
 .\" Updated 2008-02-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
 .\"
-.TH BIND 2 2007-12-28 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O bind \- bind a name to a socket
-bind \- ¥½¥±¥Ã¥È¤Ë̾Á°¤ò¤Ä¤±¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.TH BIND 2 2014\-05\-10 Linux "Linux Programmer's Manual"
+.SH 名前
+bind \- ソケットに名前をつける
+.SH 書式
 .nf
-.\"O .BR "#include <sys/types.h>" "          /* See NOTES */"
-.BR "#include <sys/types.h>" "          /* ¡ÖÃí°Õ¡×»²¾È */"
-.B #include <sys/socket.h>
+\fB#include <sys/types.h>\fP          /* 「注意」参照 */
+\fB#include <sys/socket.h>\fP
 .sp
-.BI "int bind(int " sockfd ", const struct sockaddr *" addr ,
-.BI "         socklen_t " addrlen );
+\fBint bind(int \fP\fIsockfd\fP\fB, const struct sockaddr *\fP\fIaddr\fP\fB,\fP
+\fB         socklen_t \fP\fIaddrlen\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O When a socket is created with
-.\"O .BR socket (2),
-.\"O it exists in a name space (address family) but has no address assigned to it.
-.\"O .BR bind ()
-.\"O assigns the address specified to by
-.\"O .I addr
-.\"O to the socket referred to by the file descriptor
-.\"O .IR sockfd .
-.\"O .I addrlen
-.\"O specifies the size, in bytes, of the address structure pointed to by
-.\"O .IR addr .
-.\"O Traditionally, this operation is called \(lqassigning a name to a socket\(rq.
-.BR socket (2)
-¤Ç¥½¥±¥Ã¥È¤¬ºîÀ®¤µ¤ì¤¿¤È¤­¡¢¤½¤Î¥½¥±¥Ã¥È¤Ï̾Á°¶õ´Ö (¥¢¥É¥ì¥¹¡¦¥Õ¥¡¥ß¥ê¡¼) ¤Ë
-¸ºß¤¹¤ë¤¬¡¢¥¢¥É¥ì¥¹¤Ï³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Ê¤¤¡£
-.BR bind ()
-¤Ï¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
-.I sockfd
-¤Ç»²¾È¤µ¤ì¤ë¥½¥±¥Ã¥È¤Ë
-.I addr
-¤Ç»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤ë¡£
-.I addrlen
-¤Ë¤Ï
-.I addr
-¤¬»Ø¤¹¥¢¥É¥ì¥¹¹½Â¤ÂΤΥµ¥¤¥º¤ò¥Ð¥¤¥Èñ°Ì¤Ç»ØÄꤹ¤ë¡£
-ÅÁÅýŪ¤Ë¤³¤ÎÁàºî¤Ï
-¡Ö¥½¥±¥Ã¥È¤Ë̾Á°¤ò¤Ä¤±¤ë¡×
-¤È¸Æ¤Ð¤ì¤ë¡£
+.SH 説明
+\fBsocket\fP(2)  でソケットが作成されたとき、そのソケットは名前空間 (アドレス・ファミリー) に
+存在するが、アドレスは割り当てられていない。 \fBbind\fP()  は、ファイルディスクリプタ \fIsockfd\fP で参照されるソケットに
+\fIaddr\fP で指定されたアドレスを割り当てる。 \fIaddrlen\fP には \fIaddr\fP が指すアドレス構造体のサイズをバイト単位で指定する。
+伝統的にこの操作は 「ソケットに名前をつける」 と呼ばれる。
 .PP
-.\"O It is normally necessary to assign a local address using
-.\"O .BR bind ()
-.\"O before a
-.\"O .B SOCK_STREAM
-.\"O socket may receive connections (see
-.\"O .BR accept (2)).
-.B SOCK_STREAM
-¥½¥±¥Ã¥È¤¬Àܳ¤ò¼õ¤±ÉÕ¤±¤é¤ì¤ë¤è¤¦¤Ë¤¹¤ë¤Ë¤Ï
-.RB ( accept (2)
-¤ò»²¾È)¡¢Ä̾綠¤ÎÁ°¤Ë
-.BR bind ()
-¤ò»ÈÍѤ·¤Æ¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤ëɬÍפ¬¤¢¤ë¡£
+\fBSOCK_STREAM\fP ソケットが接続を受け付けられるようにするには (\fBaccept\fP(2)  を参照)、通常その前に \fBbind\fP()
+を使用してローカルアドレスを割り当てる必要がある。
 
-.\"O The rules used in name binding vary between address families.
-.\"O Consult the manual entries in Section 7 for detailed information.
-.\"O For
-.\"O .B AF_INET
-.\"O see
-.\"O .BR ip (7),
-̾Á°ÉÕ¤±¤Î¥ë¡¼¥ë¤Ï¥¢¥É¥ì¥¹¡¦¥Õ¥¡¥ß¥ê¡¼¤´¤È¤Ë°Û¤Ê¤Ã¤Æ¤¤¤ë¡£¾ÜºÙ¤Ê¾ðÊó¤Ï
-Âè 7 ¾Ï¤Î³Æ¥Þ¥Ë¥å¥¢¥ë¤ò»²¾È¤¹¤ë¤³¤È¡£
-.B AF_INET
-¤Ï
-.BR ip (7)
-¤ò¡¢
-.\"O for
-.\"O .B AF_INET6
-.\"O see
-.\"O .BR ipv6 (7),
-.B AF_INET6
-¤Ï
-.BR ipv6 (7)
-¤ò¡¢
-.\"O for
-.\"O .B AF_UNIX
-.\"O see
-.\"O .BR unix (7),
-.B AF_UNIX
-¤Ï
-.BR unix (7)
-¤ò¡¢
-.\"O for
-.\"O .B AF_APPLETALK
-.\"O see
-.\"O .BR ddp (7),
-.B AF_APPLETALK
-¤Ï
-.BR ddp (7)
-¤ò¡¢
-.\"O for
-.\"O .B AF_PACKET
-.\"O see
-.\"O .BR packet (7),
-.B AF_PACKET
-¤Ï
-.BR packet (7)
-¤ò¡¢
-.\"O for
-.\"O .B AF_X25
-.\"O see
-.\"O .BR x25 (7)
-.B AF_X25
-¤Ï
-.BR x25 (7)
-¤ò¡¢
-.\"O and for
-.\"O .B AF_NETLINK
-.\"O see
-.\"O .BR netlink (7).
-.B AF_NETLINK
-¤Ï
-.BR netlink (7)
-¤ò»²¾È¡£
+名前付けのルールはアドレス・ファミリーごとに異なっている。詳細な情報は 第 7 章の各マニュアルを参照すること。 \fBAF_INET\fP は
+\fBip\fP(7)  を、 \fBAF_INET6\fP は \fBipv6\fP(7)  を、 \fBAF_UNIX\fP は \fBunix\fP(7)  を、
+\fBAF_APPLETALK\fP は \fBddp\fP(7)  を、 \fBAF_PACKET\fP は \fBpacket\fP(7)  を、 \fBAF_X25\fP は
+\fBx25\fP(7)  を、 \fBAF_NETLINK\fP は \fBnetlink\fP(7)  を参照。
 
-.\"O The actual structure passed for the
-.\"O .I addr
-.\"O argument will depend on the address family.
-.\"O The
-.\"O .I sockaddr
-.\"O structure is defined as something like:
-.I addr
-°ú¤­¿ô¤Ë¼ÂºÝ¤Ë¤É¤Î¤è¤¦¤Ê¹½Â¤ÂΤ¬ÅϤµ¤ì¤ë¤«¤Ï¡¢
-¥¢¥É¥ì¥¹¡¦¥Õ¥¡¥ß¥ê¡¼¤Ë°Í¸¤¹¤ë¡£
-.I sockaddr
-¹½Â¤ÂΤϰʲ¼¤Î¤è¤¦¤Ê´¶¤¸¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
+\fIaddr\fP 引き数に実際にどのような構造体が渡されるかは、 アドレス・ファミリーに依存する。 \fIsockaddr\fP
+構造体は以下のような感じで定義されている:
 .in +4n
 .nf
 
@@ -215,206 +119,95 @@ struct sockaddr {
 
 .fi
 .in
-.\"O The only purpose of this structure is to cast the structure
-.\"O pointer passed in
-.\"O .I addr
-.\"O in order to avoid compiler warnings.
-.\"O See EXAMPLE below.
-¤³¤Î¹½Â¤ÂΤϡ¢
-.I addr
-¤ËÅϤµ¤ì¤ë¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ò¥­¥ã¥¹¥È¤·¡¢
-¥³¥ó¥Ñ¥¤¥é¤Î·Ù¹ð¥á¥Ã¥»¡¼¥¸¤òÍÞ¤¨¤ë¤¿¤á¤À¤±¤Ë¸ºß¤¹¤ë¡£
-²¼µ­¤Î¡ÖÎã¡×¤ò»²¾È¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O On success, zero is returned.
-.\"O On error, \-1 is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-À®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£
-¼ºÇÔ¤¹¤ë¤È \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤òŬÀÚ¤ËÀßÄꤹ¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EACCES
+この構造体は、 \fIaddr\fP に渡される構造体へのポインタをキャストし、 コンパイラの警告メッセージを抑えるためだけに存在する。 下記の「例」を参照。
+.SH 返り値
+成功した場合にはゼロが返される。エラー時には \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP 
+\fBEACCES\fP
 .\" e.g., privileged port in AF_INET domain
-.\"O The address is protected, and the user is not the superuser.
-¤½¤Î¥¢¥É¥ì¥¹¤ÏÊݸ¤ì¤Æ¤¤¤Æ¡¢¤«¤Ä¥æ¡¼¥¶¤¬¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤Ç¤Ï¤Ê¤¤¡£
-.TP
-.B EADDRINUSE
-.\"O The given address is already in use.
-»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹¤¬´û¤Ë»ÈÍÑÃæ¤Ç¤¢¤ë¡£
-.TP
-.B EBADF
-.\"O .I sockfd
-.\"O is not a valid descriptor.
-.I sockfd
-¤¬ÉÔÀµ¤Ê¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
-.TP
-.B EINVAL
-.\"O The socket is already bound to an address.
-.\"O .\" This may change in the future: see
-.\"O .\" .I linux/unix/sock.c for details.
-¥½¥±¥Ã¥È¤¬¤¹¤Ç¤Ë¥¢¥É¥ì¥¹¤Ë·ë¤Ó¤Ä¤± (bind) ¤é¤ì¤Æ¤¤¤ë¡£
-.\" ¤³¤ì¤Ï¾­ÍèÊѹ¹¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-.\" ¾Ü¤·¤¯¤Ï
-.\" .I linux/unix/sock.c
-.\" ¤ò»²¾È¤¹¤ë¤³¤È¡£
-.B ENOTSOCK
-.\"O .I sockfd
-.\"O is a descriptor for a file, not a socket.
-.I sockfd
-¤¬¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¡¢¥½¥±¥Ã¥È¤ËÂФ¹¤ë¤â¤Î¤Ç¤Ï¤Ê¤¤¡£
+そのアドレスは保護されていて、かつユーザがスーパーユーザではない。
+.TP 
+\fBEADDRINUSE\fP
+指定されたアドレスが既に使用中である。
+.TP 
+\fBEADDRINUSE\fP
+(Internet domain sockets)  The port number was specified as zero in the
+socket address structure, but, upon attempting to bind to an ephemeral port,
+it was determined that all port numbers in the ephemeral port range are
+currently in use.  See the discussion of
+\fI/proc/sys/net/ipv4/ip_local_port_range\fP \fBip\fP(7).
+.TP 
+.TP 
+\fBEBADF\fP
+\fIsockfd\fP が不正なディスクリプタである。
+.TP 
+\fBEINVAL\fP
+.\" This may change in the future: see
+.\" .I linux/unix/sock.c for details.
+ソケットがすでにアドレスに結びつけ (bind) られている。
+.TP 
+\fBENOTSOCK\fP
+\fIsockfd\fP がファイルに対するディスクリプタで、ソケットに対するものではない。
 .PP
-.\"O The following errors are specific to Unix domain
-.\"O .RB ( AF_UNIX )
-.\"O sockets:
-°Ê²¼¤Î¥¨¥é¡¼¤Ï Unix¥É¥á¥¤¥ó
-.RB ( AF_UNIX )
-¤Î¥½¥±¥Ã¥ÈÆÃÍ­¤Ç¤¢¤ë:
-.TP
-.B EACCES
-.\"O Search permission is denied on a component of the path prefix.
-.\"O (See also
-.\"O .BR path_resolution (7).)
-¥Ñ¥¹Ì¾¤Î¹½À®Í×ÁǤ˸¡º÷µö²Ä (search permission) ¤¬¤Ê¤¤
-.RB ( path_resolution (7)
-¤â»²¾È¤¹¤ë¤³¤È)¡£
-.TP
-.B EADDRNOTAVAIL
-.\"O A nonexistent interface was requested or the requested
-.\"O address was not local.
-¸ºß¤·¤Ê¤¤¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤¬Í׵ᤵ¤ì¤¿¤«¡¢Í׵ᤵ¤ì¤¿¥¢¥É¥ì¥¹¤¬
-¥í¡¼¥«¥ë¤Ç¤Ï¤Ê¤«¤Ã¤¿¡£
-.TP
-.B EFAULT
-.\"O .I addr
-.\"O points outside the user's accessible address space.
-.I addr
-¤¬¥æ¡¼¥¶¤Î¥¢¥¯¥»¥¹²Äǽ¤Ê¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
-.TP
-.B EINVAL
-.\"O The
-.\"O .I addrlen
-.\"O is wrong, or the socket was not in the
-.\"O .B AF_UNIX
-.\"O family.
-.I addrlen
-¤¬ÉÔÀµ¤Ç¤¢¤ë¤«¡¢¥½¥±¥Ã¥È¤¬
-.B AF_UNIX
-¥Õ¥¡¥ß¥ê¡¼¤Ç¤Ï¤Ê¤¤¡£
-.TP
-.B ELOOP
-.\"O Too many symbolic links were encountered in resolving
-.\"O .IR addr .
-.I addr
-¤ò²ò·è¤¹¤ëºÝ¤ËÁø¶ø¤·¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤¬Â¿²á¤®¤ë¡£
-.TP
-.B ENAMETOOLONG
-.\"O .I addr
-.\"O is too long.
-.I addr
-¤¬Ä¹²á¤®¤ë¡£
-.TP
-.B ENOENT
-.\"O The file does not exist.
-¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Ê¤¤¡£
-.TP
-.B ENOMEM
-.\"O Insufficient kernel memory was available.
-¥«¡¼¥Í¥ë¤Ë¡¢ÍøÍѲÄǽ¤Ê¥á¥â¥ê¡¼¤¬½½Ê¬¤Ë¤Ê¤¤¡£
-.TP
-.B ENOTDIR
-.\"O A component of the path prefix is not a directory.
-¥Ñ¥¹Ì¾¤Î¹½À®Í×ÁǤ¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤Ê¤¤¡£
-.TP
-.B EROFS
-.\"O The socket inode would reside on a read-only file system.
-¥½¥±¥Ã¥È inode ¤¬Æɤ߹þ¤ßÀìÍѤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Ë¤¢¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O SVr4, 4.4BSD, POSIX.1-2001
-.\"O .RB ( bind ()
-.\"O first appeared in 4.2BSD).
-.\"O .\" SVr4 documents an additional
-.\"O .\" .B ENOSR
-.\"O .\" general error condition, and
-.\"O .\" additional
-.\"O .\" .B EIO
-.\"O .\" and
-.\"O .\" .B EISDIR
-.\"O .\" Unix-domain error conditions.
-SVr4, 4.4BSD, POSIX.1-2001
-.RB ( bind ()
-¤Ï 4.2BSD ¤ÇºÇ½é¤Ë¸½¤ï¤ì¤¿)¡£
-.\" SVr4 ¤Ë¤Ï¾¤Ë¡¢°ìÈ̤Υ¨¥é¡¼¾õÂÖ
+以下のエラーは UNIXドメイン (\fBAF_UNIX\fP)  のソケット特有である:
+.TP 
+\fBEACCES\fP
+パス名の構成要素に検索許可 (search permission) がない (\fBpath_resolution\fP(7)  も参照すること)。
+.TP 
+\fBEADDRNOTAVAIL\fP
+存在しないインタフェースが要求されたか、要求されたアドレスが ローカルではなかった。
+.TP 
+\fBEFAULT\fP
+\fIaddr\fP がユーザのアクセス可能なアドレス空間の外を指している。
+.TP 
+\fBEINVAL\fP
+\fIaddrlen\fP が不正であるか、ソケットが \fBAF_UNIX\fP ファミリーではない。
+.TP 
+\fBELOOP\fP
+\fIaddr\fP を解決する際に遭遇したシンボリック・リンクが多過ぎる。
+.TP 
+\fBENAMETOOLONG\fP
+\fIaddr\fP が長過ぎる。
+.TP 
+\fBENOENT\fP
+ファイルが存在しない。
+.TP 
+\fBENOMEM\fP
+カーネルに、利用可能なメモリーが十分にない。
+.TP 
+\fBENOTDIR\fP
+パス名の構成要素がディレクトリではない。
+.TP 
+\fBEROFS\fP
+ソケット inode が読み込み専用のファイルシステム上にある。
+.SH 準拠
+.\" SVr4 documents an additional
 .\" .B ENOSR
-.\" µÚ¤Ó Unix ¥É¥á¥¤¥ó¤Î¥¨¥é¡¼¾õÂÖ
-.\" .BR EIO ,
+.\" general error condition, and
+.\" additional
+.\" .B EIO
+.\" and
 .\" .B EISDIR
-.\" ¤Ë¤Ä¤¤¤Æ¤Îµ­½Ò¤¬¤¢¤ë¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O POSIX.1-2001 does not require the inclusion of
-.\"O .IR <sys/types.h> ,
-.\"O and this header file is not required on Linux.
-.\"O However, some historical (BSD) implementations required this header
-.\"O file, and portable applications are probably wise to include it.
-POSIX.1-2001 ¤Ç¤Ï
-.I <sys/types.h>
-¤Î¥¤¥ó¥¯¥ë¡¼¥É¤Ïɬ¿Ü¤È¤µ¤ì¤Æ¤ª¤é¤º¡¢
-Linux ¤Ç¤Ï¤³¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤ÏɬÍפǤϤʤ¤¡£
-¤·¤«¤·¡¢Îò»ËŪ¤Ë¤Ï¡¢¤¤¤¯¤Ä¤«¤Î¼ÂÁõ (BSD ·Ï) ¤Ç¤³¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤¬
-ɬÍפǤ¢¤ê¡¢°Ü¿¢À­¤¬É¬Íפʥ¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¤³¤Î¥Õ¥¡¥¤¥ë¤ò
-¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë¤Î¤¬¸­ÌÀ¤Ç¤¢¤í¤¦¡£
+.\" UNIX-domain error conditions.
+SVr4, 4.4BSD, POSIX.1\-2001 (\fBbind\fP()  は 4.2BSD で最初に現われた)。
+.SH 注意
+POSIX.1\-2001 では \fI<sys/types.h>\fP のインクルードは必須とされておらず、 Linux
+ではこのヘッダファイルは必要ではない。 しかし、歴史的には、いくつかの実装 (BSD 系) でこのヘッダファイルが
+必要であり、移植性が必要なアプリケーションではこのファイルを インクルードするのが賢明であろう。
 
-.\"O The third argument of
-.\"O .BR bind ()
-.\"O is in reality an
-.\"O .I int
-.\"O (and this is what 4.x BSD and libc4 and libc5 have).
-.\"O Some POSIX confusion resulted in the present
-.\"O .IR socklen_t ,
-.\"O also used by glibc.
-.\"O See also
-.\"O .BR accept (2).
-.BR bind ()
-¤Î»°ÈÖÌܤΰú¤­¿ô¤Ï (4.x BSD ¤ä libc4, libc5 ¤ÈƱÍͤË) ¼ÂºÝ¤Ë¤Ï
-.I int
-¤Ç¤¢¤ë¡£glibc ¤Ç¤â»È¤ï¤ì¤Æ¤¤¤ë¸½ºß¤Î
-.I socklen_t
-¤Ë´Ø¤·¤Æ¡¢POSIX ¤Ë¤Ï¾¯¤·º®Í𤬤¢¤ë¡£
-¾Ü¤·¤¯¤Ï
-.BR accept (2)
-¤ò»²¾È¤Î¤³¤È¡£
-.\"O .SH BUGS
-.SH ¥Ð¥°
-.\"O The transparent proxy options are not described.
-Æ©²áŪ¥×¥í¥­¥· (transparent proxy) ¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æµ­½Ò¤·¤Æ¤¤¤Ê¤¤¡£
+\fBbind\fP()  の三番目の引き数は (4.x BSD や libc4, libc5 と同様に) 実際には \fIint\fP である。glibc
+でも使われている現在の \fIsocklen_t\fP に関して、POSIX には少し混乱がある。 詳しくは \fBaccept\fP(2)  を参照のこと。
+.SH バグ
 .\" FIXME What *are* transparent proxy options?
-.\"O .SH EXAMPLE
-.SH Îã
-.\"O An example of the use of
-.\"O .BR bind ()
-.\"O with Internet domain sockets can be found in
-.\"O .BR getaddrinfo (3).
-¥¤¥ó¥¿¡¼¥Í¥Ã¥È¡¦¥É¥á¥¤¥ó¡¦¥½¥±¥Ã¥È¤Ç¤Î
-.BR bind ()
-¤ÎÍøÍÑÎ㤬
-.BR getaddrinfo (3)
-¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¡£
+透過的プロキシ (transparent proxy) オプションについて記述していない。
+.SH 例
+インターネット・ドメイン・ソケットでの \fBbind\fP()  の利用例が \fBgetaddrinfo\fP(3)  に記載されている。
 
-.\"O The following example shows how to bind a stream socket in the Unix
-.\"O .RB ( AF_UNIX )
-.\"O domain, and accept connections:
-°Ê²¼¤ÎÎã¤Ï¡¢Unix ¥É¥á¥¤¥ó
-.RB ( AF_UNIX )
-¤Ç¥¹¥È¥ê¡¼¥à¥½¥±¥Ã¥È¤ò bind ¤¹¤ëÊýË¡¤ò¼¨¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£
 .\" listen.7 refers to this example.
 .\" accept.7 refers to this example.
 .\" unix.7 refers to this example.
+以下の例は、UNIX ドメイン (\fBAF_UNIX\fP)  でストリームソケットを bind する方法を示したものである。
 
 .nf
 #include <sys/socket.h>
@@ -426,7 +219,7 @@ Linux 
 #define MY_SOCK_PATH "/somepath"
 #define LISTEN_BACKLOG 50
 
-#define handle_error(msg) \\
+#define handle_error(msg) \e
     do { perror(msg); exit(EXIT_FAILURE); } while (0)
 
 int
@@ -449,7 +242,7 @@ main(int argc, char *argv[])
     if (bind(sfd, (struct sockaddr *) &my_addr,
             sizeof(struct sockaddr_un)) == \-1)
         handle_error("bind");
-    
+
     if (listen(sfd, LISTEN_BACKLOG) == \-1)
         handle_error("listen");
 
@@ -468,17 +261,11 @@ main(int argc, char *argv[])
        should be deleted using unlink(2) or remove(3) */
 }
 .fi
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR accept (2),
-.BR connect (2),
-.BR getsockname (2),
-.BR listen (2),
-.BR socket (2),
-.BR getaddrinfo (3),
-.BR getifaddrs (3),
-.BR ip (7),
-.BR ipv6 (7),
-.BR path_resolution (7),
-.BR socket (7),
-.BR unix (7)
+.SH 関連項目
+\fBaccept\fP(2), \fBconnect\fP(2), \fBgetsockname\fP(2), \fBlisten\fP(2), \fBsocket\fP(2),
+\fBgetaddrinfo\fP(3), \fBgetifaddrs\fP(3), \fBip\fP(7), \fBipv6\fP(7),
+\fBpath_resolution\fP(7), \fBsocket\fP(7), \fBunix\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。