1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified 1997-08-25 by Nicolas Lichtmaier <nick@debian.org>
26 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
27 .\" Modified 2008-11-27 by mtk
29 .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
30 .\" all rights reserved.
31 .\" Translated 1997-06-27, SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
32 .\" Updated 2000-10-03, Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
33 .\" Updated & Modified 2004-12-29, Yuichi SATO <ysato444@yahoo.co.jp>
34 .\" Updated 2008-12-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.15
36 .TH GETDOMAINNAME 2 2009-09-27 "Linux" "Linux Programmer's Manual"
38 getdomainname, setdomainname \- ドメイン名の取得・設定をする
40 .B #include <unistd.h>
42 .BI "int getdomainname(char *" name ", size_t " len );
44 .BI "int setdomainname(const char *" name ", size_t " len );
48 .RB ( feature_test_macros (7)
56 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
60 これらの関数は、ホストシステムのドメイン名を取得・変更するために使われる。
73 では文字列終端の NULL バイトは必要ない)。
81 NULL 終端されたドメイン名が \fIlen\fP バイトより長い場合、
83 は、(glibc では) 始めの \fIlen\fP バイトを返し、(libc では) エラーとなる。
85 成功した場合 0 が返る。失敗した場合 \-1 が返り、
105 ケーパビリティ (capability) がない)。
119 POSIX では、これら関数は定義されていない。
120 .\" しかし、ほとんどのシステムにある...
122 Linux 1.0 以降では、ドメイン名の長さの上限は
123 終端の NULL バイトを含めて 64 バイトである。
124 もっと古いカーネルでは 8 バイトであった。
126 (x86 を含む) Linux のほとんどのアーキテクチャでは、
131 がライブラリ関数として実装されており、この関数は