Revision 220376b6

View differences:

examples/hwintf.py
5 5
hardware interface) to a network after the network is created.
6 6
"""
7 7

  
8
import re
8
import re, sys
9 9

  
10 10
from mininet.cli import CLI
11 11
from mininet.log import setLogLevel, info, error
......
28 28
if __name__ == '__main__':
29 29
    setLogLevel( 'info' )
30 30

  
31
    intfName = 'eth1'
31
    # try to get hw intf from the command line; by default, use eth1
32
    intfName = sys.argv[ 1 ] if len( sys.argv ) > 1 else 'eth1'
33
    info( '*** Connecting to hw intf: %s' % intfName )
34

  
32 35
    info( '*** Checking', intfName, '\n' )
33 36
    checkIntf( intfName )
34 37

  

Also available in: Unified diff