Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
extctrl2014
Commits
3ce41605
Commit
3ce41605
authored
Jun 08, 2016
by
Anders Blomdell
Browse files
Make ethernet frames 60 bytes for those drivers that actually checks
ethernet frame length.
parent
bcd3a834
Changes
1
Hide whitespace changes
Inline
Side-by-side
simulator/ethernet.py
View file @
3ce41605
...
...
@@ -31,6 +31,8 @@ class ETH(object):
u
=
random
.
uniform
(
0
,
1.0
)
if
u
>=
self
.
send_loss
:
data
=
data
[
0
:
6
]
+
self
.
macaddr
+
data
[
12
:]
if
len
(
data
)
<
60
:
data
=
data
.
ljust
(
60
,
'
\0
'
)
self
.
socket
.
send
(
data
)
else
:
logger
.
log
(
'Dropped sent packet'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment