added more code
This commit is contained in:
30
CPE348/.vscode/launch.json
vendored
Normal file
30
CPE348/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "gcc - Build and debug active file",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${fileDirname}/${fileBasenameNoExtension}",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${fileDirname}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "C/C++: g++ build active file",
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
36
CPE348/.vscode/settings.json
vendored
Normal file
36
CPE348/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"fstream": "cpp",
|
||||
"cmath": "cpp",
|
||||
"array": "cpp",
|
||||
"*.tcc": "cpp",
|
||||
"cctype": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"cwctype": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"vector": "cpp",
|
||||
"exception": "cpp",
|
||||
"functional": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"new": "cpp",
|
||||
"ostream": "cpp",
|
||||
"numeric": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"utility": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"iomanip": "cpp"
|
||||
}
|
||||
}
|
29
CPE348/.vscode/tasks.json
vendored
Normal file
29
CPE348/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: g++ build active file",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"-std=c++11",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}/${fileBasenameNoExtension}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "Task generated by Debugger."
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
BIN
CPE348/ExponentialBackoff.jpg
Normal file
BIN
CPE348/ExponentialBackoff.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 MiB |
43
CPE348/HW4/HW4.code-workspace
Normal file
43
CPE348/HW4/HW4.code-workspace
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": ".."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"files.associations": {
|
||||
"fstream": "cpp",
|
||||
"cmath": "cpp",
|
||||
"array": "cpp",
|
||||
"*.tcc": "cpp",
|
||||
"cctype": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"cwctype": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"vector": "cpp",
|
||||
"exception": "cpp",
|
||||
"functional": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"new": "cpp",
|
||||
"ostream": "cpp",
|
||||
"numeric": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"utility": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"iomanip": "cpp"
|
||||
}
|
||||
}
|
||||
}
|
21
CPE348/HW4/P3A.txt
Normal file
21
CPE348/HW4/P3A.txt
Normal file
@ -0,0 +1,21 @@
|
||||
Iteration # SampleRTT EstimatedRTT Deviation Difference Timeout
|
||||
0 - 4.0000 0.5000 - -
|
||||
1 1.0000 3.6250 0.8125 -3.0000 6.8750
|
||||
2 1.0000 3.2969 1.0391 -2.6250 7.4531
|
||||
3 1.0000 3.0098 1.1963 -2.2969 7.7949
|
||||
4 1.0000 2.7585 1.2980 -2.0098 7.9504
|
||||
5 1.0000 2.5387 1.3555 -1.7585 7.9609
|
||||
6 1.0000 2.3464 1.3784 -1.5387 7.8602
|
||||
7 1.0000 2.1781 1.3744 -1.3464 7.6758
|
||||
8 1.0000 2.0308 1.3499 -1.1781 7.4304
|
||||
9 1.0000 1.9020 1.3100 -1.0308 7.1420
|
||||
10 1.0000 1.7892 1.2590 -0.9020 6.8252
|
||||
11 1.0000 1.6906 1.2003 -0.7892 6.4917
|
||||
12 1.0000 1.6043 1.1366 -0.6906 6.1505
|
||||
13 1.0000 1.5287 1.0700 -0.6043 5.8088
|
||||
14 1.0000 1.4626 1.0024 -0.5287 5.4721
|
||||
15 1.0000 1.4048 0.9349 -0.4626 5.1444
|
||||
16 1.0000 1.3542 0.8686 -0.4048 4.8287
|
||||
17 1.0000 1.3099 0.8043 -0.3542 4.5273
|
||||
18 1.0000 1.2712 0.7425 -0.3099 4.2413
|
||||
19 1.0000 1.2373 0.6836 -0.2712 3.9717
|
22
CPE348/HW4/P3B.txt
Normal file
22
CPE348/HW4/P3B.txt
Normal file
@ -0,0 +1,22 @@
|
||||
Iteration # SampleRTT EstimatedRTT Deviation Difference Timeout
|
||||
0 - 4.0000 1.5000 - -
|
||||
1 1.0000 3.6250 1.6875 -3.0000 10.3750
|
||||
2 1.0000 3.2969 1.8047 -2.6250 10.5156
|
||||
3 1.0000 3.0098 1.8662 -2.2969 10.4746
|
||||
4 1.0000 2.7585 1.8842 -2.0098 10.2952
|
||||
5 1.0000 2.5387 1.8685 -1.7585 10.0125
|
||||
6 1.0000 2.3464 1.8272 -1.5387 9.6553
|
||||
7 1.0000 2.1781 1.7671 -1.3464 9.2466
|
||||
8 1.0000 2.0308 1.6935 -1.1781 8.8048
|
||||
9 1.0000 1.9020 1.6107 -1.0308 8.3446
|
||||
10 1.0000 1.7892 1.5221 -0.9020 7.8775
|
||||
11 1.0000 1.6906 1.4305 -0.7892 7.4125
|
||||
12 1.0000 1.6043 1.3380 -0.6906 6.9562
|
||||
13 1.0000 1.5287 1.2463 -0.6043 6.5138
|
||||
14 1.0000 1.4626 1.1566 -0.5287 6.0889
|
||||
15 1.0000 1.4048 1.0698 -0.4626 5.6841
|
||||
16 1.0000 1.3542 0.9867 -0.4048 5.3010
|
||||
17 1.0000 1.3099 0.9076 -0.3542 4.9405
|
||||
18 1.0000 1.2712 0.8329 -0.3099 4.6029
|
||||
19 1.0000 1.2373 0.7627 -0.2712 4.2881
|
||||
20 1.0000 1.2076 0.6970 -0.2373 3.9958
|
12
CPE348/HW4/P3C.txt
Normal file
12
CPE348/HW4/P3C.txt
Normal file
@ -0,0 +1,12 @@
|
||||
Iteration # SampleRTT EstimatedRTT Deviation Difference Timeout
|
||||
0 - 4.0000 0.5000 - -
|
||||
1 1.0000 3.2500 1.1250 -3.0000 7.7500
|
||||
2 1.0000 2.6875 1.4062 -2.2500 8.3125
|
||||
3 1.0000 2.2656 1.4766 -1.6875 8.1719
|
||||
4 1.0000 1.9492 1.4238 -1.2656 7.6445
|
||||
5 1.0000 1.7119 1.3052 -0.9492 6.9326
|
||||
6 1.0000 1.5339 1.1569 -0.7119 6.1614
|
||||
7 1.0000 1.4005 1.0011 -0.5339 5.4050
|
||||
8 1.0000 1.3003 0.8510 -0.4005 4.7042
|
||||
9 1.0000 1.2253 0.7133 -0.3003 4.0785
|
||||
10 1.0000 1.1689 0.5913 -0.2253 3.5341
|
31
CPE348/HW4/P4A.txt
Normal file
31
CPE348/HW4/P4A.txt
Normal file
@ -0,0 +1,31 @@
|
||||
Iteration # SampleRTT EstimatedRTT TimeOut
|
||||
1 1.0000 1.2500 2.5000
|
||||
2 1.0000 1.1250 2.2500
|
||||
3 1.0000 1.0625 2.1250
|
||||
4 1.0000 1.0312 2.0625
|
||||
5 1.0000 1.0156 2.0312
|
||||
6 5.0000 3.0078 6.0156
|
||||
7 1.0000 2.0039 4.0078
|
||||
8 1.0000 1.5020 3.0039
|
||||
9 1.0000 1.2510 2.5020
|
||||
10 1.0000 1.1255 2.2510
|
||||
11 1.0000 1.0627 2.1255
|
||||
12 5.0000 3.0314 6.0627
|
||||
13 1.0000 2.0157 4.0314
|
||||
14 1.0000 1.5078 3.0157
|
||||
15 1.0000 1.2539 2.5078
|
||||
16 1.0000 1.1270 2.2539
|
||||
17 1.0000 1.0635 2.1270
|
||||
18 5.0000 3.0317 6.0635
|
||||
19 1.0000 2.0159 4.0317
|
||||
20 1.0000 1.5079 3.0159
|
||||
21 1.0000 1.2540 2.5079
|
||||
22 1.0000 1.1270 2.2540
|
||||
23 1.0000 1.0635 2.1270
|
||||
24 5.0000 3.0317 6.0635
|
||||
25 1.0000 2.0159 4.0317
|
||||
26 1.0000 1.5079 3.0159
|
||||
27 1.0000 1.2540 2.5079
|
||||
28 1.0000 1.1270 2.2540
|
||||
29 1.0000 1.0635 2.1270
|
||||
30 5.0000 3.0317 6.0635
|
31
CPE348/HW4/P4B.txt
Normal file
31
CPE348/HW4/P4B.txt
Normal file
@ -0,0 +1,31 @@
|
||||
Iteration # SampleRTT EstimatedRTT TimeOut
|
||||
1 1.0000 1.4000 2.8000
|
||||
2 1.0000 1.3200 2.6400
|
||||
3 1.0000 1.2560 2.5120
|
||||
4 1.0000 1.2048 2.4096
|
||||
5 1.0000 1.1638 2.3277
|
||||
6 5.0000 1.9311 3.8621
|
||||
7 1.0000 1.7449 3.4897
|
||||
8 1.0000 1.5959 3.1918
|
||||
9 1.0000 1.4767 2.9534
|
||||
10 1.0000 1.3814 2.7627
|
||||
11 1.0000 1.3051 2.6102
|
||||
12 5.0000 2.0441 4.0882
|
||||
13 1.0000 1.8353 3.6705
|
||||
14 1.0000 1.6682 3.3364
|
||||
15 1.0000 1.5346 3.0691
|
||||
16 1.0000 1.4277 2.8553
|
||||
17 1.0000 1.3421 2.6842
|
||||
18 5.0000 2.0737 4.1474
|
||||
19 1.0000 1.8590 3.7179
|
||||
20 1.0000 1.6872 3.3743
|
||||
21 1.0000 1.5497 3.0995
|
||||
22 1.0000 1.4398 2.8796
|
||||
23 1.0000 1.3518 2.7037
|
||||
24 5.0000 2.0815 4.1629
|
||||
25 1.0000 1.8652 3.7303
|
||||
26 1.0000 1.6921 3.3843
|
||||
27 1.0000 1.5537 3.1074
|
||||
28 1.0000 1.4430 2.8859
|
||||
29 1.0000 1.3544 2.7087
|
||||
30 5.0000 2.0835 4.1670
|
31
CPE348/HW4/P4C.txt
Normal file
31
CPE348/HW4/P4C.txt
Normal file
@ -0,0 +1,31 @@
|
||||
Iteration # SampleRTT EstimatedRTT TimeOut
|
||||
1 1.0000 1.4500 2.9000
|
||||
2 1.0000 1.4050 2.8100
|
||||
3 1.0000 1.3645 2.7290
|
||||
4 1.0000 1.3280 2.6561
|
||||
5 1.0000 1.2952 2.5905
|
||||
6 5.0000 1.6657 3.3314
|
||||
7 1.0000 1.5991 3.1983
|
||||
8 1.0000 1.5392 3.0785
|
||||
9 1.0000 1.4853 2.9706
|
||||
10 1.0000 1.4368 2.8736
|
||||
11 1.0000 1.3931 2.7862
|
||||
12 5.0000 1.7538 3.5076
|
||||
13 1.0000 1.6784 3.3568
|
||||
14 1.0000 1.6106 3.2211
|
||||
15 1.0000 1.5495 3.0990
|
||||
16 1.0000 1.4946 2.9891
|
||||
17 1.0000 1.4451 2.8902
|
||||
18 5.0000 1.8006 3.6012
|
||||
19 1.0000 1.7205 3.4411
|
||||
20 1.0000 1.6485 3.2970
|
||||
21 1.0000 1.5836 3.1673
|
||||
22 1.0000 1.5253 3.0505
|
||||
23 1.0000 1.4727 2.9455
|
||||
24 5.0000 1.8255 3.6509
|
||||
25 1.0000 1.7429 3.4858
|
||||
26 1.0000 1.6686 3.3373
|
||||
27 1.0000 1.6018 3.2035
|
||||
28 1.0000 1.5416 3.0832
|
||||
29 1.0000 1.4874 2.9749
|
||||
30 5.0000 1.8387 3.6774
|
BIN
CPE348/HW4/p3
Executable file
BIN
CPE348/HW4/p3
Executable file
Binary file not shown.
BIN
CPE348/HW4/p3-back
Executable file
BIN
CPE348/HW4/p3-back
Executable file
Binary file not shown.
64
CPE348/HW4/p3-back.cpp
Normal file
64
CPE348/HW4/p3-back.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <math.h>
|
||||
|
||||
#define MAX_ARRAY_SIZE 1000
|
||||
|
||||
using namespace std;
|
||||
|
||||
void calculations(float deltaVal, float deviationVal, string outputFileName);
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
// calculate part a
|
||||
calculations(0.125, 0.500, "P3A.txt");
|
||||
calculations(0.125, 1.500, "P3B.txt");
|
||||
calculations(0.25, 0.500, "P3C.txt");
|
||||
|
||||
}
|
||||
|
||||
void calculations(float deltaVal, float deviationVal, string outputFileName)
|
||||
{
|
||||
ofstream outputFile;
|
||||
outputFile.open(outputFileName.c_str());
|
||||
// difference = sampleRTT - estimatedRTT
|
||||
// estimatedRTT = estimatedRTT + (delta * difference)
|
||||
// deviation = deviation + delta(|difference| - deviation)
|
||||
// timeOut = mu * estimatedRTT + (phi * deviation)
|
||||
|
||||
float delta = 0.0, mu = 0.0, phi = 0.0; //
|
||||
float difference[MAX_ARRAY_SIZE], estimatedRTT[MAX_ARRAY_SIZE], sampleRTT;
|
||||
float deviation[MAX_ARRAY_SIZE], timeOut = 0.0, tmpDeviation = 0.0, tmpestimateRTT = 0.0;
|
||||
// Values for Jacobson/Karels Algorithim
|
||||
delta = deltaVal;
|
||||
mu = 1.0;
|
||||
phi = 4.0;
|
||||
|
||||
// do-while loop
|
||||
int i = 0;
|
||||
outputFile << "Iteration #\t\tSampleRTT\t\tEstimatedRTT\t\t Deviation\t\tDifference\t\tTimeout\n";
|
||||
do
|
||||
{
|
||||
// initial values
|
||||
if (i == 0)
|
||||
{
|
||||
outputFile << fixed << setprecision(4);
|
||||
estimatedRTT[0] = 4.000;
|
||||
deviation[0] = deviationVal;
|
||||
outputFile << i << "\t\t\t\t - \t\t\t\t\t" << estimatedRTT[0] << "\t\t\t\t" << deviation[0] << "\t\t\t - \t\t\t - \n";
|
||||
i++;
|
||||
}
|
||||
sampleRTT = 1.0000;
|
||||
difference[i] = sampleRTT - estimatedRTT[i-1];
|
||||
// calculate estimatedRTT again
|
||||
estimatedRTT[i] = estimatedRTT[i-1] + (delta * difference[i]);
|
||||
deviation[i] = deviation[i-1] + delta*(fabs(difference[i]) - deviation[i-1]);
|
||||
timeOut = mu * estimatedRTT[i] + (phi * deviation[i]);
|
||||
// "Iteration #\t\tSampleRTT\t\tEstimatedRTT\t\tDeviation\t\tTimeout\n"
|
||||
outputFile << i << "\t\t\t\t" << setw(5) << setfill(' ') << sampleRTT << setw(10) << setfill(' ') << "\t\t" << estimatedRTT[i] << setw(8) << setfill(' ') <<
|
||||
"\t\t" << deviation[i] << setw(3) << setfill(' ') << "\t\t" << difference[i] << setw(8) << setfill(' ') << "\t" << timeOut << endl;
|
||||
i++;
|
||||
} while (timeOut > 4.0);
|
||||
outputFile.close();
|
||||
}
|
63
CPE348/HW4/p3.cpp
Normal file
63
CPE348/HW4/p3.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <math.h>
|
||||
|
||||
#define MAX_ARRAY_SIZE 1000
|
||||
|
||||
using namespace std;
|
||||
|
||||
void calculations(float deltaVal, float deviationVal, string outputFileName);
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
// calculate part a
|
||||
calculations(0.125, 0.500, "P3A.txt");
|
||||
calculations(0.125, 1.500, "P3B.txt");
|
||||
calculations(0.25, 0.500, "P3C.txt");
|
||||
|
||||
}
|
||||
|
||||
void calculations(float deltaVal, float deviationVal, string outputFileName)
|
||||
{
|
||||
ofstream outputFile;
|
||||
outputFile.open(outputFileName.c_str());
|
||||
// difference = sampleRTT - estimatedRTT
|
||||
// estimatedRTT = estimatedRTT + (delta * difference)
|
||||
// deviation = deviation + delta(|difference| - deviation)
|
||||
// timeOut = mu * estimatedRTT + (phi * deviation)
|
||||
|
||||
float delta = 0.0, mu = 0.0, phi = 0.0; //
|
||||
float difference = 0.0, estimatedRTT = 0.0, sampleRTT = 0.0;
|
||||
float deviation = 0.0, timeOut = 0.0, tmpDeviation = 0.0, tmpestimateRTT = 0.0;
|
||||
// Values for Jacobson/Karels Algorithim
|
||||
delta = deltaVal;
|
||||
mu = 1.0;
|
||||
phi = 4.0;
|
||||
|
||||
// do-while loop
|
||||
int i = 0;
|
||||
outputFile << "Iteration #\t\tSampleRTT\t\tEstimatedRTT\t\t Deviation\t\tDifference\t\tTimeout\n";
|
||||
do
|
||||
{
|
||||
// initial values
|
||||
if (i == 0)
|
||||
{
|
||||
outputFile << fixed << setprecision(4);
|
||||
estimatedRTT = 4.000;
|
||||
deviation = deviationVal;
|
||||
outputFile << i << "\t\t\t\t - \t\t\t\t\t" << estimatedRTT << "\t\t\t\t" << deviation << "\t\t\t - \t\t\t - \n";
|
||||
i++;
|
||||
}
|
||||
sampleRTT = 1.0000;
|
||||
difference = sampleRTT - estimatedRTT;
|
||||
// calculate estimatedRTT again
|
||||
estimatedRTT = estimatedRTT + (delta * difference);
|
||||
deviation = deviation + delta*(fabs(difference) - deviation);
|
||||
timeOut = mu * estimatedRTT + (phi * deviation);
|
||||
outputFile << i << "\t\t\t\t" << setw(5) << setfill(' ') << sampleRTT << setw(10) << setfill(' ') << "\t\t" << estimatedRTT << setw(8) << setfill(' ') <<
|
||||
"\t\t" << deviation << setw(3) << setfill(' ') << "\t\t" << difference << setw(8) << setfill(' ') << "\t" << timeOut << endl;
|
||||
i++;
|
||||
} while (timeOut > 4.0);
|
||||
outputFile.close();
|
||||
}
|
BIN
CPE348/HW4/p4
Executable file
BIN
CPE348/HW4/p4
Executable file
Binary file not shown.
42
CPE348/HW4/p4.cpp
Normal file
42
CPE348/HW4/p4.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <math.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void calculations(float alphaVal, string outputFileName);
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
// calculate part a
|
||||
calculations(0.5, "P4A.txt");
|
||||
calculations(0.8, "P4B.txt");
|
||||
calculations(0.9, "P4C.txt");
|
||||
|
||||
}
|
||||
|
||||
void calculations(float alphaVal, string outputFileName)
|
||||
{
|
||||
ofstream outputFile;
|
||||
outputFile.open(outputFileName.c_str());
|
||||
float alpha = alphaVal;
|
||||
outputFile << fixed << setprecision(4);
|
||||
float estimatedRTT = 1.50, sampleRTT = 0.0;
|
||||
float timeOut = 0.0;
|
||||
outputFile << "Iteration #\t\tSampleRTT\t\tEstimatedRTT\t\tTimeOut\n";
|
||||
for (int i = 1; i < 31; i++)
|
||||
{
|
||||
if((i % 6)==0)
|
||||
{
|
||||
sampleRTT = 5.0;
|
||||
}
|
||||
else sampleRTT = 1.0;
|
||||
estimatedRTT = alpha * estimatedRTT + (1 - alpha) * sampleRTT;
|
||||
timeOut = 2 * estimatedRTT;
|
||||
outputFile << i << "\t\t\t\t" << setw(5) << setfill(' ') << sampleRTT << setw(10) << setfill(' ')
|
||||
<< "\t\t" << estimatedRTT << setw(16) << setfill(' ') << timeOut << endl;
|
||||
}
|
||||
|
||||
outputFile.close();
|
||||
}
|
8
CPE348/HW4/test.cpp
Normal file
8
CPE348/HW4/test.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
const char* byteToBitString (value) {
|
||||
char output[9];
|
||||
output[8] = 0;
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
output[7 - i] = (value & (1 << i)) ? '1' : '0';
|
||||
}
|
||||
return output;
|
||||
}
|
BIN
CPE348/IP Checksum.pdf
Normal file
BIN
CPE348/IP Checksum.pdf
Normal file
Binary file not shown.
BIN
CPE348/IP Checksum.xlsm
Normal file
BIN
CPE348/IP Checksum.xlsm
Normal file
Binary file not shown.
BIN
CPE348/IP Checksum.xlsx
Normal file
BIN
CPE348/IP Checksum.xlsx
Normal file
Binary file not shown.
34
CPE348/Project2/.vscode/launch.json
vendored
Normal file
34
CPE348/Project2/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "g++ - Build and debug active file",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${fileDirname}/${fileBasenameNoExtension}",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${fileDirname}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "C/C++: g++ build active file",
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
}
|
||||
]
|
||||
}
|
29
CPE348/Project2/.vscode/tasks.json
vendored
Normal file
29
CPE348/Project2/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: g++ build active file",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"-std=c++11",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}/${fileBasenameNoExtension}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "Task generated by Debugger."
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
BIN
CPE348/Project2/ExponentialBackoff.jpg
Normal file
BIN
CPE348/Project2/ExponentialBackoff.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 MiB |
200
CPE348/Project2/Project2_part1_rn.txt
Normal file
200
CPE348/Project2/Project2_part1_rn.txt
Normal file
@ -0,0 +1,200 @@
|
||||
16482
|
||||
28905
|
||||
26183
|
||||
22666
|
||||
9664
|
||||
26342
|
||||
1587
|
||||
12704
|
||||
4094
|
||||
23596
|
||||
9459
|
||||
3914
|
||||
29436
|
||||
12112
|
||||
14330
|
||||
1337
|
||||
3107
|
||||
31257
|
||||
15633
|
||||
29246
|
||||
25721
|
||||
26178
|
||||
20807
|
||||
20408
|
||||
19472
|
||||
11827
|
||||
25427
|
||||
6293
|
||||
19782
|
||||
25126
|
||||
3492
|
||||
3496
|
||||
21263
|
||||
29675
|
||||
26163
|
||||
30927
|
||||
23250
|
||||
27750
|
||||
10863
|
||||
27344
|
||||
18578
|
||||
20322
|
||||
31258
|
||||
15246
|
||||
32434
|
||||
12820
|
||||
16583
|
||||
2773
|
||||
11310
|
||||
32216
|
||||
32020
|
||||
4263
|
||||
25626
|
||||
20059
|
||||
24672
|
||||
12331
|
||||
31886
|
||||
17331
|
||||
18624
|
||||
18900
|
||||
9689
|
||||
22116
|
||||
22397
|
||||
30952
|
||||
19024
|
||||
15792
|
||||
29111
|
||||
9506
|
||||
10774
|
||||
7206
|
||||
4082
|
||||
29352
|
||||
27528
|
||||
2573
|
||||
11831
|
||||
27195
|
||||
15393
|
||||
28414
|
||||
29968
|
||||
26703
|
||||
27863
|
||||
29220
|
||||
30967
|
||||
20721
|
||||
16511
|
||||
22871
|
||||
284
|
||||
15630
|
||||
7434
|
||||
18909
|
||||
1762
|
||||
17123
|
||||
8257
|
||||
24159
|
||||
15307
|
||||
27281
|
||||
7183
|
||||
11650
|
||||
4019
|
||||
17957
|
||||
18856
|
||||
8102
|
||||
14542
|
||||
13616
|
||||
10675
|
||||
26373
|
||||
8043
|
||||
26068
|
||||
22019
|
||||
5244
|
||||
20004
|
||||
17114
|
||||
1696
|
||||
18203
|
||||
5068
|
||||
18208
|
||||
8306
|
||||
5352
|
||||
1070
|
||||
15740
|
||||
24261
|
||||
2832
|
||||
95
|
||||
32519
|
||||
26992
|
||||
15402
|
||||
27032
|
||||
1407
|
||||
27052
|
||||
31052
|
||||
19365
|
||||
13140
|
||||
6386
|
||||
1139
|
||||
26756
|
||||
17061
|
||||
27512
|
||||
2032
|
||||
10361
|
||||
16763
|
||||
7276
|
||||
30365
|
||||
1110
|
||||
8972
|
||||
15800
|
||||
6178
|
||||
27180
|
||||
24106
|
||||
11530
|
||||
28250
|
||||
7078
|
||||
3024
|
||||
31083
|
||||
7173
|
||||
2775
|
||||
25307
|
||||
22575
|
||||
29807
|
||||
26714
|
||||
16859
|
||||
28091
|
||||
13311
|
||||
29999
|
||||
1709
|
||||
14450
|
||||
23988
|
||||
18770
|
||||
9194
|
||||
26020
|
||||
29132
|
||||
25958
|
||||
528
|
||||
26729
|
||||
27068
|
||||
9500
|
||||
9762
|
||||
478
|
||||
3913
|
||||
1100
|
||||
12008
|
||||
32163
|
||||
8179
|
||||
15032
|
||||
30478
|
||||
15352
|
||||
17807
|
||||
23017
|
||||
5160
|
||||
14847
|
||||
16964
|
||||
22019
|
||||
10170
|
||||
30275
|
||||
19251
|
||||
11880
|
||||
11958
|
||||
10471
|
||||
30650
|
||||
21152
|
||||
3723
|
BIN
CPE348/Project2/Project_2.doc
Normal file
BIN
CPE348/Project2/Project_2.doc
Normal file
Binary file not shown.
BIN
CPE348/Project2/Project_2.pdf
Normal file
BIN
CPE348/Project2/Project_2.pdf
Normal file
Binary file not shown.
BIN
CPE348/Project2/output.txt
Normal file
BIN
CPE348/Project2/output.txt
Normal file
Binary file not shown.
BIN
CPE348/Project2/project2Pt1a
Executable file
BIN
CPE348/Project2/project2Pt1a
Executable file
Binary file not shown.
405
CPE348/Project2/project2Pt1a.cpp
Normal file
405
CPE348/Project2/project2Pt1a.cpp
Normal file
@ -0,0 +1,405 @@
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <random>
|
||||
#include <fstream>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
#define MAX_COLLISIONS 10
|
||||
#define MAX_STATIONS 6
|
||||
|
||||
using namespace std;
|
||||
struct timeSlot {
|
||||
int timeOfTransmission; // time slot
|
||||
int totalCollisions;
|
||||
// stations A;
|
||||
bool collided, transmitted;
|
||||
};
|
||||
|
||||
struct stations {
|
||||
int arrivalTimeSlot; // time slot
|
||||
int collisions;
|
||||
int backoff;
|
||||
timeSlot A;
|
||||
};
|
||||
|
||||
// function that generates the
|
||||
// range of backoff slots
|
||||
//int rangeOfBackoff(int k);
|
||||
|
||||
std::random_device rand_dev;
|
||||
std::mt19937 generator(rand_dev());
|
||||
//std::uniform_int_distribution<int> distr(0, k);
|
||||
int rangeOfBackoff();
|
||||
int array[200];
|
||||
int arrayIndex;
|
||||
int main()
|
||||
{
|
||||
bool didNotCollide, end;
|
||||
int collisionArray[MAX_COLLISIONS];
|
||||
int timeArray[MAX_COLLISIONS];
|
||||
|
||||
int k;
|
||||
// file with numbers
|
||||
string file = "Project2_part1_rn.txt";
|
||||
ifstream inputFile;
|
||||
inputFile.open(file.c_str());
|
||||
bool transmitted;
|
||||
|
||||
int timeIndex = 0;
|
||||
int modOperand;
|
||||
struct stations st[6];
|
||||
int timeSlot=0, numFromFile;
|
||||
const int timeInterval = 512; // time interval in micro seconds
|
||||
|
||||
// strings for precise code
|
||||
string check="Checking time slot: ";
|
||||
string collisionsStr = " collisions: ";
|
||||
string backing = ": backing off to slot ";
|
||||
string dashes = "--------------------------------------------------\n";
|
||||
string stationStr = "\tStation ";
|
||||
// define variables
|
||||
int n, totalCollisions,i;
|
||||
struct timeSlot t[MAX_COLLISIONS];
|
||||
|
||||
|
||||
//int modOperand = pow(2,st[i].collisions);
|
||||
|
||||
// k * timeInterval
|
||||
// begining at t = 0, all stations collide
|
||||
|
||||
while (timeSlot < 10)
|
||||
{
|
||||
if (timeSlot==0)
|
||||
{
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
for (int i = 0; i < MAX_STATIONS; i++)
|
||||
{
|
||||
t[i].totalCollisions++;
|
||||
t[i].timeOfTransmission = i;
|
||||
st[i].arrivalTimeSlot=0; // Arrival Time slot
|
||||
//k= pow(2,st[i].collisions);
|
||||
st[i].collisions = 1;
|
||||
k=1;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[i].backoff = o;
|
||||
if (o==0)
|
||||
{
|
||||
st[i].arrivalTimeSlot=1;
|
||||
t[i].timeOfTransmission=1;
|
||||
timeArray[1]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
timeArray[2]++;
|
||||
st[i].arrivalTimeSlot = 2;
|
||||
}
|
||||
cout << "\tStation " << i << backing << st[i].arrivalTimeSlot << collisionsStr << st[i].collisions << endl;
|
||||
}
|
||||
|
||||
cout << dashes << endl;
|
||||
timeSlot++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int comp = 0; comp < 6; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>=timeSlot){
|
||||
//cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
//cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < MAX_COLLISIONS; i++)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
for (int stationCount = 0; stationCount < MAX_STATIONS; stationCount++)
|
||||
{
|
||||
t[stationCount].transmitted=true;
|
||||
if (stationCount==0)
|
||||
{
|
||||
for (int comp = 0; comp < 6; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>timeSlot){
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
// cout << "TimeArray\t"<<i<<"\t" << timeArray[i] << endl;
|
||||
}
|
||||
|
||||
if (timeSlot==10)
|
||||
{
|
||||
end=true;
|
||||
break;
|
||||
}
|
||||
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
}
|
||||
transmitted==false;
|
||||
if(timeArray[timeSlot]==1 && t[timeSlot].totalCollisions<=1 && st[stationCount].arrivalTimeSlot==timeSlot)//st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].totalCollisions==0 && !t[timeSlot].collided)
|
||||
{
|
||||
t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! ";
|
||||
cout << endl << dashes << endl;
|
||||
end=true;
|
||||
break;
|
||||
transmitted=true;
|
||||
}
|
||||
else if (st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].collided)
|
||||
{
|
||||
// if (t[timeSlot].totalCollisions==1 && timeArray[timeSlot]==1 && t[timeSlot].totalCollisions==0)
|
||||
// {
|
||||
// // t[timeSlot].transmitted=true;
|
||||
// cout << stationStr << stationCount << " Success! " << endl;
|
||||
// cout << "End of program\n";
|
||||
// end = true;
|
||||
// }
|
||||
if (end) break;
|
||||
|
||||
st[stationCount].arrivalTimeSlot++;
|
||||
st[stationCount].collisions++;
|
||||
inputFile >> numFromFile;
|
||||
//array[arrayIndex] = numFromFile;
|
||||
//arrayIndex++;
|
||||
modOperand = pow(2,st[stationCount].collisions);
|
||||
modOperand--;
|
||||
k = numFromFile % modOperand;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[stationCount].backoff = o;
|
||||
st[stationCount].arrivalTimeSlot = st[stationCount].arrivalTimeSlot+st[stationCount].backoff;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
if (timeArray[st[stationCount].arrivalTimeSlot]>1)
|
||||
{
|
||||
t[st[stationCount].arrivalTimeSlot].collided=false;
|
||||
|
||||
}
|
||||
|
||||
cout << "\tStation " << stationCount << backing << st[stationCount].arrivalTimeSlot << collisionsStr << st[stationCount].collisions << endl;
|
||||
}
|
||||
else if (t[timeSlot].totalCollisions==1 && t[timeSlot].transmitted && st[stationCount].arrivalTimeSlot==timeSlot)
|
||||
{
|
||||
//t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! " << endl << dashes << endl;
|
||||
cout << "End of program\n";
|
||||
end = true;
|
||||
}
|
||||
else //if (st[stationCount].arrivalTimeSlot != timeSlot && t[timeSlot].totalCollisions<1 && !t[timeSlot].transmitted)
|
||||
{
|
||||
if (timeArray[timeSlot]==0)
|
||||
{
|
||||
if(stationCount==5)
|
||||
cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (end) break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(stationCount==5)
|
||||
{
|
||||
cout << dashes << endl;
|
||||
// if (t[timeSlot].totalCollisions==0)
|
||||
// {
|
||||
// cout << " NO ATTEMPTS\n";
|
||||
// }
|
||||
|
||||
timeSlot++;
|
||||
for (int comp = 0; comp < 6; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if ((t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>=timeSlot) && t[st[comp].arrivalTimeSlot].totalCollisions>1)
|
||||
{
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
/* if (t[timeSlot].totalCollisions<2 && t[timeSlot].)
|
||||
// {
|
||||
cout << dashes << check << timeSlot << endl << stationStr << stationCount << " Success! " << endl
|
||||
<< dashes;
|
||||
} */
|
||||
// if(transmitted==true) cout << dashes << endl;
|
||||
|
||||
}
|
||||
//timeSlot++;
|
||||
if (timeSlot==9)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (end) break;
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int rangeOfBackoff()
|
||||
{
|
||||
}
|
421
CPE348/Project2/project2Pt1a.cpp.bak
Normal file
421
CPE348/Project2/project2Pt1a.cpp.bak
Normal file
@ -0,0 +1,421 @@
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <random>
|
||||
#include <fstream>
|
||||
#include <stdbool.h>
|
||||
#include<bits/stdc++.h>
|
||||
|
||||
|
||||
#define MAX_COLLISIONS 9
|
||||
#define MAX_STATIONS 6
|
||||
|
||||
using namespace std;
|
||||
struct timeSlot {
|
||||
int timeOfTransmission; // time slot
|
||||
int totalCollisions;
|
||||
// stations A;
|
||||
bool collided, transmitted;
|
||||
};
|
||||
|
||||
struct stations {
|
||||
int arrivalTimeSlot; // time slot
|
||||
int collisions;
|
||||
int backoff;
|
||||
timeSlot A;
|
||||
};
|
||||
|
||||
bool areSame(int a[],int n)
|
||||
{
|
||||
unordered_map<int,int> m;//hash map to store the frequency of every
|
||||
//element
|
||||
|
||||
for(int i=0;i<n;i++)
|
||||
m[a[i]]++;
|
||||
|
||||
if(m.size()==1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// function that generates the
|
||||
// range of backoff slots
|
||||
//int rangeOfBackoff(int k);
|
||||
|
||||
std::random_device rand_dev;
|
||||
std::mt19937 generator(rand_dev());
|
||||
//std::uniform_int_distribution<int> distr(0, k);
|
||||
int rangeOfBackoff();
|
||||
int array[200];
|
||||
int arrayIndex;
|
||||
int main()
|
||||
{
|
||||
bool didNotCollide, end;
|
||||
int collisionArray[MAX_COLLISIONS];
|
||||
int timeArray[MAX_COLLISIONS];
|
||||
|
||||
int k;
|
||||
// file with numbers
|
||||
string file = "Project2_part1_rn.txt";
|
||||
ifstream inputFile;
|
||||
inputFile.open(file.c_str());
|
||||
// while (inputFile) //Read in array
|
||||
// {
|
||||
// if (inputFile.eof())
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
|
||||
// for (int i = 0; i < 200; i++)
|
||||
// {
|
||||
// inputFile >> array[i];
|
||||
// }
|
||||
// }
|
||||
|
||||
int timeIndex = 0;
|
||||
int modOperand;
|
||||
struct stations st[6];
|
||||
int timeSlot=0, numFromFile;
|
||||
const int timeInterval = 512; // time interval in micro seconds
|
||||
|
||||
// strings for precise code
|
||||
string check="Checking time slot: ";
|
||||
string collisionsStr = " collisions: ";
|
||||
string backing = ": backing off to slot ";
|
||||
string dashes = "--------------------------------------------------\n";
|
||||
string stationStr = "\tStation ";
|
||||
// define variables
|
||||
int n, totalCollisions,i;
|
||||
struct timeSlot t[MAX_COLLISIONS];
|
||||
|
||||
|
||||
//int modOperand = pow(2,st[i].collisions);
|
||||
|
||||
// k * timeInterval
|
||||
// begining at t = 0, all stations collide
|
||||
|
||||
while (timeSlot < 10)
|
||||
{
|
||||
if (timeSlot==0)
|
||||
{
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
for (int i = 0; i < MAX_STATIONS; i++)
|
||||
{
|
||||
t[i].totalCollisions++;
|
||||
t[i].timeOfTransmission = i;
|
||||
st[i].arrivalTimeSlot=0; // Arrival Time slot
|
||||
//k= pow(2,st[i].collisions);
|
||||
st[i].collisions = 1;
|
||||
k=1;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[i].backoff = o;
|
||||
if (o==0)
|
||||
{
|
||||
st[i].arrivalTimeSlot=1;
|
||||
t[i].timeOfTransmission=1;
|
||||
}
|
||||
else st[i].arrivalTimeSlot = 2;
|
||||
|
||||
cout << "\tStation " << i << backing << st[i].arrivalTimeSlot << collisionsStr << st[i].collisions << endl;
|
||||
}
|
||||
|
||||
cout << dashes << endl;
|
||||
timeSlot++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int comp = 0; comp < 6; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>=timeSlot){
|
||||
//cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
//cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < MAX_COLLISIONS; i++)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
for (int stationCount = 0; stationCount < MAX_STATIONS; stationCount++)
|
||||
{
|
||||
t[stationCount].transmitted=true;
|
||||
if (stationCount==0)
|
||||
{
|
||||
for (int comp = 0; comp < 6; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>timeSlot){
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
// cout << "TimeArray\t"<<i<<"\t" << timeArray[i] << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
}
|
||||
|
||||
if(/*t[timeSlot].totalCollisions==1*/ timeArray[timeSlot]==1 && t[timeSlot].transmitted && st[stationCount].arrivalTimeSlot==timeSlot)//st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].totalCollisions==0 && !t[timeSlot].collided)
|
||||
{
|
||||
t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! " << endl << dashes << endl;
|
||||
cout << "End of program\n";
|
||||
end = true;
|
||||
|
||||
//timeSlot++;
|
||||
}
|
||||
else if (st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].collided)
|
||||
{
|
||||
// if (t[timeSlot].totalCollisions==1 && timeArray[timeSlot]==1 && t[timeSlot].totalCollisions==0)
|
||||
// {
|
||||
// // t[timeSlot].transmitted=true;
|
||||
// cout << stationStr << stationCount << " Success! " << endl;
|
||||
// cout << "End of program\n";
|
||||
// end = true;
|
||||
// }
|
||||
if (end) break;
|
||||
|
||||
st[stationCount].arrivalTimeSlot++;
|
||||
st[stationCount].collisions++;
|
||||
inputFile >> numFromFile;
|
||||
//array[arrayIndex] = numFromFile;
|
||||
//arrayIndex++;
|
||||
modOperand = pow(2,st[stationCount].collisions);
|
||||
modOperand--;
|
||||
k = numFromFile % modOperand;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[stationCount].backoff = o;
|
||||
st[stationCount].arrivalTimeSlot = st[stationCount].arrivalTimeSlot+st[stationCount].backoff;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
if (timeArray[st[stationCount].arrivalTimeSlot]>1)
|
||||
{
|
||||
t[st[stationCount].arrivalTimeSlot].collided=false;
|
||||
|
||||
}
|
||||
|
||||
cout << "\tStation " << stationCount << backing << st[stationCount].arrivalTimeSlot << collisionsStr << st[stationCount].collisions << endl;
|
||||
}
|
||||
else if (t[timeSlot].totalCollisions==1 && t[timeSlot].transmitted && st[stationCount].arrivalTimeSlot==timeSlot)
|
||||
{
|
||||
//t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! " << endl << dashes << endl;
|
||||
cout << "End of program\n";
|
||||
end = true;
|
||||
}
|
||||
else //if (st[stationCount].arrivalTimeSlot != timeSlot && t[timeSlot].totalCollisions<1 && !t[timeSlot].transmitted)
|
||||
{
|
||||
if (t[timeSlot].totalCollisions==0)
|
||||
{
|
||||
if(stationCount==5)
|
||||
cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (end) break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(stationCount==5)
|
||||
{
|
||||
if (t[timeSlot].totalCollisions==0)
|
||||
{
|
||||
cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
|
||||
timeSlot++;
|
||||
for (int comp = 0; comp < 6; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if ((t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>=timeSlot) && t[st[comp].arrivalTimeSlot].totalCollisions>1)
|
||||
{
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
cout << dashes << endl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
/* if (t[timeSlot].totalCollisions<2 && t[timeSlot].)
|
||||
// {
|
||||
cout << dashes << check << timeSlot << endl << stationStr << stationCount << " Success! " << endl
|
||||
<< dashes;
|
||||
} */
|
||||
}
|
||||
//timeSlot++;
|
||||
if (timeSlot==9)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (end) break;
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int rangeOfBackoff()
|
||||
{
|
||||
}
|
BIN
CPE348/Project2/project2Pt1b
Executable file
BIN
CPE348/Project2/project2Pt1b
Executable file
Binary file not shown.
229
CPE348/Project2/project2Pt1b.cpp
Normal file
229
CPE348/Project2/project2Pt1b.cpp
Normal file
@ -0,0 +1,229 @@
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <random>
|
||||
#include <fstream>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
#define MAX_COLLISIONS 100000
|
||||
#define MAX_STATIONS 6
|
||||
|
||||
using namespace std;
|
||||
struct timeSlot {
|
||||
int timeOfTransmission; // time slot
|
||||
int totalCollisions;
|
||||
// stations A;
|
||||
bool collided, transmitted;
|
||||
};
|
||||
|
||||
struct stations {
|
||||
int arrivalTimeSlot; // time slot
|
||||
int collisions;
|
||||
int backoff;
|
||||
timeSlot A;
|
||||
};
|
||||
|
||||
// function that generates the
|
||||
// range of backoff slots
|
||||
//int rangeOfBackoff(int k);
|
||||
|
||||
std::random_device rand_dev;
|
||||
std::mt19937 generator(rand_dev());
|
||||
//std::uniform_int_distribution<int> distr(0, k);
|
||||
int main()
|
||||
{
|
||||
bool didNotCollide, end;
|
||||
int collisionArray[MAX_COLLISIONS];
|
||||
int timeArray[MAX_COLLISIONS];
|
||||
int transmissions =0;
|
||||
int k = 0;
|
||||
// file with numbers
|
||||
string file = "Project2_part1_rn.txt";
|
||||
ifstream inputFile;
|
||||
inputFile.open(file.c_str());
|
||||
bool transmitted;
|
||||
|
||||
int timeIndex = 0;
|
||||
int modOperand;
|
||||
struct stations st[6];
|
||||
int timeSlot=0, numFromFile;
|
||||
const int timeInterval = 512; // time interval in micro seconds
|
||||
|
||||
// strings for precise code
|
||||
string check="Checking time slot: ";
|
||||
string collisionsStr = " collisions: ";
|
||||
string backing = ": backing off to slot ";
|
||||
string dashes = "--------------------------------------------------\n";
|
||||
string stationStr = "\tStation ";
|
||||
// define variables
|
||||
int n, totalCollisions,i;
|
||||
struct timeSlot t[MAX_COLLISIONS];
|
||||
|
||||
|
||||
//int modOperand = pow(2,st[i].collisions);
|
||||
|
||||
// k * timeInterval
|
||||
// begining at t = 0, all stations collide
|
||||
|
||||
while (timeSlot < MAX_COLLISIONS)
|
||||
{
|
||||
if (timeSlot==0)
|
||||
{
|
||||
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
// add total collisions to station time
|
||||
for (int i = 0; i < MAX_STATIONS; i++)
|
||||
{
|
||||
t[i].totalCollisions++;
|
||||
t[i].timeOfTransmission = i;
|
||||
st[i].arrivalTimeSlot=0; // Arrival Time slot
|
||||
//k= pow(2,st[i].collisions);
|
||||
st[i].collisions = 1;
|
||||
k=1;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[i].backoff = o;
|
||||
if (o==0)
|
||||
{
|
||||
|
||||
st[i].arrivalTimeSlot=1;
|
||||
t[i].timeOfTransmission=1;
|
||||
timeArray[1]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
//t[2].totalCollisions++;
|
||||
timeArray[2]++;
|
||||
st[i].arrivalTimeSlot = 2;
|
||||
}
|
||||
cout << "\tStation " << i << backing << st[i].arrivalTimeSlot << collisionsStr << st[i].collisions << endl;
|
||||
t[st[i].arrivalTimeSlot].totalCollisions++;
|
||||
}
|
||||
|
||||
cout << dashes << endl;
|
||||
timeSlot++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < MAX_COLLISIONS; i++)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
for (int stationCount = 0; stationCount < MAX_STATIONS; stationCount++)
|
||||
{
|
||||
t[stationCount].transmitted=true;
|
||||
if (stationCount==0)
|
||||
{
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
}
|
||||
transmitted==false;
|
||||
if(timeArray[timeSlot]==1 && t[timeSlot].totalCollisions<=2 && st[stationCount].arrivalTimeSlot==timeSlot)//st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].totalCollisions==0 && !t[timeSlot].collided)
|
||||
{
|
||||
t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! ";
|
||||
|
||||
|
||||
transmissions++;
|
||||
if (transmissions>1 && transmissions != 6)
|
||||
{
|
||||
cout << "\t\t<=== Project1b Solution\n";
|
||||
}
|
||||
else if (transmissions==6)
|
||||
{
|
||||
cout << "\t\t<=== Project1b Solution\n" << dashes << endl;
|
||||
end = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "\t\t<=== Project1a Solution\n";
|
||||
}
|
||||
|
||||
|
||||
transmitted=true;
|
||||
|
||||
}
|
||||
else if (st[stationCount].arrivalTimeSlot==timeSlot && timeArray[timeSlot]>1)
|
||||
{
|
||||
// if (t[timeSlot].totalCollisions==1 && timeArray[timeSlot]==1 && t[timeSlot].totalCollisions==0)
|
||||
// {
|
||||
// // t[timeSlot].transmitted=true;
|
||||
// cout << stationStr << stationCount << " Success! " << endl;
|
||||
// cout << "End of program\n";
|
||||
// end = true;
|
||||
// }
|
||||
if (end) break;
|
||||
|
||||
st[stationCount].arrivalTimeSlot++;
|
||||
st[stationCount].collisions++;
|
||||
inputFile >> numFromFile;
|
||||
//array[arrayIndex] = numFromFile;
|
||||
//arrayIndex++;
|
||||
modOperand = pow(2,st[stationCount].collisions);
|
||||
modOperand--;
|
||||
k = numFromFile % modOperand;
|
||||
//uniform_int_distribution<int> distr(0, k);
|
||||
// int o = distr(generator);
|
||||
st[stationCount].backoff = k;
|
||||
st[stationCount].arrivalTimeSlot = st[stationCount].arrivalTimeSlot+st[stationCount].backoff;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
if (timeArray[st[stationCount].arrivalTimeSlot]<=1)
|
||||
{
|
||||
t[st[stationCount].arrivalTimeSlot].collided=false;
|
||||
|
||||
}
|
||||
else
|
||||
t[st[stationCount].arrivalTimeSlot].collided=false;
|
||||
|
||||
cout << "\tStation " << stationCount << backing << st[stationCount].arrivalTimeSlot << collisionsStr << st[stationCount].collisions << endl;
|
||||
t[st[stationCount].arrivalTimeSlot].totalCollisions++;
|
||||
}
|
||||
else if (t[timeSlot].totalCollisions==1 && t[timeSlot].transmitted && st[stationCount].arrivalTimeSlot==timeSlot)
|
||||
{
|
||||
//t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! " << endl << dashes << endl;
|
||||
cout << "End of program\n";
|
||||
end = true;
|
||||
}
|
||||
else //if (st[stationCount].arrivalTimeSlot != timeSlot && t[timeSlot].totalCollisions<1 && !t[timeSlot].transmitted)
|
||||
{
|
||||
if (timeArray[timeSlot]==0)
|
||||
{
|
||||
if(stationCount==5)
|
||||
cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (end) break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(stationCount==5)
|
||||
{
|
||||
cout << dashes << endl;
|
||||
timeSlot++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
/* if (t[timeSlot].totalCollisions<2 && t[timeSlot].)
|
||||
// {
|
||||
cout << dashes << check << timeSlot << endl << stationStr << stationCount << " Success! " << endl
|
||||
<< dashes;
|
||||
} */
|
||||
// if(transmitted==true) cout << dashes << endl;
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
CPE348/Project2/project2Pt1c
Executable file
BIN
CPE348/Project2/project2Pt1c
Executable file
Binary file not shown.
390
CPE348/Project2/project2Pt1c.cpp
Normal file
390
CPE348/Project2/project2Pt1c.cpp
Normal file
@ -0,0 +1,390 @@
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <random>
|
||||
#include <fstream>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define MAX_COLLISIONS 10000
|
||||
#define MAX_STATIONS 5
|
||||
|
||||
using namespace std;
|
||||
struct timeSlot {
|
||||
int timeOfTransmission; // time slot
|
||||
int totalCollisions;
|
||||
// stations A;
|
||||
bool collided, transmitted;
|
||||
};
|
||||
|
||||
struct stations {
|
||||
int arrivalTimeSlot; // time slot
|
||||
int collisions;
|
||||
int backoff;
|
||||
timeSlot A;
|
||||
};
|
||||
|
||||
|
||||
// function that generates the
|
||||
// range of backoff slots
|
||||
//int rangeOfBackoff(int k);
|
||||
|
||||
std::random_device rand_dev;
|
||||
std::mt19937 generator(rand_dev());
|
||||
//std::uniform_int_distribution<int> distr(0, k);
|
||||
|
||||
int main()
|
||||
{
|
||||
bool didNotCollide, end;
|
||||
int collisionArray[MAX_COLLISIONS];
|
||||
int timeArray[MAX_COLLISIONS];
|
||||
|
||||
int k;
|
||||
// file with numbers
|
||||
string file = "Project2_part1_rn.txt";
|
||||
ifstream inputFile;
|
||||
inputFile.open(file.c_str());
|
||||
bool transmitted;
|
||||
int totalTransmitted = 0;
|
||||
int timeIndex = 0;
|
||||
int modOperand =0;
|
||||
struct stations st[6];
|
||||
int timeSlot=0, numFromFile = 0;
|
||||
const int timeInterval = 512; // time interval in micro seconds
|
||||
|
||||
// strings for precise code
|
||||
string check="Checking time slot: ";
|
||||
string collisionsStr = " collisions: ";
|
||||
string backing = ": backing off to slot ";
|
||||
string dashes = "--------------------------------------------------\n";
|
||||
string stationStr = "\tStation ";
|
||||
// define variables
|
||||
int n, totalCollisions,i;
|
||||
struct timeSlot t[MAX_COLLISIONS];
|
||||
|
||||
|
||||
//int modOperand = pow(2,st[i].collisions);
|
||||
|
||||
// k * timeInterval
|
||||
// begining at t = 0, all stations collide
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (timeSlot==0)
|
||||
{
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
for (int i = 0; i < MAX_STATIONS; i++)
|
||||
{
|
||||
t[i].totalCollisions++;
|
||||
t[i].timeOfTransmission = i;
|
||||
st[i].arrivalTimeSlot=0; // Arrival Time slot
|
||||
//k= pow(2,st[i].collisions);
|
||||
st[i].collisions = 1;
|
||||
k=1;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[i].backoff = o;
|
||||
if (o==0)
|
||||
{
|
||||
st[i].arrivalTimeSlot=1;
|
||||
t[i].timeOfTransmission=1;
|
||||
timeArray[1]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
timeArray[2]++;
|
||||
st[i].arrivalTimeSlot = 2;
|
||||
}
|
||||
cout << "\tStation " << i << backing << st[i].arrivalTimeSlot << collisionsStr << st[i].collisions << endl;
|
||||
}
|
||||
|
||||
cout << dashes << endl;
|
||||
timeSlot++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int comp = 0; comp < 5; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
else if (t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>=timeSlot){
|
||||
//cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
//cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < MAX_COLLISIONS; i++)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
for (int stationCount = 0; stationCount < MAX_STATIONS; stationCount++)
|
||||
{
|
||||
t[stationCount].transmitted=true;
|
||||
if (stationCount==0)
|
||||
{
|
||||
for (int comp = 0; comp < MAX_STATIONS; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>timeSlot){
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
// cout << "TimeArray\t"<<i<<"\t" << timeArray[i] << endl;
|
||||
}
|
||||
|
||||
|
||||
//stationCount++;
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
}
|
||||
transmitted==false;
|
||||
if(timeArray[timeSlot]==1 && t[timeSlot].totalCollisions<=1 && st[stationCount].arrivalTimeSlot==timeSlot)//st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].totalCollisions==0 && !t[timeSlot].collided)
|
||||
{
|
||||
t[timeSlot].transmitted=true;
|
||||
cout << stationStr << stationCount << " Success! " << endl << dashes << endl;
|
||||
st[stationCount].arrivalTimeSlot=+2;
|
||||
st[stationCount].collisions=0;
|
||||
st[stationCount].A.transmitted==true;
|
||||
totalTransmitted++;
|
||||
transmitted=true;
|
||||
}
|
||||
else if (st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].collided)
|
||||
{
|
||||
// if (t[timeSlot].totalCollisions==1 && timeArray[timeSlot]==1 && t[timeSlot].totalCollisions==0)
|
||||
// {
|
||||
// // t[timeSlot].transmitted=true;
|
||||
// cout << stationStr << stationCount << " Success! " << endl;
|
||||
// cout << "End of program\n";
|
||||
// end = true;
|
||||
// }
|
||||
if (end) break;
|
||||
|
||||
st[stationCount].arrivalTimeSlot++;
|
||||
st[stationCount].collisions++;
|
||||
inputFile >> numFromFile;
|
||||
//array[arrayIndex] = numFromFile;
|
||||
//arrayIndex++;
|
||||
modOperand = pow(2,st[stationCount].collisions);
|
||||
modOperand--;
|
||||
k = numFromFile % modOperand;
|
||||
uniform_int_distribution<int> distr(0, k);
|
||||
int o = distr(generator);
|
||||
st[stationCount].backoff = o;
|
||||
st[stationCount].arrivalTimeSlot = st[stationCount].arrivalTimeSlot+st[stationCount].backoff;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
if (timeArray[st[stationCount].arrivalTimeSlot]>1)
|
||||
{
|
||||
t[st[stationCount].arrivalTimeSlot].collided=false;
|
||||
|
||||
}
|
||||
st[stationCount].A.transmitted=false;
|
||||
cout << "\tStation " << stationCount << backing << st[stationCount].arrivalTimeSlot << collisionsStr << st[stationCount].collisions << endl;
|
||||
if (stationCount==MAX_STATIONS-1 && st[MAX_STATIONS-1].arrivalTimeSlot==timeSlot)
|
||||
{
|
||||
cout << dashes << endl;
|
||||
}
|
||||
|
||||
}
|
||||
else if (t[timeSlot].totalCollisions==1 && t[timeSlot].transmitted && st[stationCount].arrivalTimeSlot==timeSlot)
|
||||
{
|
||||
// //t[timeSlot].transmitted=true;
|
||||
// cout << stationStr << stationCount << " Success! " << endl << dashes << endl;
|
||||
// cout << "End of program\n";
|
||||
// end = true;
|
||||
}
|
||||
else //if (st[stationCount].arrivalTimeSlot != timeSlot && t[timeSlot].totalCollisions<1 && !t[timeSlot].transmitted)
|
||||
{
|
||||
if (timeArray[timeSlot]==0)
|
||||
{
|
||||
if(stationCount==4)
|
||||
cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (end) break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(stationCount == MAX_STATIONS-1)
|
||||
{
|
||||
//if(st[stationCount].A.transmitted==false) cout << dashes << endl;
|
||||
timeSlot++;
|
||||
for (int comp = 0; comp < 5; comp++)
|
||||
{
|
||||
if (st[comp].arrivalTimeSlot==st[comp+1].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+1].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+1].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+2].arrivalTimeSlot && st[comp].arrivalTimeSlot>=timeSlot && st[comp+2].arrivalTimeSlot>=timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+2].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+3].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+3].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+3].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+4].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+4].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+4].arrivalTimeSlot].collided=true;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// timeArray[st[comp].arrivalTimeSlot]++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if (st[comp].arrivalTimeSlot==st[comp+5].arrivalTimeSlot && st[comp].arrivalTimeSlot>timeSlot && st[comp+5].arrivalTimeSlot>timeSlot)
|
||||
{
|
||||
t[st[comp].arrivalTimeSlot].collided=true;
|
||||
t[st[comp+5].arrivalTimeSlot].collided=true;
|
||||
//timeArray[st[comp].arrivalTimeSlot]++;
|
||||
t[st[comp].arrivalTimeSlot].totalCollisions++;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\ttrue" << endl;
|
||||
}
|
||||
if ((t[st[comp].arrivalTimeSlot].collided=true || st[comp].arrivalTimeSlot>=timeSlot) && t[st[comp].arrivalTimeSlot].totalCollisions>1)
|
||||
{
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tcontinue" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
t[st[comp].arrivalTimeSlot].collided=false;
|
||||
// cout << comp << "\t" << st[comp].arrivalTimeSlot << "\tfalse" << endl;
|
||||
|
||||
}
|
||||
}
|
||||
if (st[MAX_STATIONS-1].A.transmitted==false)
|
||||
{
|
||||
cout << dashes <<endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
/* if (t[timeSlot].totalCollisions<2 && t[timeSlot].)
|
||||
// {
|
||||
cout << dashes << check << timeSlot << endl << stationStr << stationCount << " Success! " << endl
|
||||
<< dashes;
|
||||
} */
|
||||
//if(transmitted==false) cout << dashes << endl;
|
||||
|
||||
}
|
||||
}
|
||||
if (end) break;
|
||||
|
||||
}
|
||||
}
|
BIN
CPE348/Project2/project2PtAB
Executable file
BIN
CPE348/Project2/project2PtAB
Executable file
Binary file not shown.
141
CPE348/Project2/project2PtAB.cpp
Normal file
141
CPE348/Project2/project2PtAB.cpp
Normal file
@ -0,0 +1,141 @@
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
#define MAX_TIME 100000
|
||||
#define MAX_STATIONS 6
|
||||
|
||||
using namespace std;
|
||||
struct timeSlot {
|
||||
int timeOfTransmission; // time slot
|
||||
int totalCollisions;
|
||||
// stations A;
|
||||
bool collided, transmitted;
|
||||
};
|
||||
|
||||
struct stations {
|
||||
int arrivalTimeSlot; // time slot
|
||||
int collisions;
|
||||
int backoff;
|
||||
timeSlot A;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
bool end;
|
||||
int timeArray[MAX_TIME];
|
||||
int transmissions =0;
|
||||
int k = 0;
|
||||
// file with numbers
|
||||
string file = "Project2_part1_rn.txt";
|
||||
ifstream inputFile;
|
||||
inputFile.open(file.c_str());
|
||||
int modOperand = 0;
|
||||
struct stations st[6];
|
||||
int timeSlot=0, numFromFile = 0;
|
||||
const double timeInterval = 51.2; // time interval in micro seconds
|
||||
|
||||
// strings for precise code
|
||||
string check="Checking time slot: ";
|
||||
string collisionsStr = " collisions: ";
|
||||
string backing = ": backing off to slot ";
|
||||
string dashes = "--------------------------------------------------\n";
|
||||
string stationStr = "\tStation ";
|
||||
// define variables
|
||||
struct timeSlot t[MAX_TIME];
|
||||
|
||||
|
||||
//int modOperand = pow(2,st[stationCount].collisions);
|
||||
|
||||
// k * timeInterval
|
||||
// begining at t = 0, all stations collide
|
||||
|
||||
|
||||
for (int i = 0; i < MAX_TIME; i++)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
for (int stationCount = 0; stationCount < MAX_STATIONS; stationCount++)
|
||||
{
|
||||
t[stationCount].transmitted=true;
|
||||
if (stationCount==0)
|
||||
{
|
||||
cout << dashes << check << timeSlot << endl;
|
||||
}
|
||||
// no station has collided and will transmit
|
||||
if(timeArray[timeSlot]==1 && t[timeSlot].totalCollisions<=2 && st[stationCount].arrivalTimeSlot==timeSlot)//st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].totalCollisions==0 && !t[timeSlot].collided)
|
||||
{
|
||||
t[timeSlot].transmitted=true;
|
||||
|
||||
|
||||
transmissions++;
|
||||
if (transmissions==1)
|
||||
{
|
||||
//cout << stationStr << stationCount << " Success! ";
|
||||
cout << "Station " << stationCount << " has successfully transmitted\n" <<
|
||||
"in slot number " << timeSlot << " which is " << timeInterval*timeSlot << " micro seconds";
|
||||
cout << "\t\t<====\tSolution Part1a and Partb \n";
|
||||
}
|
||||
else if (transmissions==6)
|
||||
{
|
||||
//cout << stationStr << stationCount << " Success! ";
|
||||
cout << "Station " << stationCount << " has successfully transmitted\n" <<
|
||||
"in slot number " << timeSlot << " which is " << timeInterval*timeSlot << " micro seconds";
|
||||
cout << "\t\t<====\tSolution Part1b \n" << dashes << endl;
|
||||
end = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
//cout << stationStr << stationCount << " Success! ";
|
||||
cout << "Station " << stationCount << " has successfully transmitted\n" <<
|
||||
"in slot number " << timeSlot << " which is " << timeInterval*timeSlot << " micro seconds";
|
||||
cout << "\t\t<==== \tSolution Part1b\n";
|
||||
}
|
||||
}
|
||||
// Two or more stations have collided
|
||||
else if (st[stationCount].arrivalTimeSlot==timeSlot || timeSlot==0)
|
||||
{
|
||||
// initialize values to zero
|
||||
if (timeSlot==0)
|
||||
{
|
||||
st[stationCount].arrivalTimeSlot = 0;
|
||||
st[stationCount].backoff = 0;
|
||||
st[stationCount].collisions = 0;
|
||||
}
|
||||
st[stationCount].arrivalTimeSlot++;
|
||||
st[stationCount].collisions++;
|
||||
inputFile >> numFromFile;
|
||||
modOperand = pow(2,st[stationCount].collisions);
|
||||
k = numFromFile % modOperand;
|
||||
st[stationCount].backoff = k;
|
||||
st[stationCount].arrivalTimeSlot = st[stationCount].arrivalTimeSlot+st[stationCount].backoff;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
cout << "\tStation " << stationCount << backing << st[stationCount].arrivalTimeSlot << collisionsStr << st[stationCount].collisions << endl;
|
||||
t[st[stationCount].arrivalTimeSlot].totalCollisions++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timeArray[timeSlot]==0)
|
||||
{
|
||||
if(stationCount==5)
|
||||
cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (end) break;
|
||||
if(stationCount==5)
|
||||
{
|
||||
cout << dashes << endl;
|
||||
timeSlot++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
}
|
||||
|
||||
}
|
BIN
CPE348/Project2/project2PtC
Executable file
BIN
CPE348/Project2/project2PtC
Executable file
Binary file not shown.
140
CPE348/Project2/project2PtC.cpp
Normal file
140
CPE348/Project2/project2PtC.cpp
Normal file
@ -0,0 +1,140 @@
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
#define MAX_TIME 100000
|
||||
#define MAX_STATIONS 5
|
||||
|
||||
using namespace std;
|
||||
struct timeSlot {
|
||||
int timeOfTransmission; // time slot
|
||||
int totalCollisions;
|
||||
// stations A;
|
||||
bool collided, transmitted;
|
||||
};
|
||||
|
||||
struct stations {
|
||||
int arrivalTimeSlot; // time slot
|
||||
int collisions;
|
||||
int packetsTransmitted;
|
||||
int backoff;
|
||||
timeSlot A;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
bool end = false;
|
||||
int timeArray[MAX_TIME];
|
||||
int k = 0;
|
||||
// file with numbers
|
||||
string file = "Project2_part1_rn.txt";
|
||||
ifstream inputFile;
|
||||
inputFile.open(file.c_str());
|
||||
int firstTransmissions = 0;
|
||||
int modOperand = 0;
|
||||
struct stations st[6];
|
||||
int timeSlot=0, numFromFile =0;
|
||||
const double timeInterval = 51.2; // time interval in micro seconds
|
||||
|
||||
// strings for precise code
|
||||
string check="Checking time slot: ";
|
||||
string collisionsStr = " collisions: ";
|
||||
string backing = ": backing off to slot ";
|
||||
string dashes = "--------------------------------------------------\n";
|
||||
string stationStr = "\tStation ";
|
||||
// define variables
|
||||
struct timeSlot t[MAX_TIME];
|
||||
|
||||
|
||||
//int modOperand = pow(2,st[stationCount].collisions);
|
||||
|
||||
// k * timeInterval
|
||||
// begining at t = 0, all stations collide
|
||||
|
||||
|
||||
for (int i = 0; i < MAX_TIME; i++)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
for (int stationCount = 0; stationCount < MAX_STATIONS; stationCount++)
|
||||
{
|
||||
if (stationCount==0)
|
||||
{
|
||||
//cout << dashes << check << timeSlot << endl;
|
||||
}
|
||||
// station is going to transmit
|
||||
if(timeArray[timeSlot]==1 && st[stationCount].arrivalTimeSlot==timeSlot)//st[stationCount].arrivalTimeSlot==timeSlot && t[timeSlot].totalCollisions==0 && !t[timeSlot].collided)
|
||||
{
|
||||
t[timeSlot].transmitted=true;
|
||||
|
||||
st[stationCount].packetsTransmitted++;
|
||||
if (st[stationCount].packetsTransmitted==1)
|
||||
{
|
||||
firstTransmissions++;
|
||||
}
|
||||
|
||||
// the last station transmits
|
||||
if (firstTransmissions == 5 && st[stationCount].packetsTransmitted == 1)
|
||||
{
|
||||
cout << "\n****************************************************\n" << "Part1c: \n";
|
||||
cout << "****************************************************\n";
|
||||
cout << check << timeSlot << endl;
|
||||
cout << "Station " << stationCount << " has successfully transmitted\n" <<
|
||||
"in slot number " << timeSlot << " which is " << timeInterval*timeSlot << " micro seconds\n";
|
||||
end = true;
|
||||
break;
|
||||
}
|
||||
st[stationCount].arrivalTimeSlot=st[stationCount].arrivalTimeSlot+3;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
//t[st[stationCount].arrivalTimeSlot].totalCollisions++;
|
||||
st[stationCount].collisions=0;
|
||||
// cout << stationStr << stationCount << " Success! \n";
|
||||
}
|
||||
// Two or more stations have collided
|
||||
else if (st[stationCount].arrivalTimeSlot==timeSlot || timeSlot==0)
|
||||
{
|
||||
// initialize values to zero
|
||||
if (timeSlot==0)
|
||||
{
|
||||
st[stationCount].arrivalTimeSlot = 0;
|
||||
st[stationCount].backoff = 0;
|
||||
st[stationCount].collisions = 0;
|
||||
st[stationCount].packetsTransmitted = 0;
|
||||
}
|
||||
|
||||
st[stationCount].arrivalTimeSlot++;
|
||||
st[stationCount].collisions++;
|
||||
inputFile >> numFromFile;
|
||||
modOperand = pow(2,st[stationCount].collisions);
|
||||
k = numFromFile % modOperand;
|
||||
st[stationCount].backoff = k;
|
||||
st[stationCount].arrivalTimeSlot = st[stationCount].arrivalTimeSlot+st[stationCount].backoff;
|
||||
timeArray[st[stationCount].arrivalTimeSlot]++;
|
||||
// cout << "\tStation " << stationCount << backing << st[stationCount].arrivalTimeSlot << collisionsStr << st[stationCount].collisions << endl;
|
||||
t[st[stationCount].arrivalTimeSlot].totalCollisions++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timeArray[timeSlot]==0)
|
||||
{
|
||||
|
||||
// cout << " NO ATTEMPTS\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (end) break;
|
||||
if(stationCount==4)
|
||||
{
|
||||
//cout << dashes << endl;
|
||||
timeSlot++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (end) break;
|
||||
}
|
||||
|
||||
}
|
70
CPE348/Project2/submission sample.txt
Normal file
70
CPE348/Project2/submission sample.txt
Normal file
@ -0,0 +1,70 @@
|
||||
--------------------------------------------------
|
||||
Checking time slot: 0
|
||||
station 0: backing off to slot 1 collisions: 1
|
||||
station 1: backing off to slot 2 collisions: 1
|
||||
station 2: backing off to slot 2 collisions: 1
|
||||
station 3: backing off to slot 1 collisions: 1
|
||||
station 4: backing off to slot 1 collisions: 1
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 1
|
||||
station 0: backing off to slot 4 collisions: 2
|
||||
station 3: backing off to slot 5 collisions: 2
|
||||
station 4: backing off to slot 2 collisions: 2
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 2
|
||||
station 1: backing off to slot 5 collisions: 2
|
||||
station 2: backing off to slot 3 collisions: 2
|
||||
station 4: backing off to slot 6 collisions: 3
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 3
|
||||
station 2: success! <========= Solution Part1b
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 4
|
||||
station 0: success! <========= Solution Part1a & Part1b
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 5
|
||||
station 1: backing off to slot 2 collisions: 3
|
||||
station 3: backing off to slot 3 collisions: 3
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 6
|
||||
station 4: success! <========= Solution Part1b
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 7
|
||||
NO ATTEMPTS
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 8
|
||||
station 1: success! <========= Solution Part1b
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
Checking time slot: 9
|
||||
station 3: success! <========= Solution Part1b
|
||||
--------------------------------------------------
|
||||
|
||||
|
||||
|
||||
****************************************************
|
||||
Par1c:
|
||||
****************************************************
|
||||
Checking time slot: 135
|
||||
Station 3 has successfully transmitted
|
||||
in slot number 135 which is 6,912 micro seconds
|
||||
|
||||
|
||||
|
BIN
CPE348/Project2/t
Executable file
BIN
CPE348/Project2/t
Executable file
Binary file not shown.
14
CPE348/Project2/t.cpp
Normal file
14
CPE348/Project2/t.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include <random>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
const int range_from = 0;
|
||||
const int range_to = 1;
|
||||
std::random_device rand_dev;
|
||||
std::mt19937 generator(rand_dev());
|
||||
std::uniform_int_distribution<int> distr(range_from, range_to);
|
||||
|
||||
std::cout << distr(generator) << '\n';
|
||||
return 0;
|
||||
}
|
BIN
CPE348/Project3/Project3_wireshark.docx
Normal file
BIN
CPE348/Project3/Project3_wireshark.docx
Normal file
Binary file not shown.
9
CPE348/Project3/packets.c
Normal file
9
CPE348/Project3/packets.c
Normal file
@ -0,0 +1,9 @@
|
||||
"4","0.026477","192.168.1.102","128.119.245.12","TCP","619","1161 → 80 [PSH, ACK] Seq=1 Ack=1 Win=17520 Len=565"
|
||||
"5","0.041737","192.168.1.102","128.119.245.12","TCP","1514","1161 → 80 [PSH, ACK] Seq=566 Ack=1 Win=17520 Len=1460"
|
||||
"6","0.053937","128.119.245.12","192.168.1.102","TCP","60","80 → 1161 [ACK] Seq=1 Ack=566 Win=6780 Len=0"
|
||||
"7","0.054026","192.168.1.102","128.119.245.12","TCP","1514","1161 → 80 [ACK] Seq=2026 Ack=1 Win=17520 Len=1460"
|
||||
"8","0.054690","192.168.1.102","128.119.245.12","TCP","1514","1161 → 80 [ACK] Seq=3486 Ack=1 Win=17520 Len=1460"
|
||||
"9","0.077294","128.119.245.12","192.168.1.102","TCP","60","80 → 1161 [ACK] Seq=1 Ack=2026 Win=8760 Len=0"
|
||||
"10","0.077405","192.168.1.102","128.119.245.12","TCP","1514","1161 → 80 [ACK] Seq=4946 Ack=1 Win=17520 Len=1460"
|
||||
"11","0.078157","192.168.1.102","128.119.245.12","TCP","1514","1161 → 80 [ACK] Seq=6406 Ack=1 Win=17520 Len=1460"
|
||||
"12","0.124085","128.119.245.12","192.168.1.102","TCP","60","80 → 1161 [ACK] Seq=1 Ack=3486 Win=11680 Len=0"
|
14
CPE348/Project3/packets.csv
Normal file
14
CPE348/Project3/packets.csv
Normal file
@ -0,0 +1,14 @@
|
||||
4,0.026477,192.168.1.102,128.119.245.12,TCP,619,"1161 → 80 [PSH, ACK] Seq=1 Ack=1 Win=17520 Len=565",,,,,,,
|
||||
5,0.041737,192.168.1.102,128.119.245.12,TCP,1514,"1161 → 80 [PSH, ACK] Seq=566 Ack=1 Win=17520 Len=1460",,,,,,,
|
||||
6,0.053937,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=566 Win=6780 Len=0,,,,Segment,RTT,Estimated RTT,alpha
|
||||
7,0.054026,192.168.1.102,128.119.245.12,TCP,1514,1161 → 80 [ACK] Seq=2026 Ack=1 Win=17520 Len=1460,,,,1,0.02746,0.02746,0.125
|
||||
8,0.05469,192.168.1.102,128.119.245.12,TCP,1514,1161 → 80 [ACK] Seq=3486 Ack=1 Win=17520 Len=1460,,,,2,0.035557,0.034544875,0.125
|
||||
9,0.077294,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=2026 Win=8760 Len=0,,,,3,0.070059,0.065619734,0.125
|
||||
10,0.077405,192.168.1.102,128.119.245.12,TCP,1514,1161 → 80 [ACK] Seq=4946 Ack=1 Win=17520 Len=1460,,,,4,0.114428,0.108326967,0.125
|
||||
11,0.078157,192.168.1.102,128.119.245.12,TCP,1514,1161 → 80 [ACK] Seq=6406 Ack=1 Win=17520 Len=1460,,,,5,0.139894,0.135948121,0.125
|
||||
12,0.124085,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=3486 Win=11680 Len=0,,,,6,0.189645,0.18293289,0.125
|
||||
13,0.124185,192.168.1.102,128.119.245.12,TCP,1201,"1161 → 80 [PSH, ACK] Seq=7866 Ack=1 Win=17520 Len=1147",,,,,,,
|
||||
14,0.169118,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=4946 Win=14600 Len=0,,,,,,,
|
||||
15,0.217299,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=6406 Win=17520 Len=0,,,,,,,
|
||||
16,0.267802,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=7866 Win=20440 Len=0,,,,,,,
|
||||
17,0.304807,128.119.245.12,192.168.1.102,TCP,60,80 → 1161 [ACK] Seq=1 Ack=9013 Win=23360 Len=0,,,,,,,
|
|
BIN
CPE348/Project3/packets.pdf
Normal file
BIN
CPE348/Project3/packets.pdf
Normal file
Binary file not shown.
428
CPE348/Project3/packets.txt
Normal file
428
CPE348/Project3/packets.txt
Normal file
@ -0,0 +1,428 @@
|
||||
|Time | 192.168.1.102 | Intel_52:2b:23 | LinksysG_da:af:73 | 192.168.1.1 |
|
||||
| | | 128.119.245.12 | | Broadcast | | 192.168.1.100 | | 199.2.53.206 |
|
||||
|0.000000 | 1161 → 80 [SYN] Seq= | | | | | | |TCP: 1161 → 80 [SYN] Seq=0 Win=16384 Len=0 MSS=1460 SACK_PERM=1
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.023172 | 80 → 1161 [SYN, ACK] | | | | | | |TCP: 80 → 1161 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 SACK_PERM=1
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.023265 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=1 Ack=1 Win=17520 Len=0
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.026477 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=1 Ack=1 Win=17520 Len=565
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.041737 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=566 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.053937 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=566 Win=6780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.054026 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=2026 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.054690 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=3486 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.077294 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=2026 Win=8760 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.077405 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=4946 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.078157 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=6406 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.124085 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=3486 Win=11680 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.124185 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=7866 Ack=1 Win=17520 Len=1147
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.169118 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=4946 Win=14600 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.217299 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=6406 Win=17520 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.267802 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=7866 Win=20440 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.304807 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=9013 Win=23360 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.305040 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=9013 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.305813 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=10473 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.306692 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=11933 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.307571 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=13393 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.308699 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=14853 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.309553 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=16313 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.356437 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=10473 Win=26280 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.400164 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=11933 Win=29200 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.448613 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=13393 Win=32120 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.500029 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=14853 Win=35040 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.545052 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=16313 Win=37960 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.576417 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=17205 Win=37960 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.576671 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=17205 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.577385 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=18665 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.578329 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=20125 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.579195 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=21585 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.580149 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=23045 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.581074 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=24505 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.626496 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=18665 Win=40880 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.672796 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=20125 Win=43800 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.730684 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=21585 Win=46720 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.772990 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=23045 Win=49640 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.820622 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=24505 Win=52560 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.853186 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=25397 Win=52560 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.853405 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=25397 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.854076 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=26857 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.855036 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=28317 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.855878 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=29777 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.856802 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=31237 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.857683 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=32697 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|0.899423 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=26857 Win=55480 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.949545 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=28317 Win=58400 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|0.994715 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=29777 Win=61320 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.039820 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=31237 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.117097 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=33589 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.117333 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=33589 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.118133 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=35049 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.119029 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=36509 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.119858 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=37969 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.120902 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=39429 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.121891 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=40889 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.200421 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=35049 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.265026 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=37969 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.362074 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=40889 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.389886 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=41781 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.390110 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=41781 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.390824 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=43241 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.391683 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=44701 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.392594 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=46161 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.393390 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=47621 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.394202 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=49081 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.488313 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=44701 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.584980 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=47621 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.661513 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=49973 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.661734 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=49973 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.662474 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=51433 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.663315 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=52893 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.664198 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=54353 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.665254 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=55813 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.666151 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=57273 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.758227 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=52893 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.860063 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=55813 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.930880 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=58165 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|1.931099 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=58165 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.931879 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=59625 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.932757 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=61085 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.933636 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=62545 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.934770 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=64005 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|1.935586 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=65465 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.029069 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=61085 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.126682 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=64005 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.203195 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=66357 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.203411 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=66357 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.204125 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=67817 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.204962 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=69277 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.205836 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=70737 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.206824 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=72197 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.207746 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=73657 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.311413 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=69277 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.404228 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=72197 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.476576 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=74549 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.476801 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=74549 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.477515 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=76009 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.478415 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=77469 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.479341 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=78929 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.480356 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=80389 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.481218 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=81849 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.576633 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=77469 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.672045 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=80389 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.747257 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=82741 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.747468 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=82741 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.748321 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=84201 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.749246 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=85661 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.750126 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=87121 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.751237 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=88581 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.752049 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=90041 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|2.847009 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=85661 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|2.944420 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=88581 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.020822 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=90933 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.021036 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=90933 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.021748 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=92393 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.022626 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=93853 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.023492 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=95313 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.024734 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=96773 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.025618 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=98233 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.117302 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=93853 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.216127 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=96773 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.291672 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=99125 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.291881 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=99125 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.292657 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=100585 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.293613 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=102045 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.294487 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=103505 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.295806 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=104965 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.296698 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=106425 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.388926 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=102045 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.485275 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=104965 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.562531 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=107317 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.562737 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=107317 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.563561 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=108777 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.564458 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=110237 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.565426 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=111697 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.566442 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=113157 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.567324 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=114617 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.660330 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=110237 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.768417 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=113157 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.840483 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=115509 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|3.840697 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=115509 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.841410 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=116969 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.842307 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=118429 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.843230 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=119889 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.844008 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=121349 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.844820 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=122809 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|3.936967 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=118429 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.031145 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=121349 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.107455 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=123701 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.107686 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=123701 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.108476 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=125161 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.109329 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=126621 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.110217 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=128081 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.111334 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=129541 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.112209 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=131001 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.205521 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=126621 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.300300 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=129541 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.379826 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=131893 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.380034 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=131893 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.380741 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=133353 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.381618 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=134813 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.382478 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=136273 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.383659 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=137733 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.384548 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=139193 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.476833 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=134813 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.575928 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=137733 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.648167 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=140085 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.648386 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=140085 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.649100 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=141545 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.649993 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=143005 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.650926 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=144465 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.651858 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=145925 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.652735 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=147385 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.747988 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=143005 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.844598 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=145925 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.920051 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=148277 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|4.920310 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=148277 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.921025 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=149737 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.921916 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=151197 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.922820 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=152657 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.923863 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=154117 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|4.924667 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=155577 Ack=1 Win=17520 Len=892
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.019189 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=151197 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.104175 | | | Who has 192.168.1.1? | | | | |ARP: Who has 192.168.1.1? Tell 192.168.1.100
|
||||
| | | |(0) ------------------> (0) | | | | |
|
||||
|5.105060 | | | 192.168.1.1 is at 00:06:25:da:af:73 | | | |ARP: 192.168.1.1 is at 00:06:25:da:af:73
|
||||
| | | |(0) <-------------------------------------- (0) | | | |
|
||||
|5.106121 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|5.125019 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=154117 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.197286 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=156469 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.197508 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=156469 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.198388 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=157929 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.199275 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=159389 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.200252 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=160849 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.201150 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=162309 Ack=1 Win=17520 Len=1460
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.202024 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=163769 Ack=1 Win=17520 Len=272
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.297257 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=159389 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.297341 | 1161 → 80 [PSH, ACK] | | | | | | |TCP: 1161 → 80 [PSH, ACK] Seq=164041 Ack=1 Win=17520 Len=50
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|5.389471 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=162309 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.447887 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=164041 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.455830 | 80 → 1161 [ACK] Seq= | | | | | | |TCP: 80 → 1161 [ACK] Seq=1 Ack=164091 Win=62780 Len=0
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.461175 | 80 → 1161 [PSH, ACK] | | | | | | |TCP: 80 → 1161 [PSH, ACK] Seq=1 Ack=164091 Win=62780 Len=730
|
||||
| |(1161) <------------------ (80) | | | | | | |
|
||||
|5.598090 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|5.599082 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|5.651141 | 1161 → 80 [ACK] Seq= | | | | | | |TCP: 1161 → 80 [ACK] Seq=164091 Ack=731 Win=16790 Len=0
|
||||
| |(1161) ------------------> (80) | | | | | | |
|
||||
|6.101044 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|6.102069 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|6.600152 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|6.601063 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|7.102852 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|7.103780 | | | | | | M-SEARCH * HTTP/1.1 | |SSDP: M-SEARCH * HTTP/1.1
|
||||
| | | | | | |(44265) ------------------> (1900) | |
|
||||
|7.595557 | 1162 → 631 [SYN] Seq=0 Win=16384 Len=0 MSS=1460 SACK_PERM=1 | | | | |TCP: 1162 → 631 [SYN] Seq=0 Win=16384 Len=0 MSS=1460 SACK_PERM=1
|
||||
| |(1162) ------------------------------------------------------------------------------------------------------------------------------------------> (631) |
|
BIN
CPE348/Project3/tcp-trace
Normal file
BIN
CPE348/Project3/tcp-trace
Normal file
Binary file not shown.
BIN
CPE348/Project3/~$oject3_wireshark.docx
Normal file
BIN
CPE348/Project3/~$oject3_wireshark.docx
Normal file
Binary file not shown.
BIN
CPE348/Project3/~WRL0003.tmp
Normal file
BIN
CPE348/Project3/~WRL0003.tmp
Normal file
Binary file not shown.
BIN
CPE348/Project3/~WRL0089.tmp
Normal file
BIN
CPE348/Project3/~WRL0089.tmp
Normal file
Binary file not shown.
BIN
CPE348/Project3/~WRL0134.tmp
Normal file
BIN
CPE348/Project3/~WRL0134.tmp
Normal file
Binary file not shown.
BIN
CPE348/Project_1_CRC.doc
Normal file
BIN
CPE348/Project_1_CRC.doc
Normal file
Binary file not shown.
Reference in New Issue
Block a user