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
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
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
ba9c1275c4
Add a generic rate-limited log mechanism, and use it in a few places
...
Incidentally fixes bug 1042.
2010-08-18 15:55:49 -04:00
Nick Mathewson
a509dbba50
Merge commit 'karsten/dirbytes2'
...
Conflicts:
src/or/rephist.h
2010-08-18 10:06:14 -04:00
Karsten Loesing
58b6195455
Correctly report written bytes on linked connections.
2010-08-18 13:54:41 +02:00
Karsten Loesing
db94b7f46e
Count bytes we spend on answering directory requests.
2010-08-18 13:54:41 +02:00
Nick Mathewson
a856f446c7
Merge commit 'sebastian/bug1831'
2010-08-15 23:43:36 -04:00
Sebastian Hahn
561ca9b987
Fix misplaced labels
2010-08-16 00:46:44 +02:00
Karsten Loesing
acd25558b8
Refactor exit port statistics code and add unit tests.
2010-08-11 16:19:54 +02:00
Sebastian Hahn
05072723cb
Create routerparse.h
2010-07-27 10:00:46 +02:00
Sebastian Hahn
df9d42cef5
Create rephist.h
2010-07-27 10:00:46 +02:00
Sebastian Hahn
b0cd4551ab
Create relay.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
cc060ea220
Create reasons.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
7bd8dee463
Create policies.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
0f1548ab18
Create main.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
dc2f1666ff
Create dns.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
7d4c027fb0
Create dirserv.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
bec1c838ca
Create directory.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
98d1314c7e
Create cpuworker.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
0bfa34e1f6
Create control.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
0d33120c26
Create connection_or.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
78b6a4650b
Create connection_edge.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
2a74101f7a
Create connection.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
c4f8f1316e
Create config.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
01c7b60a80
Create circuituse.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
174a88dd79
Create circuitlist.h
2010-07-27 07:58:13 +02:00
Sebastian Hahn
21155204c6
Create circuitbuild.h
2010-07-27 07:58:13 +02:00
Sebastian Hahn
34dfce0d82
Create buffers.h
2010-07-27 07:56:26 +02:00
Sebastian Hahn
7caa8351b8
Create rendclient.h
2010-07-27 07:56:26 +02:00
Sebastian Hahn
31e81439e1
Create rendcommon.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
c53b6cc831
Create router.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
ff4030f621
Create geoip.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
e69dc22f4e
Split headers for dnsserv.c functions out of or.h
...
The next series of commits begins addressing the issue that we're
currently including the complete or.h file in all of our source files.
To change that, we're splitting function definitions into new header
files (one header file per source file).
2010-07-27 07:56:25 +02:00
Roger Dingledine
625963d92a
commit my annotations while i was hunting down the host order bug
2010-03-05 16:04:01 -05:00
Nick Mathewson
b006e3279f
Merge remote branch 'origin/maint-0.2.1'
...
Conflicts:
src/common/test.h
src/or/test.c
2010-02-27 17:16:31 -05:00
Nick Mathewson
c3e63483b2
Update Tor Project copyright years
2010-02-27 17:14:21 -05:00
Sebastian Hahn
b2b99a70c0
Don't spam controllers with TOO_MANY_CONNECTIONS events
...
We implemented ratelimiting for warnings going into the logfile, but didn't
rate-limit controller events. Now both log warnings and controller events
are rate-limited.
2010-02-08 16:45:36 +01:00
Nick Mathewson
d4354b506b
Don't use OutboundBindAddress to connect to localhost
...
The OutboundBindAddress option is useful for making sure that all of
your outbond connections use a given interface. But when connecting
to 127.0.0.1 (or ::1 even) it's important to actually have the
connection come _from_ localhost, since lots of programs running on
localhost use the source address to authenticate that the connection
is really coming from the same host.
Our old code always bound to OutboundBindAddress, whether connecting
to localhost or not. This would potentially break DNS servers on
localhost, and socks proxies on localhost. This patch changes the
behavior so that we only look at OutboundBindAddress when connecting
to a non-loopback address.
2010-01-20 13:09:10 -05:00
Sebastian Hahn
c32e8c292e
Log a notice when we get a new control connection
2010-01-18 19:14:36 -05:00
Roger Dingledine
b9f1bd3c4e
whitespace fixes
2010-01-15 15:58:35 -05:00
Roger Dingledine
f255272f45
add separate per-conn write limiting
2009-12-29 22:25:02 -05:00