|
NAMEgetdomainname , setdomainname
—
get/set the NIS domain name of current host
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <unistd.h>
int
int
DESCRIPTIONThegetdomainname () function returns the standard NIS
domain name for the current host, as previously set by
setdomainname (). The namelen
argument specifies the size of the name array. The
returned name is null-terminated unless insufficient space is provided.
The RETURN VALUESUpon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.ERRORSThe following errors may be returned by these calls:SEE ALSOgethostid(3), gethostname(3), sysctl(3)HISTORYThegetdomainname () function appeared in
4.2BSD.
BUGSDomain names are limited toMAXHOSTNAMELEN (from
<sys/param.h> ) characters,
currently 256.
Visit the GSP FreeBSD Man Page Interface. |