aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
AgeCommit message (Collapse)Author
2011-02-22Implement more heartbeat message stuff.George Kadianakis
(This squashes multiple commits: * Adds uptime monitoring support. * Adds circuit counting code. * Trivially tweaks the documentation. * Trivial run_scheduled_events() code tweaking. * Adds a status.h to export functions. * Added bandwidth monitoring code. * Added consensus presense detection code. * Restricts the precision of the bandwidth output. * Various fixes. * Fixed style and spacing problems. * Tidied up src/or/Makefile.am * Couple of minor fixes on status.c functions. * 'Implemented' client heartbeat support )
2011-02-22Initial heartbeat subsystem commit.Sebastian Hahn
Sets: * Documentation * Logging domain * Configuration option * Scheduled event * Makefile It also creates status.c and the log_heartbeat() function. All code was written by Sebastian Hahn. Commit message was written by me (George Kadianakis).
2011-02-07change APIs slightly to make #1944 easierRoger Dingledine
2011-02-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-02-03Enable ASLR and permanent DEP for Windows executablesJohn Brooks
Fix for #2358
2011-01-07GETINFO options for querying traffic usageDamian Johnson
This was originally a patch provided by pipe (http://www.mail-archive.com/or-talk@freehaven.net/msg13085.html) to provide a method for controllers to query the total amount of traffic tor has handled (this is a frequently requested piece of information by relay operators).
2011-01-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-12-21Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2010-12-03Call the new config option ConnDirectionStatistics.Karsten Loesing
2010-12-03Add metric on uni/bidirectional connection usage.Karsten Loesing
2010-11-19Better fix for 2190: defer libevent->controller messages instead of droppingNick Mathewson
2010-11-19Add a SIGNAL event for control connectionsJohn Brooks
Implements ticket #1955
2010-10-21Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/tortls.c
2010-10-21Rename get_client_identity_key to get_tlsclient_identity_keyNick Mathewson
2010-10-13Fix some XXXXs in connection_add_impl related to bufferevent error checkingNick Mathewson
This might make bufferevents more asserty for a while, but they should make other bugs less likely to go unnoticed. Noted by Sebastian.
2010-10-13Implement node_set_exit_policy_to_reject_all with a flagNick Mathewson
Also remove some debugging code.
2010-10-13Merge branch 'nodes'Nick Mathewson
2010-10-13Send END cells on bufferevent tunneled directory connsNick Mathewson
Our old code correctly called bufferevent_flush() on linked connections to make sure that the other side got an EOF event... but it didn't call bufferevent_flush() when the connection wasn't hold_open_until_flushed. Directory connections don't use hold_open_until_flushed, so the linked exit connection never got an EOF, so they never sent a RELAY_END cell to the client, and the client never concluded that data had arrived. The solution is to make the bufferevent_flush() code apply to _all_ closing linked conns whose partner is not already marked for close.
2010-10-13Use connection_mark_and_flush consistently.Nick Mathewson
2010-10-04Maintain separate server and client identity keys when appropriate.Robert Ransom
Fixes a bug described in ticket #988.
2010-10-04Maintain separate server and client TLS contexts.Robert Ransom
Fixes bug #988.
2010-10-04Refactor tor_tls_context_new:Robert Ransom
* Make tor_tls_context_new internal to tortls.c, and return the new tor_tls_context_t from it. * Add a public tor_tls_context_init wrapper function to replace it.
2010-10-01Try to make most routerinfo_t interfaces constNick Mathewson
2010-10-01Implement a basic node and nodelist typeNick Mathewson
The node_t type is meant to serve two key functions: 1) Abstracting difference between routerinfo_t and microdesc_t so that clients can use microdesc_t instead of routerinfo_t. 2) Being a central place to hold mutable state about nodes formerly held in routerstatus_t and routerinfo_t. This patch implements a nodelist type that holds a node for every router that we would consider using.
2010-09-30Start tor-fw-helper in the background, and log whatever it outputsSteven Murdoch
2010-09-29Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2010-09-28handle ugly edge case in retrying entrynodesRoger Dingledine
Specifically, a circ attempt that we'd launched while the network was down could timeout after we've marked our entrynodes up, marking them back down again. The fix is to annotate as bad the OR conns that were around before we did the retry, so if a circuit that's attached to them times out we don't do anything about it.
2010-09-28refactor; no actual changesRoger Dingledine
2010-09-27Download microdescriptors if you're a cacheNick Mathewson
This commit adds some functions to see what microdescriptors we're missing, and adds fetch-microdesc/store-microdesc logic to the directory code.
2010-09-27Document and/or fix stuff found by Sebastian in code reviewNick Mathewson
Thanks to Sebastian for his code-review of the bufferevents patch series.x
2010-09-27Convert bufferevents to use rate-limiting.Nick Mathewson
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-27Fix a couple of bufferevent incompatibilities that snuck in.Nick Mathewson
2010-09-27Get SSL connections and linked connections working with bufferevents.Nick Mathewson
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-27Add support for linked connections with bufferevent_pair.Nick Mathewson
Also, set directory connections (linked and otherwise) to use bufferevents. Also, stop using outbuf_flushlen anywhere except for OR connections.
2010-09-27Add bufferevent support for outgoing connections; exits are now supported.Nick Mathewson
2010-09-27Be a little more abstract about which connection type use buffereventsNick Mathewson
2010-09-27Make a function to mark a connection and set hold_open_until_flushed.Nick Mathewson
2010-09-27Allow hold-open-until-flushed logic to work for bufferevents.Nick Mathewson
2010-09-27Refactor users of buf_datalen to bufferevent-friendly version.Nick Mathewson
2010-09-27Teach read_event/write_event manipulators about bufferevents.Nick Mathewson
Add an --enable-bufferevents config switch.
2010-09-22Rename has_completed_circuit to can_complete_circuitNick Mathewson
Also redocument it. Related to #1362.
2010-09-08Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-09-08Remove a needless keep_open_until_flushedNick Mathewson
2010-09-03Close a non-open OR connection *only* after KeepalivePeriod.Nick Mathewson
When we introduced the code to close non-open OR connections after KeepalivePeriod had passed, we replaced some code that said if (!connection_is_open(conn)) { /* let it keep handshaking forever */ } else if (do other tests here) { ... with new code that said if (!connection_is_open(conn) && past_keepalive) { /* let it keep handshaking forever */ } else if (do other tests here) { ... This was a mistake, since it made all the other tests start applying to non-open connections, thus causing bug 1840, where non-open connections get closed way early. Fixes bug 1840. Bugfix on 0.2.1.26 (commit 67b38d50).
2010-08-05Allow enabling or disabling *Statistics while Tor is running.Karsten Loesing
With this patch we stop scheduling when we should write statistics using a single timestamp in run_scheduled_events(). Instead, we remember when a statistics interval starts separately for each statistic type in geoip.c and rephist.c. Every time run_scheduled_events() tries to write stats to disk, it learns when it should schedule the next such attempt. This patch also enables all statistics to be stopped and restarted at a later time. This patch comes with a few refactorings, some of which were not easily doable without the patch.
2010-07-27Create routerparse.hSebastian Hahn
2010-07-27Create rephist.hSebastian Hahn
2010-07-27Create relay.hSebastian Hahn