proc StopProtocol { protocol } { # Stop a protocol on all the ports that has the protocol enabled set root [ixNet getRoot] foreach vport [ixNet getList $root vport] { set port [ixNet getAttribute $vport -assignedTo] if {[ixNet getAttribute $vport/protocols/[string tolower $protocol] -enabled] == "true"} { catch {ixNet exec stop $vport/protocols/[string tolower $protocol]} errMsg if {$errMsg != "::ixNet::OK"} { puts "Error: Failed to stop $protocol on port $port" } else { puts "Stopped $protocol on port $port" } } } }