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
220376b6
Commit
220376b6
authored
11 years ago
by
Brian O'Connor
Browse files
Options
Downloads
Patches
Plain Diff
hwintf.py: allow intf to be specified in cmd line
parent
cfb6bf95
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
examples/hwintf.py
+5
-2
5 additions, 2 deletions
examples/hwintf.py
with
5 additions
and
2 deletions
examples/hwintf.py
+
5
−
2
View file @
220376b6
...
...
@@ -5,7 +5,7 @@
hardware interface) to a network after the network is created.
"""
import
re
import
re
,
sys
from
mininet.cli
import
CLI
from
mininet.log
import
setLogLevel
,
info
,
error
...
...
@@ -28,7 +28,10 @@ def checkIntf( intf ):
if
__name__
==
'
__main__
'
:
setLogLevel
(
'
info
'
)
intfName
=
'
eth1
'
# try to get hw intf from the command line; by default, use eth1
intfName
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
'
eth1
'
info
(
'
*** Connecting to hw intf: %s
'
%
intfName
)
info
(
'
*** Checking
'
,
intfName
,
'
\n
'
)
checkIntf
(
intfName
)
...
...
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