Sebastian Hahn
865bea3b89
Some bufferevents related fixes and pointers for nickm
2010-09-27 14:22:18 -04:00
Nick Mathewson
beb52352f2
Fix build with automake 1.6
...
automake 1.6 doesn't like using a conditional += to add stuff to foo_LDADD.
Instead you need to conditionally define a variable, then non-conditionally
put that variable in foo_LDADD.
2010-09-27 14:22:18 -04:00
Nick Mathewson
ffd5070b04
Convert bufferevents to use rate-limiting.
...
This requires the latest Git version of Libevent as of 24 March 2010.
In the future, we'll just say it requires Libevent 2.0.5-alpha or
later.
Since Libevent doesn't yet support hierarchical rate limit groups,
there isn't yet support for tracking relayed-bytes separately when
using the bufferevent system. If a future version does add support
for hierarchical buckets, we can add that back in.
2010-09-27 14:22:18 -04:00
Nick Mathewson
98ec959c9c
Fix a couple of bufferevent incompatibilities that snuck in.
2010-09-27 14:22:18 -04:00
Nick Mathewson
0c9b64d449
Get zlib compression working with bufferevents.
2010-09-27 14:22:11 -04:00
Nick Mathewson
9796b9bfa6
Implement SOCKS-client support for bufferevents
2010-09-27 12:31:14 -04:00
Nick Mathewson
c74a4ab515
Documentation for a few bufferevent functions.
2010-09-27 12:31:14 -04:00
Nick Mathewson
bd3612cd2b
Get SSL connections and linked connections working with bufferevents.
...
Clients are now verified to work and build circuits correctly. There
are still a few warnings given here and there that I need to look into.
2010-09-27 12:31:14 -04:00
Nick Mathewson
fc4ddafab8
Make control connections use bufferevents
2010-09-27 12:31:14 -04:00
Nick Mathewson
84bb5d573c
Fix crash/warning bug when we get an unexpected close.
...
This was possible if we have already decided to close a bufferevent
connection, but the other side decides to close it first.
2010-09-27 12:31:13 -04:00
Nick Mathewson
44375d4eb8
Add a 0-pullup version of fetch_from_evbuffer_socks
2010-09-27 12:31:13 -04:00
Nick Mathewson
f6899f3a74
Documentation for inspect_evbuffer
2010-09-27 12:31:13 -04:00
Nick Mathewson
698085d56e
Add pullup-free version of fetch_from_evbuffer_http
2010-09-27 12:31:13 -04:00
Nick Mathewson
4af6887d20
Add support for linked connections with bufferevent_pair.
...
Also, set directory connections (linked and otherwise) to use bufferevents.
Also, stop using outbuf_flushlen anywhere except for OR connections.
2010-09-27 12:31:13 -04:00
Nick Mathewson
b63f6518cb
Add bufferevent support for outgoing connections; exits are now supported.
2010-09-27 12:31:13 -04:00
Nick Mathewson
ddcb59bb70
Fix more remaining users of inbuf/outbuf to handle bufferevents instead.
2010-09-27 12:31:13 -04:00
Nick Mathewson
5279036148
Be a little more abstract about which connection type use bufferevents
2010-09-27 12:31:13 -04:00
Nick Mathewson
9f8027abfd
Make a function to mark a connection and set hold_open_until_flushed.
2010-09-27 12:31:13 -04:00
Nick Mathewson
d830eb366a
Allow hold-open-until-flushed logic to work for bufferevents.
2010-09-27 12:29:43 -04:00
Nick Mathewson
ec10c044fb
Move the "stop writing when the buffer is empty" logic to cnnection_finished_flushing
2010-09-27 12:29:43 -04:00
Nick Mathewson
63079efb87
Add a fetch_from_evbuffer_http
2010-09-27 12:29:42 -04:00
Nick Mathewson
73feedb8b3
Have edge connections use fetch_from_evbuffer_socks when appropriate.
2010-09-27 12:29:42 -04:00
Nick Mathewson
c6e22ae2b7
Basic bufferevent callbacks
...
These are based strongly on connection_handle_read and
connection_handle_write, but hopefully without so much mixture of IO
logic and Tor logic.
2010-09-27 12:29:42 -04:00
Nick Mathewson
a0f4841e2b
Refactor SOCKS parsing code to handle evbuffers.
...
Now all of the logic is in a parse_socks() function that gets data
from a buf_t or evbuffer-specific wrapper.
2010-09-27 12:29:42 -04:00
Nick Mathewson
4836014168
Clone fetch_var_cell_from_buf() for evbuffers.
2010-09-27 12:28:43 -04:00
Nick Mathewson
0514917800
Add a new connection_fetch_from_buf_line() that can handle bufferevents
2010-09-27 12:28:43 -04:00
Nick Mathewson
5448501479
New bufferevent-related check in assert_connection_ok().
...
{Make sure that if we have a bufferevent on a connection, we do not have the
other libevent/buffering-related fields set.}
2010-09-27 12:28:43 -04:00
Nick Mathewson
076025476a
Add bufferevent versions of connection_write/fetch_to/from_buf.
2010-09-27 12:28:43 -04:00
Nick Mathewson
200921dc31
Refactor users of buf_datalen to bufferevent-friendly version.
2010-09-27 12:28:43 -04:00
Nick Mathewson
57e7b54b7b
Teach read_event/write_event manipulators about bufferevents.
...
Add an --enable-bufferevents config switch.
2010-09-27 12:28:43 -04:00
Nick Mathewson
94aac84a71
Remove never-actually-finished code to use readv and writev for IO.
...
We'll get this feature for free with bufferevents, so there's no good reason
to clone it in Tor.
2010-09-27 12:28:43 -04:00
Nick Mathewson
26811a8e2d
Merge remote branch 'origin/maint-0.2.2'
2010-09-27 12:26:23 -04:00
Nick Mathewson
24a45f54d2
Merge branch 'bug1805' into maint-0.2.2
2010-09-27 12:25:32 -04:00
Nick Mathewson
9c8fb75edf
Clean up some bug1805 comments based on arma's feedback
2010-09-27 12:23:49 -04:00
Nick Mathewson
1cbdbff961
Merge remote branch 'mikeperry/bug1952-merge' into maint-0.2.2
2010-09-27 12:17:41 -04:00
Mike Perry
dfe8c2146c
Add changelog for bug 1952.
2010-09-27 09:12:00 -07:00
Mike Perry
7af0aa25d8
Update dir-spec.txt with new weight constraints.
2010-09-27 09:11:55 -07:00
Mike Perry
0ff86042ac
Implement new Wxx constraints.
...
Cases 1 and 3b are provably correct. Case 2b has a fallback to first try to
maximize entropy.
2010-09-27 08:53:41 -07:00
Nick Mathewson
2579d827ab
Use autoreconf, not autoconf&&automake&&etc in autogen.sh
...
The autoreconf tool deals much better with detecting which tools to
use on your particular platform, handling cases where your
install-sh script gets stable, and lots of other little tricky
issues.
We still fall back to autoconf&&automake&&etc in the case where
"`which autoreconf 2>/dev/null`" says something we can't run.
This is the first change of the 0.2.3.x series.
2010-09-27 11:20:12 -04:00
Nick Mathewson
83f9667fe8
Bump the Tor version in master to 0.2.3.0-alpha-dev
...
0.2.2.x development will continue in branch maint-0.2.2.
master is now out of feature freeze.
Let's not go crazy right away. :)
2010-09-24 15:15:07 -04:00
Nick Mathewson
d073d7d4eb
Consistency issues in load_windows_system_library patch. Thanks Sebastian
2010-09-24 14:16:55 -04:00
Nick Mathewson
c8e1538a0b
Merge remote branch 'sebastian/continuation'
2010-09-24 13:43:55 -04:00
Sebastian Hahn
851255170a
Note that the torrc format doesn't need nl at end
2010-09-24 13:32:27 +02:00
Nick Mathewson
9b49a89430
Merge branch 'bug1511'
2010-09-23 23:16:25 -04:00
Nick Mathewson
0a0cc4599f
Tweak continuation-and-comment logic
...
I think there was a read-off-the-end-of-the-buffer bug that I fixed.
At least I added some good comments, I hope.
2010-09-23 22:58:04 -04:00
Sebastian Hahn
1d29ad891e
Add new torrc line continuation unit tests
...
We want to make sure that we don't break old torrc files that might have
used something like this made-up example:
ContactInfo UberUser <uber@user.com> # /// Fake email! \\\
Log info file /home/nick.mathewson/projects/tor-info.log
And we also want to support the following style of writing your torrc:
ExcludeNodes \
# Node1337 is run by the Bavarian Illuminati
Node1337, \
# The operator of Node99 looked at me funny
Node99
The code already handles both cases, but the unit test should help prove
it.
2010-09-23 22:46:13 +02:00
Nick Mathewson
c9cb4f0a0e
Rename has_completed_circuit to can_complete_circuit
...
Also redocument it. Related to #1362 .
2010-09-22 01:52:57 -04:00
Nick Mathewson
31f22505a6
Merge remote branch 'arma/bug1362'
2010-09-22 01:45:57 -04:00
Nick Mathewson
4ef9ccc883
Changes to bug1959_part1 on review from arma.
...
Significant one: we want to say "not enough entry nodes descriptors, so we
can't build circuits" only when we have 0 descriptors.
2010-09-22 01:30:23 -04:00
Nick Mathewson
49c177437b
Make our min-info check also check for entry node presence
...
Part of a fix for bug1959
2010-09-21 15:17:40 -04:00