OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 2008-11-07 "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 *" exp_dn ,
99 .BI "unsigned char **" lastdnptr );
100 .RE
101 .sp
102 .BI "int dn_expand(unsigned char *" msg ", unsigned char *" eomorig ,
103 .RS
104 .BI "unsigned char *" comp_dn ", char *" exp_dn ,
105 .BI "int " length );
106 .RE
107 .fi
108 .sp
109 .\"O Link with \fI\-lresolv\fP.
110 \fI\-lresolv\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
111 .\"O .SH DESCRIPTION
112 .SH ÀâÌÀ
113 .\"O These functions make queries to and interpret the responses from Internet
114 .\"O domain name servers.
115 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ËÌ䤤¹ç¤ï¤»¡¢
116 ¤½¤Î±þÅú¤ò²ò¼á¤¹¤ë¡£
117 .PP
118 .\"O The
119 .\"O .BR res_init ()
120 .\"O function reads the configuration files (see
121 .\"O resolv.conf(5)) to get the default domain name, search order and name
122 .\"O server address(es).
123 .\"O If no server is given, the local host is tried.
124 .BR res_init ()
125 ´Ø¿ô¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥É¥á¥¤¥ó̾¡¢¸¡º÷½ç¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼
126 ¥¢¥É¥ì¥¹¤òÆÀ¤ë¤¿¤á¤ËÀßÄê¥Õ¥¡¥¤¥ë (resolv.conf(5) »²¾È) ¤òÆɤࡣ
127 ¤â¤·¥µ¡¼¥Ð¡¼¤¬¼¨¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥í¡¼¥«¥ë¥Û¥¹¥È¤ò»î¤¹¡£
128 .\"O If no domain is given, that associated with the local host is used.
129 .\"O It can be overridden with the environment variable
130 .\"O .BR LOCALDOMAIN .
131 .\"O .BR res_init ()
132 .\"O is normally executed by the first call to one of the
133 .\"O other functions.
134 ¥É¥á¥¤¥ó¤¬¼¨¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥í¡¼¥«¥ë¥Û¥¹¥È¤ËÉÕ¤±¤é¤ì¤¿¥É¥á¥¤¥ó¤òÍѤ¤¤ë¡£
135 ´Ä¶­ÊÑ¿ô
136 .B LOCALDOMAIN
137 ¤Ç¥ª¡¼¥Ð¡¼¥é¥¤¥É¤Ç¤­¤ë¡£
138 .BR res_init ()
139 ¤Ï¡¢¸å½Ò¤¹¤ë´Ø¿ô¤Î¤É¤ì¤«¤¬ºÇ½é¤Ë¸Æ¤Ó½Ð¤µ¤ì¤¿»þ¡¢¤½¤Î´Ø¿ô
140 ¤«¤é¼Â¹Ô¤µ¤ì¤ë¡£
141 .PP
142 .\"O The
143 .\"O .BR res_query ()
144 .\"O function queries the name server for the
145 .\"O fully qualified domain name \fIname\fP of specified \fItype\fP and
146 .\"O \fIclass\fP.
147 .\"O The reply is left in the buffer \fIanswer\fP of length
148 .\"O \fIanslen\fP supplied by the caller.
149 .BR res_query ()
150 ´Ø¿ô¤Ï¡¢»ØÄꤵ¤ì¤¿ \fItype\fP ¤È \fIclass\fP ¤Î
151 ´°Á´½¤¾þ¥É¥á¥¤¥ó̾ (FQDN) \fIname\fP ¤ò¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ØÌ䤤¹ç¤ï¤»¤ë¡£
152 ±þÅú¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿Â¦¤Ë¤è¤Ã¤ÆÍÑ°Õ¤µ¤ì¤ëŤµ \fIanslen\fP ¤Î \fIanswer\fP
153 ¥Ð¥Ã¥Õ¥¡¡¼¤Ë»Ä¤µ¤ì¤ë¡£
154 .PP
155 .\"O The
156 .\"O .BR res_search ()
157 .\"O function makes a query and waits for the response
158 .\"O like
159 .\"O .BR res_query (),
160 .\"O but in addition implements the default and search
161 .\"O rules controlled by
162 .\"O .B RES_DEFNAMES
163 .\"O and
164 .\"O .B RES_DNSRCH
165 .\"O (see description of
166 .\"O \fI_res\fP options below).
167 .BR res_search ()
168 ´Ø¿ô¤Ï¡¢Ì䤤¹ç¤ï¤»¤ò¹Ô¤¤
169 .BR res_query ()
170 ƱÍͤ½¤Î±þÅú¤ò
171 ÂԤĤ¬¡¢¤µ¤é¤Ë¥Ç¥Õ¥©¥ë¥È¤ò¼ÂÁõ¤·¤Æ¤ª¤ê
172 .B RES_DEFNAMES
173 ¤È
174 .B RES_DNSRCH
175 ¤Ë¤è¤Ã¤Æµ¬Äꤵ¤ì¤ë¸¡º÷¥ë¡¼¥ë¤òŬÍѤ¹¤ë¡£
176 (²¼µ­ \fI_res\fP ¥ª¥×¥·¥ç¥ó¤ÎÀâÌÀ¤ò»²¾È)
177 .PP
178 .\"O The \fBres_querydomain\fP() function makes a query using
179 .\"O .BR res_query ()
180 .\"O on the concatenation of \fIname\fP and \fIdomain\fP.
181 .BR res_querydomain ()
182 ´Ø¿ô¤Ï \fIname\fP ¤È \fIdomain\fP ¤Î·ë¹ç¤Ë
183 .BR res_query ()
184 ¤òÍѤ¤¤ÆÌ䤤¹ç¤ï¤»¤ò¹Ô¤¦¡£
185 .PP
186 .\"O The following functions are lower-level routines used by
187 .\"O .BR res_query ().
188 ¼¡¤Î´Ø¿ô¤Ï¡¢
189 .BR res_query ()
190 ¤Ç»È¤ï¤ì¤ë²¼°Ì¥ë¡¼¥Á¥ó¤Ç¤¢¤ë¡£
191 .PP
192 .\"O The
193 .\"O .BR res_mkquery ()
194 .\"O function constructs a query message in \fIbuf\fP
195 .\"O of length \fIbuflen\fP for the domain name \fIdname\fP.
196 .\"O The query type
197 .\"O \fIop\fP is usually
198 .\"O .BR QUERY ,
199 .\"O but can be any of the types defined in
200 .\"O \fI<arpa/nameser.h>\fP.  \fInewrr\fP is currently unused.
201 .BR res_mkquery ()
202 ´Ø¿ô¤Ï¡¢¥É¥á¥¤¥ó̾ \fIdname\fP ¤Î°Ù¤Ë¡¢Ä¹¤µ \fIbuflen\fP
203 ¤Î \fIbuf\fP ¤ËÌ䤤¹ç¤ï¤»¤ë¥á¥Ã¥»¡¼¥¸¤òºîÀ®¤¹¤ë¡£
204 Ì䤤¹ç¤ï¤»¤Î·¿ \fIop\fP ¤ÏÄ̾ï
205 .B QUERY
206 ¤À¤¬¡¢ \fI<arpa/nameser.h>\fP ¤ÇÄêµÁ¤µ¤ì¤¿·¿¤Î¤É¤ì¤Ç¤âÎɤ¤¡£
207 \fInewrr\fP ¤Ï¸½ºß»ÈÍѤµ¤ì¤Æ¤¤¤Ê¤¤¡£
208 .PP
209 .\"O The
210 .\"O .BR res_send ()
211 .\"O function sends a preformatted query given in
212 .\"O \fImsg\fP of length \fImsglen\fP and returns the answer in \fIanswer\fP
213 .\"O which is of length \fIanslen\fP.
214 .\"O It will call
215 .\"O .BR res_init (),
216 .\"O if it
217 .\"O has not already been called.
218 .BR res_send ()
219 ´Ø¿ô¤Ï¡¢Ä¹¤µ \fImsglen\fP ¤Î \fImsg\fP ¤Ë·è¤á¤é¤ì¤¿½ñ¼°
220 ¤ÇÌ䤤¹ç¤ï¤»¡¢\fIanswer\fP ¤ËŤµ \fIanslen\fP ¤Î²óÅú¤òÊÖ¤¹¡£
221 ¤Þ¤À¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð
222 .BR res_init ()
223 ¤ò¸Æ¤Ó½Ð¤¹¡£
224 .PP
225 .\"O The
226 .\"O .BR dn_comp ()
227 .\"O function compresses the domain name \fIexp_dn\fP
228 .\"O and stores it in the buffer \fIcomp_dn\fP of length \fIlength\fP.
229 .\"O The compression uses an array of pointers \fIdnptrs\fP to previously
230 .\"O compressed names in the current message.
231 .\"O The first pointer points
232 .\"O to the beginning of the message and the list ends with NULL.
233 .\"O The limit of the array is specified by \fIlastdnptr\fP.
234 .\"O If \fIdnptr\fP is NULL, domain names are not compressed.
235 .\"O If \fIlastdnptr\fP is NULL, the list
236 .\"O of labels is not updated.
237 .BR dn_comp ()
238 ´Ø¿ô¤Ï¥É¥á¥¤¥ó̾ \fIexp_dn\fP ¤ò°µ½Ì¤·¤Æ¡¢Ä¹¤µ \fIlength\fP
239 ¤Î¥Ð¥Ã¥Õ¥¡¡¼ \fIcomp_dn\fP ¤ËÊݸ¤¹¤ë¡£
240 °µ½Ì¤Ë¤Ï¥Ý¥¤¥ó¥¿¡¼ÇÛÎó \fIdnptrs\fP ¤òÍѤ¤¤ë¡£
241 ¤³¤ì¤é¤Î¥Ý¥¤¥ó¥¿¡¼¤Ï¡¢¸½ºß¤Î¥á¥Ã¥»¡¼¥¸¤ÎÃæ¤Ë¤¢¤ë°ÊÁ°¤Ë°µ½Ì¤µ¤ì¤¿Ì¾Á°¤ò»Ø¤¹¡£
242 ºÇ½é¤Î¥Ý¥¤¥ó¥¿¡¼¤Ï¥á¥Ã¥»¡¼¥¸¤ÎËÁƬ¤ò»Ø¤·¡¢¤½¤Î¥ê¥¹¥È¤Ï NULL ¤Ç½ª¤ï¤ë¡£
243 ÇÛÎó¤ÎÈϰϤϠ\fIlastdnptr\fP ¤Ç·è¤á¤é¤ì¤ë¡£
244 \fIdnptr\fP ¤¬ NULL ¤Ê¤é¤Ð¥É¥á¥¤¥ó̾¤Ï°µ½Ì¤µ¤ì¤Ê¤¤¡£
245 \fIlastdnptr\fP ¤¬ NULL ¤Ê¤é¤Ð¡¢¤½¤Î¥é¥Ù¥ë¤Î¥ê¥¹¥È¤Ï¥¢¥Ã¥×¥Ç¡¼¥È¤µ¤ì¤Ê¤¤¡£
246 .PP
247 .\"O The
248 .\"O .BR dn_expand ()
249 .\"O function expands the compressed domain name
250 .\"O \fIcomp_dn\fP to a full domain name, which is placed in the buffer
251 .\"O \fIexp_dn\fP of size \fIlength\fP.
252 .\"O The compressed name is contained
253 .\"O in a query or reply message, and \fImsg\fP points to the beginning of
254 .\"O the message.
255 .BR dn_expand ()
256 ´Ø¿ô¤Ï¡¢°µ½Ì¤µ¤ì¤¿¥É¥á¥¤¥ó̾ \fIcomp_dn\fP ¤«¤é¥µ¥¤¥º
257 ¤¬ \fIlength\fP ¤Î \fIexp_dn\fP ¥Ð¥Ã¥Õ¥¡¡¼¤ËÀµ¼°¤Ê¥É¥á¥¤¥ó̾¤òŸ³«¤¹¤ë¡£
258 ¤½¤Î°µ½Ì¤µ¤ì¤¿Ì¾Á°¤Ï¡¢Ì䤤¹ç¤ï¤»¡¢¤Þ¤¿¤Ï±þÅú¥á¥Ã¥»¡¼¥¸¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Æ¡¢
259 \fImsg\fP ¤¬¥á¥Ã¥»¡¼¥¸¤ÎËÁƬ¤ò»Ø¤¹¡£
260 .PP
261 .\"O The resolver routines use global configuration and state information
262 .\"O contained in the structure \fI_res\fP, which is defined in
263 .\"O \fI<resolv.h>\fP.
264 .\"O The only field that is normally manipulated by the
265 .\"O user is \fI_res.options\fP.
266 .\"O This field can contain the bitwise "OR"
267 .\"O of the following options:
268 ¥ì¥¾¥ë¥Ð¡¦¥ë¡¼¥Á¥ó¤Ï¡¢\fI<resolv.h>\fP ¤ËÄêµÁ¤µ¤ì¤¿ \fI_res\fP ¹½Â¤ÂΤË
269 ´Þ¤Þ¤ì¤Æ¤¤¤ëÁ´ÂÎŪ¤ÊÀßÄê¤È¾õÂ֤ξðÊó¤ò»ÈÍѤ¹¤ë¡£
270 Ä̾ï¥æ¡¼¥¶¡¼¤ËÁàºî¤Ç¤­¤ë¹àÌܤϠ\fI_res.options\fP ¤À¤±¤Ç¤¢¤ë¡£
271 ¤³¤Î¹àÌܤϰʲ¼¤Î¥ª¥×¥·¥ç¥ó¤Î¥Ó¥Ã¥Èñ°Ì¤ÎÏÀÍýϤˤǤ­¤ë¡£
272 .TP
273 .B RES_INIT
274 .\"O True if
275 .\"O .BR res_init ()
276 .\"O has been called.
277 .BR res_init ()
278 ¤¬¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤ì¤Ð¿¿¡£
279 .TP
280 .B RES_DEBUG
281 .\"O Print debugging messages.
282 ¥Ç¥Ð¥Ã¥°¡¦¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ¹¤ë¡£
283 .TP
284 .B RES_AAONLY
285 .\"O Accept authoritative answers only.
286 .\"O .BR res_send ()
287 .\"O continues until
288 .\"O it fins an authoritative answer or returns an error.  [Not currently
289 .\"O implemented].
290 ¸¢°ÒÉÕ¤±¤µ¤ì¤¿ (authoritative) ²óÅú¤Î¤ß¼õ¤±Æþ¤ì¤ë¡£
291 .BR res_send ()
292 ¤Ï¡¢ºÇ½ªÅª¤Ë¸¢°ÒÉÕ¤±¤µ¤ì¤¿²óÅú¤òÆÀ¤é¤ì¤ë¤«¡¢¥¨¥é¡¼¤¬ÊÖ¤µ¤ì¤ë
293 ¤Þ¤Ç³¹Ô¤¹¤ë¡£
294 [¸½ºß¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤]
295 .TP
296 .B RES_USEVC
297 .\"O Use TCP connections for queries rather than UDP datagrams.
298 Ì䤤¹ç¤ï¤»¤Ë UDP ¥Ç¡¼¥¿¥°¥é¥à¤Ç¤Ï¤Ê¤¯ TCP Àܳ¤òÍѤ¤¤ë¡£
299 .TP
300 .B RES_PRIMARY
301 .\"O Query primary domain name server only.
302 ¥×¥é¥¤¥Þ¥ê¡¦¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤Î¤ßÌ䤤¹ç¤ï¤»¤ë¡£
303 .TP
304 .B RES_IGNTC
305 .\"O Ignore truncation errors.
306 .\"O Don't retry with TCP.  [Not currently
307 .\"O implemented].
308 ÀÚ¤êµÍ¤á¥¨¥é¡¼ (truncation error) ¤ò̵»ë¤¹¤ë¡£TCP ¤Ç¥ê¥È¥é¥¤¤·¤Ê¤¤¡£
309 [¸½ºß¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤]
310 .TP
311 .B RES_RECURSE
312 .\"O Set the recursion desired bit in queries.
313 .\"O Recursion is carried out
314 .\"O by the domain name server, not by
315 .\"O .BR res_send ().
316 .\"O [Enabled by default].
317 .\"Osato:
318 .\"Osato: recursion desired ¤Ï¡ÖºÆµ¢Í×µá¡×¡ÖºÆµ¢Í×˾¡×¡ÖºÆµ¢Í×ÀÁ¡×¤Ê¤É¤È
319 .\"Osato: Ìõ¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤·¤¿¡£
320 .\"Osato:
321 ºÆµ¢Í×µá (recursion desired) ¥Ó¥Ã¥È¤òÌ䤤¹ç¤ï¤»¤ËÀßÄꤹ¤ë¡£
322 ºÆµ¢¤Ï
323 .BR res_send ()
324 ¤Ç¤Ï¤Ê¤¯¥É¥á¥¤¥ó¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¡£
325 [¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú]
326 .TP
327 .B RES_DEFNAMES
328 .\"O If set,
329 .\"O .BR res_search ()
330 .\"O will append the default domain name to
331 .\"O single component names, i.e., those that do not contain a dot.
332 .\"O [Enabled by default].
333 .\"Osato:
334 .\"Osato: single component ¤Ï¡Ö1 ¤Ä¤ÎÍ×ÁǤ«¤é¤Ê¤ë¡×¤ÎÊý¤¬¤è¤¤¤Ç¤·¤ç¤¦¤«?
335 .\"Osato:
336 ÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¢
337 .BR res_search ()
338 ¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥É¥á¥¤¥ó̾¤ò°ìÉôʬ
339 ¤Î¤ß¤«¤é¤Ê¤ë̾Á°¡¢¤¹¤Ê¤ï¤Á¥É¥Ã¥È¤ò´Þ¤Þ¤Ê¤¤Ì¾Á°¤ËÉÕ¤±²Ã¤¨¤ë¡£
340 [¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú]
341 .TP
342 .B RES_STAYOPEN
343 .\"O Used with
344 .\"O .B RES_USEVC
345 .\"O to keep the TCP connection open between queries.
346 Ì䤤¹ç¤ï¤»Ãæ¤Ë TCP Àܳ¤òÊݤĤ¿¤á
347 .B RES_USEVC
348 ¤È¶¦¤ËÍѤ¤¤é¤ì¤ë¡£
349 .TP
350 .B RES_DNSRCH
351 .\"O If set,
352 .\"O .BR res_search ()
353 .\"O will search for hostnames in the current
354 .\"O domain and in parent domains.
355 .\"O This option is used by
356 .\"O .BR gethostbyname (3).
357 .\"O [Enabled by default].
358 ÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¢
359 .BR res_search ()
360 ¤Ï¸½ºß¤Î¥É¥á¥¤¥ó¤ª¤è¤Ó¿Æ¥É¥á¥¤¥ó¤Î
361 ¥Û¥¹¥È̾¤òõ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï
362 .BR gethostbyname (3)
363 ¤ÇÍѤ¤¤é¤ì¤ë¡£
364 [¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú]
365 .\"O .SH "RETURN VALUE"
366 .SH ÊÖ¤êÃÍ
367 .\"O The
368 .\"O .BR res_init ()
369 .\"O function returns 0 on success, or \-1 if an error
370 .\"O occurs.
371 .BR res_init ()
372 ´Ø¿ô¤ÏÀ®¸ù¤¹¤ì¤Ð 0 ¤ò¡¢¥¨¥é¡¼¤¬È¯À¸¤¹¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
373 .PP
374 .\"O The \fBres_query\fP(), \fBres_search\fP(),
375 .\"O .BR res_querydomain (),
376 .\"O .BR res_mkquery ()
377 .\"O and
378 .\"O .BR res_send ()
379 .\"O functions return the length
380 .\"O of the response, or \-1 if an error occurs.
381 .BR res_query (),
382 .BR res_search (),
383 .BR res_querydomain (),
384 .BR res_mkquery (),
385 .BR res_send ()
386 ´Ø¿ô¤Ï±þÅú¤ÎŤµ¤òÊÖ¤¹¡£
387 ¤Þ¤¿¡¢¥¨¥é¡¼¤¬È¯À¸¤¹¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
388 .PP
389 .\"O The
390 .\"O .BR dn_comp ()
391 .\"O and
392 .\"O .BR dn_expand ()
393 .\"O functions return the length
394 .\"O of the compressed name, or \-1 if an error occurs.
395 .BR dn_comp ()
396 ¤È
397 .BR dn_expand ()
398 ´Ø¿ô¤Ï°µ½Ì¤µ¤ì¤¿¥É¥á¥¤¥ó̾¤ÎŤµ¤òÊÖ¤¹¡£
399 ¤Þ¤¿¡¢¥¨¥é¡¼¤¬È¯À¸¤¹¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
400 .\"O .SH FILES
401 .SH ¥Õ¥¡¥¤¥ë
402 .nf
403 .\"O /etc/resolv.conf          resolver configuration file
404 /etc/resolv.conf          ¥ì¥¾¥ë¥ÐÀßÄê¥Õ¥¡¥¤¥ë
405 .\"O /etc/host.conf            resolver configuration file
406 /etc/host.conf            ¥ì¥¾¥ë¥ÐÀßÄê¥Õ¥¡¥¤¥ë
407 .fi
408 .\"O .SH "CONFORMING TO"
409 .SH ½àµò
410 4.3BSD.
411 .\"O .SH "SEE ALSO"
412 .SH ´ØÏ¢¹àÌÜ
413 .BR gethostbyname (3),
414 .BR resolv.conf (5),
415 .BR resolver (5),
416 .BR hostname (7),
417 .BR named (8)