Namespace defining NDN-TLV related constants and procedures. More...
Namespaces | |
detail | |
nfd | |
security | |
Classes | |
class | Error |
represents an error in TLV encoding or decoding More... | |
Functions | |
std::ostream & | operator<< (std::ostream &os, const SignatureTypeValue &signatureType) |
template<typename Iterator > | |
uint64_t | readNonNegativeInteger (size_t size, Iterator &begin, const Iterator &end) |
Read nonNegativeInteger in NDN-TLV encoding. More... | |
template<typename Iterator > | |
bool | readType (Iterator &begin, const Iterator &end, uint32_t &type) |
Read TLV-TYPE. More... | |
template<typename Iterator > | |
uint32_t | readType (Iterator &begin, const Iterator &end) |
Read TLV Type. More... | |
template<typename Iterator > | |
bool | readVarNumber (Iterator &begin, const Iterator &end, uint64_t &number) |
Read VAR-NUMBER in NDN-TLV encoding. More... | |
template<typename Iterator > | |
uint64_t | readVarNumber (Iterator &begin, const Iterator &end) |
Read VAR-NUMBER in NDN-TLV encoding. More... | |
constexpr size_t | sizeOfNonNegativeInteger (uint64_t integer) |
Get number of bytes necessary to hold value of nonNegativeInteger. More... | |
constexpr size_t | sizeOfVarNumber (uint64_t number) |
Get number of bytes necessary to hold value of 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... | |
Namespace defining NDN-TLV related constants and procedures.
anonymous enum |
TLV-TYPE numbers defined in NDN Packet Format.
Definition at line 63 of file encoding/tlv.hpp.
anonymous enum |
TLV-TYPE numbers for SignatureInfo features.
Enumerator | |
---|---|
ValidityPeriod | |
NotBefore | |
NotAfter | |
AdditionalDescription | |
DescriptionEntry | |
DescriptionKey | |
DescriptionValue |
Definition at line 112 of file encoding/tlv.hpp.
indicates a possible value of ContentType field
Definition at line 125 of file encoding/tlv.hpp.
Enumerator | |
---|---|
DigestSha256 | |
SignatureSha256WithRsa | |
SignatureSha256WithEcdsa |
Definition at line 99 of file encoding/tlv.hpp.
std::ostream & ndn::tlv::operator<< | ( | std::ostream & | os, |
const SignatureTypeValue & | signatureType | ||
) |
uint64_t ndn::tlv::readNonNegativeInteger | ( | size_t | size, |
Iterator & | begin, | ||
const Iterator & | end | ||
) |
Read nonNegativeInteger in NDN-TLV encoding.
Iterator | an iterator or pointer whose value is assignable to uint8_t |
[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. Definition at line 452 of file encoding/tlv.hpp.
bool ndn::tlv::readType | ( | Iterator & | begin, |
const Iterator & | end, | ||
uint32_t & | type | ||
) |
Read TLV-TYPE.
Iterator | an iterator or pointer whose value is assignable to uint8_t |
[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 |
Definition at line 375 of file encoding/tlv.hpp.
uint32_t ndn::tlv::readType | ( | Iterator & | begin, |
const Iterator & | end | ||
) |
Read TLV Type.
Iterator | an iterator or pointer whose value is assignable to uint8_t |
[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 | VAR-NUMBER cannot be read |
Definition at line 405 of file encoding/tlv.hpp.
bool ndn::tlv::readVarNumber | ( | Iterator & | begin, |
const Iterator & | end, | ||
uint64_t & | number | ||
) |
Read VAR-NUMBER in NDN-TLV encoding.
Iterator | an iterator or pointer whose value is assignable to uint8_t |
[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 |
Definition at line 356 of file encoding/tlv.hpp.
uint64_t ndn::tlv::readVarNumber | ( | Iterator & | begin, |
const Iterator & | end | ||
) |
Read VAR-NUMBER in NDN-TLV encoding.
Iterator | an iterator or pointer whose value is assignable to uint8_t |
[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 |
Definition at line 389 of file encoding/tlv.hpp.
constexpr size_t ndn::tlv::sizeOfNonNegativeInteger | ( | uint64_t | integer | ) |
Get number of bytes necessary to hold value of nonNegativeInteger.
Definition at line 469 of file encoding/tlv.hpp.
constexpr size_t ndn::tlv::sizeOfVarNumber | ( | uint64_t | number | ) |
Get number of bytes necessary to hold value of VAR-NUMBER.
Definition at line 416 of file encoding/tlv.hpp.
|
inline |
Write nonNegativeInteger to the specified stream.
Definition at line 477 of file encoding/tlv.hpp.
|
inline |
Write VAR-NUMBER to the specified stream.
Definition at line 424 of file encoding/tlv.hpp.