d1534953b1
Do not begin a line with single quote character. Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
153 lines
4.3 KiB
Groff
153 lines
4.3 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.
|
|
.\"
|
|
.\" From: @(#)getservent.3 8.3 (Berkeley) 1/12/94
|
|
.\" %Id: getservent.3,v 1.5 1997/02/22 15:00:13 peter Exp %
|
|
.\"
|
|
.Dd July 9, 1995
|
|
.Dt GETSERVENT 3
|
|
.Os BSD 4.2
|
|
.Sh ̾¾Î
|
|
.Nm getservent ,
|
|
.Nm getservbyport ,
|
|
.Nm getservbyname ,
|
|
.Nm setservent ,
|
|
.Nm endservent
|
|
.Nd ¥µ¡¼¥Ó¥¹¥¨¥ó¥È¥ê¤ò¼èÆÀ
|
|
.Sh ½ñ¼°
|
|
.Fd #include <netdb.h>
|
|
.Ft struct servent *
|
|
.Fn getservent
|
|
.Ft struct servent *
|
|
.Fn getservbyname "const char *name" "const char *proto"
|
|
.Ft struct servent *
|
|
.Fn getservbyport "int port" "const char *proto"
|
|
.Ft void
|
|
.Fn setservent "int stayopen"
|
|
.Ft void
|
|
.Fn endservent void
|
|
.Sh ²òÀâ
|
|
.Fn getservent
|
|
¡¢
|
|
.Fn getservbyname
|
|
¤ª¤è¤Ó
|
|
.Fn getservbyport
|
|
´Ø¿ô¤Ï¤½¤ì¤¾¤ì¡¢¼¡¤Ë
|
|
¼¨¤¹¹½Â¤ÂΤò»ý¤Ä¥ª¥Ö¥¸¥§¥¯¥È¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£¹½Â¤ÂΤˤÏ
|
|
¥Í¥Ã¥È¥ï¡¼¥¯¥µ¡¼¥Ó¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹
|
|
.Pa /etc/services
|
|
¤Ë¤¢¤ë¡¢¹Ô¤ÎÆâÌõ¥Õ¥£¡¼¥ë¥É¤¬
|
|
´Þ¤Þ¤ì¤Þ¤¹¡£
|
|
.Bd -literal -offset indent
|
|
struct servent {
|
|
char *s_name; /* ¥µ¡¼¥Ó¥¹¤Î¥ª¥Õ¥£¥·¥ã¥ë̾ */
|
|
char **s_aliases; /* ¥¨¥¤¥ê¥¢¥¹¥ê¥¹¥È */
|
|
int s_port; /* ¥µ¡¼¥Ó¥¹¤¬¾ïÃ󤹤ë¥Ý¡¼¥È */
|
|
char *s_proto; /* »ÈÍѤ¹¤ë¥×¥í¥È¥³¥ë */
|
|
};
|
|
.Ed
|
|
¤³¤Î¹½Â¤ÂΤΥá¥ó¥Ð¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£
|
|
.Bl -tag -width s_aliases
|
|
.It Fa s_name
|
|
¥µ¡¼¥Ó¥¹¤Î¥ª¥Õ¥£¥·¥ã¥ë̾¡£
|
|
.It Fa s_aliases
|
|
¥µ¡¼¥Ó¥¹¤Î¥¼¥í¤Ç½ª¤ï¤ëÊÌ̾
|
|
(¥¨¥¤¥ê¥¢¥¹)
|
|
¥ê¥¹¥È¡£
|
|
.It Fa s_port
|
|
¥µ¡¼¥Ó¥¹¤¬¾ïÃ󤹤ë¥Ý¡¼¥ÈÈֹ档¥Ý¡¼¥ÈÈÖ¹æ¤Ï
|
|
¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È½ç¤ÇÊÖ¤µ¤ì¤Þ¤¹¡£
|
|
.It Fa s_proto
|
|
¥µ¡¼¥Ó¥¹¤È¤Î¥³¥ó¥¿¥¯¥ÈÃæ¤Ë»ÈÍѤ¹¤ë¥×¥í¥È¥³¥ë̾¡£
|
|
.El
|
|
.Pp
|
|
.Fn getservent
|
|
´Ø¿ô¤Ï¡¢É¬Íפʤé¤Ð¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·¤Æ¼¡¤Î¹Ô¤òÆɤ߹þ¤ß¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn setservent
|
|
´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·¥ê¥ï¥¤¥ó¥É¤·¤Þ¤¹¡£
|
|
.Fa stayopen
|
|
¥Õ¥é¥°¤¬¥¼¥í¤Ç¤Ê¤±¤ì¤Ð¡¢
|
|
.Fn getservbyname
|
|
¤Þ¤¿¤Ï
|
|
.Fn getservbyport
|
|
¤Î³Æ¸Æ¤Ó½Ð¤·¸å¤Ë¡¢
|
|
¥Í¥Ã¥È¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ï¥¯¥í¡¼¥º¤µ¤ì¤Þ¤»¤ó¡£
|
|
.Pp
|
|
.Fn endservent
|
|
´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë¤ò¥¯¥í¡¼¥º¤·¤Þ¤¹¡£
|
|
.Pp
|
|
Ŭ¹ç¤¹¤ë¥×¥í¥È¥³¥ë̾¤Þ¤¿¤Ï¥Ý¡¼¥ÈÈֹ椬¸«ÉÕ¤«¤ë¤«¡¢¤µ¤â¤Ê¤±¤ì¤Ð
|
|
.Dv EOF
|
|
¤Ë
|
|
½Ð²ñ¤¦¤Þ¤Ç¡¢
|
|
.Fn getservbyname
|
|
¤ª¤è¤Ó
|
|
.Fn getservbyport
|
|
´Ø¿ô¤ÏºÇ½é¤«¤é½ç¼¡
|
|
¥Õ¥¡¥¤¥ë¤ò¸¡º÷¤·¤Þ¤¹¡£¥×¥í¥È¥³¥ë̾¤¬¶¡µë¤µ¤ì¤Æ¤¤¤Æ¤â(
|
|
.Dv NULL
|
|
¤Ç¤Ê¤¯¤Æ¤â)
|
|
¡¢¸¡º÷¤ÏŬ¹ç¤¹¤ë¥×¥í¥È¥³¥ë¤¬¸«ÉÕ¤«¤ë¤Þ¤Ç³¤±¤é¤ì¤Þ¤¹¡£
|
|
.ne 1i
|
|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
|
|
.Bl -tag -width /etc/services -compact
|
|
.It Pa /etc/services
|
|
.El
|
|
.Sh ¿ÇÃÇ
|
|
.Dv EOF
|
|
¤Þ¤¿¤Ï¥¨¥é¡¼¤Î¾ì¹ç¡¢
|
|
Null
|
|
¥Ý¥¤¥ó¥¿
|
|
(0)
|
|
¤¬ÊÖ¤ê¤Þ¤¹¡£
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr getprotoent 3
|
|
¡¢
|
|
.Xr services 5
|
|
.Sh Îò»Ë
|
|
.Fn getservent
|
|
¡¢
|
|
.Fn getservbyport
|
|
¡¢
|
|
.Fn getservbyname
|
|
¡¢
|
|
.Fn setservent
|
|
¤ª¤è¤Ó
|
|
.Fn endservent
|
|
´Ø¿ô¤Ï¡¢
|
|
.Bx 4.2
|
|
¤ÇºÇ½é¤Ë¼è¤êÆþ¤ì¤é¤ì¤Þ¤·¤¿¡£
|
|
.Sh ¥Ð¥°
|
|
¤³¤ì¤é¤Î´Ø¿ô¤ÏÀÅŪ¥Ç¡¼¥¿¥¹¥È¥ì¡¼¥¸¤ò»ÈÍѤ·¤Þ¤¹¡£¸å¤Ç»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ì¤Ð¡¢
|
|
°Ê¸å¤Î¸Æ¤Ó½Ð¤·¤Ç¾å½ñ¤¤¹¤ëÁ°¤Ë¥Ç¡¼¥¿¤ò¥³¥Ô¡¼¤·¤ÆÊݸ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
|
¥Ý¡¼¥ÈÈֹ椬¤¹¤Ù¤Æ
|
|
32 ¥Ó¥Ã¥È¤ËŬ¹ç¤¹¤ë¤È¹Í¤¨¤ë¤Î¤Ï¡¢¤¿¤Ö¤óÁÇËѲ᤮¤Þ¤¹¡£
|