From 3c3605818fb304f8de6975c56096bfafa43a8b6b Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 19 Mar 2019 17:44:50 +0100 Subject: BGP: Mandatory option for channels Allow to mark channel to be mandatory, and do not allow BGP sessions if no common AFI/SAFI is established. --- doc/bird.sgml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/bird.sgml b/doc/bird.sgml index e531da40..8d93f8ac 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -2565,6 +2565,15 @@ be used in explicit configuration.

BGP channels have additional config options (together with the common ones): +

As you can see, a filter has a header, a list of local variables, and a body. The header consists of the type name; -pairs where each pair defines one local variable. The body consists of +pairs where each pair declares one local variable. The body consists of { statements }. Each { statements }) which is useful if you want to make a bigger @@ -1188,7 +1188,7 @@ called like in C: name(); with_parameters(5);. Function may return values using the return command. Returning a value exits from current function (this is similar to C). -

Filters are declared in a way similar to functions except they can't have +

Filters are defined in a way similar to functions except they can't have explicit parameters. They get a route table entry as an implicit parameter, it is also passed automatically to any functions called. The filter must terminate with either

A filter is implicitly passed a route, and it can access its attributes just -like it accesses variables. Attempts to access undefined attribute result in a -runtime error; you can check if an attribute is defined by using the -defined( attribute ) operator. One notable exception to this -rule are attributes of bgppath and *clist types, where undefined value is -regarded as empty bgppath/*clist for most purposes. +like it accesses variables. There are common route attributes, protocol-specific +route attributes and custom route attributes. Most common attributes are +mandatory (always defined), while remaining are optional. Attempts to access +undefined attribute result in a runtime error; you can check if an attribute is +defined by using the defined( attribute ) operator. One notable +exception to this rule are attributes of bgppath and *clist types, where +undefined value is regarded as empty bgppath/*clist for most purposes. + +Attributes can be defined by just setting them in filters. Custom attributes +have to be first declared by global +option. You can also undefine optional attribute back to non-existence by using +the unset( operator. + +Common route attributes are: -

There also exist protocol-specific attributes which are described in the -corresponding protocol sections. +

Protocol-specific route attributes are described in the corresponding +protocol sections. Other statements @@ -1653,7 +1662,7 @@ corresponding protocol sections.