Nick Mathewson
86f5742015
Add two implementations of getaddrinfo: one blocking and one nonblocking.
...
The entry points are evutil_getaddrinfo and evdns_getaddrinfo respectively.
There are fairly extensive unit tests.
I believe this code conforms to RFC3493 pretty closely, but there are
probably more issues. It should get tested on more platforms.
This code means we can dump the well-intentioned but weirdly-implemented
bufferevent_evdns and evutil_resolve code.
svn:r1537
2009-11-16 22:25:46 +00:00
Nick Mathewson
72bafc175a
Remove the stupid brokenness where DNS option names needed to end with a
...
colon.
svn:r1536
2009-11-16 22:23:55 +00:00
Nick Mathewson
784b8773a4
We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H
...
svn:r1516
2009-11-06 21:46:57 +00:00
Nick Mathewson
ac633aebdf
Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons.
...
svn:r1510
2009-11-05 21:22:23 +00:00
Nick Mathewson
0b9eb1bffb
Add a bufferevent function to resolve a name then connect to it.
...
This function, bufferevent_socket_connect_hostname() can either use
evdns to do the resolve, or use a new function (evutil_resolve) that
uses getaddrinfo or gethostbyname, like http.c does now.
This function is meant to eventually replace the hostname resolution mess in
http.c.
svn:r1496
2009-11-03 20:40:48 +00:00
Nick Mathewson
9976f1e74c
reformat weird indentation in dns tests
...
svn:r1478
2009-10-29 17:11:12 +00:00
Nick Mathewson
3c2198cb48
Unit test for reverse ipv6 lookup
...
svn:r1477
2009-10-29 17:10:36 +00:00
Nick Mathewson
5082546682
Fix windows compilation warnings.
...
svn:r1449
2009-10-21 02:14:16 +00:00
Nick Mathewson
0c09fe5ada
Add a couple more evdns tests. Libevent is now, for me, at 80.02% coverage.
...
svn:r1409
2009-08-03 20:50:56 +00:00
Nick Mathewson
94e8f9b901
Another DNS unit tests, to handle reissues.
...
The evdns module is now up to ~72% coverage; Libevent is up to nearly 80%.
svn:r1408
2009-08-03 20:15:45 +00:00
Nick Mathewson
dc1f5b1ee0
why say fprintf(stdout, X) when you can say printf?
...
svn:r1407
2009-08-03 20:15:39 +00:00
Nick Mathewson
213dc2a2ef
Fix an annoying evdns crash bug, and add more unit tests for evdns.
...
svn:r1406
2009-08-03 20:15:32 +00:00
Nick Mathewson
a5006d80cd
Unit tests for DNS search.
...
svn:r1405
2009-08-03 16:15:57 +00:00
Nick Mathewson
72ea534f8e
Export evutil_str[n]casecmp as evutil_ascii_str[n]casecmp.
...
svn:r1387
2009-07-28 19:41:57 +00:00
Nick Mathewson
a826a75800
Some tweaks to Brodie Thesfield's MSVC patch.
...
svn:r1386
2009-07-28 19:41:48 +00:00
Nick Mathewson
5b5b880be7
Various MSVC cleanups from Brodie Thiesfield.
...
svn:r1385
2009-07-28 19:41:39 +00:00
Nick Mathewson
d866f05585
Patch from Zack Weinberg: normalize perror() tt functions and add tt_fail/tt_abort_printf
...
svn:r1340
2009-07-13 20:03:00 +00:00
Nick Mathewson
ea664bf29a
Refactor test wrappers to divide legacy items from useful stuff.
...
svn:r1212
2009-04-21 18:46:30 +00:00
Nick Mathewson
4d8919ec44
Do not try to double-free the nameserver in regression test
...
svn:r1202
2009-04-19 01:58:26 +00:00
Nick Mathewson
d2e9caa6fc
Fix evdns_cancel to alert callback and free associated RAM.
...
Also, we add a test to make sure evdns_cancel is working properly.
svn:r1139
2009-04-06 20:38:19 +00:00
Nick Mathewson
d9628ef4ff
Add missing initializers
...
svn:r1082
2009-01-31 18:36:08 +00:00
Nick Mathewson
eac75f91e4
Port DNS tests.
...
svn:r1081
2009-01-31 07:32:14 +00:00
Nick Mathewson
b85b710cf5
Update copyright statements to reflect the facts that:
...
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
2009-01-27 22:34:36 +00:00
Nick Mathewson
8889a77039
Replace all use of config.h with event-config.h.
...
svn:r1064
2009-01-27 22:30:46 +00:00
Niels Provos
a077fb8c09
rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
...
svn:r1033
2009-01-22 02:47:35 +00:00
Nick Mathewson
169321c9e6
Rename four internal headers to follow the -internal.h convention.
...
svn:r1000
2009-01-13 20:26:37 +00:00
Niels Provos
87be18daa1
implement evdns_cancel_request; test one of the new evdns_base functions
...
svn:r980
2008-12-25 16:25:37 +00:00
Nick Mathewson
dd73168556
Implement increased DSN-poisoning resistance via the 0x20 hack.
...
svn:r958
2008-12-03 20:09:13 +00:00
Nick Mathewson
4e8a339ef7
r19602@catbus: nickm | 2008-05-05 11:45:18 -0400
...
Make most of the tests use the new headers.
svn:r776
2008-05-05 15:46:00 +00:00
Nick Mathewson
ce4ee418d2
r16733@catbus: nickm | 2007-11-26 14:18:25 -0500
...
Add an --enable-gcc-warnings option (lifted from Tor) to the configure script. When provided, and when we are using GCC, we enable a bunch of extra GCC warnings in the compiler. Also, make the code all build happily with these warnings.
svn:r553
2007-11-26 19:18:49 +00:00
Nick Mathewson
bab0e6d440
r16492@catbus: nickm | 2007-11-06 23:27:32 -0500
...
Fix unit tests so that an outdated nameserver means "Skip IPv6 tests", not "Abort."
svn:r487
2007-11-07 04:28:54 +00:00
Nick Mathewson
7c507668d7
r16489@catbus: nickm | 2007-11-06 22:51:05 -0500
...
Do not use "class" as identifier in evdns.h; but use a backward-compatible fix. (Should fix bug 1826515, originally reported by Roger Clark)
svn:r486
2007-11-07 03:52:20 +00:00
Nick Mathewson
1e1f77c5b0
Make the test/ subdirectory buildable under Windows. Well, mingw at least. The tests still don't all pass, but at least now we know that.
...
svn:r447
2007-09-20 19:08:20 +00:00
Nick Mathewson
35983cd60f
r14618@catbus: nickm | 2007-08-16 17:11:47 -0400
...
In ANSI C, int func() is a function with unspecified arguments, whereas int func(void) is a function that takes no arguments. Using int func() to mean a function with no arguments is a C++ism, so let's not use or generate it.
svn:r395
2007-08-16 21:12:53 +00:00
Niels Provos
7c6df310c9
remove c++ comments from Jan Kneschke
...
svn:r373
2007-07-30 23:53:10 +00:00
Niels Provos
b5d2f9a255
rolling back r339: evconfig.h does not work
...
svn:r341
2007-03-01 06:25:18 +00:00
Niels Provos
127c260bb7
make evconfig.h available as installed header file; not
...
really ideal but good enough for me; from Nick Mathewson
svn:r339
2007-02-28 04:02:29 +00:00
Niels Provos
faf5f73a69
dns server support from Nick Mathewson; tiny tweaks
...
to the regression test from me to make it run on
systems where stack variables get initialized with
trash.
svn:r321
2007-02-08 16:39:15 +00:00
Niels Provos
121efe6530
small bug fixes to AAAA resolution and regression test; from Nick Mathewson!
...
we love regresson tests.
svn:r319
2007-01-27 08:38:51 +00:00
Niels Provos
cf47f86b74
put the evdns documentation into the header file. pathetic start of evdns manpage. a little bit
...
more testing and debug output for the DNS regression test. add a BSD copyright to evdns.h with
appropriate explanations.
svn:r239
2006-10-09 00:48:42 +00:00
Niels Provos
fe1dfe0f40
sync evdns changes with tor - from Nick Mathewson
...
svn:r238
2006-10-05 22:59:44 +00:00
Niels Provos
e9c1e3f7f0
introduce evdns_init() which works on windows and unix.
...
svn:r231
2006-08-28 00:57:49 +00:00
Niels Provos
07c3fb5067
add a simple regression test for the DNS resolver; requires internet access.
...
do some KNF on evdns.c; add checks to prevent potential buffer overflows.
fix one memory leak.
svn:r230
2006-08-27 20:04:20 +00:00