proc StartTrafficNgpfHlt {} { puts "\nStartTrafficNgpfHlt" set startTrafficStatus [::ixiangpf::traffic_control -action run] if {[keylget startTrafficStatus status] != $::SUCCESS} { puts "\nError StartTrafficHlt: $startTrafficStatus\n" return 1 } # By including VerifyTrafficState, it will wait up to 15 seconds until # traffic is started before returning. VerifyTrafficState return 0 } ort -name because suppressArp API goes # by the name of the port rather than the physical port. if {$action == "enable"} { set action true } else { set action false } set root [ixNet getRoot] set globals $root\globals set globalTopology $globals/topology set globalTopologyIpv4 $globalTopology/ipv4 foreach port $ports { set vport [GetVportMapping $port] set portName [ixNet getAttribute $vport -name] # This is a list of all the ports and its name description set portNameList [ixNet getAttribute $globalTopologyIpv4 -rowNames] # Get the multi-value number set multiValue [ixNet getAttribute $globalTopologyIpv4 -suppressArpForDuplicateGateway] # The portIndex is not zero-based. Begins with 1. set portIndex [expr [lsearch $portNameList $portName] + 1] puts "\nEnableDisableSuppressArp: Set to $action" if {[SetNgpfCounterMultiValue $multiValue $portIndex $action]} { return 1 } } return 0 }