setdomainname(2) DG/UX 4.30 setdomainname(2)
NAME
setdomainname - Set name of current domain.
SYNOPSIS
int setdomainname (name, namelen)
char * name;
int namelen;
PARAMETERS
name Name to set for domain.
namelen Length of name in bytes.
DESCRIPTION
Setdomainname sets the domain of the host node to <name>,
which has length <namelen>. Only the superuser may use this
call; it is normally used at boot time.
The purpose of domains is to enable two distinct networks
that may have hostnames in common to merge. Each network
would be distinguished by having a different domain name. At
the current time, only the Yellow Pages service makes use of
domains.
Domain names are limited to MAXDOMAINNAMELEN characters,
which is defined in <user/param.h>.
ACCESS CONTROL
Only the superuser can set the domain name.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EFAULT The <name> parameter gave an invalid address,
or the <namelen> parameter specified a length
less than zero.
EPERM The caller was not the superuser.
SEE ALSO
The related manual sections: gethostname(2), gethostid(2),
getdomainname(2).
Licensed material--property of copyright holder(s) Page 1