-
Notifications
You must be signed in to change notification settings - Fork 4
/
optionsManager.h
51 lines (46 loc) · 1.34 KB
/
optionsManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include<stdio.h>
#include <iostream>
#include <string>
#include <unistd.h>
#include <map>
#include <vector>
#include <algorithm> // for copy
#include <iterator>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <list>
#include <sstream>
#include<getopt.h>
#include<errno.h>
#include <fstream>
using namespace std;
class optionsManager {
map<string,string> optionDict;
static optionsManager* m_optManager;
vector<string> scanList;
vector<string> portList;
vector<string> ipList;
public :
void readOptions(int argc,char* argv[]);
static optionsManager* Instance();
string GetStandardUsageOptionScreen();
map<string,string> getOptionDictionary();
void setPeerInfo(int numOfPeers, char * ptrToPeerString);
//vector<char> getpeerInfoList();
list<string> getpeerInfoList();
vector<string> split(string input,char delimiter);
vector<string> getScanList();
void unRollPortRange();
void calculateIPaddresesBitwise(const char *ipWithPrefix);
//void calculateIPaddresesBitwise(string ipWithPrefix);
void printHostAddresses(unsigned long networkAddress, unsigned long broadcastAddress);
void processIPFile(string fContent);
vector<string> getIPList();
vector<string> getPortList();
void deleteAllList();
void deleteSingleTon();
string ReadIPFile(const char* filename);
};