Go to the previous, next section.

getdomainname and setdomainname

SYNOPSIS

int getdomainname(char *name, size_t len);

int setdomainname(const char *name, size_t len);

PARAMETERS

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.

DESCRIPTION

Those calls get or set the machine's domainname.

RETURN VALUE

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:

Go to the previous, next section.