haskell-tor-0.1.1: A Haskell Tor Node

Safe HaskellNone
LanguageHaskell2010

Tor.DataFormat.TorCell

Description

Low-level rendering and parsing routines for raw Tor cells.

Synopsis

Documentation

putTorCell :: TorCell -> Put Source

Render a TorCell

getTorCell :: Get TorCell Source

Parse a TorCell

putDestroyReason :: DestroyReason -> Put Source

Render a DestroyReason

getDestroyReason :: Get DestroyReason Source

Parse a DestroyReason.

data HandshakeType Source

The two supported handshake types for Tor.

Constructors

TAP 
Reserved 
NTor 
Unknown Word16 

putHandshakeType :: HandshakeType -> Put Source

Render a handshake identifier.

getHandshakeType :: Get HandshakeType Source

Parse a handshake identifier.

data TorCert Source

The kinds of certificates used within the initial Tor handshake.

putTorCert :: TorCert -> Put Source

Render a certificate.

getTorCert :: Get TorCert Source

Parse a certificate.

getCircuit :: TorCell -> Maybe Word32 Source

Given a tor cell, return the circuit it's associated with, if it is.

isPadding :: TorCell -> Bool Source

Return True iff this is a padding cell of some sort.