Forum Discussion
David_18981
Nimbostratus
Mar 09, 2009How to parse data group list ?
Hi all,
i have an interresting question about : how to parse element within a data group list ?
In fact, for example if i create a data group with a list of IP addresses ...
hoolio
Cirrostratus
Mar 09, 2009Hi David,
You can use lindex (Click here) to retrieve individual elements of the list. If you're trying to create a list of IP addresses, it would be more efficient to use a datagroup of type 'address' and use the matchclass command (Click here) to check if an IP address/subnet is part of the datagroup.
when RULE_INIT {
log local0. "\$::aol: $::aol"
log local0. "\[lindex \$::aol 0\]: [lindex $::aol 0]"
}
Rule : $::aol: {64.12.96.0/19} {149.174.160.0/20} {152.163.240.0/21} {152.163.248.0/22} {152.163.252.0/23} {152.163.96.0/22} {152.163.100.0/23} {195.93.32.0/22} {195.93.48.0/22} {195.93.64.0/19} {195.93.96.0/19} {195.93.16.0/20} {198.81.0.0/22} {198.81.16.0/20} {198.81.8.0/23} {202.67.64.128/25} {205.188.192.0/20} {205.188.208.0/23} {205.188.112.0/20} {205.188.146.144/30} {207.200.112.0/21}
Rule : [lindex $::aol 0]: 64.12.96.0/19
Aaron
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