.nf
#include <ares.h>
-struct ares_options {
- int flags;
- int timeout; /* in seconds or milliseconds, depending on options */
- int tries;
- int ndots;
- unsigned short udp_port;
- unsigned short tcp_port;
- int socket_send_buffer_size;
- int socket_receive_buffer_size;
- struct in_addr *servers;
- int nservers;
- char **domains;
- int ndomains;
- char *lookups;
- ares_sock_state_cb sock_state_cb;
- void *sock_state_cb_data;
- struct apattern *sortlist;
- int nsort;
- int ednspsz;
- char *resolvconf_path;
-};
-
int ares_init_options(ares_channel *\fIchannelptr\fP,
struct ares_options *\fIoptions\fP,
int \fIoptmask\fP)
indicates a DNS lookup and "f" indicates a lookup in the hosts file.
.TP 18
.B ARES_OPT_SOCK_STATE_CB
-.B void (*\fIsock_state_cb\fP)(void *data, ares_socket_t socket_fd, int readable, int writable);
+.B void (*\fIsock_state_cb\fP)(void *data, int s, int read, int write);
.br
.B void *\fIsock_state_cb_data\fP;
.br
A callback function to be invoked when a socket changes state.
-.I socket_fd
+.I s
will be passed the socket whose state has changed;
-.I readable
+.I read
will be set to true if the socket should listen for read events, and
-.I writable
+.I write
will be set to true if the socket should listen for write events.
The value of
.I sock_state_cb_data
The message size to be advertized in EDNS; only takes effect if the
.B ARES_FLAG_EDNS
flag is set.
-.TP 18
-.B ARES_OPT_RESOLVCONF
-.B char *\fIresolvconf_path\fP;
-.br
-The path to use for reading the resolv.conf file. The
-.I resolvconf_path
-should be set to a path string, and will be honoured on *nix like systems. The
-default is
-.B /etc/resolv.conf
.br
.PP
The \fIoptmask\fP parameter also includes options without a corresponding
.SH NOTES
When initializing from
.B /etc/resolv.conf,
-(or, alternatively when specified by the
-.I resolvconf_path
-path location)
\fBares_init_options(3)\fP reads the \fIdomain\fP and \fIsearch\fP directives
to allow lookups of short names relative to the domains specified. The
\fIdomain\fP and \fIsearch\fP directives override one another. If more that
Copyright 1998 by the Massachusetts Institute of Technology.
.br
Copyright (C) 2004-2010 by Daniel Stenberg.
+