-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.cpp
56 lines (41 loc) · 764 Bytes
/
main.cpp
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
52
53
54
55
#include <bits/stdc++.h>
#include "CapturePackets.cpp"
using namespace std;
void printUsage()
{
int choice;
printf("Welcome\n");
printf("\t1. Capture packets and analyze it\n");
printf("\t2. Giving a existing file to analyze it\n");
printf("\t3. Exit from the program\n");
printf("\tPress: ");
scanf("%d",&choice);
while(true)
{
if(choice == 1)
{
callCapturePacket(); //CapturePacket.cpp
break;
}
else if(choice == 2)
{
callExitingFile(); //ReadingFile.cpp
break;
}
else if(choice == 3)
{
break;
}
else
{
printf( "-->Please Enter Valid Option<--\n");
printf("\tPress: " );
scanf("%d",&choice);
}
}
}
int main()
{
printUsage(); //Give user the first option
return 0;
}