NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::util Namespace Reference

Namespaces

 ethernet
 
 scheduler
 
 signal
 

Classes

class  CanonizeProvider
 a CanonizeProvider provides FaceUri canonization functionality for a group of schemes More...
 
class  CanonizeProviderTableInitializer
 
class  Digest
 provides a digest calculation More...
 
class  DummyClientFace
 a client-side face for unit testing More...
 
class  EtherCanonizeProvider
 
class  FaceUri
 represents the underlying protocol and address used by a Face More...
 
class  IndentedStream
 Output to stream with specified indent or prefix. More...
 
class  InMemoryStorage
 Represents in-memory storage. More...
 
class  InMemoryStorageEntry
 Represents an in-memory storage entry. More...
 
class  InMemoryStorageFifo
 Provides in-memory storage employing FIFO replacement policy, which is first in first out. More...
 
class  InMemoryStorageLfu
 Provides an in-memory storage with Least Frequently Used (LFU) replacement policy. More...
 
class  InMemoryStorageLru
 Provides in-memory storage employing LRU replacement policy, of which the least recently used entry will be evict first. More...
 
class  InMemoryStoragePersistent
 Provides application cache with persistent storage, of which no replacement policy will be employed. More...
 
class  IpHostCanonizeProvider
 
class  Logger
 represents a logger in logging facility More...
 
struct  LoggerTimestamp
 a tag that writes a timestamp upon stream output More...
 
class  NetworkMonitor
 Network state change monitor. More...
 
class  NotificationStream
 provides a publisher of Notification Stream More...
 
class  NotificationSubscriber
 provides a subscriber of Notification Stream More...
 
class  SegmentFetcher
 Utility class to fetch latest version of the segmented data. More...
 
class  Sqlite3Statement
 wrap an SQLite3 prepared statement More...
 
class  TcpCanonizeProvider
 
class  UdpCanonizeProvider
 
class  UdpDevCanonizeProvider
 

Typedefs

typedef Digest< CryptoPP::SHA256Sha256
 A digest using SHA256 as the hash function. More...
 
typedef boost::mpl::vector< UdpCanonizeProvider *, TcpCanonizeProvider *, EtherCanonizeProvider *, UdpDevCanonizeProvider *> CanonizeProviders
 
typedef std::map< std::string, shared_ptr< CanonizeProvider > > CanonizeProviderTable
 

Enumerations

enum  LogLevel {
  LogLevel::FATAL = -1, LogLevel::NONE = 0, LogLevel::ERROR = 1, LogLevel::WARN = 2,
  LogLevel::INFO = 3, LogLevel::DEBUG = 4, LogLevel::TRACE = 5, LogLevel::ALL = 255
}
 indicates the severity level of a log message More...
 

Functions

template<typename Hash >
std::ostream & operator<< (std::ostream &os, Digest< Hash > &digest)
 
template std::ostream & operator<< (std::ostream &os, Digest< CryptoPP::SHA256 > &digest)
 
template<typename Packet , typename Field , typename Tag >
static void addFieldFromTag (lp::Packet &lpPacket, const Packet &packet)
 
template<>
void DummyClientFace::receive< lp::Nack > (const lp::Nack &nack)
 
std::ostream & operator<< (std::ostream &os, const FaceUri &uri)
 
static const CanonizeProvidergetCanonizeProvider (const std::string &scheme)
 
std::ostream & operator<< (std::ostream &os, LogLevel level)
 output LogLevel as string More...
 
LogLevel parseLogLevel (const std::string &s)
 parse LogLevel from string More...
 
std::ostream & operator<< (std::ostream &os, const LoggerTimestamp &)
 write a timestamp to os More...
 

Variables

const size_t NETLINK_BUFFER_SIZE = 4096
 

Typedef Documentation

◆ Sha256

A digest using SHA256 as the hash function.

Definition at line 211 of file digest.hpp.

◆ CanonizeProviders

◆ CanonizeProviderTable

typedef std::map<std::string, shared_ptr<CanonizeProvider> > ndn::util::CanonizeProviderTable

Definition at line 500 of file face-uri.cpp.

Enumeration Type Documentation

◆ LogLevel

enum ndn::util::LogLevel
strong

indicates the severity level of a log message

Enumerator
FATAL 

fatal (will be logged unconditionally)

NONE 

no messages

ERROR 

serious error messages

WARN 

warning messages

INFO 

informational messages

DEBUG 

debug messages

TRACE 

trace messages (most verbose)

ALL 

all messages

Definition at line 40 of file logger.hpp.

Function Documentation

◆ operator<<() [1/5]

template<typename Hash >
std::ostream & ndn::util::operator<< ( std::ostream &  os,
Digest< Hash > &  digest 
)

Definition at line 160 of file digest.cpp.

References ndn::printHex().

◆ operator<<() [2/5]

template std::ostream& ndn::util::operator<< ( std::ostream &  os,
Digest< CryptoPP::SHA256 > &  digest 
)

◆ addFieldFromTag()

template<typename Packet , typename Field , typename Tag >
static void ndn::util::addFieldFromTag ( lp::Packet lpPacket,
const Packet &  packet 
)
static

Definition at line 222 of file dummy-client-face.cpp.

References ndn::lp::Packet::add().

◆ DummyClientFace::receive< lp::Nack >()

◆ operator<<() [3/5]

std::ostream & ndn::util::operator<< ( std::ostream &  os,
const FaceUri uri 
)

Definition at line 203 of file face-uri.cpp.

◆ getCanonizeProvider()

static const CanonizeProvider* ndn::util::getCanonizeProvider ( const std::string &  scheme)
static

◆ operator<<() [4/5]

std::ostream & ndn::util::operator<< ( std::ostream &  os,
LogLevel  level 
)

output LogLevel as string

Exceptions
std::invalid_argumentunknown level

Definition at line 34 of file logger.cpp.

References ALL, DEBUG, ERROR, FATAL, INFO, NONE, ndn::to_string(), TRACE, and WARN.

◆ parseLogLevel()

LogLevel ndn::util::parseLogLevel ( const std::string &  s)

parse LogLevel from string

Exceptions
std::invalid_argumentunknown level name

Definition at line 59 of file logger.cpp.

References ALL, DEBUG, ERROR, FATAL, INFO, NONE, TRACE, and WARN.

◆ operator<<() [5/5]

std::ostream& ndn::util::operator<< ( std::ostream &  os,
const LoggerTimestamp  
)

write a timestamp to os

Note
This function is thread-safe.

Variable Documentation

◆ NETLINK_BUFFER_SIZE

const size_t ndn::util::NETLINK_BUFFER_SIZE = 4096

Definition at line 32 of file network-monitor-impl-rtnl.hpp.