ares_set_servers_csv: fixed IPv6 address parsing
[platform/upstream/c-ares.git] / ares_fds.3
1 .\"
2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
3 .\"
4 .\" Permission to use, copy, modify, and distribute this
5 .\" software and its documentation for any purpose and without
6 .\" fee is hereby granted, provided that the above copyright
7 .\" notice appear in all copies and that both that copyright
8 .\" notice and this permission notice appear in supporting
9 .\" documentation, and that the name of M.I.T. not be used in
10 .\" advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission.
12 .\" M.I.T. makes no representations about the suitability of
13 .\" this software for any purpose.  It is provided "as is"
14 .\" without express or implied warranty.
15 .\"
16 .TH ARES_FDS 3 "23 July 1998"
17 .SH NAME
18 ares_fds \- Get file descriptors to select on for name service
19 .SH SYNOPSIS
20 .nf
21 .B #include <ares.h>
22 .PP
23 .B int ares_fds(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP,
24 .B      fd_set *\fIwrite_fds\fP)
25 .fi
26 .SH DESCRIPTION
27 The
28 .B ares_fds
29 function retrieves the set of file descriptors which the calling
30 application should select on for reading and writing for the
31 processing of name service queries pending on the name service channel
32 identified by
33 .IR channel .
34 File descriptors will be set in the file descriptor sets pointed to by
35 .I read_fds
36 and
37 .I write_fds
38 as appropriate.  File descriptors already set in
39 .I read_fds
40 and
41 .I write_fds
42 will remain set; initialization of the file descriptor sets
43 (using
44 .BR FD_ZERO )
45 is the responsibility of the caller.
46 .SH RETURN VALUES
47 .B ares_fds
48 returns one greater than the number of the highest socket set in either
49 .I read_fds
50 or
51 .IR write_fds .
52 If no queries are active,
53 .B ares_fds
54 will return 0.
55 .SH SEE ALSO
56 .BR ares_timeout (3),
57 .BR ares_process (3)
58 .SH AUTHOR
59 Greg Hudson, MIT Information Systems
60 .br
61 Copyright 1998 by the Massachusetts Institute of Technology.