varlen

class cell.varlen.VarLenCell(header, payload=None)[source]

Bases: oppy.cell.cell.Cell

A container class for representing a variable-length cell.

getBytes(trimmed=False)[source]

Build and return the raw byte string this cell represents.

Parameters:trimmed (bool) – ignored for varlen cells
Returns:str raw byte string represented by this cell
payloadRange()[source]

Return a two-tuple indicating the start, end positions of this cell’s payload.

Returns:tuple, int (start, end) positions of this cell’s payload
class Header(circ_id=None, cmd=None, payload_len=None, link_version=3)[source]

Bases: object

A simple container class for representing the header information of a variable-length cell.

getBytes()[source]

Build and return the raw byte string represented by this header.

Returns:str raw byte string this header represents
class cell.varlen.AuthChallengeCell(header, challenge=None, n_methods=None, methods=None)[source]

Bases: cell.varlen.VarLenCell

Note

tor-spec, Section 4.3

getBytes(trimmed=False)[source]

Build and return raw byte string representing this cell.

Parameters:trimmed (bool) – ignored for varlen cells
Returns:str – raw bytes representing this cell.
class cell.varlen.AuthenticateCell(header)[source]

Bases: cell.varlen.VarLenCell

Note

Not Implemented

class cell.varlen.AuthorizeCell(header)[source]

Bases: cell.varlen.VarLenCell

Note

Not Implemented

class cell.varlen.CertsCell(header, num_certs=None, cert_bytes=None)[source]

Bases: cell.varlen.VarLenCell

Note

tor-spec, Section 4.2

getBytes(trimmed=False)[source]

Build and return raw byte string represeting this cell.

Parameters:trimmed (bool) – ignore for varlen cells
Returns:str raw byte string representing this cell.
class cell.varlen.VersionsCell(header, versions=None)[source]

Bases: cell.varlen.VarLenCell

Note

tor-spec, Section 4.1

static make(versions)[source]

Construct and return a VersionsCell, using default values where possible.

Automatically create and use an appropriate FixedLenCell.Header.

Parameters:int versions (list,) – Link Protocol versions to indicate support for in this VersionsCell
Returns:VersionsCell
getBytes(trimmed=False)[source]

Build and return raw byte string representing this cell.

Parameters:trimmed (bool) – ignored for varlen cells
Returns:str – raw byte string representing this cell.
class cell.varlen.VPaddingCell(header, payload=None)[source]

Bases: cell.varlen.VarLenCell

Note

tor-spec, Section 3, 4, 7.2

Previous topic

relay

Next topic

exceptions

This Page