.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified Mon Aug 25 16:26:16 1997 by Nicolás Lichtmaier .\" .\" Translated 8 Jan 1996 Miguel A. Sepulveda (miguel@typhoon.harvard.edu) .\" Modified 1 Jul 1996 Miguel A. Sepulveda (angel@vivaldi.princeton.edu) .\" Translation revised on Wed Apr 29 18:30:20 CEST 1998 by Gerardo .\" Aburruzaga García .\" .TH GETDOMAINNAME 2 "25 agosto 1997" "Linux 2.0" "Manual del Programador de Linux" .SH NOMBRE getdomainname, setdomainname \- obtiene/asigna el nombre del dominio .SH SINOPSIS .B #include .sp .BI "int getdomainname(char *" name ", size_t " len ); .br .BI "int setdomainname(const char *" name ", size_t " len ); .SH DESCRIPCIÓN Estas funciones se usan para acceder o cambiar el nombre de dominio del procesador actual. Si el nombre de dominio acabado en NULL requiere más de \fIlen\fP bytes, .B getdomainname devuelve los primeros \fIlen\fP bytes (glibc) o devuelve un error (libc). .SH "VALOR DEVUELTO" En caso de éxito se devuelve 0. En caso de error, \-1, y .I errno toma un valor adecuado. .SH ERRORES .TP .B EINVAL Para .BR getdomainname bajo libc: .I name es .B NULL o .I name tiene más de .I len bytes. .TP .B EINVAL Para .BR setdomainname : .I len era demasiado grande o menor que 0. .TP .B EPERM Para .BR setdomainname : el invocador no era el superusuario. .TP .B EFAULT Para .BR setdomainname : .I name apuntaba afuera del espacio de direcciones del usuario. .SH "CONFORME A" POSIX no especifica estas llamadas. ..SH OBSERVACIONES En Linux, .B getdomainname está implementada en el ámbito de bibliotecas mediante la llamada .SH "VÉASE TAMBIÉN" .BR gethostname (2), .BR sethostname (2), .BR uname (2)