diff options
Diffstat (limited to 'doc/bird.sgml')
-rw-r--r-- | doc/bird.sgml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml index 61ebc7a..a6fa4df 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/˜/ 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 |