aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
AgeCommit message (Collapse)Author
2018-06-28Fix paths for buffers.h; automated.Nick Mathewson
2018-06-28Move buffers into containerNick Mathewson
Split the network-only and compression-only parts of buffers into the appropriate modules.
2018-06-27Fix up include paths for sandbox.h (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract routerinfo_t into its own header.Nick Mathewson
I was expecting this to be much worse.
2018-06-15Split socks_request_t into its own header.Nick Mathewson
2018-06-15Extract connection_t into its own header.Nick Mathewson
Now the entire connection_t hierarchy is extracted from or.h
2018-06-15Move or_connection_t to its own header.Nick Mathewson
2018-06-15Split listener_connection_t into its own headerNick Mathewson
For once, it's a type that is used almost nowhere else besides the logical place.
2018-06-15Split dir_connection_t into its own headerNick Mathewson
2018-06-15Split control_connection_t into its own header.Nick Mathewson
This one was actually fairly simple.
2018-06-15Split entry and edge_connection_t into their own headers.Nick Mathewson
2018-06-14Make server_port_cfg_t and port_cfg_t into separate headers.Nick Mathewson
2018-05-11Merge remote-tracking branch 'catalyst-github/bug25756'Nick Mathewson
2018-05-10Merge branch 'ticket26063_squashed'Nick Mathewson
2018-05-09Merge branch 'ticket26009'Nick Mathewson
2018-05-09Use net_is_completely_disabled() in connection.cNick Mathewson
This fixes the XXXX case that we had before, and also enforces the rule that we won't open connections when we're in hard hibernation.
2018-05-09Comment-only fix: annotate we_are_hibernating() usageNick Mathewson
Everywhere we use we_are_hibernating(), remind the reader what it means. (Also, add an XXXX to note a DisableNetwork usage to change later.)
2018-05-08Make clock_skew_warning() mockableTaylor Yu
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-05-03Add update_current_time() calls to periodic and event-driven callbacksNick Mathewson
This is part of 26009, where we're going to keep track of the current time and its jumps without having to do so in second_elapsed_callback.
2018-04-26Remove the "cached gettimeofday" logic.Nick Mathewson
Previously were using this value to have a cheap highish-resolution timer. But we were only using it in one place, and current dogma is to use monotime_coarse_t for this kind of thing.
2018-04-26Remove a blank line that was bothering me.Nick Mathewson
2018-04-23Merge remote-tracking branch 'github/lazy_bucket_refill'Nick Mathewson
2018-04-18Rename some functions to start with a uniform prefixNick Mathewson
2018-04-17Fix a compilation warning on clangNick Mathewson
2018-04-17Remove the periodic refill event entirely.Nick Mathewson
Now that we update our buckets on demand before reading or writing, we no longer need to update them all every TokenBucketRefillInterval msec. When a connection runs out of bandwidth, we do need a way to reenable it, however. We do this by scheduling a timer to reenable all blocked connections for TokenBucketRefillInterval msec after a connection becomes blocked. (If we were using PerConnBWRate more, it might make sense to have a per-connection timer, rather than a single timeout. But since PerConnBWRate is currently (mostly) unused, I'm going to go for the simpler approach here, since usually whenever one connection has become blocked on bandwidth, most connections are blocked on bandwidth.) Implements ticket 25373.
2018-04-17Move responsibility for recording read/written bytesNick Mathewson
Previously this was done as part of the refill callback, but there's no real reason to do it like that. Since we're trying to remove the refill callback completely, we can do this work as part of record_num_bytes_transferred_impl(), which already does quite a lot of this.
2018-04-17Refill each token bucket at the last instant before reading/writing.Nick Mathewson
(This patch does not yet eliminate the global refill callback; fortunately, bucket refilling is idempotent.)
2018-04-17Refactor responsibility for checking global write bucket emptinessNick Mathewson
We used to do this 10x per second in connection_buckets_refill(); instead, we now do it when the bucket becomes empty. This change is part of the work of making connection_buckets_refill() obsolete. Closes ticket 25828; bugfix on 0.2.3.5-alpha.
2018-04-17Rename connection_bucket_refill to connection_bucket_refill_allNick Mathewson
Also document its actual behavior
2018-04-17Rename connection_bucket_round_robin -> get_shareNick Mathewson
There was nothing round_robinish about this function.
2018-04-17Refactor the "block the connection on bandwidth" logicNick Mathewson
Right now, this patch just introduces and exposes some new functions. Later, these functions will get a little more complexity.
2018-04-16Bug 25400: Make CIRC_BW event properly total everything on a circ.Mike Perry
2018-04-1332-bit compilation warningsNick Mathewson
2018-04-13Rename token_bucket_t to token_bucket_rw_t.Nick Mathewson
This is a simple search-and-replace to rename the token bucket type to indicate that it contains both a read and a write bucket, bundled with their configuration. It's preliminary to refactoring the bucket type.
2018-04-13Remove a bunch of int casts; make clang happier.Nick Mathewson
2018-04-13Ensure that global buckets are updated on configuration changeNick Mathewson
2018-04-13Replace the global buckets with token_bucket_tNick Mathewson
2018-04-13Refactor or_connection token buckets to use token_bucket_tNick Mathewson
2018-04-10Remove TestingEnableTbEmptyEventNick Mathewson
This option was used for shadow testing previously, but is no longer used for anything. It interferes with refactoring our token buckets.
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-02-20Merge remote-tracking branch 'fristonio/ticket-25261'Nick Mathewson
2018-02-15Merge branch 'maint-0.3.3'Nick Mathewson
2018-02-15Merge remote-tracking branch 'valentecaio/t-24714'Nick Mathewson
2018-02-15Merge branch 'bug18105'Nick Mathewson
2018-02-15ticket 25261: Removed multiple includes of transports.h in connection.cDeepesh Pathak