d1534953b1
Do not begin a line with single quote character. Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
98 lines
3.3 KiB
Groff
98 lines
3.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.
|
||
.\"
|
||
.\" @(#)gethostname.3 8.1 (Berkeley) 6/4/93
|
||
.\" %Id: getdomainname.3,v 1.8 1997/02/22 14:58:06 peter Exp %
|
||
.\"
|
||
.Dd May 6, 1994
|
||
.Dt GETDOMAINNAME 3
|
||
.Os BSD 4.2
|
||
.Sh ̾¾Î
|
||
.Nm getdomainname ,
|
||
.Nm setdomainname
|
||
.Nd ¸½ºß¤Î¥Û¥¹¥È¤Î¥É¥á¥¤¥ó̾¤ò¼èÆÀ/ÀßÄê
|
||
.Sh ½ñ¼°
|
||
.Fd #include <unistd.h>
|
||
.Ft int
|
||
.Fn getdomainname "char *name" "int namelen"
|
||
.Ft int
|
||
.Fn setdomainname "const char *name" "int namelen"
|
||
.Sh ²òÀâ
|
||
.Fn Getdomainname
|
||
¤ÏÁ°¤Ë
|
||
.Fn setdomainname
|
||
¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤¿¡¢¸½ºß¤Î¥×¥í¥»¥Ã¥µ¤Îɸ½à¥É¥á¥¤¥ó̾¤òÊÖ¤·¤Þ¤¹¡£¥Ñ¥é¥á¡¼
|
||
¥¿
|
||
.Fa namelen
|
||
¤Ï
|
||
.Fa name
|
||
ÇÛÎó¤Î¥µ¥¤¥º¤ò»ØÄꤷ¤Þ¤¹¡£¶õ´Ö¤¬½½Ê¬¤Ë¤Ê¤¤¾ì¹ç¤ò½ü¤¤¤Æ¡¢ÊÖ¤µ¤ì¤ëÃͤÏ
|
||
null ¤Ç½ª¤ï¤ê¤Þ¤¹¡£
|
||
.Pp
|
||
.Fn Setdomainname
|
||
¤Ï
|
||
.Fa name
|
||
¤¹¤ë¥Û¥¹¥È¥Þ¥·¥ó¤Î¡¢Ä¹¤µ
|
||
.Fa namelen
|
||
¤Î¥É¥á¥¤¥ó̾¤òÀßÄꤷ¤Þ¤¹¡£¤³¤Î¸Æ¤Ó½Ð¤·¤Ï¥¹¡¼¥Ñ¥æ¡¼¥¶¤Ë¸ÂÄꤵ¤ì¤Þ¤¹¡£ÄÌ
|
||
¾ï¤Ï¥·¥¹¥Æ¥à¤ò¡¢¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¤¹¤ë¾ì¹ç¤Ë¤À¤±»ÈÍѤµ¤ì¤Þ¤¹¡£
|
||
.Sh Ìá¤êÃÍ
|
||
¸Æ¤Ó½Ð¤·¤ËÀ®¸ù¤·¤¿¾ì¹ç¤ÏÃÍ 0¤¬ÊÖ¤ê¤Þ¤¹¡£¸Æ¤Ó½Ð¤·¤Ë¼ºÇÔ¤·¤¿¾ì¹ç¤ÏÃÍ -1
|
||
¤¬Ê֤ꡢ¥°¥í¡¼¥Ð¥ë¤Ê°ÌÃÖ
|
||
.Va errno
|
||
¤Ë¥¨¥é¡¼¥³¡¼¥É¤¬ÃÖ¤«¤ì¤Þ¤¹¡£
|
||
.Sh ¥¨¥é¡¼
|
||
¤³¤ì¤é¤Î¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤Æ¡¢¼¡¤Î¥¨¥é¡¼¤¬ÊÖ¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
|
||
.Bl -tag -width Er
|
||
.It Bq Er EFAULT
|
||
.Fa name
|
||
¤Þ¤¿¤Ï
|
||
.Fa namelen
|
||
¥Ñ¥é¥á¡¼¥¿¤ËÍ¿¤¨¤¿¥¢¥É¥ì¥¹¤¬Ìµ¸ú¤Ç¤¹¡£
|
||
.It Bq Er EPERM
|
||
¸Æ¤Ó½Ð¤·¸µ¤¬¥Û¥¹¥È̾¤òÀßÄꤷ¤è¤¦¤È¤·¤Þ¤·¤¿¤¬¡¢¥¹¡¼¥Ñ¥æ¡¼¥¶¤Ç¤Ï¤¢¤ê¤Þ¤»
|
||
¤ó¡£
|
||
.El
|
||
.Sh ´ØÏ¢¹àÌÜ
|
||
.Xr gethostid 3 ,
|
||
.Xr gethostname 3 ,
|
||
.Xr sysctl 3
|
||
.Sh ¥Ð¥°
|
||
¥É¥á¥¤¥ó̾¤Ï¡¢(
|
||
.Ao Pa sys/param.h Ac
|
||
¤Ë¤è¤ë)
|
||
.Dv MAXHOSTNAMELEN
|
||
Ťµ¤Î¥¥ã¥é¥¯¥¿¡¢¸½ºß 256 ʸ»ú¤Ë¸Â¤é¤ì¤Æ¤¤¤Þ¤¹¡£
|
||
.Sh Îò»Ë
|
||
.Fn getdomainname
|
||
´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¤Ï¡¢
|
||
.Bx 4.2
|
||
¤ÇºÇ½é¤ËÅо줷¤Þ¤·¤¿¡£
|