Documentation ¶
Overview ¶
Package commands implements the Sphinx Packet Format per-hop routing info commands.
Index ¶
Constants ¶
View Source
const ( // NextNodeHopLength is the length of a NextNodeHop command in bytes. NextNodeHopLength = 1 + constants.NodeIDLength + crypto.MACLength // RecipientLength is the length of a Recipient command in bytes. RecipientLength = 1 + constants.RecipientIDLength // SURBReplyLength is the length of a SURBReply command in bytes. SURBReplyLength = 1 + constants.SURBIDLength // NodeDelayLength is the length of a NodeDelay command in bytes. NodeDelayLength = 1 + 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NextNodeHop ¶
NextNodeHop is a de-serialized Sphinx next_node command.
func (*NextNodeHop) ToBytes ¶
func (cmd *NextNodeHop) ToBytes(b []byte) []byte
ToBytes appends the serialized NextNodeHop to slice b, and returns the resulting slice.
type NodeDelay ¶
type NodeDelay struct {
Delay uint32
}
NodeDelay is a de-serialized Sphinx mix_delay command.
type Recipient ¶
type Recipient struct {
ID [constants.RecipientIDLength]byte
}
Recipient is a de-serialized Sphinx recipient command.
type RoutingCommand ¶
type RoutingCommand interface { // ToBytes appends the serialized command to slice b, and returns the // resulting slice. ToBytes(b []byte) []byte }
RoutingCommand is the common interface exposed by all per-hop routing command structures.
Click to show internal directories.
Click to hide internal directories.