Skip to content

Commit b1451cd

Browse files
committed
assignment 4
1 parent 974c63e commit b1451cd

File tree

12 files changed

+16763
-0
lines changed

12 files changed

+16763
-0
lines changed

Assignment 4/Report.pdf

677 KB
Binary file not shown.

Assignment 4/Screensort/q1.png

2 MB
Loading

Assignment 4/Screensort/q2.png

1.76 MB
Loading

Assignment 4/source_code_files/1.awk

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
BEGIN {
2+
3+
dcount = 0;
4+
5+
rcount = 0;
6+
7+
}
8+
9+
{
10+
11+
event = $1;
12+
13+
if(event == "d")
14+
15+
{
16+
17+
dcount++;
18+
19+
}
20+
21+
if(event == "r")
22+
23+
{
24+
25+
rcount++;
26+
27+
}
28+
29+
}
30+
31+
END {
32+
33+
printf("The no.of packets dropped : %d\n ",dcount);
34+
35+
36+
37+
}
38+

Assignment 4/source_code_files/2.awk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
BEGIN {
2+
count=0;
3+
}
4+
{
5+
event=$1;
6+
if(event=="d")
7+
{
8+
count++;
9+
}
10+
}
11+
END {
12+
printf("No of packets dropped : %d\n",count);
13+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
V -t * -v 1.0a5 -a 0
2+
A -t * -n 1 -p 0 -o 0x7fffffff -c 30 -a 1
3+
A -t * -h 1 -m 1073741823 -s 0
4+
n -t * -a 4 -s 4 -S UP -v circle -c black -i black
5+
n -t * -a 0 -s 0 -S UP -v circle -c black -i black
6+
n -t * -a 5 -s 5 -S UP -v circle -c black -i black
7+
n -t * -a 1 -s 1 -S UP -v circle -c black -i black
8+
n -t * -a 2 -s 2 -S UP -v circle -c black -i black
9+
n -t * -a 3 -s 3 -S UP -v circle -c black -i black
10+
l -t * -s 0 -d 2 -S UP -r 20200000 -D 0.01 -c black
11+
l -t * -s 2 -d 1 -S UP -r 20200000 -D 0.01 -c black
12+
l -t * -s 2 -d 3 -S UP -r 1500000 -D 0.01 -c black
13+
l -t * -s 3 -d 4 -S UP -r 20200000 -D 0.01 -c black
14+
l -t * -s 3 -d 5 -S UP -r 20200000 -D 0.01 -c black
15+
+ -t 0.1 -s 0 -d 2 -p ping -e 64 -c 0 -i 0 -a 0 -x {0.0 4.0 -1 ------- null}
16+
- -t 0.1 -s 0 -d 2 -p ping -e 64 -c 0 -i 0 -a 0 -x {0.0 4.0 -1 ------- null}
17+
h -t 0.1 -s 0 -d 2 -p ping -e 64 -c 0 -i 0 -a 0 -x {0.0 4.0 -1 ------- null}
18+
+ -t 0.1 -s 5 -d 3 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
19+
- -t 0.1 -s 5 -d 3 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
20+
h -t 0.1 -s 5 -d 3 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
21+
r -t 0.110025346534653 -s 0 -d 2 -p ping -e 64 -c 0 -i 0 -a 0 -x {0.0 4.0 -1 ------- null}
22+
+ -t 0.110025346534653 -s 2 -d 3 -p ping -e 64 -c 0 -i 0 -a 0 -x {0.0 4.0 -1 ------- null}
23+
d -t 0.110025346534653 -s 2 -d 3 -p ping -e 64 -c 0 -i 0 -a 0 -x {0.0 4.0 -1 ------- null}
24+
r -t 0.110025346534653 -s 5 -d 3 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
25+
+ -t 0.110025346534653 -s 3 -d 2 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
26+
- -t 0.110025346534653 -s 3 -d 2 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
27+
h -t 0.110025346534653 -s 3 -d 2 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
28+
r -t 0.120366679867987 -s 3 -d 2 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
29+
+ -t 0.120366679867987 -s 2 -d 1 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
30+
d -t 0.120366679867987 -s 2 -d 1 -p ping -e 64 -c 0 -i 1 -a 0 -x {5.0 1.0 -1 ------- null}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The no.of packets dropped : 494
2+

Assignment 4/source_code_files/prog1.nam

Lines changed: 9280 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)