Commit Graph

6807 Commits

Author SHA1 Message Date
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
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
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
9b49a89430 Merge branch 'bug1511' 2010-09-23 23:16:25 -04: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
Nick Mathewson
52db5c2539 Even more accurate handling for shifting accounting intervals
Roger correctly pointed out that my code was broken for accounting
periods that shifted forwards, since
start_of_accounting_period_containing(interval_start_time) would not
be equal to interval_start_time, but potentially much earlier.
2010-09-21 14:59:43 -04:00
Nick Mathewson
e476ffc2ba Merge branch 'bug1789' 2010-09-21 14:29:59 -04:00
Nick Mathewson
9cba61eb8c Bug1789 cleanups suggested by arma
The significant one is that we look at RelayBandwidthRate if it is set.
2010-09-21 14:02:04 -04:00
Roger Dingledine
fe42f10954 log when we finish a circuit after being offline 2010-09-21 02:16:43 -04:00
Nick Mathewson
5a55662a6b Merge branch 'bug1956' 2010-09-21 00:07:45 -04:00
Roger Dingledine
47b23bd03e A start at a patch for bug 1943 (alignment issues) 2010-09-20 18:40:32 -04:00
Nick Mathewson
1411842933 Count unknown authorities as unknown only once, not once per signature.
Do not double-report signatures from unrecognized authorities both as
"from unknown authority" and "not present".  Fixes bug 1956, bugfix on
0.2.2.16-alpha.
2010-09-20 13:33:57 -04:00
Sebastian Hahn
ff5ffd1776 Attempt to fix compilation on Windows
Our attempt to make compilation work on old versions of Windows
again while keeping wince compatibility broke the build for Win2k+.
helix reports this patch fixes the issue for WinXP. Bugfix on
0.2.2.15-alpha; related to bug 1797.
2010-09-19 13:39:30 +02:00
Nick Mathewson
01c6b01137 I hear we are close to a release. Clean up the whitespace. 2010-09-16 15:44:14 -04:00
Nick Mathewson
c009c9da01 Merge remote branch 'sebastian/bug1921' 2010-09-16 10:52:43 -04:00
Roger Dingledine
0ac67bf3c3 perconnbwrate and perconnbwburst consensus params 2010-09-16 00:17:39 -04:00
Sebastian Hahn
4f1e36ca1d Demote a warn when enabling CellStatistics
When the CellStatistics option is off, we don't store cell insertion
times. Doing so would also not be very smart, because there seem to
still be some performance issues with this type of statistics. Nothing
harmful happens when we don't have insertion times, so we don't need to
alarm the user.
2010-09-16 01:13:51 +02:00
Nick Mathewson
144d92d538 finish a comment, lower a variable 2010-09-15 15:41:32 -04:00
Sebastian Hahn
bc081c254a How many seconds until != timestamp of that date 2010-09-15 21:13:17 +02:00
Nick Mathewson
c18bcc8a55 Merge branch 'bug1184' 2010-09-15 14:20:28 -04:00
Nick Mathewson
87f18c9578 Never queue a cell on a marked circuit 2010-09-15 13:06:54 -04:00
Nick Mathewson
6d8fc4eb38 Add a simple integer-ceiling-division macro before we get it wrong 2010-09-14 22:32:36 -04:00
Nick Mathewson
60e3def3ed Merge branch 'bug1899' 2010-09-14 22:19:25 -04:00
Nick Mathewson
e2b71d8841 Merge branch 'bug911' 2010-09-14 22:19:22 -04:00
Nick Mathewson
f5b7e039f3 Extract the "do these routers have the same addr:orport" logic into a fn 2010-09-14 22:19:00 -04:00
Nick Mathewson
d9e0550560 Tweak some issues found by arma in bug911 review. 2010-09-14 22:10:32 -04:00