Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tinynets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jake Read
tinynets
Commits
50f6346b
Commit
50f6346b
authored
7 years ago
by
Selby, Nicholas Stearns
Browse files
Options
Downloads
Patches
Plain Diff
Updated onReceive algorithm
parent
a1392965
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+20
-26
20 additions, 26 deletions
README.md
with
20 additions
and
26 deletions
README.md
+
20
−
26
View file @
50f6346b
...
@@ -136,27 +136,23 @@ We develop a router, protocol and implementation of a network that:
...
@@ -136,27 +136,23 @@ We develop a router, protocol and implementation of a network that:
On Packet Received:
On Packet Received:
```
swift
```
swift
if
hop
count
>
max
:
if
the
packet
is
not
a
buffer
update
:
kill
packet
update
the
LUT
using
packet
src
.
and
hop
count
increment
hop
count
if
packet
is
standard
:
if
packet
is
standard
:
if
LUT
does
not
already
have
source
address
:
add
entry
to
LUT
if
I
am
destination
:
if
I
am
destination
:
process
data
in
packet
process
data
in
packet
reply
with
ACK
else
:
else
:
increment
hop
count
if
LUT
has
destination
address
:
if
LUT
has
destination
address
:
send
packet
to
port
which
minimizes
C
(
hops
,
buffer
)
=
hops
+
\
lambda
*
buffer
over
all
ports
send
packet
to
port
which
minimizes
C
(
hops
,
buffer
)
=
hops
+
\
lambda
*
buffer
over
all
ports
else
:
else
:
send
packet
to
all
ports
as
standard
flood
send
packet
to
all
ports
as
standard
flood
elseif
packet
is
ack
:
elseif
packet
is
ack
:
if
LUT
does
not
already
have
source
address
:
add
entry
to
LUT
if
I
am
destination
:
if
I
am
destination
:
process
acknowledgement
,
increment
window
process
acknowledgement
else
:
else
:
increment
hop
count
increment
hop
count
if
LUT
has
destination
address
:
if
LUT
has
destination
address
:
...
@@ -165,28 +161,26 @@ elseif packet is ack:
...
@@ -165,28 +161,26 @@ elseif packet is ack:
send
packet
to
all
ports
as
ack
flood
send
packet
to
all
ports
as
ack
flood
elseif
packet
is
standard
flood
:
elseif
packet
is
standard
flood
:
if
LUT
does
not
already
have
source
address
:
remove
packet
src
.
from
LUT
at
that
port
if
it
exists
add
entry
to
LUT
if
I
have
not
yet
seen
this
flood
:
if
I
am
destination
:
if
I
am
destination
:
process
data
in
packet
process
data
in
packet
open
window
for
duplicate
packet
elimination
reply
with
ACK
check
previous
duplicates
else
:
else
:
increment
hop
count
if
LUT
has
destination
address
:
if
LUT
has
destination
address
:
send
packet
to
port
which
minimizes
C
(
hops
,
buffer
)
=
hops
+
\
lambda
*
buffer
over
all
ports
send
packet
to
port
which
minimizes
C
(
hops
,
buffer
)
=
hops
+
\
lambda
*
buffer
as
standard
packet
else
:
else
:
send
packet
to
all
ports
send
packet
to
all
ports
elseif
packet
is
ack
flood
elseif
packet
is
ack
flood
if
LUT
does
not
already
have
source
address
:
remove
packet
src
.
from
LUT
at
that
port
if
it
exists
add
entry
to
LUT
if
I
am
destination
:
if
I
am
destination
:
process
acknowledgement
,
increment
window
process
acknowledgement
open
timer
for
duplicate
ack
elimination
check
previous
duplicates
else
:
else
:
increment
hop
count
if
LUT
has
destination
address
:
if
LUT
has
destination
address
:
send
packet
to
port
which
minimizes
C
(
hops
,
buffer
)
=
hops
+
\
lambda
*
buffer
over
all
ports
send
packet
to
port
which
minimizes
C
(
hops
,
buffer
)
=
hops
+
\
lambda
*
buffer
as
standard
ACK
else
:
else
:
send
packet
to
all
ports
send
packet
to
all
ports
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment