mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Implements protocol templates.
Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
This commit is contained in:
@@ -202,3 +202,16 @@ protocol static {
|
||||
# reject;
|
||||
# };
|
||||
#}
|
||||
#
|
||||
# Template usage example
|
||||
#template bgp rr_client {
|
||||
# disabled;
|
||||
# local as 65000;
|
||||
# multihop;
|
||||
# rr client;
|
||||
# rr cluster id 1.0.0.1;
|
||||
#}
|
||||
#
|
||||
#protocol bgp rr_abcd from rr_client {
|
||||
# neighbor 10.1.4.7 as 65000;
|
||||
#}
|
||||
|
||||
@@ -296,10 +296,21 @@ protocol rip {
|
||||
<tag>function <m/name/ (<m/parameters/) <m/local variables/ { <m/commands/ }</tag> Define a function. You can learn more
|
||||
about functions in the following chapter.
|
||||
|
||||
<tag>protocol rip|ospf|bgp|... <m/[name]/ { <m>protocol options</m> }</tag> Define a protocol
|
||||
instance called <cf><m/name/</cf> (or with a name like "rip5" generated automatically if you don't specify any <cf><m/name/</cf>). You can learn more
|
||||
about configuring protocols in their own chapters. You can run more than one instance of
|
||||
most protocols (like RIP or BGP). By default, no instances are configured.
|
||||
<tag>protocol rip|ospf|bgp|... [<m/name/ [from <m/name2/]] { <m>protocol options</m> }</tag>
|
||||
Define a protocol instance called <cf><m/name/</cf> (or with a name like "rip5" generated
|
||||
automatically if you don't specify any <cf><m/name/</cf>). You can learn more about
|
||||
configuring protocols in their own chapters. When <cf>from <m/name2/</cf> expression is
|
||||
used, initial protocol options are taken from protocol or template <cf><m/name2/</cf>
|
||||
You can run more than one instance of most protocols (like RIP or BGP). By default, no
|
||||
instances are configured.
|
||||
|
||||
<tag>template rip|bgp|... [<m/name/ [from <m/name2/]] { <m>protocol options</m> }</tag>
|
||||
Define a protocol template instance called <cf><m/name/</cf> (or with a name like "bgp1"
|
||||
generated automatically if you don't specify any <cf><m/name/</cf>). Protocol templates can
|
||||
be used to group common options when many similarly configured protocol instances are to be
|
||||
defined. Protocol instances (and other templates) can use templates by using <cf/from/
|
||||
expression and the name of the template. At the moment templates (and <cf/from/ expression)
|
||||
are not implemented for OSPF protocol.
|
||||
|
||||
<tag>define <m/constant/ = (<m/expression/)|<m/number/|<m/IP address/</tag>
|
||||
Define a constant. You can use it later in every place you could use a simple integer or an IP address.
|
||||
|
||||
Reference in New Issue
Block a user