summaryrefslogtreecommitdiff
path: root/tor-proto/src/circuit
Commit message (Collapse)AuthorAgeFilesLines
* Try to fix a nightly rustdoc warningNick Mathewson2021-06-171-1/+1
|
* Use FuturesUnordered, not SelectAll<Once<...>>Nick Mathewson2021-06-141-7/+6
| | | | Closes #124
* tor-proto: change internal meta-handler API for error-proofingNick Mathewson2021-05-281-1/+1
| | | | | | | The previous API required the caller to check that the meta-cell it got was coming from the right hop; the new API requires the caller to say which hop it expects to get a cell from. With this change, it's not possible to omit the correct-hop check.
* Use the "typos" tool to fix some spellingNick Mathewson2021-05-263-3/+3
|
* Add the "unreachable_pub" lint.Nick Mathewson2021-05-183-23/+27
| | | | | | This is a somewhat obnoxious change in its scope and requirements, but it makes it easier to understand what the real public and private parts of our APIs are.
* Add unseparated_literal_suffix lint, and fix it.Nick Mathewson2021-05-031-1/+1
|
* Fix Rust-1.51 clippy warnings about acronyms in camel case.Nick Mathewson2021-03-291-1/+1
| | | | This is painful, but we shouldn't have to do it again.
* Add tests for correct incoming sendme handling.Nick Mathewson2021-03-221-0/+9
| | | | | | At this point I'm going to pause writing tor-proto tests for a little while and think about refactoring that could make these tests simpler. I'm doing way too much copy-paste here.
* Refactor circuit reactor for testing.Nick Mathewson2021-03-161-1/+6
|
* Merge remote-tracking branch 'origin/mr/16' into mainNick Mathewson2021-02-261-22/+37
|\
| * Refactor StreamMap methods to use HashMap::EntryGeorge Kadianakis2021-02-261-22/+37
| |
* | Fix an intermittent test failure on int overflow.Nick Mathewson2021-02-191-1/+4
|/
* Run cargo fix --edition-idiomsNick Mathewson2020-12-022-2/+2
|
* Expose UniqId types for channels and circuitsNick Mathewson2020-12-011-5/+6
|
* Rename LogId -> UniqId.Nick Mathewson2020-12-012-13/+13
|
* Derive more types for circuit and channel LogIdsNick Mathewson2020-12-011-1/+1
|
* Move closed-check for circuits into an atomicbool.Nick Mathewson2020-11-131-5/+4
|
* Make Arc<>-ness of ClientCirc explicit.Nick Mathewson2020-11-121-8/+7
|
* tor-proto API: Use new_ref, not clone.Nick Mathewson2020-10-291-1/+0
| | | | | | Semantically, cloning a Channel or Circuit is actually increasing an internal reference count. We should name the functions to reflect that, to be more explicit about what we're doing.
* Downgrade an XXXXM3 message.Nick Mathewson2020-10-271-1/+1
|
* Make circuit reactors also have a run_once() method for testing.Nick Mathewson2020-10-271-27/+34
|
* Add a fake, reactorless channel, for use in testing circuitsNick Mathewson2020-10-271-3/+1
|
* Remove a bunch of dbg! calls.Nick Mathewson2020-10-262-2/+3
|
* Use event_listener to find out about sendme replenishment.Nick Mathewson2020-10-261-30/+11
| | | | | Previously we would fail if a sendme window was exhausted and two tasks were waiting for it to be replenished at the same time.
* Resolve a bunch of XXXM3 comments in tor-proto.Nick Mathewson2020-10-263-59/+70
|
* Improve documentation in tor-protoNick Mathewson2020-10-261-3/+6
|
* Add a CircEnt::DestroySent circuit state.Nick Mathewson2020-10-261-0/+37
| | | | | | | A circuit enters DestroySent after it's sent a DESTROY cell. We use this state to make sure that we don't receive too many cells on a destroyed circuit, _and_ so that we don't block such cells completely.
* Rename CircID and StreamID to end with Id instead, for consistencyNick Mathewson2020-10-252-16/+16
|
* Add some tests for channel reactor and related code.Nick Mathewson2020-10-251-0/+2
|
* circuit: Remove the needlessly separated ReactorCore type.Nick Mathewson2020-10-231-29/+16
|
* Use an enum for the return value of StreamMap::terminateNick Mathewson2020-10-222-8/+25
|
* Initial tests for tor_proto::circuit::streammapNick Mathewson2020-10-221-0/+51
|
* Tests for tor_proto::circuit::halfstreamNick Mathewson2020-10-221-1/+79
|
* tor-proto: Add tests for circuit::sendmeNick Mathewson2020-10-221-4/+134
|
* Add tests for tor_proto::circuit::celltypesNick Mathewson2020-10-211-0/+43
|
* Follow API convention about mutable getters.Nick Mathewson2020-10-211-6/+6
| | | | They're supposed to be called field_mut().
* Missing file and docsNick Mathewson2020-10-201-0/+29
|
* Add some helpful logs in circuit code.Nick Mathewson2020-10-201-0/+29
|
* Mark must-resolve XXXX issues with "XXXXM3".Nick Mathewson2020-10-183-12/+12
| | | | | | | | | | "M3" is for "milestone 3" -- my target to fix the technical debt that I think will be bad if we ship even a pre-alpha with it. These aren't necessarily _all_ must-resolve, but they're all must-look-at. Closes #15
* tor-proto: Add a ClientCircChanMsg type.Nick Mathewson2020-10-152-11/+33
| | | | | | This wraps exactly the ChanMsg values that are valid on open client circuits, so that we can be sure that only those cells are sent to a ClientCirc's reactor.
* tor-proto: Add a "CreateResponse" type.Nick Mathewson2020-10-151-0/+37
| | | | | | CreateResponse includes exactly those cells that are a correct response to a CREATE2/CREATE_FAST, so we can be sure that only those cells are actually passed to a PendingClientCirc.
* Fix a couple of clippy warningsNick Mathewson2020-10-151-1/+1
|
* Use weak references from circuit reactor to circimpl.Nick Mathewson2020-10-141-14/+29
| | | | This prevents the reactor from keeping the circuit alive forever.
* Revise DropMark defense to use a better type and match Tor's behavior.Nick Mathewson2020-10-134-12/+96
|
* Document all private members in tor-protoNick Mathewson2020-10-133-1/+27
|
* Improve handling of circuit closure or failure on reactor shutdown.Nick Mathewson2020-10-131-0/+19
| | | | | | | | | | We already handled the case okay when we were reading on streams, since the reactor's going away would drop the sender side of their mpsc channels. But if the reactor went away, nothing would tell _writing_ streams that they needed to close. Now we handle that case, as well as anybody who is waiting on a meta-cell to get back to them.
* Another tweak to handling closing streamsNick Mathewson2020-10-133-14/+40
| | | | | | When a stream is closed and we haven't adjusted its state in the stream map yet, remember how many cells we've dropped so we can decrement them from the window later on.
* Try giving distinct handling to streams where END has been sentNick Mathewson2020-10-123-42/+95
| | | | | | This is the first step along the line to handling Tor issue tor#27557. We want to remember streams that we've ended and treat them as distinct from streams that have never existed
* Tweak terminate hand handle_close() functions.Nick Mathewson2020-10-112-13/+20
| | | | | These need to become functions about terminating and noticing a termination request.
* Rename StreamMap::Closing to EndReceivedNick Mathewson2020-10-111-4/+4
| | | | This is in preparation for adding a different EndSent stream state.