aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-cell/src/chancell.rs
Commit message (Collapse)AuthorAgeFilesLines
* proto: Remove the AUTHORIZE as a parsable cellDavid Goulet2025-08-211-1/+1
| | | | | | | | | | | | | The AUTHORIZE cell command is simply reserved but not defined. The tor specification, at this point in time, is allowing such cell before the handshake starts but it is very unclear on what ordering is allowed nor how many can are allowed. C-tor silents drop them like VPADDING and so clearly unused. Instead of dealing with it, simply remove its support but keeping its reserved number. Signed-off-by: David Goulet <[email protected]>
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Some HasMemoryCost impls in tor-cellIan Jackson2024-10-021-1/+8
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* Change `CircId` to never be zeroJim Newsome2023-10-251-23/+35
| | | | | | | | | | This changes the internal representation to be `NonZeroU32` instead of just `u32`. Various places where a circuit ID is optional now use `Option<CircId>`. Fixes a bug in `CircIdRange::sample` that would previously return a circuit ID of 0, when the rng returned 0x8000_0000 for a low range.
* tor-cell: Refactor relay cells to copy much lessNick Mathewson2023-02-151-0/+5
| | | | | | | | | | | | | We now manipulate raw relay cell bodies as (an alias for) `Box<[u8;509]>` rather than as (an alias for) `[u8;509]`. This enables us to do much less copying. It will become more important soon, as we defer parsing relay cell bodies even longer. Related to #7. We also use SliceWriter to avoid allocating a Vec<> for every relay message we want to encode, and instead encode directly into the cell.
* tor-cell: documentation cleanups related to restricted_msgNick Mathewson2023-02-071-2/+2
|
* tor-cell: Rename ChanMsg and ChanCell-related types.Nick Mathewson2023-02-071-5/+5
|
* tor-cell: Make Body and MsgClass traits more uniform.Nick Mathewson2023-02-071-5/+2
| | | | | | | | Doing this will make it much easier to implement a macro that generates restricted instances of the Msg types (for #525). The Body change is a breaking change. I don't think anybody else implements Body, but in theory they could.
* tor-cell: Generic "Restricted{Relay,Chan}Cell" types.Nick Mathewson2023-02-071-7/+30
| | | | | | | These are generalizations of RelayCell and ChanCell respectively, that allow using an arbitrary message type in place of the fully general RelayMsg and ChanMsg types. Doing this is a prerequisite for usefully implementing arti#525.
* tor-cell: Make historical comments more concreteEmil Engler2022-10-211-4/+6
| | | | | This commit extends comments that make references to historical protocol versions of Tor, by adding the concrete protocol version numbers.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+181
This will cause some pain for now, but now is really the best time to do this kind of thing.