GETDOMAINNAME(2) COMMAND REFERENCE GETDOMAINNAME(2) NAME getdomainname, setdomainname - get/set name of current domain SYNOPSIS getdomainname(name, namelen) char *name; int namelen; setdomainname(name, namelen) char *name; int namelen; DESCRIPTION The program getdomainname returns the name of the domain for the current processor, as previously set by setdomainname. The parameter namelen specifies the size of the name array. The returned name is null-terminated unless insufficient space is provided. The program setdomainname sets the domain of the host machine to name, which has length namelen; this call is restricted to the superuser and is normally used only when the system is bootstrapped. The purpose of domains is to enable merging of two distinct networks that may have common host names. Each network would be distinguished by having a different domain name. Currently, only the Yellow Pages service makes use of domains. RETURN VALUE If the call succeeds, a value of 0 is returned. If the call fails, a value of -1 is returned and an error code is placed in the global location errno. The following errors may be returned by these calls: EFAULT The name parameter gave an invalid address. EPERM The caller was not the superuser; this error only applies to setdomainname. CAVEATS Domain names are limited to 255 characters. Printed 5/12/88 1
%%index%% na:456,118; sy:574,1188; de:1762,1215; rv:2977,680; ca:3657,135; %%index%%000000000098