path_mgmt

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MinRevTTL = 10 * time.Second // MinRevTTL is the minimum lifetime of a revocation

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
}

type IFStateInfo

type IFStateInfo struct {
	IfID     uint64
	Active   bool
	SRevInfo *SignedRevInfo
}

func (*IFStateInfo) String

func (i *IFStateInfo) String() string

type IFStateInfos

type IFStateInfos struct {
	Infos []*IFStateInfo
}

func (*IFStateInfos) ProtoId

func (i *IFStateInfos) ProtoId() proto.ProtoIdType

func (*IFStateInfos) String

func (i *IFStateInfos) String() string

type IFStateReq

type IFStateReq struct {
	IfID uint64
}

func (*IFStateReq) ProtoId

func (i *IFStateReq) ProtoId() proto.ProtoIdType

func (*IFStateReq) String

func (i *IFStateReq) String() string

type Pld

type Pld struct {
	*Data
	// contains filtered or unexported fields
}

func NewPld

func NewPld(u proto.Cerealizable, d *Data) (*Pld, error)

NewPld creates a new path mgmt payload, containing the supplied Cerealizable instance.

func (*Pld) ProtoId

func (p *Pld) ProtoId() proto.ProtoIdType

func (*Pld) String

func (p *Pld) String() string

func (*Pld) Union

func (p *Pld) Union() (proto.Cerealizable, error)

type RevInfo

type RevInfo struct {
	IfID     common.IFIDType
	RawIsdas addr.IAInt `capnp:"isdas"`
	// LinkType of revocation
	LinkType proto.LinkType
	// RawTimestamp the issuing timestamp in seconds.
	RawTimestamp uint32 `capnp:"timestamp"`
	// RawTTL validity period of the revocation in seconds
	RawTTL uint32 `capnp:"ttl"`
}

func NewRevInfoFromRaw

func NewRevInfoFromRaw(b common.RawBytes) (*RevInfo, error)

func (*RevInfo) Active

func (r *RevInfo) Active() error

func (*RevInfo) Eq added in v0.3.1

func (r *RevInfo) Eq(other *RevInfo) bool

func (*RevInfo) Expiration

func (r *RevInfo) Expiration() time.Time

func (*RevInfo) IA

func (r *RevInfo) IA() addr.IA

func (*RevInfo) ProtoId

func (r *RevInfo) ProtoId() proto.ProtoIdType

func (*RevInfo) RelativeTTL

func (r *RevInfo) RelativeTTL(reference time.Time) time.Duration

RelativeTTL returns the duration r is still valid for, relative to reference. If the revocation is already expired, the returned value is 0.

func (*RevInfo) SameIntf added in v0.3.1

func (r *RevInfo) SameIntf(other *RevInfo) bool

SameIntf returns true if r and other both apply to the same interface.

func (*RevInfo) String

func (r *RevInfo) String() string

func (*RevInfo) TTL

func (r *RevInfo) TTL() time.Duration

func (*RevInfo) Timestamp

func (r *RevInfo) Timestamp() time.Time

Timestamp returns the issuing time stamp of the revocation.

type RevTimeError

type RevTimeError string

func NewRevTimeError

func NewRevTimeError(r *RevInfo) RevTimeError

func (RevTimeError) Error

func (ee RevTimeError) Error() string

func (RevTimeError) Timeout

func (ee RevTimeError) Timeout() bool

type SegChangesIdReply added in v0.3.0

type SegChangesIdReply struct {
	Ids []*SegIds
}

func (*SegChangesIdReply) ProtoId added in v0.3.0

func (s *SegChangesIdReply) ProtoId() proto.ProtoIdType

func (*SegChangesIdReply) String added in v0.3.0

func (s *SegChangesIdReply) String() string

type SegChangesIdReq added in v0.3.0

type SegChangesIdReq struct {
	LastCheck uint32
}

func (*SegChangesIdReq) ProtoId added in v0.3.0

func (s *SegChangesIdReq) ProtoId() proto.ProtoIdType

func (*SegChangesIdReq) String added in v0.3.0

func (s *SegChangesIdReq) String() string

type SegChangesReply added in v0.3.0

type SegChangesReply struct {
	*SegRecs
}

type SegChangesReq added in v0.3.0

type SegChangesReq struct {
	SegIds []common.RawBytes
}

func (*SegChangesReq) ProtoId added in v0.3.0

func (s *SegChangesReq) ProtoId() proto.ProtoIdType

func (*SegChangesReq) String added in v0.3.0

func (s *SegChangesReq) String() string

type SegIds added in v0.3.0

type SegIds struct {
	SegId  common.RawBytes
	FullId common.RawBytes
}

type SegRecs

type SegRecs struct {
	Recs      []*seg.Meta
	SRevInfos []*SignedRevInfo
}

func (*SegRecs) ParseRaw added in v0.3.0

func (s *SegRecs) ParseRaw() error

ParseRaw populates the non-capnp fields of s based on data from the raw capnp fields.

func (*SegRecs) ProtoId

func (s *SegRecs) ProtoId() proto.ProtoIdType

func (*SegRecs) String

func (s *SegRecs) String() string

type SegReg

type SegReg struct {
	*SegRecs
}

type SegReply

type SegReply struct {
	Req  *SegReq
	Recs *SegRecs
}

func NewSegReplyFromRaw

func NewSegReplyFromRaw(b common.RawBytes) (*SegReply, error)

func (*SegReply) ParseRaw

func (s *SegReply) ParseRaw() error

ParseRaw populates the non-capnp fields of s based on data from the raw capnp fields.

func (*SegReply) ProtoId

func (s *SegReply) ProtoId() proto.ProtoIdType

func (*SegReply) Sanitize

func (s *SegReply) Sanitize(logger log.Logger) *SegReply

Sanitize returns a fresh SegReply containing only the segments and revocations in s that could be parsed successfully. Note that pointers in the returned value reference the same memory as s.

Since Sanitize is always successful, pass in a logger to be informed of any discarded objects. If logger is nil, no logging is performed and the reply is silently sanitized.

func (*SegReply) String

func (s *SegReply) String() string

func (*SegReply) Write

func (s *SegReply) Write(b common.RawBytes) (int, error)

type SegReq

type SegReq struct {
	RawSrcIA addr.IAInt `capnp:"srcIA"`
	RawDstIA addr.IAInt `capnp:"dstIA"`
	Flags    SegReqFlags
}

func NewSegReqFromRaw

func NewSegReqFromRaw(b common.RawBytes) (*SegReq, error)

func (*SegReq) DstIA

func (s *SegReq) DstIA() addr.IA

func (*SegReq) ProtoId

func (s *SegReq) ProtoId() proto.ProtoIdType

func (*SegReq) SrcIA

func (s *SegReq) SrcIA() addr.IA

func (*SegReq) String

func (s *SegReq) String() string

func (*SegReq) Write

func (s *SegReq) Write(b common.RawBytes) (int, error)

type SegReqFlags added in v0.3.0

type SegReqFlags struct {
	Sibra     bool
	CacheOnly bool
}

type SegSync

type SegSync struct {
	*SegRecs
}

type SignedRevInfo

type SignedRevInfo struct {
	Blob common.RawBytes
	Sign *proto.SignS
	// contains filtered or unexported fields
}

func NewSignedRevInfoFromRaw

func NewSignedRevInfoFromRaw(b common.RawBytes) (*SignedRevInfo, error)

func (*SignedRevInfo) ProtoId

func (sr *SignedRevInfo) ProtoId() proto.ProtoIdType

func (*SignedRevInfo) RevInfo

func (sr *SignedRevInfo) RevInfo() (*RevInfo, error)

func (*SignedRevInfo) String

func (sp *SignedRevInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL