Go to the previous, next section.
int getdomainname(char *name, size_t len);
int setdomainname(const char *name, size_t len);
name: (For getdomainname) [out] points to a buffer where to
save the domain name. (For setdomainname) [in] points to a buffer
containing the new domain name.
len: [in] the maximum length of name.
Those calls get or set the machine's domainname.
On success zero is returned. On error, -1 is returned and errno is
set to one of the following values:
In the case of getdomainname: EINVAL: name is
NULL or the domain name is longer than len.
In the case of setdomainname:
EPERM: the caller is not superuser.
EINVAL: len is too long.
Go to the previous, next section.