Documentation
¶
Index ¶
- Constants
- func IsCritical(tlvType uint32) bool
- type Packet
- func (p *Packet) Acks() []uint64
- func (p *Packet) AppendAck(ack uint64)
- func (p *Packet) CachePolicyType() *uint64
- func (p *Packet) ClearAcks()
- func (p *Packet) CongestionMark() *uint64
- func (p *Packet) Encode() (*tlv.Block, error)
- func (p *Packet) FragCount() *uint64
- func (p *Packet) FragIndex() *uint64
- func (p *Packet) Fragment() []byte
- func (p *Packet) IncomingFaceID() *uint64
- func (p *Packet) IsBare() bool
- func (p *Packet) IsIdle() bool
- func (p *Packet) NextHopFaceID() *uint64
- func (p *Packet) NonDiscovery() bool
- func (p *Packet) PitToken() []byte
- func (p *Packet) PrefixAnnouncement() *ndn.Data
- func (p *Packet) Sequence() *uint64
- func (p *Packet) SetCachePolicytype(cachePolicyType uint64)
- func (p *Packet) SetCongestionMark(congestionMark uint64)
- func (p *Packet) SetFragCount(fragCount uint64)
- func (p *Packet) SetFragIndex(fragIndex uint64)
- func (p *Packet) SetFragment(fragment []byte)
- func (p *Packet) SetIncomingFaceID(incomingFaceID uint64)
- func (p *Packet) SetNextHopFaceID(nextHopFaceID uint64)
- func (p *Packet) SetNonDiscovery(nonDiscovery bool)
- func (p *Packet) SetPitToken(pitToken []byte)
- func (p *Packet) SetPrefixAnnouncement(prefixAnnouncement *ndn.Data)
- func (p *Packet) SetSequence(sequence uint64)
- func (p *Packet) SetTxSequence(txSequence uint64)
- func (p *Packet) TxSequence() *uint64
Constants ¶
const ( Fragment = 0x50 Sequence = 0x51 FragIndex = 0x52 FragCount = 0x53 PitToken = 0x62 LpPacket = 0x64 Nack = 0x0320 NextHopFaceID = 0x0330 IncomingFaceID = 0x0331 CachePolicy = 0x0334 CachePolicyType = 0x0335 CongestionMark = 0x0340 Ack = 0x0344 TxSequence = 0x0348 NonDiscovery = 0x034c PrefixAnnouncement = 0x0350 )
TLV types for NDNLPv2.
Variables ¶
This section is empty.
Functions ¶
func IsCritical ¶
IsCritical returns whether the NDNLPv2 TLV type is critical.
Types ¶
type Packet ¶
type Packet struct {
// contains filtered or unexported fields
}
Packet represents an NDNLPv2 frame.
func DecodePacket ¶
DecodePacket returns an NDNLPv2 frame decoded from the wire.
func NewPacket ¶
NewPacket returns an NDNLPv2 frame containing a copy of the provided network-layer packet.
func (*Packet) CachePolicyType ¶
CachePolicyType returns the CachePolicyType of the LpPacket or nil if it is unset.
func (*Packet) ClearAcks ¶
func (p *Packet) ClearAcks()
ClearAcks removes all Acks from the LpPacket.
func (*Packet) CongestionMark ¶
CongestionMark returns the CongestionMark of the LpPacket or nil if it is unset.
func (*Packet) Fragment ¶
Fragment returns the Fragment field of the LpPacket or nil if it is unset.
func (*Packet) IncomingFaceID ¶
IncomingFaceID returns the IncomingFaceId of the LpPacket or nil if it is unset.
func (*Packet) IsBare ¶
IsBare returns whether the LpPacket only contains a fragment and has no headers fields.
func (*Packet) IsIdle ¶
IsIdle returns whether the LpPacket is an "IDLE" frame and does not contain a fragment.
func (*Packet) NextHopFaceID ¶
NextHopFaceID returns the NextHopFaceId of the LpPacket or nil if it is unset.
func (*Packet) NonDiscovery ¶
NonDiscovery returns whether the NonDiscovery flag is set in the LpPacket
func (*Packet) PitToken ¶
PitToken returns the PitToken set in the LpPacket or an empty slice if it is unset.
func (*Packet) PrefixAnnouncement ¶
PrefixAnnouncement returns the PrefixAnnouncement field of the LpPacket or nil if none is present.
func (*Packet) SetCachePolicytype ¶
SetCachePolicytype sets the CachePolicyType of the LpPacket.
func (*Packet) SetCongestionMark ¶
SetCongestionMark sets the CongestionMark of the LpPacket.
func (*Packet) SetFragCount ¶
SetFragCount sets the FragCount of the LpPacket.
func (*Packet) SetFragIndex ¶
SetFragIndex sets the FragIndex of the LpPacket.
func (*Packet) SetFragment ¶
SetFragment sets the Fragment field of the LpPacket.
func (*Packet) SetIncomingFaceID ¶
SetIncomingFaceID sets the IncomingFaceId of the LpPacket.
func (*Packet) SetNextHopFaceID ¶
SetNextHopFaceID sets the NextHopFaceId of the LpPacket.
func (*Packet) SetNonDiscovery ¶
SetNonDiscovery sets the NonDiscovery flag of the LpPacket.
func (*Packet) SetPitToken ¶
SetPitToken sets the PitToken of the LpPacket.
func (*Packet) SetPrefixAnnouncement ¶
SetPrefixAnnouncement sets the PrefixAnnouncement field of the LpPacket.
func (*Packet) SetSequence ¶
SetSequence sets the Sequence of the LpPacket.
func (*Packet) SetTxSequence ¶
SetTxSequence sets the TxSequence of the LpPacket.
func (*Packet) TxSequence ¶
TxSequence returns the TxSequence of the LpPacket or nil if it is unset.