Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parsing and rendering routines for relay cells.
- data RelayCell
- = RelayBegin { }
- | RelayData { }
- | RelayEnd { }
- | RelayConnected { }
- | RelaySendMe { }
- | RelayExtend { }
- | RelayExtended { }
- | RelayTruncate { }
- | RelayTruncated { }
- | RelayDrop { }
- | RelayResolve { }
- | RelayResolved {
- relayStreamId :: Word16
- relayResolvedAddrs :: [(TorAddress, Word32)]
- | RelayBeginDir { }
- | RelayExtend2 { }
- | RelayExtended2 { }
- | RelayEstablishIntro { }
- | RelayEstablishRendezvous { }
- | RelayIntroduce1 { }
- | RelayIntroduce2 { }
- | RelayRendezvous1 { }
- | RelayRendezvous2 { }
- | RelayIntroEstablished { }
- | RelayRendezvousEstablished { }
- | RelayIntroduceAck { }
- putRelayCell :: ByteString -> RelayCell -> Put
- getRelayCell :: Get (ByteString, RelayCell)
- parseRelayCell :: Context SHA1 -> Get (RelayCell, Context SHA1)
- renderRelayCell :: Context SHA1 -> RelayCell -> (ByteString, Context SHA1)
- data ExtendSpec
- putExtendSpec :: ExtendSpec -> Put
- getExtendSpec :: Get ExtendSpec
- data RelayEndReason
- putRelayEndReason :: RelayEndReason -> Put
- getRelayEndReason :: Word16 -> Get RelayEndReason
- putRelayCellGuts :: RelayCell -> PutM Word8
- data RelayIntro1Data
- = RelayIntro1v0 { }
- | RelayIntro1v1 { }
- | RelayIntro1v2 { }
- | RelayIntro1v3 { }
Documentation
The format of a Relay cell in a Tor stream.
putRelayCell :: ByteString -> RelayCell -> Put Source
Perform a raw relay cell render, with 0 for the hash mark.
getRelayCell :: Get (ByteString, RelayCell) Source
Parse a relay cell off the wire, returning the shortened digest and the parsed relay cell.
parseRelayCell :: Context SHA1 -> Get (RelayCell, Context SHA1) Source
Parse a relay cell, verifying that the digest matches appropriately, returning the parsed cell and new hash context.
renderRelayCell :: Context SHA1 -> RelayCell -> (ByteString, Context SHA1) Source
Render a relay cell using the given hash context, returning the rendered cell and the new hash context.
data ExtendSpec Source
The format for extension request.
putExtendSpec :: ExtendSpec -> Put Source
Render an ExtendSpec.
getExtendSpec :: Get ExtendSpec Source
Parse an ExtendSpec
data RelayEndReason Source
A reason that someone might want to end a relay.
putRelayEndReason :: RelayEndReason -> Put Source
Render a RelayEndReason.
getRelayEndReason :: Word16 -> Get RelayEndReason Source
Parse a RelayEndReason.
putRelayCellGuts :: RelayCell -> PutM Word8 Source
Render the internals of a relay cell (basically everything but the header).
data RelayIntro1Data Source
Various bits of information for dealing with hidden services. Currently not implemented.