diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-11-01 18:35:19 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-11-01 18:35:19 +0000 |
commit | 1a1b4eb4f2fb6112534994c20ac20679c5c7339c (patch) | |
tree | 76fda13f7f58853b63f184e061cb75eec6922d44 /ares_private.h | |
parent | aa8d8b4933ca1f5de8da3f92f614e5f3236d6f89 (diff) | |
download | c-ares-1a1b4eb4f2fb6112534994c20ac20679c5c7339c.tar.gz c-ares-1a1b4eb4f2fb6112534994c20ac20679c5c7339c.tar.bz2 c-ares-1a1b4eb4f2fb6112534994c20ac20679c5c7339c.zip |
- Carlo Contavalli added support for the glibc "rotate" option, as documented
in man resolv.conf:
causes round robin selection of nameservers from among those listed. This
has the effect of spreading the query load among all listed servers, rather
than having all clients try the first listed server first every time.
You can enable it with ARES_OPT_ROTATE
Diffstat (limited to 'ares_private.h')
-rw-r--r-- | ares_private.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ares_private.h b/ares_private.h index 0b4edf9..976fa9f 100644 --- a/ares_private.h +++ b/ares_private.h @@ -195,8 +195,8 @@ struct query { void *arg; /* Query status */ - int try; - int server; + int try; /* Number of times we tried this query already. */ + int server; /* Server this query has last been sent to. */ struct query_server_info *server_info; /* per-server state */ int using_tcp; int error_status; @@ -242,6 +242,7 @@ struct ares_channeldata { int timeout; /* in milliseconds */ int tries; int ndots; + int rotate; /* if true, all servers specified are used */ int udp_port; int tcp_port; int socket_send_buffer_size; @@ -268,6 +269,9 @@ struct ares_channeldata { just to draw the line somewhere. */ time_t last_timeout_processed; + /* Last server we sent a query to. */ + int last_server; + /* Circular, doubly-linked list of queries, bucketed various ways.... */ /* All active queries in a single list: */ struct list_node all_queries; |