summaryrefslogtreecommitdiff
path: root/crates/tor-cell/src/chancell.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.