aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
Commit message (Expand)AuthorAge
* Fix a documention issue in circuitlist.cNick Mathewson2010-10-15
* Fold timestamp_created into highres_created•••There's no reason to keep a time_t and a struct timeval to represent the same value: highres_created.tv_sec was the same as timestamp_created. This should save a few bytes per circuit. Nick Mathewson2010-10-15
* Initial conversion to use node_t throughout our codebase.•••A node_t is an abstraction over routerstatus_t, routerinfo_t, and microdesc_t. It should try to present a consistent interface to all of them. There should be a node_t for a server whenever there is * A routerinfo_t for it in the routerlist * A routerstatus_t in the current_consensus. (note that a microdesc_t alone isn't enough to make a node_t exist, since microdescriptors aren't usable on their own.) There are three ways to get a node_t right now: looking it up by ID, looking it up by nickname, and iterating over the whole list of microdescriptors. All (or nearly all) functions that are supposed to return "a router" -- especially those used in building connections and circuits -- should return a node_t, not a routerinfo_t or a routerstatus_t. A node_t should hold all the *mutable* flags about a node. This patch moves the is_foo flags from routerinfo_t into node_t. The flags in routerstatus_t remain, but they get set from the consensus and should not change. Some other highlights of this patch are: * Looking up routerinfo and routerstatus by nickname is now unified and based on the "look up a node by nickname" function. This tries to look only at the values from current consensus, and not get confused by the routerinfo_t->is_named flag, which could get set for other weird reasons. This changes the behavior of how authorities (when acting as clients) deal with nodes that have been listed by nickname. * I tried not to artificially increase the size of the diff here by moving functions around. As a result, some functions that now operate on nodes are now in the wrong file -- they should get moved to nodelist.c once this refactoring settles down. This moving should happen as part of a patch that moves functions AND NOTHING ELSE. * Some old code is now left around inside #if 0/1 blocks, and should get removed once I've verified that I don't want it sitting around to see how we used to do things. There are still some unimplemented functions: these are flagged with "UNIMPLEMENTED_NODELIST()." I'll work on filling in the implementation here, piece by piece. I wish this patch could have been smaller, but there did not seem to be any piece of it that was independent from the rest. Moving flags forces many functions that once returned routerinfo_t * to return node_t *, which forces their friends to change, and so on. Nick Mathewson2010-10-01
* Try to make most routerinfo_t interfaces constNick Mathewson2010-10-01
* Send control port events for timeouts.•••We now differentiate between timeouts and cutoffs by the REASON string and the PURPOSE string. Mike Perry2010-09-29
* Clear cell queues when marking or truncating a circuit.•••At best, this patch helps us avoid sending queued relayed cells that would get ignored during the time between when a destroy cell is sent and when the circuit is finally freed. At worst, it lets us release some memory a little earlier than it would otherwise. Fix for bug #1184. Bugfix on 0.2.0.1-alpha. Nick Mathewson2010-07-30
* Create rephist.hSebastian Hahn2010-07-27
* Create relay.hSebastian Hahn2010-07-27
* Create onion.hSebastian Hahn2010-07-27
* Create networkstatus.hSebastian Hahn2010-07-27
* Create control.hSebastian Hahn2010-07-27
* Create connection_or.hSebastian Hahn2010-07-27
* Create connection_edge.hSebastian Hahn2010-07-27
* Create connection.hSebastian Hahn2010-07-27
* Create config.hSebastian Hahn2010-07-27
* Create circuituse.hSebastian Hahn2010-07-27
* Create circuitlist.hSebastian Hahn2010-07-27
* Create circuitbuild.hSebastian Hahn2010-07-27
* Create rendclient.hSebastian Hahn2010-07-27
* Create rendcommon.hSebastian Hahn2010-07-27
* Create routerlist.hSebastian Hahn2010-07-27
* print right controller purpose string for measure-timeout circsRoger Dingledine2010-07-14
* Don't cannibalize one-hop circuits•••In rare cases, we could cannibalize a one-hop circuit, ending up with a two-hop circuit. This circuit would not be actually used, but we should prevent its creation in the first place. Thanks to outofwords and swissknife for helping to analyse this. Sebastian Hahn2010-06-04
* Merge remote branch 'origin/maint-0.2.1'•••Conflicts: src/common/test.h src/or/test.c Nick Mathewson2010-02-27
|\
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
* | Remove some old, commented out codeSebastian Hahn2009-12-25
* | Merge branch 'ewma'Nick Mathewson2009-12-18
|\ \
| * | Optimize cell-ewma circuit priority algorithm.•••There are two big changes here: - We store active circuits in a priority queue for each or_conn, rather than doing a linear search over all the active circuits before we send each cell. - Rather than multiplying every circuit's cell-ewma by a decay factor every time we send a cell (thus normalizing the value of a current cell to 1.0 and a past cell to alpha^t), we instead only scale down the cell-ewma every tick (ten seconds atm), normalizing so that a cell sent at the start of the tick has value 1.0). Nick Mathewson2009-12-13
| * | Favor quiet circuits when choosing which order to relay cells in.•••Each circuit is ranked in terms of how many cells from it have been relayed recently, using a time-weighted average. This patch has been tested this on a private Tor network on PlanetLab, and gotten improvements of 12-35% in time it takes to fetch a small web page while there's a simultaneous large data transfer going on simultaneously. [Commit msg by nickm based on mail from Ian Goldberg.] Can Tang2009-12-12
* | | Merge branch 'safelogging2'•••Conflicts: ChangeLog Nick Mathewson2009-12-15
|\ \ \ | |/ / |/| |
| * | Refactor the safe_str_*() API to make more sense.•••The new rule is: safe_str_X() means "this string is a piece of X information; make it safe to log." safe_str() on its own means "this string is a piece of who-knows-what; make it safe to log". Nick Mathewson2009-12-15
* | | Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12
* | | *_free functions now accept NULL•••Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary. Sebastian Hahn2009-12-12
|/ /
* | Merge commit 'origin/maint-0.2.1'Roger Dingledine2009-11-23
|\|
| * fix race condition that can cause crashes at client or exit relay•••Avoid crashing if the client is trying to upload many bytes and the circuit gets torn down at the same time, or if the flip side happens on the exit relay. Bugfix on 0.2.0.1-alpha; fixes bug 1150. Roger Dingledine2009-11-23
| * read the "circwindow" parameter from the consensus•••backport of c43859c5c12361fad505 backport of 0d13e0ed145f4c1b5bd1 Roger Dingledine2009-10-14
| * Update copyright to 2009.Karsten Loesing2009-05-04
* | stop assuming that our downcasts have a struct offset of 0•••shouldn't actually change anything, but who knows. Roger Dingledine2009-11-21
* | Be more robust to bad circwindow values•••If the networkstatus consensus tells us that we should use a negative circuit package window, ignore it. Otherwise we'll believe it and then trigger an assert. Also, change the interface for networkstatus_get_param() so we don't have to lookup the consensus beforehand. Roger Dingledine2009-09-22
* | Fix the math.h log() conflict.•••It was compiling, but causing segfaults. Also, adjust when the timer starts for new test circs and save state every 25 circuits. Mike Perry2009-09-16
* | Clean up Fallon's partially complete GSoC project.•••The code actually isn't that bad. It's a shame she didn't finish. Using it as the base for this feature. Mike Perry2009-09-16
* | Read "circwindow=x" from the consensus and use it•••Tor now reads the "circwindow" parameter out of the consensus, and uses that value for its circuit package window rather than the default of 1000 cells. Begins the implementation of proposal 168. Roger Dingledine2009-09-15
* | Write all statistics to disk exactly every 24 hours.Karsten Loesing2009-08-19
* | Remove ./configure option for cell statistics.Karsten Loesing2009-08-17
* | If configured, write cell statistics to disk periodically.Karsten Loesing2009-07-05
* | Update copyright to 2009.Karsten Loesing2009-05-02
|/
* Remove svn $Id$s from our source, and remove tor --version --version.•••The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867 Nick Mathewson2009-01-04
* Do not cannibalize a circuit that has run out of RELAY_EARLY cells. Partial ...•••svn:r17814 Nick Mathewson2008-12-29
* Document the purpose argument of circuit_find_to_cannibalize•••svn:r17689 Nick Mathewson2008-12-18
* Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this p...•••svn:r17686 Nick Mathewson2008-12-18