Penguin

NAME

getdomainname -- get domain name

SYNOPSIS

#include <unistd.h>

int getdomainname(char *name, size_t len);

DESCRIPTION

This function is used to access or to change the domain name of the current machine. If the NUL-terminated domain name requires more than len bytes, getdomainname(2) returns the first len bytes (glibc) or returns an error (libc).

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

ERRORS

EINVAL
Under libc: name is NULL or name is longer than len bytes.

CONFORMING TO

POSIX.1? does not specify these calls. POSIX.3? does. Who knows about POSIX.2?

SEE ALSO

getdomainname(2), gethostname(2), sethostname(2), uname(2)

This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.