Skip to content
Snippets Groups Projects
Commit 220376b6 authored by Brian O'Connor's avatar Brian O'Connor
Browse files

hwintf.py: allow intf to be specified in cmd line

parent cfb6bf95
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment