summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-05-22 22:47:24 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-05-22 22:47:24 +0200
commitba5c0057ed01fb006b7a6fb1bd8c21f0c9ae12be (patch)
treebcbab1f5404ec81e6d5eef038ce4104a20866368 /doc
parent6d04ef8987f6f5483d353d393ef66dae4b887f30 (diff)
Extends pair set syntax, matching and deleting against clist.
Expressions like (123,*) can be used in pair set literals, clists can be matched against pair sets (community ~ pairset) and pair sets can be used to specify items to delete from clists (community.delete(pairset)).
Diffstat (limited to 'doc')
-rw-r--r--doc/bird.sgml16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml
index 61ebc7a5..a6fa4df1 100644
--- a/doc/bird.sgml
+++ b/doc/bird.sgml
@@ -706,7 +706,8 @@ incompatible with each other (that is to prevent you from shooting in the foot).
Filters recognize four types of sets. Sets are similar to strings: you can pass them around
but you can't modify them. Literals of type <cf>int set</cf> look like <cf>
[ 1, 2, 5..7 ]</cf>. As you can see, both simple values and ranges are permitted in
- sets.
+ sets. For pair sets, expressions like <cf/(123,*)/ can be used to denote ranges (in
+ that case <cf/(123,0)..(123,65535)/).
Sets of prefixes are special: their literals does not allow ranges, but allows
prefix patterns that are written as <cf><M>ipaddress</M>/<M>pxlen</M>{<M>low</M>,<M>high</M>}</cf>.
@@ -777,9 +778,16 @@ incompatible with each other (that is to prevent you from shooting in the foot).
no literals of this type. There are two special operators on
clists:
- <cf>add(<m/C/,<m/P/)</cf> adds pair (or quad) <m/P/ to clist <m/C/ and returns the result.
+ <cf>add(<m/C/,<m/P/)</cf> adds pair (or quad) <m/P/ to clist
+ <m/C/ and returns the result. If item <m/P/ is already in
+ clist <m/C/, it does nothing.
- <cf>delete(<m/C/,<m/P/)</cf> deletes pair (or quad) <m/P/ from clist <m/C/ and returns the result.
+ <cf>delete(<m/C/,<m/P/)</cf> deletes pair (or quad)
+ <m/P/ from clist <m/C/ and returns the result. If clist
+ <m/C/ does not contain item <m/P/, it does nothing.
+ <m/P/ may also be a pair (or quad) set, in that case the
+ operator deletes all items from clist <m/C/ that are also
+ members of set <m/P/.
Statement <cf><m/C/ = add(<m/C/, <m/P/);</cf> can be shortened to
<cf><m/C/.add(<m/P/);</cf> if <m/C/ is appropriate route attribute
@@ -794,7 +802,7 @@ incompatible with each other (that is to prevent you from shooting in the foot).
Special operators include <cf/&tilde;/ for "is element of a set" operation - it can be
used on element and set of elements of the same type (returning true if element is contained in the given set), or
on two strings (returning true if first string matches a shell-like pattern stored in second string) or on IP and prefix (returning true if IP is within the range defined by that prefix), or on
-prefix and prefix (returning true if first prefix is more specific than second one) or on bgppath and bgpmask (returning true if the path matches the mask) or on pair and clist (returning true if the pair (or quad) is element of the clist).
+prefix and prefix (returning true if first prefix is more specific than second one) or on bgppath and bgpmask (returning true if the path matches the mask) or on pair/quad and clist (returning true if the pair/quad is element of the clist) or on clist and pair/quad set (returning true if there is an element of the clist that is also a member of the pair/quad set).
<sect>Control structures