proc ConfigPacketCapturePortHlt { port {dataPlane "dataPlane"} {controlPlane "noControlPlane"} } { # $port = 1/1/3. Not 1/3. # dataPlane options: dataPlane or noDataPlane # controlPlane options: controlPlane or noControlPlane if {$dataPlane == "dataPlane"} { set dataPlane 1 } else { set dataPlane 0 } if {$controlPlane == "controlPlane"} { set controlPlane 1 } else { set controlPlane 0 } puts "\nConfigPacketCapturePort" set status [::ixia::packet_config_buffers \ -port_handle $port \ -data_plane_capture_enable $dataPlane \ -control_plane_capture_enable $controlPlane \ -slice_size 0 \ -trigger_position 1 \ -capture_mode trigger \ -after_trigger_filter filter \ -before_trigger_filter none \ -continuous_filter filter \ ] if {[keylget status status] != $::SUCCESS} { puts "\nError ConfigPacketCapturePort: $status\n" return 1 } else { puts "\nConfigPacketCapturePort: Successfully configured packet capturing on port $port." } after 5000 puts "ConfigPacketCapturePort: Applying traffic ..." ixNet exec apply [ixNet getRoot]/traffic after 2000 } list like below and the list must align # with each list's index accordlingly. # # ports = {1/1/1 1/1/1 1/1/1} # # ipList = {1.1.1.1 1.1.1.2 1.1.1.3} # # gatewayList = {1.1.1.4 1.1.1.5 1.1.1.6} # # vlanList = {1001 1002 1003} # # macList = {same as above} upvar $portConfigParams params puts "\nPortConfigProtocolIntHlt: $port" foreach {properties values} [array get params $port,*] { set property [lindex [split $properties ,] end] append paramList "$property $values " } set interfaceConfigStatus [eval ::ixia::interface_config $paramList] if {[keylget interfaceConfigStatus status] != $::SUCCESS} { puts "\nError PortConfigProtocolInt:\n$interfaceConfigStatus\n" return 1 } # interface object = ::ixNet::OBJ-/vport:1/interface:1 set interfaceHandle [keylget interfaceConfigStatus interface_handle] return $interfaceHandle }