doc/ja_JP.eucJP/man/man3/ethers.3
Kazuo Horikawa 6a00dc5ed2 man3 update to 4.5-RELEASE base done by jpman project <man-jp@jp.FreeBSD.org>
Submitted by:	Yuko Sasaki <yuko@veltec.co.jp>
2002-05-18 07:12:57 +00:00

195 lines
5 KiB
Groff

.\" Copyright (c) 1995
.\" Bill Paul <wpaul@ctr.columbia.edu>. 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 Bill Paul.
.\" 4. Neither the name of the author nor the names of any co-contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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.
.\"
.\" %FreeBSD: src/lib/libc/net/ethers.3,v 1.10.2.10 2001/12/14 18:33:55 ru Exp %
.\" $FreeBSD$
.\"
.Dd April 12, 1995
.Dt ETHERS 3
.Os
.Sh ̾¾Î
.Nm ethers ,
.Nm ether_line ,
.Nm ether_aton ,
.Nm ether_ntoa ,
.Nm ether_ntohost ,
.Nm ether_hostton
.Nd ¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹ÊÑ´¹¤ª¤è¤ÓÄ´ºº¥ë¡¼¥Á¥ó
.Sh ¥é¥¤¥Ö¥é¥ê
.Lb libc
.Sh ½ñ¼°
.In sys/types.h
.In sys/socket.h
.In net/ethernet.h
.Ft int
.Fn ether_line "const char *l" "struct ether_addr *e" "char *hostname"
.Ft struct ether_addr *
.Fn ether_aton "const char *a"
.Ft char *
.Fn ether_ntoa "const struct ether_addr *n"
.Ft int
.Fn ether_ntohost "char *hostname" "const struct ether_addr *e"
.Ft int
.Fn ether_hostton "const char *hostname" "struct ether_addr *e"
.Sh ²òÀâ
¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢
.Ar ether_addr
¹½Â¤ÂΤò»ÈÍѤ·¤Æ¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤òÁàºî¤·¤Þ¤¹¡£
¤³¤Î¹½Â¤ÂΤϥإåÀ¥Õ¥¡¥¤¥ë
.Aq Pa netinet/if_ether.h
¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
.Bd -literal -offset indent
/*
* ¥¤¡¼¥µ¥Í¥Ã¥È(MAC)¥¢¥É¥ì¥¹¤Î¥Ð¥¤¥È¿ô
*/
#define ETHER_ADDR_LEN 6
/*
* 48 ¥Ó¥Ã¥È¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤Î¹½Â¤ÂÎ
*/
struct ether_addr {
u_char octet[ETHER_ADDR_LEN];
};
.Ed
.Pp
.Fn ether_line
´Ø¿ô¤Ï¡¢
.Xr ethers 5
·Á¼°¤Î
.Tn ASCII
ʸ»úÎó¤Ç¤¢¤ë
.Ar l
¤òÁöºº¤·¡¢Ê¸»úÎó¤Ç»ØÄꤵ¤ì¤¿¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤ò
.Ar e
¤ËÀßÄꤷ¡¢¥Û¥¹¥È̾¤ò
.Ar h
¤ËÀßÄꤷ¤Þ¤¹¡£
¤³¤Î´Ø¿ô¤Ï¡¢
.Pa /etc/ethers
¤Î¹Ô¤ò¤½¤Î¹½À®Éôʬ¤Ë¥Ñ¡¼¥¹¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤Þ¤¹¡£
.Pp
.Fn ether_aton
´Ø¿ô¤Ï¡¢¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤Î
.Tn ASCII
ɽ¸½¤ò
.Ar ether_addr
¹½Â¤ÂΤËÊÑ´¹¤·¤Þ¤¹¡£
ƱÍͤˡ¢
.Fn ether_ntoa
¤Ï¡¢
.Ar ether_addr
¹½Â¤ÂΤȤ·¤Æ»ØÄꤵ¤ì¤¿¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤ò
.Tn ASCII
ʸ»úÎó¤ËÊÑ´¹¤·¤Þ¤¹¡£
.Pp
.Fn ether_ntohost
´Ø¿ô¤È
.Fn ether_hostton
´Ø¿ô¤Ï¡¢¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤ò
.Pa /etc/ethers
¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç»ØÄꤵ¤ì¤¿Âбþ¤¹¤ë¥Û¥¹¥È̾¤Ë¥Þ¥Ã¥×¤·¤Þ¤¹¡£
.Fn ether_ntohost
¤Ï¡¢¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤«¤é¥Û¥¹¥È̾¤Ø¤ÎÊÑ´¹¤ò¹Ô¤¤¡¢
.Fn ether_hostton
¤Ï¡¢¥Û¥¹¥È̾¤«¤é¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤Ø¤ÎÊÑ´¹¤ò¹Ô¤¤¤Þ¤¹¡£
.Sh Ìá¤êÃÍ
.Fn ether_line
¤Ï¡¢½èÍý¤¬À®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤·¤Þ¤¹¡£
Í¿¤¨¤é¤ì¤¿¹Ô
.Ar l
¤Î°ìÉô¤Ç¤â¥Ñ¡¼¥¹¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï 0 ¤Ç¤Ê¤¤ÃͤòÊÖ¤·¤Þ¤¹¡£
Ãê½Ð¤µ¤ì¤¿¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤òÍ¿¤¨¤é¤ì¤¿
.Ar ether_addr
¹½Â¤ÂÎ
.Ar e
¤ËÊÖ¤·¡¢¥Û¥¹¥È̾¤òÍ¿¤¨¤é¤ì¤¿Ê¸»úÎó
.Ar h
¤ËÊÖ¤·¤Þ¤¹¡£
.Pp
.Fn ether_ntoa
¤Ï¡¢½èÍý¤¬À®¸ù¤¹¤ë¤È¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤Î
.Tn ASCII
ɽ¸½¤¬Æþ¤Ã¤¿Ê¸»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£
Í¿¤¨¤é¤ì¤¿
.Ar ether_addr
¹½Â¤ÂΤòÊÑ´¹¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢
.Dv NULL
¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£
Ʊ¤¸¤è¤¦¤Ë¡¢
.Fn ether_aton
¤ÏÀ®¸ù¤¹¤ë¤È
.Ar ether_addr
¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤·¡¢¼ºÇÔ¤¹¤ë¤È
.Dv NULL
¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£
.Pp
.Fn ether_ntohost
´Ø¿ô¤È
.Fn ether_hostton
´Ø¿ô¤ÏξÊý¤È¤â¡¢À®¸ù¤·¤¿¾ì¹ç¤Ï 0 ¤òÊÖ¤·¡¢
.Pa /etc/ethers
¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤Ë°ìÃפ¹¤ë¤â¤Î¤ò¸«¤Ä¤±¤é¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï
0 ¤Ç¤Ê¤¤ÃͤòÊÖ¤·¤Þ¤¹¡£
.Sh Ãí
¥æ¡¼¥¶¤Ï¡¢
.Fn ether_line ,
.Fn ether_ntohost
¤ª¤è¤Ó
.Fn ether_hostton
¤Î³Æ´Ø¿ô¤ËÅϤµ¤ì¤ë¥Û¥¹¥È̾ʸ»úÎ󤬡¢
ÊÖ¤µ¤ì¤¿¥Û¥¹¥È̾¤òÆþ¤ì¤é¤ì¤ë¤Û¤ÉÂ礭¤¤¤³¤È¤òÊݾڤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
.Sh NIS Áê¸ßºîÍÑ
.Pa /etc/ethers
¤ÎÃæ¤Ë 1 ¤Ä¤Î + ¤¬Æþ¤Ã¤¿¹Ô¤¬¤¢¤ë¾ì¹ç¡¢
.Fn ether_ntohost
´Ø¿ô¤È
.Fn ether_hostton
´Ø¿ô¤Ï¡¢
.Pa /etc/ethers
¥Õ¥¡¥¤¥ëÆâ¤Î¥Ç¡¼¥¿¤Ë²Ã¤¨¤Æ¡¢
NIS
.Pa ethers.byname
¤ª¤è¤Ó
.Pa ethers.byaddr
¥Þ¥Ã¥×¤òÄ´¤Ù¤è¤¦¤È¤·¤Þ¤¹¡£
.Sh ´ØÏ¢¹àÌÜ
.Xr yp 4 ,
.Xr ethers 5
.Sh ¥Ð¥°
.Fn ether_aton
´Ø¿ô¤È
.Fn ether_ntoa
´Ø¿ô¤Ï¡¢¤³¤ì¤é¤¬¼¡¤Ë¸Æ¤Ó½Ð¤µ¤ì¤¿¤È¤­¤Ë¤Ï
¾å½ñ¤­¤µ¤ì¤ë²ÄǽÀ­¤Î¤¢¤ëÀÅŪ¥á¥â¥êÎΰè¤ËÊݸ¤µ¤ì¤¿ÃͤòÊÖ¤·¤Þ¤¹¡£
.Sh Îò»Ë
.Nm
¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Î¤³¤Î¼ÂÁõ¤Ï¡¢
.Fx 2.1
¤Î¤¿¤á¤ËºîÀ®¤µ¤ì¡¢Åо줷¤Þ¤·¤¿¡£