Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Olaf Bergmann
mininet
Commits
a908fafa
Commit
a908fafa
authored
13 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Change default to vanilla Intf. Also edit comments.
parent
8688ca92
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mininet/link.py
+7
-5
7 additions, 5 deletions
mininet/link.py
with
7 additions
and
5 deletions
mininet/link.py
+
7
−
5
View file @
a908fafa
"""
link.py: interface and link abstractions for mininet
It seems useful to bundle functionality for interfaces into a single
...
...
@@ -19,6 +18,10 @@
Intfs: know how to configure themselves
Links: know how to connect nodes together
Intf: basic interface object that can configure itself
TCIntf: interface with bandwidth limiting and delay via tc
Link: basic link class for creating veth pairs
"""
from
mininet.log
import
info
,
error
,
debug
...
...
@@ -26,7 +29,7 @@
from
time
import
sleep
import
re
class
Basic
Intf
(
object
):
class
Intf
(
object
):
"
Basic interface object that can configure itself.
"
...
...
@@ -146,7 +149,7 @@ def __str__( self ):
return
self
.
name
class
TCIntf
(
Basic
Intf
):
class
TCIntf
(
Intf
):
"
Interface customized by tc (traffic control) utility
"
def
config
(
self
,
bw
=
None
,
delay
=
None
,
loss
=
0
,
disable_gro
=
True
,
...
...
@@ -154,7 +157,7 @@ def config( self, bw=None, delay=None, loss=0, disable_gro=True,
enable_red
=
False
,
max_queue_size
=
1000
,
**
params
):
"
Configure the port and set its properties.
"
result
=
Basic
Intf
.
config
(
self
,
**
params
)
result
=
Intf
.
config
(
self
,
**
params
)
# disable GRO
if
disable_gro
:
...
...
@@ -241,7 +244,6 @@ def doConfigPort(s):
result
[
'
tcoutputs
'
]
=
tcoutputs
return
result
Intf
=
TCIntf
class
Link
(
object
):
...
...
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