Expand description
Module exposing the relay circuit reactor subsystem.
See reactor for a description of the overall architecture.
All cells moving in the forward direction (i.e. away from the client) are handled by the forward reactor, which deals with
- unrecognized RELAY* cells, by moving them in the forward direction (towards the exit)
- recognized RELAY* cells, by splitting each cell into messages, and handling each message individually as described in the table below (Note: since prop340 is not yet implemented, in practice there is only 1 message per cell).
- DESTROY cells, by tearing down the circuit, and causing a DESTROY to be sent forward, to the next hop, if there is one
- PADDING_NEGOTIATE cells (not yet implemented)
Legend: `F` = "forward reactor", `B` = "backward reactor", `S` = "stream reactor"
`FH` = `ForwardHandler`
| RELAY cmd | Received in | Handled in | Description |
|------------|-------------|-----------------------|----------------------------------------|
| DROP | F | FH::handle_meta_msg() | Passed to PaddingController for |
| | | | validation |
|------------|-------------|-----------------------|----------------------------------------|
| EXTEND2 | F | FH::handle_meta_msg() | Handled by the ExtendRequestHandler |
| | | | See [forward::extend_handler]. |
|------------|-------------|-----------------------|----------------------------------------|
| TRUNCATE | F | FH::handle_meta_msg() | Not supported: TRUNCATE is considered |
| | | | a protocol violation, because none of |
| | | | of our implementations send it. |
|------------|-------------|-----------------------|----------------------------------------|
| SENDME | F | B | Sent to BackwardReactor for handling. |
| (sid = 0) | | | See the [crate::circuit::reactor] docs |
|------------|-------------|-----------------------|----------------------------------------|
| Other | F | FH::handle_meta_msg() | Rejected as unrecognized |
| (sid = 0) | | | |
|------------|-------------|-----------------------|----------------------------------------|
| Other | F | S | Handled in the `StreamReactor` |
| (sid != 0) | | | |Modules§
- backward 🔒
- A relay’s view of the backward (towards the client) state of a circuit.
- forward 🔒
- A relay’s view of the forward (away from the client, towards the exit) state of a circuit.
Structs§
- Reactor 🔒
- The entry point of the circuit reactor subsystem.
- Stream
Handler 🔒 - A handler customizing the relay stream reactor.
Type Aliases§
- Relay
Base 🔒Reactor - Type-alias for the relay base reactor type.