summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-05-04 12:03:53 +0200
committerPavel Machek <pavel@ucw.cz>2000-05-04 12:03:53 +0200
commit5dc4b0aae20ef7e6b862af29a3135e018147ce97 (patch)
tree74b76b3544d0b004675b9ee37a03e0d6e8c14b71
parent1d9622e10ddc3baf2cd4f81bc2fa95593b4d3e85 (diff)
downloadbird-5dc4b0aae20ef7e6b862af29a3135e018147ce97.tar
bird-5dc4b0aae20ef7e6b862af29a3135e018147ce97.zip
Display examples more nicely
-rw-r--r--doc/bird.sgml20
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml
index 50da577..a96913f 100644
--- a/doc/bird.sgml
+++ b/doc/bird.sgml
@@ -58,7 +58,7 @@ generate nice printed copy.
<p>Bird is configured using text configuration file. At startup, bird reads <file/bird.conf/
(unless -c command line parameter is given). Really simple configuration file might look like this:
-<cf>
+<cf><verb>
protocol kernel {
persist; # Don't remove routes on bird shutdown
@@ -74,7 +74,7 @@ protocol rip {
export all;
import all;
}
-</cf>
+</verb></cf>
<p>You can find example of more complicated configuration file in <file>doc/bird.conf.example</file>.
@@ -102,7 +102,7 @@ value and value.
<p>Filter basically looks like this:
-<cf>
+<cf><verb>
filter not_too_far
int var;
{
@@ -117,7 +117,7 @@ int var;
else
accept "ok";
}
-</cf>
+</verb></cf>
<p>As you can see, filter has a header, list of local variables, and body. Header consists of <cf/filter/ keyword, followed by (unique) name of filter. List of local variables consists of
pairs <cf><I>type name</I>;</cf>, 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:
-<cf>
+<cf><verb>
function name ()
int local_variable;
{
@@ -199,7 +199,7 @@ function with_parameters (int parameter)
{
print parameter;
}
-</cf>
+</verb></cf>
<p>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: <cf>name(); with_parameters(5);</cf>.
@@ -216,13 +216,13 @@ case. Syntax of if/then/else is <cf>if <I>expression</I> then
or both commands. <cf>else</cf> clause may be ommited. Case is
used like this:
-<cf>
+<cf><verb>
case <I>argument</I> {
2: print "dva"; print "jeste jednou dva";
3 .. 5: print "tri az pet";
else: print "neco jineho";
}
-</cf>
+</verb></cf>
where <I>argument</I> 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.
<p>In addition, rip defines two filter variables, both of type it. <cf>rip_metric</cf> is rip
metric of current route, <cf>rip_tag</cf> is tag of current route.
-<cf>
+<cf><verb>
protocol rip MyRIP_test {
debug all;
@@ -309,6 +309,6 @@ protocol rip MyRIP_test {
import filter { print "importing"; accept; };
export filter { print "exporting"; accept; };
}
-</cf>
+</verb></cf>
</article>