proc ConfigBgpNgpf {args} { set direction increment set step 0.0.0.0 set paramList {} set argIndex 0 while {$argIndex < [llength $args]} { set currentArg [lindex $args $argIndex] switch -exact -- $currentArg { -ipv4Obj { set ipv4Obj [lindex $args [expr $argIndex + 1]] incr argIndex 2 } -dutIp { set dutIp [lindex $args [expr $argIndex + 1]] append paramList " -start $dutIp" incr argIndex 2 } -direction { set direction [lindex $args [expr $argIndex + 1]] append paramList " -direction $direction" incr argIndex 2 } -step { set step [lindex $args [expr $argIndex + 1]] append paramList " -step $step" incr argIndex 2 } default { puts "Connect: No such parameter: $currentArg" return 1 } } } puts "\nCreateBgpNgpf: Adding new BGP V4 stack" set bgpObj [ixNet add $ipv4Obj bgpIpv4Peer] ixNet commit set bgpMultivalue [ixNet getAttribute $bgpObj -dutIp] puts "\t$paramList" if {[catch {eval ixNet setMultiAttribute $bgpMultivalue/counter $paramList} errMsg]} { puts "\nConfigBgpNgpf failed: $errMsg" return 1 } ixNet commit }