proc ModifyIgmpGroupRanges { portList igmpGroupCount } { # portList = One port or a list of ports in format of: "1/2 1/3 1/5" # igmpGroupCount = A list of group counts for each port: "100 200 300" # For example: # If modifying one port, then: 1/1 200 # If modifying two ports, then: "1/1 1/2" "100 200" if {[llength $portList] != [llength $igmpGroupCount]} { puts "\nError: ModifyIgmpGroupRanges: The number of portList and igmpGroupCount are not the same" return 1 } for {set index 0} {$index < [llength $portList]} {incr index} { set port [lindex $portList $index] set vport [GetVportMapping $port] foreach igmpHostNumber [ixNet getList $vport/protocols/igmp host] { foreach igmpHostGroupNumber [ixNet getList $igmpHostNumber group] { puts "\nModifyIgmpGroupRanges: $port igmpGroupCount=$igmpGroupCount" ixNet setAttribute $igmpHostGroupNumber -groupCount [lindex $igmpGroupCount $index] ixNet commit } } } return 0 }