]> xenbits.xensource.com Git - libvirt.git/commit
Introduce possibility to have an iterator per variable
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Wed, 11 Jan 2012 11:42:37 +0000 (06:42 -0500)
committerStefan Berger <stefanb@us.ibm.com>
Wed, 11 Jan 2012 11:42:37 +0000 (06:42 -0500)
commit80e9a5cd4cd88919a165fd55a99c60da82882f41
tree5ae29892784faf8e23342dd2cb62f2bbbbebaee5
parent134c56764f803c526239ac570e5c385d24d6eb1d
Introduce possibility to have an iterator per variable

This patch introduces the capability to use a different iterator per
variable.

The currently supported notation of variables in a filtering rule like

  <rule action='accept' direction='out'>
     <tcp  srcipaddr='$A' srcportstart='$B'/>
  </rule>

processes the two lists 'A' and 'B' in parallel. This means that A and B
must have the same number of 'N' elements and that 'N' rules will be
instantiated (assuming all tuples from A and B are unique).

In this patch we now introduce the assignment of variables to different
iterators. Therefore a rule like

  <rule action='accept' direction='out'>
     <tcp  srcipaddr='$A[@1]' srcportstart='$B[@2]'/>
  </rule>

will now create every combination of elements in A with elements in B since
A has been assigned to an iterator with Id '1' and B has been assigned to an
iterator with Id '2', thus processing their value independently.

The first rule has an equivalent notation of

  <rule action='accept' direction='out'>
     <tcp  srcipaddr='$A[@0]' srcportstart='$B[@0]'/>
  </rule>
docs/schemas/nwfilter.rng
src/conf/nwfilter_conf.c
src/conf/nwfilter_conf.h
src/conf/nwfilter_params.c
src/conf/nwfilter_params.h
src/libvirt_private.syms
src/nwfilter/nwfilter_ebiptables_driver.c
src/nwfilter/nwfilter_gentech_driver.c