From 5dc4b0aae20ef7e6b862af29a3135e018147ce97 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Thu, 4 May 2000 10:03:53 +0000 Subject: [PATCH] Display examples more nicely --- doc/bird.sgml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 50da577a..a96913f0 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -58,7 +58,7 @@ generate nice printed copy.

Bird is configured using text configuration file. At startup, bird reads + protocol kernel { persist; # Don't remove routes on bird shutdown @@ -74,7 +74,7 @@ protocol rip { export all; import all; } - +

You can find example of more complicated configuration file in doc/bird.conf.example. @@ -102,7 +102,7 @@ value and value.

Filter basically looks like this: - + filter not_too_far int var; { @@ -117,7 +117,7 @@ int var; else accept "ok"; } - +

As you can see, filter has a header, list of local variables, and body. Header consists of type name;, where each pair defines one local variable. Body consists of @@ -188,7 +188,7 @@ is true if element is in given set or if ip adress is inside given prefix. over. Functions can have zero or more parameters, and can have local variables. Function basically looks like this: - + function name () int local_variable; { @@ -199,7 +199,7 @@ function with_parameters (int parameter) { print parameter; } - +

Unlike C, variables are declared after function line but before first {. You can not declare variables in nested blocks. Functions are called like in C: name(); with_parameters(5);. @@ -216,13 +216,13 @@ case. Syntax of if/then/else is if expression then or both commands. else clause may be ommited. Case is used like this: - + case argument { 2: print "dva"; print "jeste jednou dva"; 3 .. 5: print "tri az pet"; else: print "neco jineho"; } - + where argument is any argument that can be on the left side of ~ operator, and anything that could be member of set is allowed before :. Multiple commands are allowed without {} grouping. If @@ -293,7 +293,7 @@ other than equally (mis-)configured bird. I warned you.

In addition, rip defines two filter variables, both of type it. rip_metric is rip metric of current route, rip_tag is tag of current route. - + protocol rip MyRIP_test { debug all; @@ -309,6 +309,6 @@ protocol rip MyRIP_test { import filter { print "importing"; accept; }; export filter { print "exporting"; accept; }; } - +