You can only perform string comparisons with switch. IP::addr does support bitwise address comparisons. I can't see a switch working if you need to support CIDR ranges. If you can do single host or classed networks (class A, B, C) and don't mind the loss of performance you could use switch:
switch -glob [IP::client_addr] {
1.1.1.1 {
client IP was 1.1.1.1, do something
}
2.2.2.2 {
client IP was 2.2.2.2, do something
}
2.2.3.* {
client IP was 2.2.3.x, do something
}
2.3.*.* {
client IP was 2.3.x.x, do something
}
default {
client IP was not matched, do something by default
}
}
Aaron