.\" 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 del dominio es de longitud mayor que .IR len , .B getdomainname devuelve los primeros .I len bytes. .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 , .\".I name .\"señala a .\".B NULL .\"ó .\".I name .\"es más largo que .\".IR len . .TP .B EPERM Para .BR setdomainname , el llamador no era el superusuario. .TP .B EINVAL Para .BR setdomainname , .I len era demasiado grande o menor que 0. .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 BUGS .\".B getdomainname .\"no se ajusta a otras implementaciones, ya que estas siempre regresan .\".I len .\"bytes, aún en caso de que .\".I name .\"sea más largo. Linux, por otra parte regresa .\".B EINVAL .\"en dicho caso (hasta las bibliotecas DLL 4.4.1 ). .SH NOTAS En Linux, .B getdomainname está implementada en el ámbito de bibliotecas mediante la llamada .BR uname (2). .SH "VÉASE TAMBIÉN" .BR gethostname (2), .BR sethostname (2), .BR uname (2)