Forum Discussion
LillyM_9417
Dec 14, 2011Altostratus
switch & swith -globe question
Hello,
I could not manage to work this irule. Please help me to make it run.
Thanks
Lilly
=============================
**************
...
LillyM_9417
Dec 14, 2011Altostratus
Hi again Micheal,
I am taking the following error for these lines: " switch -glob [$trx1] {"
[invalid list: list element in quotes followed by "{" instead of space] []
I will appreciate it if you could help on this too..
Thanks
Lilly
=============================================================
when CLIENT_DATA {
set pay1 [TCP::payload 8]
binary scan $pay1 IA4 len1 trx1
if { [IP::addr [IP::client_addr] equals X.X.X.X/24]}{
switch -glob [$trx1] {
"A"{
do something
}
"B" {
do something
}
"C" {
do something
}
default {
do something else
}
}
}
if { [IP::addr [IP::client_addr] equals Y.Y.Y.Y/24]}{
switch -glob [$trx1] {
"D"{
do something
}
"E" {
do something
}
"F" {
do something
}
default {
do something else
}
}
}
}
=============================================================
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects