summaryrefslogtreecommitdiff
path: root/tor-proto/src/circuit/streammap.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use the "typos" tool to fix some spellingNick Mathewson2021-05-261-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.
* 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
|/
* Downgrade an XXXXM3 message.Nick Mathewson2020-10-271-1/+1
|
* Remove a bunch of dbg! calls.Nick Mathewson2020-10-261-1/+3
|
* Rename CircID and StreamID to end with Id instead, for consistencyNick Mathewson2020-10-251-12/+12
|
* Use an enum for the return value of StreamMap::terminateNick Mathewson2020-10-221-5/+22
|
* Initial tests for tor_proto::circuit::streammapNick Mathewson2020-10-221-0/+51
|
* Mark must-resolve XXXX issues with "XXXXM3".Nick Mathewson2020-10-181-1/+1
| | | | | | | | | | "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
* Revise DropMark defense to use a better type and match Tor's behavior.Nick Mathewson2020-10-131-5/+11
|
* Document all private members in tor-protoNick Mathewson2020-10-131-1/+10
|
* Another tweak to handling closing streamsNick Mathewson2020-10-131-6/+16
| | | | | | 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-121-6/+32
| | | | | | 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-111-11/+18
| | | | | 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.
* Remove idmap as needlessly complex.Nick Mathewson2020-09-291-10/+26
|
* Split the cell-handling parts of tor-proto into a new crate.Nick Mathewson2020-09-261-3/+3
|
* Attempted implementation of stream sendme cellsNick Mathewson2020-09-251-5/+10
|
* Add support for RELAY_END cells.Nick Mathewson2020-09-241-2/+26
| | | | | | | | | | | | | | | | | | | | This was a hard one. I need to make sure that we send an END cell when the stream is dropped. But we can't call an .await from inside the drop() function, since drop() isn't async, and we don't have an executor. Fortunately, you can call send() on a oneshot::Sender without having to await on it, so that's the obvious thing to put in drop(). But we need some way to make sure that the oneshot::Receiver is given to the reactor, and is .awaited. For that, we needed a control channel. And the reactor needs to treat the control channel and the close messages as equally important. So that's how I wound up with a Fuse<Select<mpsc::Receiver<Result<Foo>>, SelectAll<Once<oneshot::Receiver<Foo>>>>>. I doubt that this is actually the best way to handle any of this!
* as Tor does, skip to random initial stream member.Nick Mathewson2020-09-231-1/+6
|
* Turn IdMap into an extension trait.Nick Mathewson2020-09-231-25/+9
| | | | | Also, use the "right" (cyclic, potentially expensive) algorithm for stream IDs.
* More documentation for channel, circuit, stream.Nick Mathewson2020-09-211-3/+11
|
* Start implementing streams and circuit-level reactors.Nick Mathewson2020-09-211-4/+12
| | | | | | Also, revise nearly all of the circuit/channel interaction to actually send relay cells to the right place and do sensible things with them.
* Create a StreamID->Stream map type.Nick Mathewson2020-09-201-0/+51
Also extract the shared part of CircMap and StreamMap into a new IdMap type.