Add tshark interface name to params

Change-Id: I03c87873abfc0da6b04be96cd1502e94a6110c8e
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
index 00b9959..c7cc4a2 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
@@ -49,6 +49,7 @@
     </BENCH>
 
     <TSHARK>
+        <tsharkInterface>lo</tsharkInterface>
         <up>
             <TCP>6653\ \[SYN\]</TCP> #1
             <RQ>OpenFlow 90 Type: OFPT_ROLE_REQUEST</RQ> #2
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index 21f9186..822274a 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -70,6 +70,7 @@
             main.scale = ( main.params[ 'SCALE' ] ).split( "," )
 
             main.ofPackage = main.params[ 'TSHARK' ]
+            main.tsharkInterface = main.params[ 'TSHARK' ][ 'tsharkInterface' ]
             main.defaultTopoCfg = main.params[ 'CFG' ][ 'defaultTopo' ]
             main.tsharkResultPath = main.params[ 'TEST' ][ 'tsharkResultPath' ]
             main.sampleSize = int( main.params[ 'TEST' ][ 'sampleSize' ] )
@@ -165,9 +166,9 @@
             main.log.info( "************************ Iteration: {} **********************" .format( str( i + 1 ) ) )
             if i < main.warmUp:
                 main.switchFunc.captureOfPack( main, main.device, main.ofPackage,
-                                               "up", resultDict, True )
+                                               "up", resultDict, True, main.tsharkInterface )
                 main.switchFunc.captureOfPack( main, main.device, main.ofPackage,
-                                               "down", resultDict, True )
+                                               "down", resultDict, True, main.tsharkInterface )
                 main.log.debug( "Before devices : " + str( main.Cluster.active( 0 ).CLI.devices() ) )
                 main.Cluster.active( 0 ).CLI.removeDevice( "of:0000000000000001" )
                 main.log.debug( "After devices : " + str( main.Cluster.active( 0 ).CLI.devices() ) )
@@ -176,9 +177,9 @@
                     main.Cluster.active( 0 ).CLI.removeDevice( "of:0000000000000001" )
             else:
                 main.switchFunc.captureOfPack( main, main.device, main.ofPackage,
-                                               "up", resultDict, False )
+                                               "up", resultDict, False, main.tsharkInterface )
                 main.switchFunc.captureOfPack( main, main.device, main.ofPackage,
-                                                "down", resultDict, False )
+                                                "down", resultDict, False, main.tsharkInterface )
                 main.log.debug( "Before devices : " + str( main.Cluster.active( 0 ).CLI.devices() ) )
                 main.Cluster.active( 0 ).CLI.removeDevice( "of:0000000000000001" )
                 main.log.debug("After devices : " + str(main.Cluster.active(0).CLI.devices()))
diff --git a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
index 4c26b59..2b847a5 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
@@ -151,7 +151,7 @@
         main.cleanAndExit()
 
 
-def captureOfPack( main, deviceName, ofPack, switchStatus, resultDict, warmup ):
+def captureOfPack( main, deviceName, ofPack, switchStatus, resultDict, warmup, tsharkInterface ):
     """
     Args:
         main: TestON class
@@ -180,7 +180,7 @@
     grepString = grepString[ :-1 ]
     # open tshark
     main.log.info( "starting tshark capture" )
-    main.ONOSbench.tsharkGrep( grepString, main.tsharkResultPath[ switchStatus ][ 'ALL' ], grepOptions='-E' )
+    main.ONOSbench.tsharkGrep( grepString, main.tsharkResultPath[ switchStatus ][ 'ALL' ], interface=tsharkInterface, grepOptions='-E' )
     if switchStatus == 'up':
         # if up, assign switch to controller
         time.sleep( main.measurementSleep )