From a7f23f581f5e3efe92ec97dfca7d01c66f31ab04 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 7 Nov 2011 00:31:23 +0100 Subject: Implements protocol templates. Based on the patch from Alexander V. Chernikov. Extended to support almost all protocols. Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax. --- doc/bird.conf.example | 13 +++++++++++++ doc/bird.sgml | 19 +++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/bird.conf.example b/doc/bird.conf.example index 339898f..5e07ab5 100644 --- a/doc/bird.conf.example +++ b/doc/bird.conf.example @@ -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; +#} diff --git a/doc/bird.sgml b/doc/bird.sgml index d454629..7f53f02 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -296,10 +296,21 @@ protocol rip { function Define a function. You can learn more about functions in the following chapter. - protocol rip|ospf|bgp|... protocol options } Define a protocol - instance called (or with a name like "rip5" generated automatically if you don't specify any ). 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. + protocol rip|ospf|bgp|... [protocol options } + Define a protocol instance called (or with a name like "rip5" generated + automatically if you don't specify any ). You can learn more about + configuring protocols in their own chapters. When from expression is + used, initial protocol options are taken from protocol or template + You can run more than one instance of most protocols (like RIP or BGP). By default, no + instances are configured. + + template rip|bgp|... [protocol options } + Define a protocol template instance called (or with a name like "bgp1" + generated automatically if you don't specify any ). 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 define Define a constant. You can use it later in every place you could use a simple integer or an IP address. -- cgit v1.2.3