2 * This is an example configuration file.
11 function callme (int arg1; int arg2;)
13 print "Function callme called arguments " arg1 " and " arg2;
16 2: print "dva"; print "jeste jednou dva";
17 [ 3 .. 5 ]: print "tri az pet";
18 else: print "neco jineho";
26 print "Testing filter language:";
29 print " arithmetics: 1234 = " i;
30 printn " if statements ";
31 if i = 4 then { print "*** FAIL: if 0"; quitbird; } else printn ".";
32 if 1234 = i then printn "."; else { print "*** FAIL: if 1 else"; }
33 if 1 <= 1 then printn "."; else { print "*** FAIL: test 3"; }
34 if 1234 < 1234 then { print "*** FAIL: test 4"; quitbird; } else print "ok";
36 print " data types; must be true: " 1.2.3.4 = 1.2.3.4 "," 1 ~ [1,2,3] "," 5 ~ [1..20] "," 2 ~ [ 1, 2, 3 ] "," 5 ~ [ 4 .. 7 ] "," 1.2.3.4 ~ [ 1.2.3.3..1.2.3.5 ];
37 print " data types: must be false: " 1 ~ [ 2, 3, 4 ] "," 5 ~ [ 2, 3, 4, 7..11 ] "," 1.2.3.4 ~ [ 1.2.3.3, 1.2.3.5 ] "," (1,2) > (2,2) "," (1,1) > (1,1);
40 print "Testing prefixes: 1.2.3.4/18 = " px;
41 print "Testing pairs: (1,2) = " (1,2);
43 print "Testing functions...";
52 # print "*** FAIL: this is unreachable";
58 print "Heya, filtering route to " rta.net.ip " prefixlen " rta.net.len;
59 print "This route was from " rta.from;
63 protocol rip MyRIP_test {
69 interface "*" { mode broadcast; };
72 passwords { password "ahoj" from 0 to 10;
73 password "nazdar" from 10;
80 # interface "eth*", "ppp*";
85 # learn; # Learn all routes from the kernel
86 # scan time 10; # Scan kernel tables every 10 seconds
91 route 0.0.0.0/0 via 62.168.0.13;
92 route 62.168.0.0/25 reject;
93 # route 10.0.0.0/8 reject;
94 # route 10.1.1.0:255.255.255.0 via 62.168.0.3;
95 # route 10.1.2.0:255.255.255.0 via 62.168.0.3;
96 # route 10.1.3.0:255.255.255.0 via 62.168.0.4;
97 # route 10.2.0.0/24 via "arc0";