Namespace defining NDN Packet Format related constants and procedures. More...
Namespaces | |
detail | |
nfd | |
security | |
Classes | |
class | Error |
represents an error in TLV encoding or decoding More... | |
Functions | |
constexpr bool | isCriticalType (uint32_t type) |
Determine whether a TLV-TYPE is "critical" for evolvability purpose. More... | |
std::ostream & | operator<< (std::ostream &os, SignatureTypeValue st) |
std::ostream & | operator<< (std::ostream &os, ContentTypeValue ct) |
template<typename Iterator > | |
uint64_t | readNonNegativeInteger (size_t size, Iterator &begin, Iterator end) |
Read nonNegativeInteger in NDN-TLV encoding. More... | |
template<typename Iterator > | |
bool | readType (Iterator &begin, Iterator end, uint32_t &type) noexcept |
Read TLV-TYPE. More... | |
template<typename Iterator > | |
uint32_t | readType (Iterator &begin, Iterator end) |
Read TLV-TYPE. More... | |
template<typename Iterator > | |
bool | readVarNumber (Iterator &begin, Iterator end, uint64_t &number) noexcept |
Read VAR-NUMBER in NDN-TLV encoding. More... | |
template<typename Iterator > | |
uint64_t | readVarNumber (Iterator &begin, Iterator end) |
Read VAR-NUMBER in NDN-TLV encoding. More... | |
constexpr size_t | sizeOfNonNegativeInteger (uint64_t integer) noexcept |
Get the number of bytes necessary to hold the value of integer encoded as nonNegativeInteger. More... | |
constexpr size_t | sizeOfVarNumber (uint64_t number) noexcept |
Get the number of bytes necessary to hold the value of number encoded as VAR-NUMBER. More... | |
size_t | writeNonNegativeInteger (std::ostream &os, uint64_t integer) |
Write nonNegativeInteger to the specified stream. More... | |
size_t | writeVarNumber (std::ostream &os, uint64_t number) |
Write VAR-NUMBER to the specified stream. More... | |
Variables | |
constexpr int | NameComponent = GenericNameComponent |
Namespace defining NDN Packet Format related constants and procedures.
anonymous enum : uint32_t |
TLV-TYPE numbers defined in NDN Packet Format v0.3.
anonymous enum : uint32_t |
anonymous enum : uint32_t |
anonymous enum |
TLV-TYPE numbers for SignatureInfo features.
Enumerator | |
---|---|
ValidityPeriod | |
NotBefore | |
NotAfter | |
AdditionalDescription | |
DescriptionEntry | |
DescriptionKey | |
DescriptionValue |
enum ndn::tlv::ContentTypeValue : uint32_t |
ContentType values.
enum ndn::tlv::SignatureTypeValue : uint16_t |
constexpr bool ndn::tlv::isCriticalType | ( | uint32_t | type | ) |
Determine whether a TLV-TYPE is "critical" for evolvability purpose.
std::ostream & ndn::tlv::operator<< | ( | std::ostream & | os, |
SignatureTypeValue | st | ||
) |
std::ostream & ndn::tlv::operator<< | ( | std::ostream & | os, |
ContentTypeValue | ct | ||
) |
uint64_t ndn::tlv::readNonNegativeInteger | ( | size_t | size, |
Iterator & | begin, | ||
Iterator | end | ||
) |
Read nonNegativeInteger in NDN-TLV encoding.
Iterator | an iterator or pointer that dereferences to uint8_t or compatible type |
[in] | size | size of the nonNegativeInteger |
[in,out] | begin | Begin of the buffer, will be incremented to point to the first byte after the read nonNegativeInteger |
[in] | end | End of the buffer |
tlv::Error | number cannot be read |
size
, which can be either 1, 2, 4, or 8. If size
differs from std::distance(begin, end)
, tlv::Error exception will be thrown.
|
noexcept |
Read TLV-TYPE.
Iterator | an iterator or pointer that dereferences to uint8_t or compatible type |
[in,out] | begin | Begin of the buffer, will be incremented to point to the first byte after the read TLV-TYPE |
[in] | end | End of the buffer |
[out] | type | Read TLV-TYPE |
uint32_t ndn::tlv::readType | ( | Iterator & | begin, |
Iterator | end | ||
) |
Read TLV-TYPE.
Iterator | an iterator or pointer that dereferences to uint8_t or compatible type |
[in,out] | begin | Begin of the buffer, will be incremented to point to the first byte after the read TLV-TYPE |
[in] | end | End of the buffer |
tlv::Error | TLV-TYPE cannot be read |
|
noexcept |
Read VAR-NUMBER in NDN-TLV encoding.
Iterator | an iterator or pointer that dereferences to uint8_t or compatible type |
[in,out] | begin | Begin of the buffer, will be incremented to point to the first byte after the read VAR-NUMBER |
[in] | end | End of the buffer |
[out] | number | Read VAR-NUMBER |
uint64_t ndn::tlv::readVarNumber | ( | Iterator & | begin, |
Iterator | end | ||
) |
Read VAR-NUMBER in NDN-TLV encoding.
Iterator | an iterator or pointer that dereferences to uint8_t or compatible type |
[in,out] | begin | Begin of the buffer, will be incremented to point to the first byte after the read VAR-NUMBER |
[in] | end | End of the buffer |
tlv::Error | VAR-NUMBER cannot be read |
|
noexcept |
|
noexcept |
|
inline |
|
inline |
constexpr int ndn::tlv::NameComponent = GenericNameComponent |