Age | Commit message (Collapse) | Author |
|
This commit won't build yet -- it just puts everything in a slightly
more logical place.
The reasoning here is that "src/core" will hold the stuff that every (or
nearly every) tor instance will need in order to do onion routing.
Other features (including some necessary ones) will live in
"src/feature". The "src/app" directory will hold the stuff needed
to have Tor be an application you can actually run.
This commit DOES NOT refactor the former contents of src/or into a
logical set of acyclic libraries, or change any code at all. That
will have to come in the future.
We will continue to move things around and split them in the future,
but I hope this lays a reasonable groundwork for doing so.
|
|
|
|
|
|
|
|
The standard is printf("%"PRIu64, x);
|
|
This reverts part of commit 6ed384b827dce21ea3a44b587, in order to
fix bug 26568. Bugfix on 0.3.4.1-alpha.
|
|
|
|
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
|
|
|
|
Split the network-only and compression-only parts of buffers into
the appropriate modules.
|
|
|
|
|
|
|
|
|
|
|
|
I was expecting this to be much worse.
|
|
|
|
Now the entire connection_t hierarchy is extracted from or.h
|
|
|
|
For once, it's a type that is used almost nowhere else besides the
logical place.
|
|
|
|
This one was actually fairly simple.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Everywhere we use we_are_hibernating(), remind the reader what it
means.
(Also, add an XXXX to note a DisableNetwork usage to change later.)
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
(This patch does not yet eliminate the global refill callback;
fortunately, bucket refilling is idempotent.)
|
|
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.
|
|
Also document its actual behavior
|
|
There was nothing round_robinish about this function.
|
|
Right now, this patch just introduces and exposes some new
functions. Later, these functions will get a little more complexity.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|