OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man3 / resolver.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified 1993-07-25 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2004-10-31 by aeb
29 .\"
30 .\" Japanese Version Copyright (c) 1998 Shinji Orito all rights reserved.
31 .\"     Translated Mon May 25 21:27:03 JST 1998
32 .\"             by Shinji Orito <shinji@os.gulf.or.jp>
33 .\" Updated & Modified Thu Feb 17 03:58:45 JST 2005
34 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
35 .\"
36 .\"WORD:        resolver        ¥ì¥¾¥ë¥Ð (¥ê¥¾¥ë¥Ð)
37 .\"WORD:        override        ¥ª¡¼¥Ð¡¼¥é¥¤¥É
38 .\"WORD:        call    ¸Æ¤Ó½Ð¤·¡¢¸Æ¤Ó½Ð¤¹
39 .\"WORD:        fully qualified domain name     ´°Á´½¤¾þ¥É¥á¥¤¥ó̾(FQDN)
40 .\"WORD:        type    ·¿
41 .\"WORD:        class   ¥¯¥é¥¹
42 .\"WORD:        query   Ì䤤¹ç¤ï¤»¡¢Ì䤤¹ç¤ï¤»¤ë
43 .\"WORD:        buffer  ¥Ð¥Ã¥Õ¥¡¡¼
44 .\"WORD:        lower-level routines    ²¼°Ì¥ë¡¼¥Á¥ó
45 .\"WORD:        limit of the array      ÇÛÎó¤ÎÈÏ°Ï
46 .\"WORD:        state information       ¾õÂ֤ξðÊó
47 .\"WORD:        bitwise ``or''  ¥Ó¥Ã¥Èñ°Ì¤ÎÏÀÍýÏÂ
48 .\"WORD:        True    ¿¿ÃÍ
49 .\"WORD:        authoritative   ¸¢°ÒÉÕ¤±¤µ¤ì¤¿
50 .\"WORD:        recursion desired bit   ºÆµ¢Í×µá¥Ó¥Ã¥È
51 .\"WORD:        single component names  °ìÉôʬ¤«¤é¤Ê¤ë̾Á°
52 .\"
53 .TH RESOLVER 3 2010-06-17 "GNU" "Linux Programmer's Manual"
54 .\"O .SH NAME
55 .SH Ì¾Á°
56 .\"O res_init, res_query, res_search, res_querydomain, res_mkquery, res_send,
57 .\"O dn_comp, dn_expand \- resolver routines
58 res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, dn_comp, dn_expand \- ¥ì¥¾¥ë¥Ð¡¦¥ë¡¼¥Á¥ó
59 .\"O .SH SYNOPSIS
60 .SH ½ñ¼°
61 .nf
62 .B #include <netinet/in.h>
63 .B #include <arpa/nameser.h>
64 .B #include <resolv.h>
65 .B extern struct state _res;
66 .sp
67 .B int res_init(void);
68 .sp
69 .BI "int res_query(const char *" dname ", int " class ", int " type ,
70 .RS
71 .BI "unsigned char *" answer ", int " anslen );
72 .RE
73 .sp
74 .BI "int res_search(const char *" dname ", int " class ", int " type ,
75 .RS
76 .BI "unsigned char *" answer ", int " anslen );
77 .RE
78 .sp
79 .BI "int res_querydomain(const char *" name ", const char *" domain ,
80 .RS
81 .BI "int " class ", int " type ", unsigned char *" answer ,
82 .BI "int " anslen );
83 .RE
84 .sp
85 .BI "int res_mkquery(int " op ", const char *" dname ", int " class ,
86 .RS
87 .BI "int " type ", char *" data ", int " datalen ", struct rrec *" newrr ,
88 .BI "char *" buf ", int " buflen );
89 .RE
90 .sp
91 .BI "int res_send(const char *" msg ", int " msglen ", char *" answer ,
92 .RS
93 .BI "int " anslen );
94 .RE
95 .sp
96 .BI "int dn_comp(unsigned char *" exp_dn ", unsigned char *" comp_dn ,
97 .RS
98 .BI "int " length ", unsigned char **" dnptrs ", unsigned char **" lastdnptr );
99 .RE
100 .sp
101 .BI "int dn_expand(unsigned char *" msg ", unsigned char *" eomorig ,
102 .RS
103 .BI "unsigned char *" comp_dn ", char *" exp_dn ,
104 .BI "int " length );
105 .RE
106 .fi
107 .sp
108 .\"O Link with \fI\-lresolv\fP.
109 \fI\-lresolv\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
110 .\"O .SH DESCRIPTION
111 .SH ÀâÌÀ
112 .\"O These functions make queries to and interpret the responses from Internet
113 .\"O domain name servers.
114 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ËÌ䤤¹ç¤ï¤»¡¢
115 ¤½¤Î±þÅú¤ò²ò¼á¤¹¤ë¡£
116 .PP
117 .\"O The
118 .\"O .BR res_init ()
119 .\"O function reads the configuration files (see
120 .\"O resolv.conf(5)) to get the default domain name, search order and name
121 .\"O server address(es).
122 .\"O If no server is given, the local host is tried.
123 .BR res_init ()
124 ´Ø¿ô¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥É¥á¥¤¥ó̾¡¢¸¡º÷½ç¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼
125 ¥¢¥É¥ì¥¹¤òÆÀ¤ë¤¿¤á¤ËÀßÄê¥Õ¥¡¥¤¥ë (resolv.conf(5) »²¾È) ¤òÆɤࡣ
126 ¤â¤·¥µ¡¼¥Ð¡¼¤¬¼¨¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥í¡¼¥«¥ë¥Û¥¹¥È¤ò»î¤¹¡£
127 .\"O If no domain is given, that associated with the local host is used.
128 .\"O It can be overridden with the environment variable
129 .\"O .BR LOCALDOMAIN .
130 .\"O .BR res_init ()
131 .\"O is normally executed by the first call to one of the
132 .\"O other functions.
133 ¥É¥á¥¤¥ó¤¬¼¨¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥í¡¼¥«¥ë¥Û¥¹¥È¤ËÉÕ¤±¤é¤ì¤¿¥É¥á¥¤¥ó¤òÍѤ¤¤ë¡£
134 ´Ä¶­ÊÑ¿ô
135 .B LOCALDOMAIN
136 ¤Ç¥ª¡¼¥Ð¡¼¥é¥¤¥É¤Ç¤­¤ë¡£
137 .BR res_init ()
138 ¤Ï¡¢¸å½Ò¤¹¤ë´Ø¿ô¤Î¤É¤ì¤«¤¬ºÇ½é¤Ë¸Æ¤Ó½Ð¤µ¤ì¤¿»þ¡¢¤½¤Î´Ø¿ô
139 ¤«¤é¼Â¹Ô¤µ¤ì¤ë¡£
140 .PP
141 .\"O The
142 .\"O .BR res_query ()
143 .\"O function queries the name server for the
144 .\"O fully qualified domain name \fIname\fP of specified \fItype\fP and
145 .\"O \fIclass\fP.
146 .\"O The reply is left in the buffer \fIanswer\fP of length
147 .\"O \fIanslen\fP supplied by the caller.
148 .BR res_query ()
149 ´Ø¿ô¤Ï¡¢»ØÄꤵ¤ì¤¿ \fItype\fP ¤È \fIclass\fP ¤Î
150 ´°Á´½¤¾þ¥É¥á¥¤¥ó̾ (FQDN) \fIname\fP ¤ò¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ØÌ䤤¹ç¤ï¤»¤ë¡£
151 ±þÅú¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿Â¦¤Ë¤è¤Ã¤ÆÍÑ°Õ¤µ¤ì¤ëŤµ \fIanslen\fP ¤Î \fIanswer\fP
152 ¥Ð¥Ã¥Õ¥¡¡¼¤Ë»Ä¤µ¤ì¤ë¡£
153 .PP
154 .\"O The
155 .\"O .BR res_search ()
156 .\"O function makes a query and waits for the response
157 .\"O like
158 .\"O .BR res_query (),
159 .\"O but in addition implements the default and search
160 .\"O rules controlled by
161 .\"O .B RES_DEFNAMES
162 .\"O and
163 .\"O .B RES_DNSRCH
164 .\"O (see description of
165 .\"O \fI_res\fP options below).
166 .BR res_search ()
167 ´Ø¿ô¤Ï¡¢Ì䤤¹ç¤ï¤»¤ò¹Ô¤¤
168 .BR res_query ()
169 ƱÍͤ½¤Î±þÅú¤ò
170 ÂԤĤ¬¡¢¤µ¤é¤Ë¥Ç¥Õ¥©¥ë¥È¤ò¼ÂÁõ¤·¤Æ¤ª¤ê
171 .B RES_DEFNAMES
172 ¤È
173 .B RES_DNSRCH
174 ¤Ë¤è¤Ã¤Æµ¬Äꤵ¤ì¤ë¸¡º÷¥ë¡¼¥ë¤òŬÍѤ¹¤ë¡£
175 (²¼µ­ \fI_res\fP ¥ª¥×¥·¥ç¥ó¤ÎÀâÌÀ¤ò»²¾È)
176 .PP
177 .\"O The \fBres_querydomain\fP() function makes a query using
178 .\"O .BR res_query ()
179 .\"O on the concatenation of \fIname\fP and \fIdomain\fP.
180 .BR res_querydomain ()
181 ´Ø¿ô¤Ï \fIname\fP ¤È \fIdomain\fP ¤Î·ë¹ç¤Ë
182 .BR res_query ()
183 ¤òÍѤ¤¤ÆÌ䤤¹ç¤ï¤»¤ò¹Ô¤¦¡£
184 .PP
185 .\"O The following functions are lower-level routines used by
186 .\"O .BR res_query ().
187 ¼¡¤Î´Ø¿ô¤Ï¡¢
188 .BR res_query ()
189 ¤Ç»È¤ï¤ì¤ë²¼°Ì¥ë¡¼¥Á¥ó¤Ç¤¢¤ë¡£
190 .PP
191 .\"O The
192 .\"O .BR res_mkquery ()
193 .\"O function constructs a query message in \fIbuf\fP
194 .\"O of length \fIbuflen\fP for the domain name \fIdname\fP.
195 .\"O The query type
196 .\"O \fIop\fP is usually
197 .\"O .BR QUERY ,
198 .\"O but can be any of the types defined in
199 .\"O \fI<arpa/nameser.h>\fP.  \fInewrr\fP is currently unused.
200 .BR res_mkquery ()
201 ´Ø¿ô¤Ï¡¢¥É¥á¥¤¥ó̾ \fIdname\fP ¤Î°Ù¤Ë¡¢Ä¹¤µ \fIbuflen\fP
202 ¤Î \fIbuf\fP ¤ËÌ䤤¹ç¤ï¤»¤ë¥á¥Ã¥»¡¼¥¸¤òºîÀ®¤¹¤ë¡£
203 Ì䤤¹ç¤ï¤»¤Î·¿ \fIop\fP ¤ÏÄ̾ï
204 .B QUERY
205 ¤À¤¬¡¢ \fI<arpa/nameser.h>\fP ¤ÇÄêµÁ¤µ¤ì¤¿·¿¤Î¤É¤ì¤Ç¤âÎɤ¤¡£
206 \fInewrr\fP ¤Ï¸½ºß»ÈÍѤµ¤ì¤Æ¤¤¤Ê¤¤¡£
207 .PP
208 .\"O The
209 .\"O .BR res_send ()
210 .\"O function sends a preformatted query given in
211 .\"O \fImsg\fP of length \fImsglen\fP and returns the answer in \fIanswer\fP
212 .\"O which is of length \fIanslen\fP.
213 .\"O It will call
214 .\"O .BR res_init (),
215 .\"O if it
216 .\"O has not already been called.
217 .BR res_send ()
218 ´Ø¿ô¤Ï¡¢Ä¹¤µ \fImsglen\fP ¤Î \fImsg\fP ¤Ë·è¤á¤é¤ì¤¿½ñ¼°
219 ¤ÇÌ䤤¹ç¤ï¤»¡¢\fIanswer\fP ¤ËŤµ \fIanslen\fP ¤Î²óÅú¤òÊÖ¤¹¡£
220 ¤Þ¤À¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð
221 .BR res_init ()
222 ¤ò¸Æ¤Ó½Ð¤¹¡£
223 .PP
224 .\"O The
225 .\"O .BR dn_comp ()
226 .\"O function compresses the domain name \fIexp_dn\fP
227 .\"O and stores it in the buffer \fIcomp_dn\fP of length \fIlength\fP.
228 .\"O The compression uses an array of pointers \fIdnptrs\fP to previously
229 .\"O compressed names in the current message.
230 .\"O The first pointer points
231 .\"O to the beginning of the message and the list ends with NULL.
232 .\"O The limit of the array is specified by \fIlastdnptr\fP.
233 .\"O If \fIdnptr\fP is NULL, domain names are not compressed.
234 .\"O If \fIlastdnptr\fP is NULL, the list
235 .\"O of labels is not updated.
236 .BR dn_comp ()
237 ´Ø¿ô¤Ï¥É¥á¥¤¥ó̾ \fIexp_dn\fP ¤ò°µ½Ì¤·¤Æ¡¢Ä¹¤µ \fIlength\fP
238 ¤Î¥Ð¥Ã¥Õ¥¡¡¼ \fIcomp_dn\fP ¤ËÊݸ¤¹¤ë¡£
239 °µ½Ì¤Ë¤Ï¥Ý¥¤¥ó¥¿¡¼ÇÛÎó \fIdnptrs\fP ¤òÍѤ¤¤ë¡£
240 ¤³¤ì¤é¤Î¥Ý¥¤¥ó¥¿¡¼¤Ï¡¢¸½ºß¤Î¥á¥Ã¥»¡¼¥¸¤ÎÃæ¤Ë¤¢¤ë°ÊÁ°¤Ë°µ½Ì¤µ¤ì¤¿Ì¾Á°¤ò»Ø¤¹¡£
241 ºÇ½é¤Î¥Ý¥¤¥ó¥¿¡¼¤Ï¥á¥Ã¥»¡¼¥¸¤ÎËÁƬ¤ò»Ø¤·¡¢¤½¤Î¥ê¥¹¥È¤Ï NULL ¤Ç½ª¤ï¤ë¡£
242 ÇÛÎó¤ÎÈϰϤϠ\fIlastdnptr\fP ¤Ç·è¤á¤é¤ì¤ë¡£
243 \fIdnptr\fP ¤¬ NULL ¤Ê¤é¤Ð¥É¥á¥¤¥ó̾¤Ï°µ½Ì¤µ¤ì¤Ê¤¤¡£
244 \fIlastdnptr\fP ¤¬ NULL ¤Ê¤é¤Ð¡¢¤½¤Î¥é¥Ù¥ë¤Î¥ê¥¹¥È¤Ï¥¢¥Ã¥×¥Ç¡¼¥È¤µ¤ì¤Ê¤¤¡£
245 .PP
246 .\"O The
247 .\"O .BR dn_expand ()
248 .\"O function expands the compressed domain name
249 .\"O \fIcomp_dn\fP to a full domain name, which is placed in the buffer
250 .\"O \fIexp_dn\fP of size \fIlength\fP.
251 .\"O The compressed name is contained
252 .\"O in a query or reply message, and \fImsg\fP points to the beginning of
253 .\"O the message.
254 .BR dn_expand ()
255 ´Ø¿ô¤Ï¡¢°µ½Ì¤µ¤ì¤¿¥É¥á¥¤¥ó̾ \fIcomp_dn\fP ¤«¤é¥µ¥¤¥º
256 ¤¬ \fIlength\fP ¤Î \fIexp_dn\fP ¥Ð¥Ã¥Õ¥¡¡¼¤ËÀµ¼°¤Ê¥É¥á¥¤¥ó̾¤òŸ³«¤¹¤ë¡£
257 ¤½¤Î°µ½Ì¤µ¤ì¤¿Ì¾Á°¤Ï¡¢Ì䤤¹ç¤ï¤»¡¢¤Þ¤¿¤Ï±þÅú¥á¥Ã¥»¡¼¥¸¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Æ¡¢
258 \fImsg\fP ¤¬¥á¥Ã¥»¡¼¥¸¤ÎËÁƬ¤ò»Ø¤¹¡£
259 .PP
260 .\"O The resolver routines use global configuration and state information
261 .\"O contained in the structure \fI_res\fP, which is defined in
262 .\"O \fI<resolv.h>\fP.
263 .\"O The only field that is normally manipulated by the
264 .\"O user is \fI_res.options\fP.
265 .\"O This field can contain the bitwise "OR"
266 .\"O of the following options:
267 ¥ì¥¾¥ë¥Ð¡¦¥ë¡¼¥Á¥ó¤Ï¡¢\fI<resolv.h>\fP ¤ËÄêµÁ¤µ¤ì¤¿ \fI_res\fP ¹½Â¤ÂΤË
268 ´Þ¤Þ¤ì¤Æ¤¤¤ëÁ´ÂÎŪ¤ÊÀßÄê¤È¾õÂ֤ξðÊó¤ò»ÈÍѤ¹¤ë¡£
269 Ä̾ï¥æ¡¼¥¶¡¼¤ËÁàºî¤Ç¤­¤ë¹àÌܤϠ\fI_res.options\fP ¤À¤±¤Ç¤¢¤ë¡£
270 ¤³¤Î¹àÌܤϰʲ¼¤Î¥ª¥×¥·¥ç¥ó¤Î¥Ó¥Ã¥Èñ°Ì¤ÎÏÀÍýϤˤǤ­¤ë¡£
271 .TP
272 .B RES_INIT
273 .\"O True if
274 .\"O .BR res_init ()
275 .\"O has been called.
276 .BR res_init ()
277 ¤¬¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤ì¤Ð¿¿¡£
278 .TP
279 .B RES_DEBUG
280 .\"O Print debugging messages.
281 ¥Ç¥Ð¥Ã¥°¡¦¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ¹¤ë¡£
282 .TP
283 .B RES_AAONLY
284 .\"O Accept authoritative answers only.
285 .\"O .BR res_send ()
286 .\"O continues until
287 .\"O it fins an authoritative answer or returns an error.  [Not currently
288 .\"O implemented].
289 ¸¢°ÒÉÕ¤±¤µ¤ì¤¿ (authoritative) ²óÅú¤Î¤ß¼õ¤±Æþ¤ì¤ë¡£
290 .BR res_send ()
291 ¤Ï¡¢ºÇ½ªÅª¤Ë¸¢°ÒÉÕ¤±¤µ¤ì¤¿²óÅú¤òÆÀ¤é¤ì¤ë¤«¡¢¥¨¥é¡¼¤¬ÊÖ¤µ¤ì¤ë
292 ¤Þ¤Ç³¹Ô¤¹¤ë¡£
293 [¸½ºß¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤]
294 .TP
295 .B RES_USEVC
296 .\"O Use TCP connections for queries rather than UDP datagrams.
297 Ì䤤¹ç¤ï¤»¤Ë UDP ¥Ç¡¼¥¿¥°¥é¥à¤Ç¤Ï¤Ê¤¯ TCP Àܳ¤òÍѤ¤¤ë¡£
298 .TP
299 .B RES_PRIMARY
300 .\"O Query primary domain name server only.
301 ¥×¥é¥¤¥Þ¥ê¡¦¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤Î¤ßÌ䤤¹ç¤ï¤»¤ë¡£
302 .TP
303 .B RES_IGNTC
304 .\"O Ignore truncation errors.
305 .\"O Don't retry with TCP.  [Not currently
306 .\"O implemented].
307 ÀÚ¤êµÍ¤á¥¨¥é¡¼ (truncation error) ¤ò̵»ë¤¹¤ë¡£TCP ¤Ç¥ê¥È¥é¥¤¤·¤Ê¤¤¡£
308 [¸½ºß¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤]
309 .TP
310 .B RES_RECURSE
311 .\"O Set the recursion desired bit in queries.
312 .\"O Recursion is carried out
313 .\"O by the domain name server, not by
314 .\"O .BR res_send ().
315 .\"O [Enabled by default].
316 .\"Osato:
317 .\"Osato: recursion desired ¤Ï¡ÖºÆµ¢Í×µá¡×¡ÖºÆµ¢Í×˾¡×¡ÖºÆµ¢Í×ÀÁ¡×¤Ê¤É¤È
318 .\"Osato: Ìõ¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤·¤¿¡£
319 .\"Osato:
320 ºÆµ¢Í×µá (recursion desired) ¥Ó¥Ã¥È¤òÌ䤤¹ç¤ï¤»¤ËÀßÄꤹ¤ë¡£
321 ºÆµ¢¤Ï
322 .BR res_send ()
323 ¤Ç¤Ï¤Ê¤¯¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¡£
324 [¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú]
325 .TP
326 .B RES_DEFNAMES
327 .\"O If set,
328 .\"O .BR res_search ()
329 .\"O will append the default domain name to
330 .\"O single component names, i.e., those that do not contain a dot.
331 .\"O [Enabled by default].
332 .\"Osato:
333 .\"Osato: single component ¤Ï¡Ö1 ¤Ä¤ÎÍ×ÁǤ«¤é¤Ê¤ë¡×¤ÎÊý¤¬¤è¤¤¤Ç¤·¤ç¤¦¤«?
334 .\"Osato:
335 ÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¢
336 .BR res_search ()
337 ¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥É¥á¥¤¥ó̾¤ò°ìÉôʬ
338 ¤Î¤ß¤«¤é¤Ê¤ë̾Á°¡¢¤¹¤Ê¤ï¤Á¥É¥Ã¥È¤ò´Þ¤Þ¤Ê¤¤Ì¾Á°¤ËÉÕ¤±²Ã¤¨¤ë¡£
339 [¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú]
340 .TP
341 .B RES_STAYOPEN
342 .\"O Used with
343 .\"O .B RES_USEVC
344 .\"O to keep the TCP connection open between queries.
345 Ì䤤¹ç¤ï¤»Ãæ¤Ë TCP Àܳ¤òÊݤĤ¿¤á
346 .B RES_USEVC
347 ¤È¶¦¤ËÍѤ¤¤é¤ì¤ë¡£
348 .TP
349 .B RES_DNSRCH
350 .\"O If set,
351 .\"O .BR res_search ()
352 .\"O will search for hostnames in the current
353 .\"O domain and in parent domains.
354 .\"O This option is used by
355 .\"O .BR gethostbyname (3).
356 .\"O [Enabled by default].
357 ÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¢
358 .BR res_search ()
359 ¤Ï¸½ºß¤Î¥É¥á¥¤¥ó¤ª¤è¤Ó¿Æ¥É¥á¥¤¥ó¤Î
360 ¥Û¥¹¥È̾¤òõ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï
361 .BR gethostbyname (3)
362 ¤ÇÍѤ¤¤é¤ì¤ë¡£
363 [¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú]
364 .\"O .SH "RETURN VALUE"
365 .SH ÊÖ¤êÃÍ
366 .\"O The
367 .\"O .BR res_init ()
368 .\"O function returns 0 on success, or \-1 if an error
369 .\"O occurs.
370 .BR res_init ()
371 ´Ø¿ô¤ÏÀ®¸ù¤¹¤ì¤Ð 0 ¤ò¡¢¥¨¥é¡¼¤¬È¯À¸¤¹¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
372 .PP
373 .\"O The \fBres_query\fP(), \fBres_search\fP(),
374 .\"O .BR res_querydomain (),
375 .\"O .BR res_mkquery ()
376 .\"O and
377 .\"O .BR res_send ()
378 .\"O functions return the length
379 .\"O of the response, or \-1 if an error occurs.
380 .BR res_query (),
381 .BR res_search (),
382 .BR res_querydomain (),
383 .BR res_mkquery (),
384 .BR res_send ()
385 ´Ø¿ô¤Ï±þÅú¤ÎŤµ¤òÊÖ¤¹¡£
386 ¤Þ¤¿¡¢¥¨¥é¡¼¤¬È¯À¸¤¹¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
387 .PP
388 .\"O The
389 .\"O .BR dn_comp ()
390 .\"O and
391 .\"O .BR dn_expand ()
392 .\"O functions return the length
393 .\"O of the compressed name, or \-1 if an error occurs.
394 .BR dn_comp ()
395 ¤È
396 .BR dn_expand ()
397 ´Ø¿ô¤Ï°µ½Ì¤µ¤ì¤¿¥É¥á¥¤¥ó̾¤ÎŤµ¤òÊÖ¤¹¡£
398 ¤Þ¤¿¡¢¥¨¥é¡¼¤¬È¯À¸¤¹¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
399 .\"O .SH FILES
400 .SH ¥Õ¥¡¥¤¥ë
401 .nf
402 .\"O /etc/resolv.conf          resolver configuration file
403 /etc/resolv.conf          ¥ì¥¾¥ë¥ÐÀßÄê¥Õ¥¡¥¤¥ë
404 .\"O /etc/host.conf            resolver configuration file
405 /etc/host.conf            ¥ì¥¾¥ë¥ÐÀßÄê¥Õ¥¡¥¤¥ë
406 .fi
407 .\"O .SH "CONFORMING TO"
408 .SH ½àµò
409 4.3BSD.
410 .\"O .SH "SEE ALSO"
411 .SH ´ØÏ¢¹àÌÜ
412 .BR gethostbyname (3),
413 .BR resolv.conf (5),
414 .BR resolver (5),
415 .BR hostname (7),
416 .BR named (8)