Yang Tse
0c677f578e
setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
...
Inclusion of these two header files now done in setup_once.h
12 years ago
Yang Tse
a1035276c1
Header inclusion clean-up
...
Remove header inclusions already done in setup_once.h
12 years ago
hpopescu@ixiacom.com
90364defb0
Added new feature (rfc2671)
12 years ago
Daniel Stenberg
e447bc5c60
code police: fix indents, < 80 columns, reflowed comments
13 years ago
Gisle Vanem
4d91235900
read_udp_packets: bail out loop on bad sockets
...
I can see that recvfrom() in ares_process.c many times is called with
'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call
recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the
inner-loop.
13 years ago
Yang Tse
38b69b7269
Kill compiler warning
13 years ago
Yang Tse
66e91438c5
ares_process.c: fix compiler warning
13 years ago
Yang Tse
5ef8f5ead2
compiler warning: fix
...
Fix compiler warning: variable was set but never used
Fix compiler warning: clobber ignored
14 years ago
David Stuart
6518b56a5e
IPv6-on-windows: find DNS servers correctly
14 years ago
Yang Tse
8c503ddf79
System's errno.h inclusion cleanup.
...
System's errno.h is conditionally included from setup_once.h
14 years ago
Daniel Stenberg
366cd6d54d
advance_tcp_send_queue: avoid NULL ptr dereference
...
If given a too large 'num_bytes' value, it would cause a NULL ptr
dereference. Instead the code will now break out of the loop at the end
of the list.
14 years ago
Yang Tse
10ae9e4ec2
Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
14 years ago
Yang Tse
4ab5eb6631
Revert commit 494274e653
14 years ago
Yang Tse
494274e653
Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
14 years ago
Yang Tse
747981be8e
Revert following commits:
...
07bc7ea795
3392a50ea3
9912637d32
The purpose of the whole patch was to silence a compiler warning triggered
with GCC 4 on file ares_process.c The specific compiler warning was
'dereferencing type-punned pointer might break strict-aliasing rules'.
A simpler patch will follow to equally silence the warning.
14 years ago
Ben Greear
9912637d32
sock-addr-storage: Detect and deal with lack of .ss_family member.
...
AIX, at least, does not have sockaddr_storage.ss_family member.
Detect this in the configure logic and use proper #ifdefs in the
ares_process logic.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Tor Arntsen <tor@spacetec.no>
15 years ago
Ben Greear
3392a50ea3
typo: Fix compile bug for platforms that don't have sockaddr_storage.
...
Bug was introduced by me in previous commit.
Signed-off-by: Ben Greear <greearb@candelatech.com>
15 years ago
Ben Greear
07bc7ea795
Fix aliasing warning in gcc 4.4.4 (at least).
...
Should be no functional change, though the code gets a bit
ugglier.
Signed-off-by: Ben Greear <greearb@candelatech.com>
15 years ago
Ben Greear
3e33e2c2ba
ipv6: Fix some build issues related to the local-bind feature.
...
Signed-off-by: Ben Greear <greearb@candelatech.com>
15 years ago
Ben Greear
e3b04e5a47
local-bind: Support binding to local interface/IPs
...
Add 3 new functions to set the local binding for the out-going
socket connection, and add ares_set_servers_csv() to set a
list of servers at once as a comma-separated string.
Signed-off-by: Ben Greear <greearb@candelatech.com>
15 years ago
Daniel Stenberg
63627fa5ab
remove all $Id$ lines
15 years ago
Peter Pentchev
a83d892bb2
Fix a couple of typos and grammar nits.
15 years ago
Yang Tse
8fe746fcf2
Added IPv6 name servers support
15 years ago
Daniel Stenberg
8b6f71ce95
- Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
...
check for broken connections like ares_process() did. Based on that, I
merged the two functions into a single generic one with two front-ends.
15 years ago
Yang Tse
58d9b0c1bd
- Fix configure_socket() to use ares_socket_t instead of int data type.
15 years ago
Yang Tse
10461d1414
Make usage of calloc()'s arguments consistent with rest of code base
15 years ago
Yang Tse
a82a8fbf82
Renamed c-ares setup.h to ares_setup.h
15 years ago
Yang Tse
f34c2a879b
sclose() function-like macro definition used to close a socket,
...
16 years ago
Yang Tse
3a55bbebf1
Use build-time configured ares_socklen_t instead of socklen_t
16 years ago
Yang Tse
737707bf4b
fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value
16 years ago
Phil Blundell
977de8c778
- ares__send_query() now varies the retry timeout pseudo-randomly to avoid
...
packet storms when several queries were started at the same time.
16 years ago
Daniel Stenberg
f61fa37f40
Gregor Jasny provided the patch that introduces ares_set_socket_callback(),
...
and I edited it to also get duped by ares_dup().
16 years ago
Dan Fandrich
36a6a6e175
Only set TCP_NODELAY when it exists
16 years ago
Yang Tse
65cafbe109
Refactor configure script detection of functions used to set sockets into
...
non-blocking mode, and decouple function detection from function capability.
16 years ago
Daniel Stenberg
1a1b4eb4f2
- 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
16 years ago
Yang Tse
64c82d0853
Charles Hardin patch:
...
- handles the EINPROGRESS for UDP connects
- uses closesocket instead of close on some paths that were noticed
16 years ago
Yang Tse
f214b583f5
adjust inclusion of "nameser.h"
16 years ago
Yang Tse
c035f2d3a4
Functionality only possible if recvfrom() is available.
17 years ago
Yang Tse
09d10cb5c5
Brad House's validation that DNS response address matches the request address
17 years ago
Yang Tse
2265b9281c
fix compiler warning
17 years ago
Yang Tse
7cb1c3a215
millisecond resolution support followup
17 years ago
Daniel Stenberg
46dbd9461a
- Introducing millisecond resolution support for the timeout option. See
...
ares_init_options()'s ARES_OPT_TIMEOUTMS.
17 years ago
Daniel Stenberg
7829b79768
check for strings.h in configure and use it for the strcasecmp() proto
17 years ago
Yang Tse
3bac381e3f
Renamed internal function to avoid a variable shadowing it
17 years ago
Gisle Vanem
6ff970c067
'FD_CLOXEC' is meaningless on MSDOS/Watt-32.
17 years ago
Steinar H. Gunderson
f75d1172f8
Removed a piece of redundant code (process_answer already takes care of it).
17 years ago
Yang Tse
10df4bdba2
Fix compiler warning
17 years ago
Yang Tse
68aa62d76b
check availability of <netinet/tcp.h>
17 years ago
Steinar H. Gunderson
60519063ea
Use ISDIGIT instead of isdigit; fixes a gcc warning.
17 years ago
Steinar H. Gunderson
04e49e09dc
Previously, processing a large batch of timeouts was O(n^2) in the number of
...
outstanding queries, and processing a DNS response packet was O(n) in the
number of outstanding queries. To speed things up in Google, we added a few circular,
doubly-linked lists of queries that are hash-bucketed based on
the attributes we care about, so most important operations are now O(1).
It might be that the number of buckets are higher than most people would need,
but on a quick calculation it should only be 100kB or so even on a 64-bit
system, so I've let it stay as-is.
17 years ago