1999-12-09 17:26:08 +01:00
|
|
|
|
.\" 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
|
2002-11-03 07:38:28 +01:00
|
|
|
|
.\" %FreeBSD: src/lib/libc/gen/gethostname.3,v 1.5.2.5 2001/12/14 18:33:51 ru Exp %
|
1999-12-09 17:26:08 +01:00
|
|
|
|
.\"
|
2001-05-14 03:10:24 +02:00
|
|
|
|
.\" $FreeBSD$
|
1999-12-09 17:26:08 +01:00
|
|
|
|
.Dd June 4, 1993
|
|
|
|
|
.Dt GETHOSTNAME 3
|
|
|
|
|
.Os BSD 4.2
|
|
|
|
|
.Sh ̾<EFBFBD><EFBFBD>
|
|
|
|
|
.Nm gethostname ,
|
|
|
|
|
.Nm sethostname
|
2002-11-03 07:38:28 +01:00
|
|
|
|
.Nd <EFBFBD><EFBFBD><EFBFBD>ߤΥۥ<EFBFBD><EFBFBD>Ȥ<EFBFBD>̾<EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><EFBFBD><EFBFBD> / <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.Sh <EFBFBD>饤<EFBFBD>֥<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.Lb libc
|
1999-12-09 17:26:08 +01:00
|
|
|
|
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2002-11-03 07:38:28 +01:00
|
|
|
|
.In unistd.h
|
1999-12-09 17:26:08 +01:00
|
|
|
|
.Ft int
|
|
|
|
|
.Fn gethostname "char *name" "int namelen"
|
|
|
|
|
.Ft int
|
|
|
|
|
.Fn sethostname "const char *name" "int namelen"
|
|
|
|
|
.S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