GETDOMAINNAME
Section: Linux Programmer's Manual (2)
Updated: 22 July 1993
Index
Return to Main Contents
NAME
getdomainname, setdomainname - get/set domain name
SYNOPSIS
#include <unistd.h>
int getdomainname(char *name, size_t len);
int setdomainname(const char *name, size_t len);
DESCRIPTION
These functions are used to access or to change the domain name of the
current processor.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and
errno
is set appropriately.
ERRORS
- EINVAL
-
For
getdomainname,
name
points to
NULL
or
name
is longer than
len.
- EPERM
-
For
setdomainname,
the caller was not the superuser.
- EINVAL
-
For
setdomainname,
len
was too long.
CONFORMING TO
POSIX does not specify these calls.
BUGS
getdomainname
is not compliant with other implementations, since they always return
len
bytes, even if
name
is longer. Linux, however, returns
EINVAL
in this case (as of DLL 4.4.1 libraries).
NOTES
Under Linux,
getdomainname
is implemented at the library level by calling
uname(2).
SEE ALSO
gethostname(2), sethostname(2), uname(2)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- CONFORMING TO
-
- BUGS
-
- NOTES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 12:25:00 GMT, March 22, 2025