NLSR - Named Data Link State Routing Protocol 0.4.0 documentation
Main Page
Namespaces
Data Structures
Files
File List
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
main.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#include "
nlsr-runner.hpp
"
23
#include "version.hpp"
24
25
int
26
main
(int32_t argc,
char
** argv)
27
{
28
using namespace
nlsr
;
29
30
std::string programName(argv[0]);
31
32
std::string configFileName =
"nlsr.conf"
;
33
bool
isDaemonProcess =
false
;
34
35
int32_t opt;
36
while
((opt = getopt(argc, argv,
"df:hV"
)) != -1) {
37
switch
(opt) {
38
case
'f'
:
39
configFileName = optarg;
40
break
;
41
case
'd'
:
42
isDaemonProcess =
true
;
43
break
;
44
case
'V'
:
45
std::cout << NLSR_VERSION_BUILD_STRING << std::endl;
46
return
EXIT_SUCCESS;
47
break
;
48
case
'h'
:
49
default
:
50
NlsrRunner::printUsage
(programName);
51
return
EXIT_FAILURE;
52
}
53
}
54
55
NlsrRunner
runner(configFileName, isDaemonProcess);
56
57
try
{
58
runner.
run
();
59
}
60
catch
(
const
std::exception& e) {
61
std::cerr << e.what() << std::endl;
62
return
EXIT_FAILURE;
63
}
64
65
return
EXIT_SUCCESS;
66
}
nlsr::NlsrRunner
A wrapper class to instantiate and configure an NLSR object.
Definition:
nlsr-runner.hpp:44
nlsr-runner.hpp
main
int main(int32_t argc, char **argv)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
Definition:
main.cpp:26
nlsr
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
Definition:
adjacency-list.cpp:30
nlsr::NlsrRunner::run
void run()
Instantiate, configure, and start the NLSR process.
Definition:
nlsr-runner.cpp:41
nlsr::NlsrRunner::printUsage
static void printUsage(const std::string &programName)
Definition:
nlsr-runner.cpp:85
var
lib
ndn-docs
NLSR
src
main.cpp
Generated on Sun Jun 16 2019 01:04:15 for NLSR - Named Data Link State Routing Protocol by
1.8.11