mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 08:38:42 +00:00
Add section about utility functions in filters
This commit is contained in:
parent
4a5bb2bf1b
commit
69477cad70
@ -54,7 +54,8 @@ configuration primitives, <cf> is fragment of configuration within normal
|
|||||||
<p>Bird is configured using text configuration file. At startup, bird
|
<p>Bird is configured using text configuration file. At startup, bird
|
||||||
reads <file/bird.conf/ (unless -c command line parameter is
|
reads <file/bird.conf/ (unless -c command line parameter is
|
||||||
given). Everything on a line after <cf/#/ is a comment, whitespace is
|
given). Everything on a line after <cf/#/ is a comment, whitespace is
|
||||||
ignored. If there's variable number of options, it is grouped using
|
ignored, C-style comments <cf>/* comment */</cf> are also
|
||||||
|
recognized. If there's variable number of options, it is grouped using
|
||||||
<cf/{ }/ brackets. Each option is terminated by <cf/;/.
|
<cf/{ }/ brackets. Each option is terminated by <cf/;/.
|
||||||
|
|
||||||
<p>Really simple configuration file might look like this, you can find
|
<p>Really simple configuration file might look like this, you can find
|
||||||
@ -328,21 +329,33 @@ if 1234 = i then printn "."; else { print "*** FAIL: if 1 else"; }
|
|||||||
<tag>defined( <m>attribute</m> )</tag>
|
<tag>defined( <m>attribute</m> )</tag>
|
||||||
returns TRUE if given attribute is defined. Access to undefined attribute results in runtime error.
|
returns TRUE if given attribute is defined. Access to undefined attribute results in runtime error.
|
||||||
|
|
||||||
<tag/prefix network/
|
<tag/<m/prefix/ network/
|
||||||
network this route is talking about.
|
network this route is talking about.
|
||||||
|
|
||||||
<tag/ip from/
|
<tag/<m/ip/ from/
|
||||||
who told me about this route.
|
who told me about this route.
|
||||||
|
|
||||||
<tag/ip gw/
|
<tag/<m/ip/ gw/
|
||||||
what is nexthop packets routed using this route should be forwarded to.
|
what is nexthop packets routed using this route should be forwarded to.
|
||||||
|
|
||||||
<tag/enum source/
|
<tag/<m/enum/ source/
|
||||||
what protocol told me about this route. This can have values such as <cf/RTS_RIP/ or <cf/RTS_OSPF_EXT/.
|
what protocol told me about this route. This can have values such as <cf/RTS_RIP/ or <cf/RTS_OSPF_EXT/.
|
||||||
</descrip>
|
</descrip>
|
||||||
|
|
||||||
<p>Plus, there are protocol-specific attributes, which are described in protocol sections.
|
<p>Plus, there are protocol-specific attributes, which are described in protocol sections.
|
||||||
|
|
||||||
|
<sect1>Utility functions
|
||||||
|
|
||||||
|
<p>There are few functions you might find convient to use:
|
||||||
|
|
||||||
|
<descrip>
|
||||||
|
<tag>print <m/expr/ [ <m/, expr .../ ]</tag>
|
||||||
|
prints given expressions, usefull mainly while debugging filters.
|
||||||
|
|
||||||
|
<tag>quitbird</tag>
|
||||||
|
terminates bird. Usefull while debugging filter interpretter.
|
||||||
|
</descrip>
|
||||||
|
|
||||||
<sect>Protocols
|
<sect>Protocols
|
||||||
|
|
||||||
<sect1>Rip
|
<sect1>Rip
|
||||||
@ -426,8 +439,15 @@ protocol rip MyRIP_test {
|
|||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
|
<sect>Getting more help
|
||||||
|
|
||||||
|
<p>This is really last section of this file, should give pointers to
|
||||||
|
programmers documentation, web pages mailing lists and similar stuff.
|
||||||
|
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
# LocalWords: IPv doctype verb GPL Cisco sgml html Cisco's unix dvi sgmltools linuxdoc dtd descrip config conf syslog stderr auth ospf bgp router's IP expr num inst bool int ip px len enum cf md rfc doc
|
# LocalWords: IPv doctype verb GPL Cisco sgml html Cisco's unix dvi sgmltools linuxdoc dtd descrip config conf syslog stderr auth ospf bgp router's IP expr num inst bool int ip px len enum cf md rfc doc
|
||||||
-->
|
-->
|
Loading…
Reference in New Issue
Block a user