Documentation
¶
Index ¶
- Constants
- func CreateHeader(ifacFlag byte, headerType byte, contextFlag byte, propType byte, destType byte, ...) []byte
- type Announce
- func (a *Announce) CreatePacket() []byte
- func (a *Announce) DeregisterHandler(handler AnnounceHandler)
- func (a *Announce) GetPacket() []byte
- func (a *Announce) HandleAnnounce(data []byte) error
- func (a *Announce) Hash() []byte
- func (a *Announce) Propagate(interfaces []common.NetworkInterface) error
- func (a *Announce) RegisterHandler(handler AnnounceHandler)
- func (a *Announce) RequestPath(destHash []byte, onInterface common.NetworkInterface) error
- type AnnounceHandler
- type AnnouncePacket
- type Handler
Constants ¶
View Source
const ( PACKET_TYPE_DATA = 0x00 PACKET_TYPE_ANNOUNCE = 0x01 PACKET_TYPE_LINK = 0x02 PACKET_TYPE_PROOF = 0x03 // Announce Types ANNOUNCE_NONE = 0x00 ANNOUNCE_PATH = 0x01 ANNOUNCE_IDENTITY = 0x02 // Header Types HEADER_TYPE_1 = 0x00 // One address field HEADER_TYPE_2 = 0x01 // Two address fields // Propagation Types PROP_TYPE_BROADCAST = 0x00 PROP_TYPE_TRANSPORT = 0x01 DEST_TYPE_SINGLE = 0x00 DEST_TYPE_GROUP = 0x01 DEST_TYPE_PLAIN = 0x02 DEST_TYPE_LINK = 0x03 // IFAC Flag IFAC_NONE = 0x00 IFAC_AUTH = 0x80 MAX_HOPS = 128 PROPAGATION_RATE = 0.02 // 2% of interface bandwidth RETRY_INTERVAL = 300 // 5 minutes MAX_RETRIES = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Announce ¶
type Announce struct {
// contains filtered or unexported fields
}
func NewAnnounce ¶
func NewAnnounce(identity *identity.Identity, destinationHash []byte, appData []byte, ratchetID []byte, pathResponse bool, config *common.ReticulumConfig) (*Announce, error)
NewAnnounce creates a new announce packet for a destination
func (*Announce) CreatePacket ¶
func (*Announce) DeregisterHandler ¶
func (a *Announce) DeregisterHandler(handler AnnounceHandler)
func (*Announce) HandleAnnounce ¶
func (*Announce) Propagate ¶
func (a *Announce) Propagate(interfaces []common.NetworkInterface) error
func (*Announce) RegisterHandler ¶
func (a *Announce) RegisterHandler(handler AnnounceHandler)
func (*Announce) RequestPath ¶
func (a *Announce) RequestPath(destHash []byte, onInterface common.NetworkInterface) error
type AnnounceHandler ¶
type AnnouncePacket ¶
type AnnouncePacket struct {
Data []byte
}
func NewAnnouncePacket ¶
func NewAnnouncePacket(pubKey []byte, appData []byte, announceID []byte) *AnnouncePacket
Click to show internal directories.
Click to hide internal directories.