summaryrefslogtreecommitdiff
path: root/doc/bird.sgml
diff options
context:
space:
mode:
authorAlexander Zubkov <green@qrator.net>2021-12-28 04:09:36 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-12-28 04:09:36 +0100
commit77042292ff1ebeb5451f3a4119c3cbde0629f5b1 (patch)
tree41cb8eb38d552e90ebb02608564aa8457874df8b /doc/bird.sgml
parent0e1fd7ea6af8aaeb68a23e320c2a0a0a8480d6de (diff)
Doc: Document min/max operators for lists
Diffstat (limited to 'doc/bird.sgml')
-rw-r--r--doc/bird.sgml11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml
index d1059cb1..a63493da 100644
--- a/doc/bird.sgml
+++ b/doc/bird.sgml
@@ -1532,7 +1532,7 @@ in the foot).
Clist is similar to a set, except that unlike other sets, it can be
modified. The type is used for community list (a set of pairs) and for
cluster list (a set of quads). There exist no literals of this type.
- There are three special operators on clists:
+ There are special operators on clists:
<cf><m/C/.len</cf> returns the length of clist <m/C/.
@@ -1559,6 +1559,15 @@ in the foot).
<cf><m/C/.add(<m/P/);</cf> if <m/C/ is appropriate route attribute (for
example <cf/bgp_community/). Similarly for <cf/delete/ and <cf/filter/.
+ <cf><m/C/.min</cf> returns the minimum element of clist <m/C/.
+
+ <cf><m/C/.max</cf> returns the maximum element of clist <m/C/.
+
+ Operators <cf/.min/, <cf/.max/ can be used together with <cf/filter/
+ to extract the community from the specific subset of communities
+ (e.g. localpref or prepend) without the need to check every possible
+ value (e.g. <cf/filter(bgp_community, [(23456, 1000..1099)]).min/).
+
<tag><label id="type-eclist">eclist</tag>
Eclist is a data type used for BGP extended community lists. Eclists
are very similar to clists, but they are sets of ECs instead of pairs.