All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ndn Namespace Reference

Copyright (C) 2013 Regents of the University of California. More...

Namespaces

 crypto
 
 encoding
 
 io
 
 name
 
 ndnd
 
 nfd
 
 nrd
 
 random
 
 security
 
 time
 
 Tlv
 Namespace defining NDN-TLV related constants and procedures.
 
 tlv
 

Data Structures

class  Data
 
class  PendingInterest
 
struct  MatchPendingInterestId
 Functor to match pending interests against PendingInterestId. More...
 
class  RegisteredPrefix
 
struct  MatchRegisteredPrefixId
 Functor to match pending interests against PendingInterestId. More...
 
class  EncodingImpl
 
class  Block
 Class representing wire element of the NDN packet. More...
 
class  Buffer
 Class representing a general-use automatically managed/resized buffer. More...
 
struct  OBufferStream
 Class implementing interface similar to ostringstream, but to construct ndn::Buffer. More...
 
class  EncodingImpl< encoding::Buffer >
 Class representing wire element of the NDN packet. More...
 
class  EncodingImpl< encoding::Estimator >
 Class representing wire element of the NDN packet. More...
 
class  OID
 
class  Exclude
 Class to represent Exclude component in NDN interests. More...
 
class  NullIoDeleter
 
class  Face
 Abstraction to communicate with local or remote NDN forwarder. More...
 
class  Interest
 An Interest holds a Name and other fields for an interest. More...
 
class  KeyLocator
 
class  Controller
 
class  MetaInfo
 An MetaInfo holds the meta info which is signed inside the data packet. More...
 
class  Name
 A Name holds an array of Name::Component and represents an NDN name. More...
 
class  CertificateCacheTtl
 
class  CertificateCache
 
class  CertificateExtension
 A CertificateExtension represents the Extension entry in a certificate. More...
 
class  CertificateSubjectDescription
 A CertificateSubjectDescription represents the SubjectDescription entry in a Certificate. More...
 
class  Certificate
 
class  EncryptionManager
 
class  IdentityCertificate
 
class  KeyChainImpl
 KeyChain is one of the main classes of the security library. More...
 
class  PublicKey
 
class  SecPublicInfoMemory
 SecPublicInfoMemory extends SecPublicInfo and implements its methods to store identity, public key and certificate objects in memory. More...
 
class  SecPublicInfoSqlite3
 
class  SecPublicInfo
 SecPublicInfo is a base class for the storage of public information. More...
 
class  SecRuleRelative
 
class  SecRuleSpecific
 
class  SecRule
 
class  SecTpmFile
 
class  SecTpmMemory
 SecTpmMemory implements a simple in-memory TPM. More...
 
class  SecTpmOsx
 
class  SecTpm
 SecTpm is the base class of the TPM classes. More...
 
class  SecuredBag
 
class  SignatureSha256WithRsa
 Representing of SHA256-with-RSA signature in a data packet. More...
 
class  SignatureSha256
 Representing of SHA256 signature in a data packet. More...
 
class  ValidationRequest
 
class  ValidatorConfig
 
class  ValidatorNull
 
class  ValidatorRegex
 
class  Validator
 Validator is one of the main classes of the security library. More...
 
class  Selectors
 Abstraction implementing Interest selectors. More...
 
class  Signature
 A Signature is storage for the signature-related information (info and value) in a Data packet. More...
 
class  StreamTransportImpl
 
class  StreamTransportWithResolverImpl
 
class  TcpTransport
 
class  Transport
 
class  UnixTransport
 
class  CommandInterestGenerator
 Helper class to generate CommandInterests. More...
 
class  CommandInterestValidator
 
class  ConfigFile
 
class  RegexBackrefManager
 
class  RegexBackrefMatcher
 
class  RegexComponentMatcher
 
class  RegexComponentSetMatcher
 
class  RegexMatcher
 
class  RegexPatternListMatcher
 
class  RegexPseudoMatcher
 
class  RegexRepeatMatcher
 
class  RegexTopMatcher
 
struct  EventIdImpl
 
class  Scheduler
 Generic scheduler. More...
 

Typedefs

typedef EncodingImpl< true > EncodingBuffer
 
typedef ptr_lib::shared_ptr
< const Buffer
ConstBufferPtr
 
typedef ptr_lib::shared_ptr
< Buffer
BufferPtr
 
typedef EncodingImpl
< encoding::Estimator
EncodingEstimator
 
typedef function< void(const
Interest &, Data &)> 
OnData
 An OnData function object is used to pass a callback to expressInterest. More...
 
typedef function< void(const
Interest &)> 
OnTimeout
 An OnTimeout function object is used to pass a callback to expressInterest. More...
 
typedef function< void(const
Name &, const Interest &)> 
OnInterest
 An OnInterest function object is used to pass a callback to registerPrefix. More...
 
typedef function< void(const
Name &, const std::string &)> 
OnSetInterestFilterFailed
 An OnRegisterFailed function object is used to report when registerPrefix fails. More...
 
typedef KeyChainImpl
< SecPublicInfoSqlite3,
SecTpmFile
KeyChain
 
typedef function< void(const
shared_ptr< const Interest > &)> 
OnInterestValidated
 Callback to report a successful Interest validation. More...
 
typedef function< void(const
shared_ptr< const Interest >
&, const std::string &)> 
OnInterestValidationFailed
 Callback to report a failed Interest validation. More...
 
typedef function< void(const
shared_ptr< const Data > &)> 
OnDataValidated
 Callback to report a successful Data validation. More...
 
typedef function< void(const
shared_ptr< const Data >
&, const std::string &)> 
OnDataValidationFailed
 Callback to report a failed Data validation. More...
 
typedef
boost::asio::basic_deadline_timer
< time::steady_clock::TimePoint::clock > 
monotonic_deadline_timer
 
typedef RegexTopMatcher Regex
 
typedef shared_ptr< EventIdImplEventId
 Private storage of information about the event. More...
 

Enumerations

enum  KeyType { KEY_TYPE_RSA, KEY_TYPE_AES }
 
enum  KeyClass { KEY_CLASS_PUBLIC, KEY_CLASS_PRIVATE, KEY_CLASS_SYMMETRIC }
 
enum  DigestAlgorithm { DIGEST_ALGORITHM_SHA256 }
 
enum  EncryptMode { ENCRYPT_MODE_DEFAULT, ENCRYPT_MODE_CFB_AES }
 
enum  AclType { ACL_TYPE_PUBLIC, ACL_TYPE_PRIVATE }
 

Functions

std::ostream & operator<< (std::ostream &os, const Data &data)
 
Block nonNegativeIntegerBlock (uint32_t type, uint64_t value)
 
uint64_t readNonNegativeInteger (const Block &block)
 
Block booleanBlock (uint32_t type)
 
Block dataBlock (uint32_t type, const char *data, size_t dataSize)
 
Block dataBlock (uint32_t type, const unsigned char *data, size_t dataSize)
 
size_t DEREncodeGeneralTime (CryptoPP::BufferedTransformation &bt, const time::system_clock::TimePoint &time)
 
void BERDecodeTime (CryptoPP::BufferedTransformation &bt, time::system_clock::TimePoint &time)
 
template<bool P>
size_t prependNonNegativeIntegerBlock (EncodingImpl< P > &encoder, uint32_t type, uint64_t number)
 helper methods More...
 
template<bool P>
size_t prependByteArrayBlock (EncodingImpl< P > &encoder, uint32_t type, const uint8_t *array, size_t arraySize)
 
template<bool P>
size_t prependBooleanBlock (EncodingImpl< P > &encoder, uint32_t type)
 
template<bool P, class U >
size_t prependNestedBlock (EncodingImpl< P > &encoder, uint32_t type, const U &nestedBlock)
 
template<bool P>
size_t prependBlock (EncodingImpl< P > &encoder, const Block &block)
 
void EncodeValue (BufferedTransformation &bt, word32 v)
 
size_t DecodeValue (BufferedTransformation &bt, word32 &v)
 
std::ostream & operator<< (std::ostream &os, const Exclude &exclude)
 
std::ostream & operator<< (std::ostream &os, const Interest &interest)
 
std::ostream & operator<< (std::ostream &os, const MetaInfo &info)
 
std::ostream & operator<< (std::ostream &os, const Name &name)
 
std::istream & operator>> (std::istream &is, Name &name)
 
std::ostream & operator<< (std::ostream &os, const Certificate &cert)
 
std::ostream & operator<< (std::ostream &os, const PublicKey &key)
 
static int sqlite3_bind_text (sqlite3_stmt *statement, int index, const string &value, void(*destructor)(void *))
 A utility function to call the normal sqlite3_bind_text where the value and length are value.c_str() and value.size(). More...
 
void ndn_digestSha256 (const uint8_t *data, size_t dataLength, uint8_t *digest)
 Compute the sha-256 digest of data. More...
 
std::string toHex (const uint8_t *array, size_t arraySize)
 Return the hex representation of the bytes in array. More...
 
void trimLeft (std::string &str)
 Modify str in place to erase whitespace on the left. More...
 
void trimRight (std::string &str)
 Modify str in place to erase whitespace on the right. More...
 
void trim (std::string &str)
 Modify str in place to erase whitespace on the left and right. More...
 
int fromHexChar (uint8_t c)
 Convert the hex character to an integer from 0 to 15, or -1 if not a hex character. More...
 
std::string unescape (const std::string &str)
 Return a copy of str, converting each escaped "%XX" to the char value. More...
 

Variables

const time::seconds DEFAULT_INTEREST_LIFETIME = time::seconds(4)
 
static OID RSA_OID ("1.2.840.113549.1.1.1")
 
static const string INIT_ID_TABLE
 
static const string INIT_KEY_TABLE
 
static const string INIT_CERT_TABLE
 
const size_t MAX_LENGTH = 9000
 
static const char * WHITESPACE_CHARS = " \n\r\t"
 

Detailed Description

Copyright (C) 2013 Regents of the University of California.

Copyright (C) 2013-2014 Regents of the University of California.

Copyright (C) 2014 Regents of the University of California.

Copyright (C) 2014 Named Data Networking Project See COPYING for copyright and distribution information.

See COPYING for copyright and distribution information.

Author
: Jeff Thompson jefft.nosp@m.0@re.nosp@m.map.u.nosp@m.cla..nosp@m.edu
: Yingdi Yu yingd.nosp@m.i@cs.nosp@m..ucla.nosp@m..edu
: Alexander Afanasyev alexa.nosp@m.nder.nosp@m..afan.nosp@m.asye.nosp@m.v@ucl.nosp@m.a.ed.nosp@m.u See COPYING for copyright and distribution information.
: Jeff Thompson jefft.nosp@m.0@re.nosp@m.map.u.nosp@m.cla..nosp@m.edu See COPYING for copyright and distribution information.
: Jeff Thompson jefft.nosp@m.0@re.nosp@m.map.u.nosp@m.cla..nosp@m.edu
: Alexander Afanasyev alexa.nosp@m.nder.nosp@m..afan.nosp@m.asye.nosp@m.v@ucl.nosp@m.a.ed.nosp@m.u
: Zhenkai Zhu zhenk.nosp@m.ai@c.nosp@m.s.ucl.nosp@m.a.ed.nosp@m.u See COPYING for copyright and distribution information.
: Yingdi Yu yingd.nosp@m.i@cs.nosp@m..ucla.nosp@m..edu See COPYING for copyright and distribution information.
: Yingdi Yu yingd.nosp@m.i@cs.nosp@m..ucla.nosp@m..edu
: Jeff Thompson jefft.nosp@m.0@re.nosp@m.map.u.nosp@m.cla..nosp@m.edu See COPYING for copyright and distribution information.
: Xingyu Ma maxy1.nosp@m.2@cs.nosp@m..ucla.nosp@m..edu Yingdi Yu yingd.nosp@m.i@cs.nosp@m..ucla.nosp@m..edu See COPYING for copyright and distribution information.

Typedef Documentation

typedef ptr_lib::shared_ptr<Buffer> ndn::BufferPtr

Definition at line 19 of file buffer.hpp.

typedef ptr_lib::shared_ptr<const Buffer> ndn::ConstBufferPtr

Definition at line 17 of file buffer.hpp.

Definition at line 20 of file block.hpp.

typedef shared_ptr<EventIdImpl> ndn::EventId

Private storage of information about the event.

Opaque type (shared_ptr) representing ID of the scheduled event

Definition at line 15 of file scheduler.hpp.

typedef boost::asio::basic_deadline_timer<time::steady_clock::TimePoint::clock> ndn::monotonic_deadline_timer

Definition at line 70 of file monotonic_deadline_timer.hpp.

typedef function<void(const Interest&, Data&)> ndn::OnData

An OnData function object is used to pass a callback to expressInterest.

Definition at line 27 of file face.hpp.

typedef function<void(const shared_ptr<const Data>&)> ndn::OnDataValidated

Callback to report a successful Data validation.

Definition at line 23 of file validation-request.hpp.

typedef function<void(const shared_ptr<const Data>&, const std::string&)> ndn::OnDataValidationFailed

Callback to report a failed Data validation.

Definition at line 27 of file validation-request.hpp.

typedef function<void (const Name&, const Interest&)> ndn::OnInterest

An OnInterest function object is used to pass a callback to registerPrefix.

Definition at line 42 of file face.hpp.

typedef function<void(const shared_ptr<const Interest>&)> ndn::OnInterestValidated

Callback to report a successful Interest validation.

Definition at line 16 of file validation-request.hpp.

typedef function<void(const shared_ptr<const Interest>&, const std::string&)> ndn::OnInterestValidationFailed

Callback to report a failed Interest validation.

Definition at line 20 of file validation-request.hpp.

typedef function<void(const Name&, const std::string&)> ndn::OnSetInterestFilterFailed

An OnRegisterFailed function object is used to report when registerPrefix fails.

Definition at line 47 of file face.hpp.

typedef function<void(const Interest&)> ndn::OnTimeout

An OnTimeout function object is used to pass a callback to expressInterest.

Definition at line 37 of file face.hpp.

Definition at line 15 of file regex.hpp.

Enumeration Type Documentation

Enumerator
ACL_TYPE_PUBLIC 
ACL_TYPE_PRIVATE 

Definition at line 41 of file security-common.hpp.

Enumerator
DIGEST_ALGORITHM_SHA256 

Definition at line 28 of file security-common.hpp.

Enumerator
ENCRYPT_MODE_DEFAULT 
ENCRYPT_MODE_CFB_AES 

Definition at line 35 of file security-common.hpp.

Enumerator
KEY_CLASS_PUBLIC 
KEY_CLASS_PRIVATE 
KEY_CLASS_SYMMETRIC 

Definition at line 22 of file security-common.hpp.

Enumerator
KEY_TYPE_RSA 
KEY_TYPE_AES 

Definition at line 13 of file security-common.hpp.

Function Documentation

void ndn::BERDecodeTime ( CryptoPP::BufferedTransformation &  bt,
time::system_clock::TimePoint &  time 
)

Definition at line 36 of file asn_ext.cpp.

Block ndn::booleanBlock ( uint32_t  type)
inline

Definition at line 35 of file block-helpers.hpp.

Block ndn::dataBlock ( uint32_t  type,
const char *  data,
size_t  dataSize 
)
inline

Definition at line 44 of file block-helpers.hpp.

Block ndn::dataBlock ( uint32_t  type,
const unsigned char *  data,
size_t  dataSize 
)
inline

Definition at line 55 of file block-helpers.hpp.

size_t ndn::DecodeValue ( BufferedTransformation &  bt,
word32 &  v 
)
inline

Definition at line 89 of file oid.cpp.

size_t ndn::DEREncodeGeneralTime ( CryptoPP::BufferedTransformation &  bt,
const time::system_clock::TimePoint &  time 
)

Definition at line 20 of file asn_ext.cpp.

void ndn::EncodeValue ( BufferedTransformation &  bt,
word32  v 
)
inline

Definition at line 81 of file oid.cpp.

int ndn::fromHexChar ( uint8_t  c)
inline

Convert the hex character to an integer from 0 to 15, or -1 if not a hex character.

Parameters
c
Returns

Definition at line 92 of file string-helper.hpp.

void ndn::ndn_digestSha256 ( const uint8_t *  data,
size_t  dataLength,
uint8_t *  digest 
)

Compute the sha-256 digest of data.

Parameters
dataPointer to the input byte array.
dataLengthThe length of data.
digestA pointer to a buffer of size crypto::SHA256_DIGEST_SIZE to receive the data.

Definition at line 13 of file crypto.cpp.

Block ndn::nonNegativeIntegerBlock ( uint32_t  type,
uint64_t  value 
)
inline

Definition at line 18 of file block-helpers.hpp.

std::ostream & ndn::operator<< ( std::ostream &  os,
const Interest &  interest 
)

Definition at line 77 of file interest.cpp.

std::ostream & ndn::operator<< ( std::ostream &  os,
const PublicKey &  key 
)

Definition at line 109 of file public-key.cpp.

std::ostream & ndn::operator<< ( std::ostream &  os,
const Exclude &  exclude 
)

Definition at line 146 of file exclude.cpp.

std::ostream& ndn::operator<< ( std::ostream &  os,
const Certificate &  cert 
)
inline

Definition at line 201 of file certificate.hpp.

std::ostream& ndn::operator<< ( std::ostream &  os,
const MetaInfo &  info 
)
inline

Definition at line 211 of file meta-info.hpp.

std::ostream& ndn::operator<< ( std::ostream &  os,
const Name &  name 
)
inline

Definition at line 519 of file name.hpp.

std::ostream& ndn::operator<< ( std::ostream &  os,
const Data &  data 
)
inline

Definition at line 523 of file data.hpp.

std::istream& ndn::operator>> ( std::istream &  is,
Name &  name 
)
inline

Definition at line 544 of file name.hpp.

template<bool P>
size_t ndn::prependBlock ( EncodingImpl< P > &  encoder,
const Block &  block 
)
inline

Definition at line 555 of file encoding-buffer.hpp.

template<bool P>
size_t ndn::prependBooleanBlock ( EncodingImpl< P > &  encoder,
uint32_t  type 
)
inline

Definition at line 532 of file encoding-buffer.hpp.

template<bool P>
size_t ndn::prependByteArrayBlock ( EncodingImpl< P > &  encoder,
uint32_t  type,
const uint8_t *  array,
size_t  arraySize 
)
inline

Definition at line 519 of file encoding-buffer.hpp.

template<bool P, class U >
size_t ndn::prependNestedBlock ( EncodingImpl< P > &  encoder,
uint32_t  type,
const U &  nestedBlock 
)
inline

Definition at line 543 of file encoding-buffer.hpp.

template<bool P>
size_t ndn::prependNonNegativeIntegerBlock ( EncodingImpl< P > &  encoder,
uint32_t  type,
uint64_t  number 
)
inline

helper methods

Definition at line 507 of file encoding-buffer.hpp.

uint64_t ndn::readNonNegativeInteger ( const Block &  block)
inline

Definition at line 28 of file block-helpers.hpp.

static int ndn::sqlite3_bind_text ( sqlite3_stmt *  statement,
int  index,
const string &  value,
void(*)(void *)  destructor 
)
static

A utility function to call the normal sqlite3_bind_text where the value and length are value.c_str() and value.size().

Definition at line 79 of file sec-public-info-sqlite3.cpp.

std::string ndn::toHex ( const uint8_t *  array,
size_t  arraySize 
)
inline

Return the hex representation of the bytes in array.

Parameters
arrayThe array of bytes.
Returns
Hex string.

Definition at line 24 of file string-helper.hpp.

void ndn::trim ( std::string &  str)
inline

Modify str in place to erase whitespace on the left and right.

Parameters
str

Definition at line 80 of file string-helper.hpp.

void ndn::trimLeft ( std::string &  str)
inline

Modify str in place to erase whitespace on the left.

Parameters
str

Definition at line 46 of file string-helper.hpp.

void ndn::trimRight ( std::string &  str)
inline

Modify str in place to erase whitespace on the right.

Parameters
str

Definition at line 63 of file string-helper.hpp.

std::string ndn::unescape ( const std::string &  str)
inline

Return a copy of str, converting each escaped "%XX" to the char value.

Parameters
str

Definition at line 109 of file string-helper.hpp.

Variable Documentation

const time::seconds ndn::DEFAULT_INTEREST_LIFETIME = time::seconds(4)

Definition at line 19 of file interest.hpp.

const string ndn::INIT_CERT_TABLE
static
Initial value:
= "\
CREATE TABLE IF NOT EXISTS \n \
Certificate( \n \
cert_name BLOB NOT NULL, \n \
cert_issuer BLOB NOT NULL, \n \
identity_name BLOB NOT NULL, \n \
key_identifier BLOB NOT NULL, \n \
not_before TIMESTAMP, \n \
not_after TIMESTAMP, \n \
certificate_data BLOB NOT NULL, \n \
valid_flag INTEGER DEFAULT 1, \n \
default_cert INTEGER DEFAULT 0, \n \
\
PRIMARY KEY (cert_name) \n \
); \n \
\
CREATE INDEX cert_index ON Certificate(cert_name); \n \
CREATE INDEX subject ON Certificate(identity_name); \n \
"

Definition at line 55 of file sec-public-info-sqlite3.cpp.

const string ndn::INIT_ID_TABLE
static
Initial value:
= "\
CREATE TABLE IF NOT EXISTS \n \
Identity( \n \
identity_name BLOB NOT NULL, \n \
default_identity INTEGER DEFAULT 0, \n \
\
PRIMARY KEY (identity_name) \n \
); \n \
\
CREATE INDEX identity_index ON Identity(identity_name); \n \
"

Definition at line 27 of file sec-public-info-sqlite3.cpp.

const string ndn::INIT_KEY_TABLE
static
Initial value:
= "\
CREATE TABLE IF NOT EXISTS \n \
Key( \n \
identity_name BLOB NOT NULL, \n \
key_identifier BLOB NOT NULL, \n \
key_type INTEGER, \n \
public_key BLOB, \n \
default_key INTEGER DEFAULT 0, \n \
active INTEGER DEFAULT 0, \n \
\
PRIMARY KEY (identity_name, key_identifier) \n \
); \n \
\
CREATE INDEX key_index ON Key(identity_name); \n \
"

Definition at line 39 of file sec-public-info-sqlite3.cpp.

const size_t ndn::MAX_LENGTH = 9000

Definition at line 14 of file stream-transport.hpp.

OID ndn::RSA_OID("1.2.840.113549.1.1.1")
static
const char* ndn::WHITESPACE_CHARS = " \n\r\t"
static

Definition at line 16 of file string-helper.hpp.