All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tlv.hpp File Reference
#include <stdexcept>
#include <iterator>
#include "buffer.hpp"
#include "endian.hpp"
Include dependency graph for tlv.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  ndn::Tlv::Error
 

Namespaces

 ndn
 Copyright (C) 2013 Regents of the University of California.
 
 ndn::Tlv
 Namespace defining NDN-TLV related constants and procedures.
 

Enumerations

enum  {
  ndn::Tlv::Interest = 5, ndn::Tlv::Data = 6, ndn::Tlv::Name = 7, ndn::Tlv::NameComponent = 8,
  ndn::Tlv::Selectors = 9, ndn::Tlv::Nonce = 10, ndn::Tlv::Scope = 11, ndn::Tlv::InterestLifetime = 12,
  ndn::Tlv::MinSuffixComponents = 13, ndn::Tlv::MaxSuffixComponents = 14, ndn::Tlv::PublisherPublicKeyLocator = 15, ndn::Tlv::Exclude = 16,
  ndn::Tlv::ChildSelector = 17, ndn::Tlv::MustBeFresh = 18, ndn::Tlv::Any = 19, ndn::Tlv::MetaInfo = 20,
  ndn::Tlv::Content = 21, ndn::Tlv::SignatureInfo = 22, ndn::Tlv::SignatureValue = 23, ndn::Tlv::ContentType = 24,
  ndn::Tlv::FreshnessPeriod = 25, ndn::Tlv::FinalBlockId = 26, ndn::Tlv::SignatureType = 27, ndn::Tlv::KeyLocator = 28,
  ndn::Tlv::KeyLocatorDigest = 29, ndn::Tlv::AppPrivateBlock1 = 128, ndn::Tlv::AppPrivateBlock2 = 32767
}
 
enum  ndn::Tlv::SignatureType { ndn::Tlv::DigestSha256 = 0, ndn::Tlv::SignatureSha256WithRsa = 1 }
 
enum  ndn::Tlv::ConentType { ndn::Tlv::ContentType_Default = 0, ndn::Tlv::ContentType_Link = 1, ndn::Tlv::ContentType_Key = 2 }
 

Functions

template<class InputIterator >
bool ndn::Tlv::readVarNumber (InputIterator &begin, const InputIterator &end, uint64_t &number)
 Read VAR-NUMBER in NDN-TLV encoding. More...
 
template<class InputIterator >
bool ndn::Tlv::readType (InputIterator &begin, const InputIterator &end, uint32_t &type)
 Read TLV Type. More...
 
template<class InputIterator >
uint64_t ndn::Tlv::readVarNumber (InputIterator &begin, const InputIterator &end)
 Read VAR-NUMBER in NDN-TLV encoding. More...
 
template<class InputIterator >
uint32_t ndn::Tlv::readType (InputIterator &begin, const InputIterator &end)
 Read TLV Type. More...
 
size_t ndn::Tlv::sizeOfVarNumber (uint64_t varNumber)
 Get number of bytes necessary to hold value of VAR-NUMBER. More...
 
size_t ndn::Tlv::writeVarNumber (std::ostream &os, uint64_t varNumber)
 Write VAR-NUMBER to the specified stream. More...
 
template<class InputIterator >
uint64_t ndn::Tlv::readNonNegativeInteger (size_t size, InputIterator &begin, const InputIterator &end)
 Read nonNegativeInteger in NDN-TLV encoding. More...
 
size_t ndn::Tlv::sizeOfNonNegativeInteger (uint64_t varNumber)
 Get number of bytes necessary to hold value of nonNegativeInteger. More...
 
size_t ndn::Tlv::writeNonNegativeInteger (std::ostream &os, uint64_t varNumber)
 Write nonNegativeInteger to the specified stream. More...
 
template<>
bool ndn::Tlv::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 ndn::Tlv::readNonNegativeInteger< std::istream_iterator< uint8_t > > (size_t size, std::istream_iterator< uint8_t > &begin, const std::istream_iterator< uint8_t > &end)