OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man3 / bindresvport.3
1 .\" Copyright (C) 2007, Michael Kerrisk <mtk.manpages@gmail.com>
2 .\" and Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\" 2007-05-31, mtk: Rewrite and substantial additional text.
25 .\" 2008-12-03, mtk: Rewrote some pieces and fixed some errors
26 .\"
27 .\" Japanese Version Copyright (c) 1999 Shouichi Saito all rights reserved.
28 .\" Translated 1999-08-28, Shouichi Saito <ss236rx@ymg.urban.ne.jp>
29 .\" Proofed 1999-09-25, NAKANO Takeo <nakano@apm.seikei.ac.jp>
30 .\" Updated 2007-06-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.54
31 .\" Updated 2008-12-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.15
32 .\"
33 .TH BINDRESVPORT 3  2008-12-03 "" "Linux Programmer's Manual"
34 .SH Ì¾Á°
35 bindresvport \- ¥½¥±¥Ã¥È¤òÆø¢ IP ¥Ý¡¼¥È¤Ë¥Ð¥¤¥ó¥É¤¹¤ë
36 .SH ½ñ¼°
37 .nf
38 .B #include <sys/types.h>
39 .B #include <netinet/in.h>
40 .LP
41 .BI "int bindresvport(int " sockfd ", struct sockaddr_in *" sin );
42 .fi
43 .SH ÀâÌÀ
44 .LP
45 .BR bindresvport ()
46 ¤Ï¡¢¥½¥±¥Ã¥È¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÆø¢ÌµÌ¾ (privileged anonymous) IP ¥Ý¡¼¥È¤Ë
47 ¥Ð¥¤¥ó¥É¤¹¤ë¤Î¤Ë»È¤¦¡£Æø¢ÌµÌ¾ IP ¥Ý¡¼¥È¤È¤Ï¡¢
48 ¥Ý¡¼¥ÈÈֹ椬 512 ¤«¤é 1023 ¤ÎÈϰϤ«¤éǤ°Õ¤ËÁªÂò¤µ¤ì¤ë¥Ý¡¼¥È¤Ç¤¢¤ë¡£
49 .\" Glibc actually starts searching with a port # in the range 600 to 1023
50
51 .BR bindresvport ()
52 ¤Ë¤è¤Ã¤Æ¼Â¹Ô¤µ¤ì¤¿
53 .BR bind (2)
54 ¤¬À®¸ù¤·¡¢
55 .I sin
56 ¤¬ NULL °Ê³°¤Î¾ì¹ç¡¢¼ÂºÝ¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥Ý¡¼¥ÈÈֹ椬
57 .I sin\->sin_port
58 ¤ËÆþ¤ì¤ÆÊÖ¤µ¤ì¤ë¡£
59
60 .I sin
61 ¤Ë¤Ï NULL ¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤­¡¢¤½¤Î¾ì¹ç¤Ë¤Ï
62 .I sin\->sin_family
63 ¤Ï°ÅÌۤΤ¦¤Á¤Ë
64 .B AF_INET
65 ¤È¤ß¤Ê¤µ¤ì¤ë¡£
66 ¤·¤«¤·¡¢¤³¤Î¾ì¹ç¤Ë¤Ï¡¢
67 .BR bindresvport ()
68 ¤Ï¼ÂºÝ¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥Ý¡¼¥ÈÈÖ¹æ¤òÊÖ¤¹¼êÃʤò»ý¤¿¤Ê¤¤
69 (³ä¤êÅö¤Æ¤é¤ì¤¿¥Ý¡¼¥ÈÈÖ¹æ¤Ï¡¢¸å¤Ç
70 .BR getsockname (2)
71 ¤ò»È¤Ã¤Æ¼èÆÀ¤Ç¤­¤ë)¡£
72 .SH ÊÖ¤êÃÍ
73 .BR bindresvport ()
74 ¤ÏÀ®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£¤½¤ì°Ê³°¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
75 .I errno
76 ¤Ë¥¨¥é¡¼¤Î¸¶°ø¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
77 .SH ¥¨¥é¡¼
78 .BR bindresvport ()
79 ¤Ï
80 .BR bind (2)
81 ¤ÈƱ¤¸¸¶°ø¤Ç¼ºÇÔ¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
82 ¤µ¤é¤Ë¡¢°Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ë:
83 .TP
84 .BR EACCES
85 ¸Æ¤Ó½Ð¤·¸µ¤¬¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤ÎÆø¢¤ò»ý¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿ (¤è¤êÀµ³Î¤Ë¸À¤¦¤È¡¢
86 .B CAP_NET_BIND_SERVICE
87 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬É¬ÍפǤ¢¤ë)¡£
88 .TP
89 .B EADDRINUSE
90 Á´¤Æ¤ÎÆø¢¥Ý¡¼¥È¤¬»ÈÍÑÃæ¤Ç¤¢¤ë¡£
91 .TP
92 .BR EAFNOSUPPORT " (glibc 2.7 °ÊÁ°¤Ç¤Ï " EPFNOSUPPORT ")"
93 .I sin
94 ¤¬ NULL °Ê³°¤Ç¡¢¤«¤Ä
95 .I sin->sin_family
96 ¤¬
97 .B AF_INET
98 ¤Ç¤Ê¤«¤Ã¤¿¡£
99 .SH ½àµò
100 POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¡£
101 BSD, Solaris ¤ª¤è¤Ó¤½¤Î¾¤Î¿¤¯¤Î¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë¡£
102 .SH Ãí°Õ
103 .LP
104 .BR bindresvport ()
105 ¤Î¤¤¤¯¤Ä¤«¤Î¼ÂÁõ¤È°Û¤Ê¤ê¡¢glibc ¤Î¼ÂÁõ¤Ç¤Ï¸Æ¤Ó½Ð¤·¸µ¤¬
106 .I sin\->sin_port
107 ¤ÇÅϤ·¤¿ÃͤϤɤó¤ÊÃͤǤ¢¤Ã¤Æ¤â̵»ë¤µ¤ì¤ë¡£
108 .SH ´ØÏ¢¹àÌÜ
109 .BR bind (2),
110 .BR getsockname (2)