ndn::lp Namespace Reference

Contains classes and functions related to NDNLPv2. More...

Namespaces

 field_location_tags
 Indicates where a field may occur.
 
 tlv
 Contains constants related to the NDNLPv2 packet format.
 

Classes

class  CachePolicy
 Represents a CachePolicy header field. More...
 
struct  DecodeHelper
 
struct  DecodeHelper< TlvType, EmptyValue >
 
struct  DecodeHelper< TlvType, NonNegativeIntegerTag >
 
struct  DecodeHelper< TlvType, std::pair< Buffer::const_iterator, Buffer::const_iterator > >
 
struct  DecodeHelper< TlvType, uint64_t >
 
struct  EmptyValue
 Represents a zero-length TLV-VALUE. More...
 
struct  EncodeHelper
 
struct  EncodeHelper< TAG, TlvType, EmptyValue >
 
struct  EncodeHelper< TAG, TlvType, NonNegativeIntegerTag >
 
struct  EncodeHelper< TAG, TlvType, std::pair< Buffer::const_iterator, Buffer::const_iterator > >
 
struct  EncodeHelper< TAG, TlvType, uint64_t >
 
struct  Field
 Concept check for NDNLPv2 fields. More...
 
class  FieldDecl
 Declare a field. More...
 
class  Nack
 Represents a Network Nack. More...
 
class  NackHeader
 Represents a Network Nack header. More...
 
class  Packet
 
class  PitToken
 Represent a PIT token field. More...
 
class  PrefixAnnouncementHeader
 Represents a PrefixAnnouncement header field in NDNLP. More...
 

Typedefs

typedef FieldDecl< field_location_tags::Header, Sequence, tlv::Ack, true > AckField
 
typedef FieldDecl< field_location_tags::Header, CachePolicy, tlv::CachePolicyCachePolicyField
 
using CachePolicyTag = SimpleTag< CachePolicy, 12 >
 
typedef FieldDecl< field_location_tags::Header, uint64_t, tlv::CongestionMark, false, NonNegativeIntegerTag, NonNegativeIntegerTag > CongestionMarkField
 
using CongestionMarkTag = SimpleTag< uint64_t, 13 >
 
using FieldSet = boost::mp11::mp_list< FragmentField, SequenceField, FragIndexField, FragCountField, PitTokenField, NackField, NextHopFaceIdField, IncomingFaceIdField, CachePolicyField, CongestionMarkField, AckField, TxSequenceField, NonDiscoveryField, PrefixAnnouncementField >
 Set of all field declarations. More...
 
typedef FieldDecl< field_location_tags::Header, uint64_t, tlv::FragCount, false, NonNegativeIntegerTag, NonNegativeIntegerTag > FragCountField
 
typedef FieldDecl< field_location_tags::Header, uint64_t, tlv::FragIndex, false, NonNegativeIntegerTag, NonNegativeIntegerTag > FragIndexField
 
typedef FieldDecl< field_location_tags::Fragment, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::FragmentFragmentField
 Declare the Fragment field. More...
 
typedef FieldDecl< field_location_tags::Header, uint64_t, tlv::IncomingFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > IncomingFaceIdField
 
using IncomingFaceIdTag = SimpleTag< uint64_t, 10 >
 
typedef FieldDecl< field_location_tags::Header, NackHeader, tlv::NackNackField
 
typedef FieldDecl< field_location_tags::Header, uint64_t, tlv::NextHopFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > NextHopFaceIdField
 
using NextHopFaceIdTag = SimpleTag< uint64_t, 11 >
 
typedef FieldDecl< field_location_tags::Header, EmptyValue, tlv::NonDiscoveryNonDiscoveryField
 
using NonDiscoveryTag = SimpleTag< EmptyValue, 14 >
 
typedef FieldDecl< field_location_tags::Header, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::PitTokenPitTokenField
 
typedef FieldDecl< field_location_tags::Header, PrefixAnnouncementHeader, tlv::PrefixAnnouncementPrefixAnnouncementField
 
using PrefixAnnouncementTag = SimpleTag< PrefixAnnouncementHeader, 15 >
 
using Sequence = uint64_t
 Represents a sequence number. More...
 
typedef FieldDecl< field_location_tags::Header, Sequence, tlv::SequenceSequenceField
 
typedef FieldDecl< field_location_tags::Header, Sequence, tlv::TxSequenceTxSequenceField
 

Enumerations

enum class  CachePolicyType {
  NONE = 0 ,
  NO_CACHE = 1
}
 Indicates the cache policy applied to a Data packet. More...
 
enum class  NackReason {
  NONE = 0 ,
  CONGESTION = 50 ,
  DUPLICATE = 100 ,
  NO_ROUTE = 150
}
 Indicates the reason type of a Network Nack. More...
 

Functions

template size_t CachePolicy ::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t CachePolicy ::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 
bool isLessSevere (lp::NackReason x, lp::NackReason y)
 Compare NackReason according to severity. More...
 
template size_t NackHeader ::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t NackHeader ::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 
std::ostream & operator<< (std::ostream &os, CachePolicyType policy)
 
std::ostream & operator<< (std::ostream &os, const PitToken &pitToken)
 
std::ostream & operator<< (std::ostream &os, NackReason reason)
 
template size_t PrefixAnnouncementHeader ::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t PrefixAnnouncementHeader ::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 

Variables

constexpr size_t LENGTH_MAX = 32
 
constexpr size_t LENGTH_MIN = 1
 

Detailed Description

Contains classes and functions related to NDNLPv2.

Typedef Documentation

◆ AckField

◆ CachePolicyField

◆ CachePolicyTag

Definition at line 54 of file tags.hpp.

◆ CongestionMarkField

typedef FieldDecl<field_location_tags::Header, uint64_t, tlv::CongestionMark, false, NonNegativeIntegerTag, NonNegativeIntegerTag> ndn::lp::CongestionMarkField

Definition at line 98 of file fields.hpp.

◆ CongestionMarkTag

using ndn::lp::CongestionMarkTag = typedef SimpleTag<uint64_t, 13>

Definition at line 62 of file tags.hpp.

◆ FieldSet

◆ FragCountField

typedef FieldDecl<field_location_tags::Header, uint64_t, tlv::FragCount, false, NonNegativeIntegerTag, NonNegativeIntegerTag> ndn::lp::FragCountField

Definition at line 65 of file fields.hpp.

◆ FragIndexField

typedef FieldDecl<field_location_tags::Header, uint64_t, tlv::FragIndex, false, NonNegativeIntegerTag, NonNegativeIntegerTag> ndn::lp::FragIndexField

Definition at line 58 of file fields.hpp.

◆ FragmentField

typedef FieldDecl<field_location_tags::Fragment, std::pair<Buffer::const_iterator, Buffer::const_iterator>, tlv::Fragment> ndn::lp::FragmentField

Declare the Fragment field.

The fragment (i.e., payload) is the range of bytes between two provided iterators. During encoding, these bytes are copied from the Buffer into the LpPacket.

Definition at line 47 of file fields.hpp.

◆ IncomingFaceIdField

typedef FieldDecl<field_location_tags::Header, uint64_t, tlv::IncomingFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag> ndn::lp::IncomingFaceIdField

Definition at line 80 of file fields.hpp.

◆ IncomingFaceIdTag

using ndn::lp::IncomingFaceIdTag = typedef SimpleTag<uint64_t, 10>

Definition at line 38 of file tags.hpp.

◆ NackField

◆ NextHopFaceIdField

typedef FieldDecl<field_location_tags::Header, uint64_t, tlv::NextHopFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag> ndn::lp::NextHopFaceIdField

Definition at line 87 of file fields.hpp.

◆ NextHopFaceIdTag

using ndn::lp::NextHopFaceIdTag = typedef SimpleTag<uint64_t, 11>

Definition at line 46 of file tags.hpp.

◆ NonDiscoveryField

◆ NonDiscoveryTag

Definition at line 70 of file tags.hpp.

◆ PitTokenField

typedef FieldDecl<field_location_tags::Header, std::pair<Buffer::const_iterator, Buffer::const_iterator>, tlv::PitToken> ndn::lp::PitTokenField

Definition at line 69 of file fields.hpp.

◆ PrefixAnnouncementField

◆ PrefixAnnouncementTag

Definition at line 78 of file tags.hpp.

◆ Sequence

using ndn::lp::Sequence = typedef uint64_t

Represents a sequence number.

Definition at line 34 of file sequence.hpp.

◆ SequenceField

◆ TxSequenceField

Enumeration Type Documentation

◆ CachePolicyType

Indicates the cache policy applied to a Data packet.

Enumerator
NONE 
NO_CACHE 

Definition at line 35 of file cache-policy.hpp.

◆ NackReason

enum ndn::lp::NackReason
strong

Indicates the reason type of a Network Nack.

Enumerator
NONE 
CONGESTION 
DUPLICATE 
NO_ROUTE 

Definition at line 36 of file nack-header.hpp.

Function Documentation

◆ CachePolicy ::wireEncode<::ndn::encoding::EncoderTag >()

template size_t ndn::lp::CachePolicy ::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const

◆ CachePolicy ::wireEncode<::ndn::encoding::EstimatorTag >()

template size_t ndn::lp::CachePolicy ::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const

◆ isLessSevere()

bool ndn::lp::isLessSevere ( lp::NackReason  x,
lp::NackReason  y 
)

Compare NackReason according to severity.

NackReason::NONE is treated as most severe.

Definition at line 44 of file nack-header.cpp.

◆ NackHeader ::wireEncode<::ndn::encoding::EncoderTag >()

template size_t ndn::lp::NackHeader ::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const

◆ NackHeader ::wireEncode<::ndn::encoding::EstimatorTag >()

template size_t ndn::lp::NackHeader ::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const

◆ operator<<() [1/3]

std::ostream & ndn::lp::operator<< ( std::ostream &  os,
CachePolicyType  policy 
)

Definition at line 29 of file cache-policy.cpp.

◆ operator<<() [2/3]

std::ostream & ndn::lp::operator<< ( std::ostream &  os,
const PitToken pitToken 
)

Definition at line 40 of file pit-token.cpp.

◆ operator<<() [3/3]

std::ostream & ndn::lp::operator<< ( std::ostream &  os,
NackReason  reason 
)

Definition at line 28 of file nack-header.cpp.

◆ PrefixAnnouncementHeader ::wireEncode<::ndn::encoding::EncoderTag >()

template size_t ndn::lp::PrefixAnnouncementHeader ::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const

◆ PrefixAnnouncementHeader ::wireEncode<::ndn::encoding::EstimatorTag >()

template size_t ndn::lp::PrefixAnnouncementHeader ::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const

Variable Documentation

◆ LENGTH_MAX

constexpr size_t ndn::lp::LENGTH_MAX = 32
constexpr

Definition at line 29 of file pit-token.cpp.

◆ LENGTH_MIN

constexpr size_t ndn::lp::LENGTH_MIN = 1
constexpr

Definition at line 28 of file pit-token.cpp.