Documentation ¶
Overview ¶
Package packet implements the Katzenpost server side packet structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Packet ¶
type Packet struct { Geometry *geo.Geometry Raw []byte Payload []byte // The parsed out routing commands. NextNodeHop *commands.NextNodeHop NodeDelay *commands.NodeDelay Recipient *commands.Recipient SurbReply *commands.SURBReply ID uint64 Delay time.Duration RecvAt time.Time DispatchAt time.Time MustForward bool MustTerminate bool // contains filtered or unexported fields }
func NewPacketFromSURB ¶
func NewWithID ¶
NewWithID allocates a new Packet, with the specified raw payload and ID. Most callers should use New, this exists to support serializing packets to external memory.
func (*Packet) CmdsToString ¶
CmdsToString returns an abbreviated list of the packet's routing commands, suitable for debugging.
func (*Packet) Dispose ¶
func (pkt *Packet) Dispose()
Dispose clears the packet structure and returns it to the allocation pool.
func (*Packet) IsForward ¶
IsForward returns true iff the packet has routing commands indicating it is a forward packet destined for another hop.
func (*Packet) IsSURBReply ¶
IsSURBReply returns true iff the packet has routing commands indicating it is a SURB Reply destined for a local user.
Click to show internal directories.
Click to hide internal directories.