32 : m_scheduler(m_ioService)
34 , m_nlsr(m_ioService, m_scheduler, m_face, m_keyChain)
45 if (!configProcessor.processConfFile()) {
46 BOOST_THROW_EXCEPTION(
Error(
"Error in configuration file processing! Exiting from NLSR"));
65 [
this] (std::list<Adjacent>::iterator iterator) {
66 m_nlsr.canonizeContinuation(iterator, [
this] {
76 catch (
const std::exception& e) {
78 std::cerr <<
"ERROR: " << e.what() << std::endl;
87 std::cout <<
"Usage: " << programName <<
" [OPTIONS...]" << std::endl;
88 std::cout <<
" NDN routing...." << std::endl;
89 std::cout <<
" -d Run in daemon mode" << std::endl;
90 std::cout <<
" -f <FILE> Specify configuration file name" << std::endl;
91 std::cout <<
" -V Display version information" << std::endl;
92 std::cout <<
" -h Display this help message" << std::endl;
std::string getConfFileName() const
void INIT_LOG4CXX(const std::string &log4cxxConfPath)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
ConfParameter & getConfParameter()
void setIsDaemonProcess(bool value)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
bool getIsSetDaemonProcess()
const std::string & getLogLevel() const
const std::string & getLog4CxxConfPath() const
#define INIT_LOGGER(name)
void canonizeNeighborUris(std::list< Adjacent >::iterator currentNeighbor, std::function< void(std::list< Adjacent >::iterator)> then, std::function< void(void)> finally)
Canonize the URI for this and all proceeding neighbors in a list.
AdjacencyList & getAdjacencyList()
void clean()
Remove all entries from the FIB.
void setConfFileName(const std::string &fileName)
A class containing methods to parse an NLSR configuration file.
NlsrRunner(std::string &configFileName, bool isDaemonProcess)
bool isLog4CxxConfAvailable() const
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void run()
Instantiate, configure, and start the NLSR process.
static void printUsage(const std::string &programName)
void INIT_LOGGERS(const std::string &logDir, const std::string &logLevel)
#define NLSR_LOG_FATAL(x)
const std::string & getLogDir() const
std::list< Adjacent > & getAdjList()