Documentation
¶
Index ¶
- type BaseNameComponent
- type ByteOffsetNameComponent
- type Data
- func (d *Data) Content() []byte
- func (d *Data) Encode() (*tlv.Block, error)
- func (d *Data) HasWire() bool
- func (d *Data) MetaInfo() *MetaInfo
- func (d *Data) Name() *Name
- func (d *Data) PitToken() int
- func (d *Data) SetContent(content []byte)
- func (d *Data) SetMetaInfo(metaInfo *MetaInfo)
- func (d *Data) SetName(name *Name)
- func (d *Data) SetPitToken(pitToken int)
- func (d *Data) SetSignatureInfo(sigInfo *SignatureInfo)
- func (d *Data) ShouldValidateSignature() bool
- func (d *Data) SignatureInfo() *SignatureInfo
- func (d *Data) SignatureValue() []byte
- func (d *Data) String() string
- type Delegation
- type GenericNameComponent
- type ImplicitSha256DigestComponent
- type Interest
- func (i *Interest) AppendApplicationParameter(block *tlv.Block)
- func (i *Interest) AppendForwardingHint(delegation *Delegation)
- func (i *Interest) ApplicationParameters() []tlv.Block
- func (i *Interest) CanBePrefix() bool
- func (i *Interest) ClearApplicationParameters()
- func (i *Interest) ClearForwardingHints()
- func (i *Interest) Encode() (*tlv.Block, error)
- func (i *Interest) EraseForwardingHint(index int) error
- func (i *Interest) ForwardingHint() []Delegation
- func (i *Interest) HasWire() bool
- func (i *Interest) HopLimit() *uint8
- func (i *Interest) Lifetime() time.Duration
- func (i *Interest) MustBeFresh() bool
- func (i *Interest) Name() *Name
- func (i *Interest) Nonce() []byte
- func (i *Interest) ResetNonce()
- func (i *Interest) SetCanBePrefix(canBePrefix bool)
- func (i *Interest) SetHopLimit(hopLimit uint8)
- func (i *Interest) SetLifetime(lifetime time.Duration)
- func (i *Interest) SetMustBeFresh(mustBeFresh bool)
- func (i *Interest) SetName(name *Name)
- func (i *Interest) SetNonce(nonce []byte) error
- func (i *Interest) String() string
- func (i *Interest) UnsetHopLimit()
- type KeywordNameComponent
- type LinkObject
- type LinkType
- type MetaInfo
- func (m *MetaInfo) ContentType() *uint64
- func (m *MetaInfo) Encode() (*tlv.Block, error)
- func (m *MetaInfo) FinalBlockID() NameComponent
- func (m *MetaInfo) FreshnessPeriod() *time.Duration
- func (m *MetaInfo) HasWire() bool
- func (m *MetaInfo) SetContentType(contentType uint64)
- func (m *MetaInfo) SetFinalBlockID(finalBlockID NameComponent)
- func (m *MetaInfo) SetFreshnessPeriod(freshnessPeriod time.Duration)
- func (m *MetaInfo) String() string
- func (m *MetaInfo) UnsetContentType()
- func (m *MetaInfo) UnsetFinalBlockID()
- func (m *MetaInfo) UnsetFreshnessPeriod()
- type Name
- func (n *Name) Append(component NameComponent) *Name
- func (n *Name) At(index int) NameComponent
- func (n *Name) Clear()
- func (n *Name) Compare(other *Name) int
- func (n *Name) DeepCopy() *Name
- func (n *Name) Encode() *tlv.Block
- func (n *Name) Equals(other *Name) bool
- func (n *Name) Erase(index int) error
- func (n *Name) Find(tlvType uint16) (int, NameComponent)
- func (n *Name) HasWire() bool
- func (n *Name) Insert(index int, component NameComponent) error
- func (n *Name) Prefix(size int) *Name
- func (n *Name) PrefixOf(other *Name) bool
- func (n *Name) Set(index int, component NameComponent) error
- func (n *Name) Size() int
- func (n *Name) String() string
- type NameComponent
- type ParametersSha256DigestComponent
- type PendingPacket
- type PrefixAnnouncement
- type Scope
- type SegmentNameComponent
- type SequenceNumNameComponent
- type SignatureInfo
- func (s *SignatureInfo) Encode() (*tlv.Block, error)
- func (s *SignatureInfo) HasWire() bool
- func (s *SignatureInfo) Interest() bool
- func (s *SignatureInfo) KeyLocator() *tlv.Block
- func (s *SignatureInfo) Nonce() []byte
- func (s *SignatureInfo) SeqNum() *uint64
- func (s *SignatureInfo) SetKeyLocator(keyLocator *tlv.Block)
- func (s *SignatureInfo) SetNonce(nonce []byte)
- func (s *SignatureInfo) SetSeqNum(seqNum uint64)
- func (s *SignatureInfo) SetTime(newTime *time.Time)
- func (s *SignatureInfo) SetType(signatureType security.SignatureType)
- func (s *SignatureInfo) String() string
- func (s *SignatureInfo) Time() *time.Time
- func (s *SignatureInfo) Type() security.SignatureType
- func (s *SignatureInfo) UnsetKeyLocator()
- func (s *SignatureInfo) UnsetNonce()
- func (s *SignatureInfo) UnsetSeqNum()
- func (s *SignatureInfo) UnsetTime()
- type State
- type TimestampNameComponent
- type URI
- func DecodeURIString(str string) *URI
- func MakeDevFaceURI(ifname string) *URI
- func MakeEthernetFaceURI(mac net.HardwareAddr) *URI
- func MakeFDFaceURI(fd int) *URI
- func MakeInternalFaceURI() *URI
- func MakeNullFaceURI() *URI
- func MakeUDPFaceURI(ipVersion int, host string, port uint16) *URI
- func MakeUnixFaceURI(path string) *URI
- func (u *URI) Canonize() error
- func (u *URI) GetURIType() uriType
- func (u *URI) IsCanonical() bool
- func (u *URI) Path() string
- func (u *URI) PathHost() string
- func (u *URI) PathZone() string
- func (u *URI) Port() uint16
- func (u *URI) Scheme() string
- func (u *URI) Scope() Scope
- func (u *URI) String() string
- type VersionNameComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseNameComponent ¶
type BaseNameComponent struct {
// contains filtered or unexported fields
}
BaseNameComponent represents a name component without a specialized type.
func NewBaseNameComponent ¶
func NewBaseNameComponent(tlvType uint16, value []byte) *BaseNameComponent
NewBaseNameComponent creates a name component of an arbitrary type.
func (*BaseNameComponent) DeepCopy ¶
func (n *BaseNameComponent) DeepCopy() NameComponent
DeepCopy makes a deep copy of the name component.
func (*BaseNameComponent) Encode ¶
func (n *BaseNameComponent) Encode() *tlv.Block
Encode encodes the name component into a block.
func (*BaseNameComponent) Equals ¶
func (n *BaseNameComponent) Equals(other NameComponent) bool
Equals returns whether the two name components match.
func (*BaseNameComponent) String ¶
func (n *BaseNameComponent) String() string
func (*BaseNameComponent) Type ¶
func (n *BaseNameComponent) Type() uint16
Type returns the TLV type of the name component.
func (*BaseNameComponent) Value ¶
func (n *BaseNameComponent) Value() []byte
Value returns the TLV value of the name component.
type ByteOffsetNameComponent ¶
type ByteOffsetNameComponent struct { BaseNameComponent // contains filtered or unexported fields }
ByteOffsetNameComponent is a component containing a byte offset.
func DecodeByteOffsetNameComponent ¶
func DecodeByteOffsetNameComponent(value []byte) *ByteOffsetNameComponent
DecodeByteOffsetNameComponent decodes a ByteOffsetNameComponent from a TLV wire value.
func NewByteOffsetNameComponent ¶
func NewByteOffsetNameComponent(value uint64) *ByteOffsetNameComponent
NewByteOffsetNameComponent creates a new ByteOffsetNameComponent.
func (*ByteOffsetNameComponent) DeepCopy ¶
func (n *ByteOffsetNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*ByteOffsetNameComponent) SetValue ¶
func (n *ByteOffsetNameComponent) SetValue(value uint64)
SetValue sets the value of a ByteOffsetNameComponent.
func (*ByteOffsetNameComponent) String ¶
func (n *ByteOffsetNameComponent) String() string
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data represents an NDN Data packet.
func DecodeData ¶
DecodeData decodes a Data packet from the wire.
func (*Data) SetContent ¶
SetContent sets the content of the Data packet.
func (*Data) SetMetaInfo ¶
SetMetaInfo sets the MetaInfo of the Data packet.
func (*Data) SetPitToken ¶
SetPitToken sets the PIT token attached to the Data.
func (*Data) SetSignatureInfo ¶
func (d *Data) SetSignatureInfo(sigInfo *SignatureInfo)
SetSignatureInfo sets the SignatureInfo in the Data packet.
func (*Data) ShouldValidateSignature ¶
ShouldValidateSignature returns whether signature validation is enabled for this Data.
func (*Data) SignatureInfo ¶
func (d *Data) SignatureInfo() *SignatureInfo
SignatureInfo returns a copy of the SignatureInfo in the Data packet.
func (*Data) SignatureValue ¶
SignatureValue returns a copy of the SignatureValue in the Data packet. If the signature has not yet been calculated,
type Delegation ¶
type Delegation struct {
// contains filtered or unexported fields
}
Delegation contains a Link Object delegation.
func DecodeDelegation ¶
func DecodeDelegation(wire *tlv.Block) (*Delegation, error)
DecodeDelegation decodes a delegation from the wire.
func NewDelegation ¶
func NewDelegation(preference uint64, name *Name) (*Delegation, error)
NewDelegation creates a new delegation.
func (*Delegation) Encode ¶
func (d *Delegation) Encode() *tlv.Block
Encode encodes the delegation into a block.
func (*Delegation) Name ¶
func (d *Delegation) Name() *Name
Name returns a copy of the name set in the delegation.
func (*Delegation) Preference ¶
func (d *Delegation) Preference() uint64
Preference returns the preference set in the delegation.
func (*Delegation) SetName ¶
func (d *Delegation) SetName(name *Name)
SetName sets the name in the delegation.
func (*Delegation) SetPreference ¶
func (d *Delegation) SetPreference(preference uint64)
SetPreference sets the preference in the delegation.
func (*Delegation) String ¶
func (d *Delegation) String() string
type GenericNameComponent ¶
type GenericNameComponent struct {
BaseNameComponent
}
GenericNameComponent represents a generic NDN name component.
func NewGenericNameComponent ¶
func NewGenericNameComponent(value []byte) *GenericNameComponent
NewGenericNameComponent creates a new GenericNameComponent.
func (*GenericNameComponent) DeepCopy ¶
func (n *GenericNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*GenericNameComponent) SetValue ¶
func (n *GenericNameComponent) SetValue(value []byte)
SetValue sets the value of a GenericNameComponent.
func (*GenericNameComponent) String ¶
func (n *GenericNameComponent) String() string
type ImplicitSha256DigestComponent ¶
type ImplicitSha256DigestComponent struct {
BaseNameComponent
}
ImplicitSha256DigestComponent represents an implicit SHA-256 digest component.
func NewImplicitSha256DigestComponent ¶
func NewImplicitSha256DigestComponent(value []byte) *ImplicitSha256DigestComponent
NewImplicitSha256DigestComponent creates a new ImplicitSha256DigestComponent.
func (*ImplicitSha256DigestComponent) DeepCopy ¶
func (n *ImplicitSha256DigestComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*ImplicitSha256DigestComponent) SetValue ¶
func (n *ImplicitSha256DigestComponent) SetValue(value []byte) error
SetValue sets the value of an ImplicitSha256DigestComponent.
func (*ImplicitSha256DigestComponent) String ¶
func (n *ImplicitSha256DigestComponent) String() string
type Interest ¶
type Interest struct {
// contains filtered or unexported fields
}
Interest represents an NDN Interest packet.
func DecodeInterest ¶
DecodeInterest decodes an Interest from the wire.
func NewInterest ¶
NewInterest creates a new Interest with the specified name and default values.
func (*Interest) AppendApplicationParameter ¶
AppendApplicationParameter appends an application parameter to the Interest. If not already present (or the type of the parameter block specified), it adds an empty ApplicationParameters block before appending this block.
func (*Interest) AppendForwardingHint ¶
func (i *Interest) AppendForwardingHint(delegation *Delegation)
AppendForwardingHint appends a delegation to the ForwardingHint in the Interest.
func (*Interest) ApplicationParameters ¶
ApplicationParameters returns a copy of the application parameters of the Interest.
func (*Interest) CanBePrefix ¶
CanBePrefix returns whether the Interest can be satisfied by a Data packet whos name the Interest name is a prefix of.
func (*Interest) ClearApplicationParameters ¶
func (i *Interest) ClearApplicationParameters()
ClearApplicationParameters clears all ApplicationParameters from the Interest.
func (*Interest) ClearForwardingHints ¶
func (i *Interest) ClearForwardingHints()
ClearForwardingHints removes all forwarding hints attached to the Interest.
func (*Interest) EraseForwardingHint ¶
EraseForwardingHint removes the forwarding hint at the specified index from the Interest.
func (*Interest) ForwardingHint ¶
func (i *Interest) ForwardingHint() []Delegation
ForwardingHint returns a copy of the delegations in the ForwardingHint in the Interest.
func (*Interest) HopLimit ¶
HopLimit returns the hop limit of the Interest or nil if no hop limit is set.
func (*Interest) MustBeFresh ¶
MustBeFresh returns whether the Interest can only be satisfied by "fresh" Data packets.
func (*Interest) ResetNonce ¶
func (i *Interest) ResetNonce()
ResetNonce regenerates the value of the nonce.
func (*Interest) SetCanBePrefix ¶
SetCanBePrefix sets whether the Interest can be satisfied by a Data packet whos name the Interest name is a prefix of.
func (*Interest) SetHopLimit ¶
SetHopLimit sets the hop limit of the Interest.
func (*Interest) SetLifetime ¶
SetLifetime set the lifetime of the Interest.
func (*Interest) SetMustBeFresh ¶
SetMustBeFresh sets whether the Interest can only be satisfied by "fresh" Data packets.
func (*Interest) SetNonce ¶
SetNonce sets the nonce to the specified value. If not exactly 4 bytes, an error is returned.
func (*Interest) UnsetHopLimit ¶
func (i *Interest) UnsetHopLimit()
UnsetHopLimit unsets the hop limit of the Interest.
type KeywordNameComponent ¶
type KeywordNameComponent struct {
BaseNameComponent
}
KeywordNameComponent is a component containing a well-known keyword.
func NewKeywordNameComponent ¶
func NewKeywordNameComponent(value []byte) *KeywordNameComponent
NewKeywordNameComponent creates a new KeywordNameComponent.
func (*KeywordNameComponent) DeepCopy ¶
func (n *KeywordNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*KeywordNameComponent) SetValue ¶
func (n *KeywordNameComponent) SetValue(value []byte)
SetValue sets the value of a KeywordNameComponent.
func (*KeywordNameComponent) String ¶
func (n *KeywordNameComponent) String() string
type LinkObject ¶
type LinkObject struct {
Data
}
LinkObject is a specialized Data packet containing delegation information.
type MetaInfo ¶
type MetaInfo struct {
// contains filtered or unexported fields
}
MetaInfo represents the MetaInfo in a Data packet.
func DecodeMetaInfo ¶
DecodeMetaInfo decodes a MetaInfo from a block.
func (*MetaInfo) ContentType ¶
ContentType returns the ContentType set in the MetaInfo.
func (*MetaInfo) FinalBlockID ¶
func (m *MetaInfo) FinalBlockID() NameComponent
FinalBlockID returns the FinalBlockId set in the MetaInfo.
func (*MetaInfo) FreshnessPeriod ¶
FreshnessPeriod returns the FreshnessPeriod set in the MetaInfo.
func (*MetaInfo) HasWire ¶
HasWire returns whether the MetaInfo has an existing valid wire encoding.
func (*MetaInfo) SetContentType ¶
SetContentType sets the ContentType in the MetaInfo.
func (*MetaInfo) SetFinalBlockID ¶
func (m *MetaInfo) SetFinalBlockID(finalBlockID NameComponent)
SetFinalBlockID sets the FinalBlockId in the MetaInfo.
func (*MetaInfo) SetFreshnessPeriod ¶
SetFreshnessPeriod sets the FreshnessPeriod in the MetaInfo.
func (*MetaInfo) UnsetContentType ¶
func (m *MetaInfo) UnsetContentType()
UnsetContentType unsets the ContentType in the MetaInfo.
func (*MetaInfo) UnsetFinalBlockID ¶
func (m *MetaInfo) UnsetFinalBlockID()
UnsetFinalBlockID unsets the FinalBlockId in the MetaInfo.
func (*MetaInfo) UnsetFreshnessPeriod ¶
func (m *MetaInfo) UnsetFreshnessPeriod()
UnsetFreshnessPeriod unsets the FreshnessPeriod in the MetaInfo.
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
Name represents an NDN name.
func DecodeName ¶
DecodeName decodes a name from wire encoding.,
func NameFromString ¶
NameFromString decodes a name from a string.
func (*Name) Append ¶
func (n *Name) Append(component NameComponent) *Name
Append adds the specified name component to the end of the name.
func (*Name) At ¶
func (n *Name) At(index int) NameComponent
At returns the name component at the specified index. If out of range, nil is returned.
func (*Name) Compare ¶
Compare returns the canonical order of this name against the the specified other name.
func (*Name) Erase ¶
Erase erases the specified name component. If out of range, no action is taken.
func (*Name) Find ¶
func (n *Name) Find(tlvType uint16) (int, NameComponent)
Find returns the first name component with the specified type, as well as its index.
func (*Name) Insert ¶
func (n *Name) Insert(index int, component NameComponent) error
Insert inserts a name component at the specified index.
func (*Name) Prefix ¶
Prefix returns a name prefix of the specified number of components. If greater than or equal to the size of the name, this returns a copy of the name.
type NameComponent ¶
type NameComponent interface { String() string DeepCopy() NameComponent Type() uint16 Value() []byte Equals(other NameComponent) bool Encode() *tlv.Block }
NameComponent represents an NDN name component.
func DecodeNameComponent ¶
func DecodeNameComponent(wire *tlv.Block) (NameComponent, error)
DecodeNameComponent decodes a name component from the wire.
type ParametersSha256DigestComponent ¶
type ParametersSha256DigestComponent struct {
BaseNameComponent
}
ParametersSha256DigestComponent represents a component containing the SHA-256 digest of the Interest parameters.
func NewParametersSha256DigestComponent ¶
func NewParametersSha256DigestComponent(value []byte) *ParametersSha256DigestComponent
NewParametersSha256DigestComponent creates a new ParametersSha256DigestComponent.
func (*ParametersSha256DigestComponent) DeepCopy ¶
func (n *ParametersSha256DigestComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*ParametersSha256DigestComponent) SetValue ¶
func (n *ParametersSha256DigestComponent) SetValue(value []byte) error
SetValue sets the value of an ParametersSha256DigestComponent.
func (*ParametersSha256DigestComponent) String ¶
func (n *ParametersSha256DigestComponent) String() string
type PendingPacket ¶
type PendingPacket struct { Wire *tlv.Block NetPacket interface{} PitToken []byte CongestionMark *uint64 IncomingFaceID *uint64 NextHopFaceID *uint64 CachePolicy *uint64 }
PendingPacket represents a pending network-layer packet to be sent or recently received on the link, plus any associated metadata.
func (*PendingPacket) DeepCopy ¶
func (p *PendingPacket) DeepCopy() *PendingPacket
DeepCopy creates a deep copy of a pending packet.
type PrefixAnnouncement ¶
type PrefixAnnouncement struct {
// contains filtered or unexported fields
}
PrefixAnnouncement is a specially-formatted Data packet used by applications to announce prefixes they produce.
func DecodePrefixAnnouncement ¶
func DecodePrefixAnnouncement(wire *tlv.Block) (*PrefixAnnouncement, error)
DecodePrefixAnnouncement decodes a prefix announcement from the wire.
func NewPrefixAnnouncement ¶
func NewPrefixAnnouncement(data *Data) (*PrefixAnnouncement, error)
NewPrefixAnnouncement creates a prefix announcement from a data packet.
func (*PrefixAnnouncement) ExpirationPeriod ¶
func (p *PrefixAnnouncement) ExpirationPeriod() uint64
ExpirationPeriod returns the expiration period contained in the prefix announcement.
func (*PrefixAnnouncement) Prefix ¶
func (p *PrefixAnnouncement) Prefix() *Name
Prefix returns the prefix announced by the the prefix announcement.
func (*PrefixAnnouncement) Valid ¶
func (p *PrefixAnnouncement) Valid() bool
Valid returns whether the PrefixAnnouncement is validly formatted.
func (*PrefixAnnouncement) ValidityPeriod ¶
func (p *PrefixAnnouncement) ValidityPeriod() (time.Time, time.Time)
ValidityPeriod returns the validity period contained in the prefix announcement. If unset, returns 0 time for both values.
type SegmentNameComponent ¶
type SegmentNameComponent struct { BaseNameComponent // contains filtered or unexported fields }
SegmentNameComponent is a component containing a segment number.
func DecodeSegmentNameComponent ¶
func DecodeSegmentNameComponent(value []byte) *SegmentNameComponent
DecodeSegmentNameComponent decodes a SegmentNameComponent from a TLV wire value.
func NewSegmentNameComponent ¶
func NewSegmentNameComponent(value uint64) *SegmentNameComponent
NewSegmentNameComponent creates a new SegmentNameComponent.
func (*SegmentNameComponent) DeepCopy ¶
func (n *SegmentNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*SegmentNameComponent) SetValue ¶
func (n *SegmentNameComponent) SetValue(value uint64)
SetValue sets the value of a KeywordNameComponent.
func (*SegmentNameComponent) String ¶
func (n *SegmentNameComponent) String() string
type SequenceNumNameComponent ¶
type SequenceNumNameComponent struct { BaseNameComponent // contains filtered or unexported fields }
SequenceNumNameComponent is a component containing a sequence number.
func DecodeSequenceNumNameComponent ¶
func DecodeSequenceNumNameComponent(value []byte) *SequenceNumNameComponent
DecodeSequenceNumNameComponent decodes a SequenceNumNameComponent from a TLV wire value.
func NewSequenceNumNameComponent ¶
func NewSequenceNumNameComponent(value uint64) *SequenceNumNameComponent
NewSequenceNumNameComponent creates a new SequenceNumNameComponent.
func (*SequenceNumNameComponent) DeepCopy ¶
func (n *SequenceNumNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*SequenceNumNameComponent) SetValue ¶
func (n *SequenceNumNameComponent) SetValue(value uint64)
SetValue sets the value of a SequenceNumNameComponent.
func (*SequenceNumNameComponent) String ¶
func (n *SequenceNumNameComponent) String() string
type SignatureInfo ¶
type SignatureInfo struct {
// contains filtered or unexported fields
}
SignatureInfo represents either the SignatureInfo (for Data packets) or InterestSignatureInfo blocks.
func DecodeSignatureInfo ¶
func DecodeSignatureInfo(wire *tlv.Block) (*SignatureInfo, error)
DecodeSignatureInfo decodes a SignatureInfo or InterestSignatureInfo from the wire.
func NewInterestSignatureInfo ¶
func NewInterestSignatureInfo(signatureType security.SignatureType) *SignatureInfo
NewInterestSignatureInfo creates a new InterestSignatureInfo.
func NewSignatureInfo ¶
func NewSignatureInfo(signatureType security.SignatureType) *SignatureInfo
NewSignatureInfo creates a new SignatureInfo for a Data packet.
func (*SignatureInfo) Encode ¶
func (s *SignatureInfo) Encode() (*tlv.Block, error)
Encode encodes the SignatureInfo (or InterestSignatureInfo) into a block.
func (*SignatureInfo) HasWire ¶
func (s *SignatureInfo) HasWire() bool
HasWire returns whether a valid up-to-date wire encoding exists for the SignatureInfo.
func (*SignatureInfo) Interest ¶
func (s *SignatureInfo) Interest() bool
Interest returns true if this is an InterestSignatureInfo and false if it is a SignatureInfo (for Data packets).
func (*SignatureInfo) KeyLocator ¶
func (s *SignatureInfo) KeyLocator() *tlv.Block
KeyLocator returns the KeyLocator of the signature.
func (*SignatureInfo) Nonce ¶
func (s *SignatureInfo) Nonce() []byte
Nonce returns the SignatureNonce of the signature.
func (*SignatureInfo) SeqNum ¶
func (s *SignatureInfo) SeqNum() *uint64
SeqNum returns the SignatureSeqNum of the signature.
func (*SignatureInfo) SetKeyLocator ¶
func (s *SignatureInfo) SetKeyLocator(keyLocator *tlv.Block)
SetKeyLocator sets the KeyLocator of the signature.
func (*SignatureInfo) SetNonce ¶
func (s *SignatureInfo) SetNonce(nonce []byte)
SetNonce sets the SignatureNonce of the signature.
func (*SignatureInfo) SetSeqNum ¶
func (s *SignatureInfo) SetSeqNum(seqNum uint64)
SetSeqNum sets the SignatureSeqNum of the signature.
func (*SignatureInfo) SetTime ¶
func (s *SignatureInfo) SetTime(newTime *time.Time)
SetTime sets the SignatureTime of the signature.
func (*SignatureInfo) SetType ¶
func (s *SignatureInfo) SetType(signatureType security.SignatureType)
SetType sets the type of the signature.
func (*SignatureInfo) String ¶
func (s *SignatureInfo) String() string
func (*SignatureInfo) Time ¶
func (s *SignatureInfo) Time() *time.Time
Time returns the SignatureTime of the signature.
func (*SignatureInfo) Type ¶
func (s *SignatureInfo) Type() security.SignatureType
Type returns the type of the signature.
func (*SignatureInfo) UnsetKeyLocator ¶
func (s *SignatureInfo) UnsetKeyLocator()
UnsetKeyLocator unsets the KeyLocator of the signature.
func (*SignatureInfo) UnsetNonce ¶
func (s *SignatureInfo) UnsetNonce()
UnsetNonce unsets the SignatureNonce of the signature.
func (*SignatureInfo) UnsetSeqNum ¶
func (s *SignatureInfo) UnsetSeqNum()
UnsetSeqNum unsets the SignatureSeqNum of the signature.
func (*SignatureInfo) UnsetTime ¶
func (s *SignatureInfo) UnsetTime()
UnsetTime unsets the SignatureTime of the signature.
type TimestampNameComponent ¶
type TimestampNameComponent struct { BaseNameComponent // contains filtered or unexported fields }
TimestampNameComponent is a component containing a Unix timestamp (in microseconds).
func DecodeTimestampNameComponent ¶
func DecodeTimestampNameComponent(value []byte) *TimestampNameComponent
DecodeTimestampNameComponent decodes a TimestampNameComponent from a TLV wire value.
func NewTimestampNameComponent ¶
func NewTimestampNameComponent(value uint64) *TimestampNameComponent
NewTimestampNameComponent creates a new TimestampNameComponent.
func (*TimestampNameComponent) DeepCopy ¶
func (n *TimestampNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*TimestampNameComponent) SetValue ¶
func (n *TimestampNameComponent) SetValue(value uint64)
SetValue sets the value of a TimestampNameComponent.
func (*TimestampNameComponent) String ¶
func (n *TimestampNameComponent) String() string
type URI ¶
type URI struct {
// contains filtered or unexported fields
}
URI represents a URI for a face.
func DecodeURIString ¶
DecodeURIString decodes a URI from a string.
func MakeDevFaceURI ¶
MakeDevFaceURI constucts a URI for a network interface.
func MakeEthernetFaceURI ¶
func MakeEthernetFaceURI(mac net.HardwareAddr) *URI
MakeEthernetFaceURI constructs a URI for an Ethernet face.
func MakeFDFaceURI ¶
MakeFDFaceURI constructs a file descriptor URI.
func MakeInternalFaceURI ¶
func MakeInternalFaceURI() *URI
MakeInternalFaceURI constructs an internal face URI.
func MakeUDPFaceURI ¶
MakeUDPFaceURI constructs a URI for a UDP face.
func MakeUnixFaceURI ¶
MakeUnixFaceURI constructs a URI for a Unix face.
func (*URI) GetURIType ¶
func (u *URI) GetURIType() uriType
GetURIType returns the type of the face URI.
func (*URI) IsCanonical ¶
IsCanonical returns whether the face URI is canonical.
type VersionNameComponent ¶
type VersionNameComponent struct { BaseNameComponent // contains filtered or unexported fields }
VersionNameComponent is a component containing a version number.
func DecodeVersionNameComponent ¶
func DecodeVersionNameComponent(value []byte) *VersionNameComponent
DecodeVersionNameComponent decodes a VersionNameComponent from a TLV wire value.
func NewVersionNameComponent ¶
func NewVersionNameComponent(value uint64) *VersionNameComponent
NewVersionNameComponent creates a new VersionNameComponent.
func (*VersionNameComponent) DeepCopy ¶
func (n *VersionNameComponent) DeepCopy() NameComponent
DeepCopy creates a deep copy of the name component.
func (*VersionNameComponent) SetValue ¶
func (n *VersionNameComponent) SetValue(value uint64)
SetValue sets the value of a VersionNameComponent.
func (*VersionNameComponent) String ¶
func (n *VersionNameComponent) String() string
func (*VersionNameComponent) Version ¶
func (n *VersionNameComponent) Version() uint64
Version returns the version contained in the name component.