Complete restructuring and addition of core Logging system and dhcp module

This commit is contained in:
Suraxius committed 2021-01-03 22:43:45 +01:00
1 parent 8fa965823a
commit 7fa4d1fc58
49 files changed
+3627 -193

No files matched your search

+21 -2
View File
@@ -1,11 +1,30 @@
#include "ConfigManager.hpp"
#include <iostream>
#include <stdio.h>
#include <unistd.h>
#include <string>
namespace DistriNS {
namespace Plains {
namespace Core {
using std::cout;
using std::endl;
using std::string;
ConfigManager::ConfigManager(int numParameters, char **parameters) {
//Process
// move this to a function that can return an error code?
if ( numParameters <= 1 ) return;
cout << "Interpreting Paremters..." << endl;
for (unsigned i = 0; i < (numParameters-1); ++i) {
string p = string(parameters[i]);
string v = string(parameters[i+1]);
// Check if this parameter is an argument or an argument value:
if ( p.compare(0,1,"-") == 0 ) {
cout << "Interpreting parameter " << p << endl;
if ( ! p.compare("--initial-peer") ) cout << "Peer " << v << " set" << endl;
}
}
}
}}