proc StartProtocolOnPortList { portList protocolList } { # You can pass in a list of ports and a list of protocols # portList format = 1/1 foreach protocol $protocolList { foreach port $portList { set vport [GetVportMapping $port] puts "StartProtocol: $port" catch {ixNet exec start $vport/protocols/[string tolower $protocol]} errMsg if {$errMsg != "::ixNet::OK"} { puts "\nError StartProtocol: $port: $errMsg\n" return 1 } } } after 5000 return 0 }