1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified 22 July 1995 by Michael Chastain (mec@duracef.shout.net):
26 .\" 'gethostname' is real system call on Linux/Alpha.
28 .\" German translation by René Tschirley (gremlin@cs.tu-berlin.de)
30 .TH GETHOSTNAME 2 "22. July 1995" "Linux 1.3.6" "Systemaufrufe"
32 gethostname, sethostname \- hole/setze Hostname
34 .B #include <unistd.h>
36 .BI "int gethostname(char *" name ", size_t " len );
38 .BI "int sethostname(const char *" name ", size_t " len );
40 Diese Funktionen werden dazu benutzt, den Hostnamen des Systems
41 abzufragen oder zu setzen.
43 Bei Erfolg wird 0 zurückgeliefert, bei aufgetretenem Fehler -1 und
45 wird entsprechend gesetzt.
54 größer als die maximal zulässige Größe, oder bei
58 kleiner als die aktuelle Größe.
62 wurde nicht vom Superuser aufgerufen.
66 ist eine ungültige Adresse.
68 Diese Funktionen werden nicht in POSIX.1 definiert, doch werden sie in
69 B.4.4.1 der ISO/IEC 9945-1:1990 erwähnt.
71 Einige andere Implementationen von
78 Linux/Alpha verhält sich analog, während Linux/i386 in diesem Falle
84 ein System Call, in Linux/i386 ist
86 auf Libraryebene als Aufruf von
90 .BR getdomainname (2),
91 .BR setdomainname (2),