Documentation ¶
Index ¶
- Constants
- type Data
- type HPCfg
- type HPCfgReply
- type HPCfgReq
- type HPGroupId
- type HPSegRecs
- type HPSegReg
- type HPSegReply
- type HPSegReq
- type IFStateInfo
- type IFStateInfos
- type IFStateReq
- type Pld
- type RevInfo
- func (r *RevInfo) Active() error
- func (r *RevInfo) Equal(other *RevInfo) bool
- func (r *RevInfo) Expiration() time.Time
- func (r *RevInfo) IA() addr.IA
- func (r *RevInfo) Pack() (common.RawBytes, error)
- func (r *RevInfo) ProtoId() proto.ProtoIdType
- func (r *RevInfo) RelativeTTL(reference time.Time) time.Duration
- func (r *RevInfo) SameIntf(other *RevInfo) bool
- func (r *RevInfo) String() string
- func (r *RevInfo) TTL() time.Duration
- func (r *RevInfo) Timestamp() time.Time
- type RevTimeError
- type SegChangesIdReply
- type SegChangesIdReq
- type SegChangesReply
- type SegChangesReq
- type SegIds
- type SegRecs
- type SegReg
- type SegReply
- type SegReq
- type SegReqFlags
- type SegSync
- type SignedRevInfo
- func (sr *SignedRevInfo) Pack() (common.RawBytes, error)
- func (sr *SignedRevInfo) ProtoId() proto.ProtoIdType
- func (sr *SignedRevInfo) RevInfo() (*RevInfo, error)
- func (sr *SignedRevInfo) String() string
- func (sr *SignedRevInfo) VerifiedRevInfo(ctx context.Context, verifier Verifier) (*RevInfo, error)
- type Signer
- type Verifier
Constants ¶
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 HPCfg ¶ added in v0.4.0
type HPCfg struct { GroupId *HPGroupId Version uint32 OwnerISD addr.ISD Writers []addr.IAInt Readers []addr.IAInt Registries []addr.IAInt }
func (*HPCfg) ProtoId ¶ added in v0.4.0
func (hc *HPCfg) ProtoId() proto.ProtoIdType
type HPCfgReply ¶ added in v0.4.0
type HPCfgReply struct {
Cfgs []*HPCfg
}
func (*HPCfgReply) ProtoId ¶ added in v0.4.0
func (hr *HPCfgReply) ProtoId() proto.ProtoIdType
func (*HPCfgReply) String ¶ added in v0.4.0
func (hr *HPCfgReply) String() string
type HPCfgReq ¶ added in v0.4.0
type HPCfgReq struct {
ChangedSince uint32
}
func (*HPCfgReq) ProtoId ¶ added in v0.4.0
func (hr *HPCfgReq) ProtoId() proto.ProtoIdType
type HPGroupId ¶ added in v0.4.0
func (*HPGroupId) ProtoId ¶ added in v0.4.0
func (id *HPGroupId) ProtoId() proto.ProtoIdType
type HPSegRecs ¶ added in v0.4.0
func (*HPSegRecs) ParseRaw ¶ added in v0.4.0
ParseRaw populates the non-capnp fields of s based on data from the raw capnp fields.
func (*HPSegRecs) ProtoId ¶ added in v0.4.0
func (hs *HPSegRecs) ProtoId() proto.ProtoIdType
type HPSegReply ¶ added in v0.4.0
type HPSegReply struct {
Recs []*HPSegRecs
}
func (*HPSegReply) ParseRaw ¶ added in v0.4.0
func (hs *HPSegReply) ParseRaw() error
ParseRaw populates the non-capnp fields of s based on data from the raw capnp fields.
func (*HPSegReply) ProtoId ¶ added in v0.4.0
func (hs *HPSegReply) ProtoId() proto.ProtoIdType
func (*HPSegReply) Sanitize ¶ added in v0.4.0
func (hs *HPSegReply) Sanitize(logger log.Logger) *HPSegReply
Sanitize returns a fresh HPSegReply 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 (*HPSegReply) String ¶ added in v0.4.0
func (hs *HPSegReply) String() string
type HPSegReq ¶ added in v0.4.0
func (*HPSegReq) ProtoId ¶ added in v0.4.0
func (s *HPSegReq) ProtoId() proto.ProtoIdType
type IFStateInfo ¶
type IFStateInfo struct { IfID common.IFIDType 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 ¶
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
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 (*RevInfo) Expiration ¶
func (*RevInfo) ProtoId ¶
func (r *RevInfo) ProtoId() proto.ProtoIdType
func (*RevInfo) RelativeTTL ¶
RelativeTTL returns the duration r is still valid for, relative to reference. If the revocation is already expired, the returned value is 0.
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
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 SegRecs ¶
type SegRecs struct { Recs []*seg.Meta SRevInfos []*SignedRevInfo }
func (*SegRecs) ParseRaw ¶ added in v0.3.0
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
type SegReply ¶
func (*SegReply) ParseRaw ¶
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 ¶
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.
type SegReq ¶
type SegReq struct { RawSrcIA addr.IAInt `capnp:"srcIA"` RawDstIA addr.IAInt `capnp:"dstIA"` Flags SegReqFlags }
func (*SegReq) ProtoId ¶
func (s *SegReq) ProtoId() proto.ProtoIdType
type SegReqFlags ¶ added in v0.3.0
type SignedRevInfo ¶
type SignedRevInfo struct { Blob common.RawBytes Sign *proto.SignS // contains filtered or unexported fields }
func NewSignedRevInfo ¶ added in v0.4.0
func NewSignedRevInfo(r *RevInfo, signer Signer) (*SignedRevInfo, error)
func NewSignedRevInfoFromRaw ¶
func NewSignedRevInfoFromRaw(b common.RawBytes) (*SignedRevInfo, error)
func (*SignedRevInfo) Pack ¶ added in v0.4.0
func (sr *SignedRevInfo) Pack() (common.RawBytes, error)
func (*SignedRevInfo) ProtoId ¶
func (sr *SignedRevInfo) ProtoId() proto.ProtoIdType
func (*SignedRevInfo) RevInfo ¶
func (sr *SignedRevInfo) RevInfo() (*RevInfo, error)
func (*SignedRevInfo) String ¶
func (sr *SignedRevInfo) String() string
func (*SignedRevInfo) VerifiedRevInfo ¶ added in v0.4.0
VerifiedRevInfo verifies the signature and returns the revocation information or an error in case the verification fails.