|
enum | {
Interest = 5,
Data = 6,
Name = 7,
ImplicitSha256DigestComponent = 1,
NameComponent = 8,
Selectors = 9,
Nonce = 10,
InterestLifetime = 12,
MinSuffixComponents = 13,
MaxSuffixComponents = 14,
PublisherPublicKeyLocator = 15,
Exclude = 16,
ChildSelector = 17,
MustBeFresh = 18,
Any = 19,
MetaInfo = 20,
Content = 21,
SignatureInfo = 22,
SignatureValue = 23,
ContentType = 24,
FreshnessPeriod = 25,
FinalBlockId = 26,
SignatureType = 27,
KeyLocator = 28,
KeyDigest = 29,
LinkPreference = 30,
LinkDelegation = 31,
SelectedDelegation = 32,
AppPrivateBlock1 = 128,
AppPrivateBlock2 = 32767
} |
|
enum | SignatureTypeValue { DigestSha256 = 0,
SignatureSha256WithRsa = 1,
SignatureSha256WithEcdsa = 3
} |
|
enum | {
ValidityPeriod = 253,
NotBefore = 254,
NotAfter = 255,
AdditionalDescription = 258,
DescriptionEntry = 512,
DescriptionKey = 513,
DescriptionValue = 514
} |
| TLV codes for SignatureInfo features. More...
|
|
enum | ContentTypeValue { ContentType_Blob = 0,
ContentType_Link = 1,
ContentType_Key = 2,
ContentType_Nack = 3
} |
| indicates a possible value of ContentType field More...
|
|
|
std::ostream & | operator<< (std::ostream &os, const SignatureTypeValue &signatureType) |
|
template<class InputIterator > |
bool | readVarNumber (InputIterator &begin, const InputIterator &end, uint64_t &number) |
| Read VAR-NUMBER in NDN-TLV encoding. More...
|
|
template<class InputIterator > |
bool | readType (InputIterator &begin, const InputIterator &end, uint32_t &type) |
| Read TLV Type. More...
|
|
template<class InputIterator > |
uint64_t | readVarNumber (InputIterator &begin, const InputIterator &end) |
| Read VAR-NUMBER in NDN-TLV encoding. More...
|
|
template<class InputIterator > |
uint32_t | readType (InputIterator &begin, const InputIterator &end) |
| Read TLV Type. More...
|
|
size_t | sizeOfVarNumber (uint64_t varNumber) |
| Get number of bytes necessary to hold value of VAR-NUMBER. More...
|
|
size_t | writeVarNumber (std::ostream &os, uint64_t varNumber) |
| Write VAR-NUMBER to the specified stream. More...
|
|
template<class InputIterator > |
uint64_t | readNonNegativeInteger (size_t size, InputIterator &begin, const InputIterator &end) |
| Read nonNegativeInteger in NDN-TLV encoding. More...
|
|
size_t | sizeOfNonNegativeInteger (uint64_t varNumber) |
| Get number of bytes necessary to hold value of nonNegativeInteger. More...
|
|
size_t | writeNonNegativeInteger (std::ostream &os, uint64_t varNumber) |
| Write nonNegativeInteger to the specified stream. More...
|
|
template<> |
bool | readVarNumber< std::istream_iterator< uint8_t > > (std::istream_iterator< uint8_t > &begin, const std::istream_iterator< uint8_t > &end, uint64_t &value) |
|
template<> |
uint64_t | readNonNegativeInteger< std::istream_iterator< uint8_t > > (size_t size, std::istream_iterator< uint8_t > &begin, const std::istream_iterator< uint8_t > &end) |
|
Namespace defining NDN-TLV related constants and procedures.
template<class InputIterator >
uint64_t ndn::tlv::readNonNegativeInteger |
( |
size_t |
size, |
|
|
InputIterator & |
begin, |
|
|
const InputIterator & |
end |
|
) |
| |
|
inline |
Read nonNegativeInteger in NDN-TLV encoding.
This call will throw ndn::tlv::Error (aka std::runtime_error) if number cannot be read
Note that after call finished, begin will point to the first byte after the read VAR-NUMBER
How many bytes will be read is directly controlled by the size parameter, which can be either 1, 2, 4, or 8. If the value of size is different, then an exception will be thrown.
Definition at line 436 of file encoding/tlv.hpp.