blob: 8448823f675fe2f2f74dcdca7436c234773ea174 [file] [log] [blame]
akmhoque298385a2014-02-13 14:13:09 -06001#ifndef CONF_PROCESSOR_HPP
2#define CONF_PROCESSOR_HPP
3
akmhoque1fd8c1e2014-02-19 19:41:49 -06004#include "nlsr.hpp"
akmhoque298385a2014-02-13 14:13:09 -06005
akmhoque1fd8c1e2014-02-19 19:41:49 -06006namespace nlsr
7{
akmhoqueb1710aa2014-02-19 17:13:36 -06008
akmhoque5a44dd42014-03-12 18:11:32 -05009 using namespace std;
akmhoque298385a2014-02-13 14:13:09 -060010
akmhoque5a44dd42014-03-12 18:11:32 -050011 class ConfFileProcessor
12 {
13 public:
14 ConfFileProcessor()
akmhoque05d5fcf2014-04-15 14:58:45 -050015 :m_confFileName()
akmhoque1fd8c1e2014-02-19 19:41:49 -060016 {
akmhoque5a44dd42014-03-12 18:11:32 -050017 }
18 ConfFileProcessor(const string& cfile)
19 {
akmhoque05d5fcf2014-04-15 14:58:45 -050020 m_confFileName=cfile;
akmhoque5a44dd42014-03-12 18:11:32 -050021 }
akmhoque298385a2014-02-13 14:13:09 -060022
akmhoque5a44dd42014-03-12 18:11:32 -050023 int processConfFile(Nlsr& pnlsr);
akmhoque298385a2014-02-13 14:13:09 -060024
akmhoque5a44dd42014-03-12 18:11:32 -050025 private:
26 int processConfCommand(Nlsr& pnlsr, string command);
27 int processConfCommandNetwork(Nlsr& pnlsr, string command);
28 int processConfCommandSiteName(Nlsr& pnlsr, string command);
29 int processConfCommandRootKeyPrefix(Nlsr& pnlsr, string command);
30 int processConfCommandRouterName(Nlsr& pnlsr, string command);
31 int processConfCommandInterestRetryNumber(Nlsr& pnlsr, string command);
32 int processConfCommandInterestResendTime(Nlsr& pnlsr, string command);
33 int processConfCommandLsaRefreshTime(Nlsr& pnlsr, string command);
34 int processConfCommandMaxFacesPerPrefix(Nlsr& pnlsr, string command);
35 int processConfCommandTunnelType(Nlsr& pnlsr, string command);
akmhoque298385a2014-02-13 14:13:09 -060036
akmhoque5a44dd42014-03-12 18:11:32 -050037 int processConfCommandChronosyncSyncPrefix(Nlsr& pnlsr, string command);
38 int processConfCommandLogDir(Nlsr& pnlsr, string command);
39 int processConfCommandCertDir(Nlsr& pnlsr, string command);
40 int processConfCommandDebugging(Nlsr& pnlsr, string command);
41 int processConfCommandDetailedLogging(Nlsr& pnlsr, string command);
42 int processConfCommandIsHyperbolicCalc(Nlsr& pnlsr, string command);
akmhoque298385a2014-02-13 14:13:09 -060043
akmhoque5a44dd42014-03-12 18:11:32 -050044 int processConfCommandHyperbolicCordinate(Nlsr& pnlsr, string command);
45
46 int processConfCommandNdnNeighbor(Nlsr& pnlsr, string command);
47 int processConfCommandNdnName(Nlsr& pnlsr, string command);
48 int processConfCommandLinkCost(Nlsr& pnlsr, string command);
akmhoque298385a2014-02-13 14:13:09 -060049
akmhoque1fd8c1e2014-02-19 19:41:49 -060050
akmhoque5a44dd42014-03-12 18:11:32 -050051 private:
akmhoque05d5fcf2014-04-15 14:58:45 -050052 string m_confFileName;
akmhoque5a44dd42014-03-12 18:11:32 -050053 };
akmhoque298385a2014-02-13 14:13:09 -060054
akmhoqueb1710aa2014-02-19 17:13:36 -060055} //namespace nlsr
akmhoque298385a2014-02-13 14:13:09 -060056#endif