This section is based on catpages contributed by Mainichi Communications, Inc. Translated by: MYCOM team Converted by: Japanese Online Manual Project <man-jp@jp.FreeBSD.ORG> Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
142 lines
4 KiB
Groff
142 lines
4 KiB
Groff
.\" Copyright (c) 1983, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" 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.
|
|
.\"
|
|
.\" @(#)getprotoent.3 8.1 (Berkeley) 6/4/93
|
|
.\"
|
|
.Dd June 4, 1993
|
|
.Dt GETPROTOENT 3
|
|
.Os BSD 4.2
|
|
.Sh ̾¾Î
|
|
.Nm getprotoent ,
|
|
.Nm getprotobynumber ,
|
|
.Nm getprotobyname ,
|
|
.Nm setprotoent ,
|
|
.Nm endprotoent
|
|
.Nd ¥×¥í¥È¥³¥ë¥¨¥ó¥È¥ê¤ò¼èÆÀ
|
|
.Sh ½ñ¼°
|
|
.Fd #include <netdb.h>
|
|
.Ft struct protoent *
|
|
.Fn getprotoent void
|
|
.Ft struct protoent *
|
|
.Fn getprotobyname "const char *name"
|
|
.Ft struct protoent *
|
|
.Fn getprotobynumber "int proto"
|
|
.Ft void
|
|
.Fn setprotoent "int stayopen"
|
|
.Ft void
|
|
.Fn endprotoent void
|
|
.Sh ²òÀâ
|
|
.Fn getprotoent
|
|
¡¢
|
|
.Fn getprotobyname
|
|
¤ª¤è¤Ó
|
|
.Fn getprotobynumber
|
|
´Ø¿ô¤Ï¤½¤ì¤¾¤ì¡¢
|
|
¼¡¤Ë¼¨¤¹¹½Â¤ÂΤò»ý¤Ä¥ª¥Ö¥¸¥§¥¯¥È¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£¹½Â¤ÂΤˤϡ¢
|
|
¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥È¥³¥ë¥Ç¡¼¥¿¥Ù¡¼¥¹
|
|
.Pa /etc/protocols
|
|
¤Ë¤¢¤ë¹Ô¤ÎÆâÌõ¥Õ¥£¡¼¥ë¥É
|
|
¤¬´Þ¤Þ¤ì¤Þ¤¹¡£
|
|
.Bd -literal -offset indent
|
|
.Pp
|
|
struct protoent {
|
|
char *p_name; /* ¥×¥í¥È¥³¥ë¤Î¥ª¥Õ¥£¥·¥ã¥ë̾ */
|
|
char **p_aliases; /* ¥¨¥¤¥ê¥¢¥¹¥ê¥¹¥È */
|
|
int p_proto; /* ¥×¥í¥È¥³¥ëÈÖ¹æ */
|
|
};
|
|
.Ed
|
|
.Pp
|
|
¤³¤Î¹½Â¤ÂΤΥá¥ó¥Ð¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£
|
|
.Bl -tag -width p_aliases
|
|
.It Fa p_name
|
|
¥×¥í¥È¥³¥ë¤Î¥ª¥Õ¥£¥·¥ã¥ë̾¡£
|
|
.It Fa p_aliases
|
|
¥×¥í¥È¥³¥ë¤Î¥¼¥í¤Ç½ª¤ï¤ëÊÌ̾
|
|
(¥¨¥¤¥ê¥¢¥¹)
|
|
¥ê¥¹¥È¡£
|
|
.It Fa p_proto
|
|
¥×¥í¥È¥³¥ëÈֹ档
|
|
.El
|
|
.Pp
|
|
.Fn getprotoent
|
|
´Ø¿ô¤Ï¡¢É¬Íפʤé¤Ð¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·¤Æ¼¡¤Î¹Ô¤òÆÉ¤ß
|
|
¹þ¤ß¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn setprotoent
|
|
´Ø¿ô¤Ï¡¢¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·¤Æ¥ê¥ï¥¤¥ó¥É¤·¤Þ¤¹¡£
|
|
.Fa stayopen
|
|
¥Õ¥é¥°¤¬¥¼¥í¤Ç¤Ê¤±¤ì¤Ð¡¢
|
|
.Fn getprotobyname
|
|
¤Þ¤¿¤Ï
|
|
.Fn getprotobynumber
|
|
¤Î³Æ¸Æ¤Ó½Ð¤·¤Î¸å¡¢¥Í¥Ã¥È¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ï¥¯¥í¡¼¥º¤µ¤ì¤Þ¤»¤ó¡£
|
|
|
|
.Fn endprotoent
|
|
´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë¤ò¥¯¥í¡¼¥º¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn getprotobyname
|
|
¤ª¤è¤Ó
|
|
.Fn getprotobynumber
|
|
´Ø¿ô¤Ï¡¢Å¬¹ç¤¹¤ë
|
|
¥×¥í¥È¥³¥ë̾¤Þ¤¿¤Ï¥×¥í¥È¥³¥ëÈֹ椬¸«ÉÕ¤«¤ë¤«¡¢¤Þ¤¿¤Ï
|
|
.Dv EOF
|
|
¤Ë½Ð²ñ¤¦¤Þ¤Ç¥Õ¥¡¥¤¥ë¤ò½ç¼¡¸¡º÷¤·¤Þ¤¹¡£
|
|
.Sh Ìá¤êÃÍ
|
|
.Dv EOF
|
|
¤Þ¤¿¤Ï¥¨¥é¡¼¤Ç
|
|
Null
|
|
¥Ý¥¤¥ó¥¿
|
|
(0)
|
|
¤¬ÊÖ¤ê¤Þ¤¹¡£
|
|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
|
|
.Bl -tag -width /etc/protocols -compact
|
|
.It Pa /etc/protocols
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr protocols 5
|
|
.Sh Îò»Ë
|
|
.Fn getprotoent
|
|
¡¢
|
|
.Fn getprotobynumber
|
|
¡¢
|
|
.Fn getprotobyname
|
|
¡¢
|
|
.Fn setprotoent
|
|
¤ª¤è¤Ó
|
|
.Fn endprotoent
|
|
´Ø¿ô¤Ï
|
|
.Bx 4.2
|
|
¤ÇºÇ½é¤Ë¼è¤êÆþ¤ì¤é¤ì¤Þ¤·¤¿¡£
|
|
.Sh ¥Ð¥°
|
|
¤³¤ì¤é¤Î´Ø¿ô¤ÏÀÅŪ¥Ç¡¼¥¿¶õ´Ö¤ò»ÈÍѤ·¤Þ¤¹¡£¸å¤Ç»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ì¤Ð¡¢°Ê¸å¤Î
|
|
¸Æ¤Ó½Ð¤·¤Ç¾å½ñ¤¤¹¤ëÁ°¤Ë¥Ç¡¼¥¿¤ò¥³¥Ô¡¼¤·¤ÆÊݸ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤Ê¤ª¡¢
|
|
¥×¥í¥È¥³¥ë¥Ç¡¼¥¿¤È¤·¤Æ¼õ¤±Æþ¤ì¤ë¤Î¤Ï¸½ºß¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥×¥í¥È¥³¥ë
|
|
¤À¤±¤Ç¤¹¡£
|