5 #include <cmn/buildinfo.h>
11 namespace opt = boost::program_options;
17 LOG(DEBUG,
"Router ID Dependent modules (Nova and BGP) INITIALIZED");
24 int main(
int argc,
char *argv[]) {
27 const opt::variables_map &var_map = params.var_map();
29 params.ParseArguments(argc, argv);
31 cout <<
"Invalid arguments. ";
32 cout << params.options() << endl;
36 if (var_map.count(
"help")) {
37 cout << params.options() << endl;
41 if (var_map.count(
"version")) {
44 cout << build_info << endl;
48 string init_file =
"";
49 if (var_map.count(
"config_file")) {
50 init_file = var_map[
"config_file"].as<
string>();
52 if (stat(init_file.c_str(), &s) != 0) {
53 LOG(ERROR,
"Error opening config file <" << init_file
54 <<
">. Error number <" << errno <<
">");
60 params.Init(init_file, argv[0]);
68 Agent *agent = init.agent();
74 init.set_agent_param(¶ms);
78 if ((ret = init.Start()) != 0) {
static Agent * GetInstance()
static void Initialize(uint32_t thread_count=0, EventManager *evm=NULL)
static bool GetBuildInfo(BuildModule id, const std::string &build_info, std::string &result)
static void LogVersionInfo(const std::string str, Category::type categ)
VNController * controller() const
EventManager * event_manager() const
#define LOG(_Level, _Msg)
void RouterIdDepInit(Agent *agent)
bool GetBuildInfo(std::string &build_info_str)