Annotation of embedaddon/bird2/filter/test.conf2, revision 1.1.1.1
1.1 misho 1: /*
2: * This is an example configuration file.
3: */
4:
5: # Yet another comment
6:
7: router id 62.168.0.1;
8:
9: define xyzzy = (120+10);
10:
11: protocol device {
12: # disabled;
13: # interface "eth*", "ppp*";
14: }
15:
16: protocol direct {
17: }
18:
19: protocol kernel {
20: disabled;
21: ipv4; # Must be specified at least one channel
22: # learn; # Learn all routes from the kernel
23: # scan time 10; # Scan kernel tables every 10 seconds
24: }
25:
26: protocol static {
27: # disabled;
28:
29: ipv4 {
30: export all;
31:
32: import filter {
33: print "ahoj";
34: print source;
35: if source = RTS_STATIC then {
36: print "It is from static";
37: }
38: print from;
39: from = 1.2.3.4;
40: print from;
41: print scope;
42: scope = SCOPE_HOST;
43: print scope;
44: if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then {
45: print "Failed in test";
46: quitbird;
47: }
48:
49: preference = 15;
50: print preference;
51: preference = 29;
52: print preference;
53: rip_metric = 1;
54: print rip_metric;
55: rip_metric = rip_metric + 5;
56: print rip_metric;
57:
58: bgp_community = -empty-;
59: print "hi";
60: bgp_community = add(bgp_community, (1,2));
61: print "hello";
62: bgp_community = add(bgp_community, (2,3));
63: bgp_community.add((4,5));
64: print "community = ", bgp_community;
65: bgp_community.delete((2,3));
66: print "community = ", bgp_community;
67: bgp_community.empty;
68: print "community = ", bgp_community;
69: print "done";
70:
71: accept;
72: };
73: };
74: route 0.0.0.0/0 via 195.113.31.113;
75: route 62.168.0.0/25 reject;
76: route 1.2.3.4/32 via 195.113.31.124;
77: route 10.0.0.0/8 reject;
78: route 10.1.1.0/24 via 62.168.0.3;
79: route 10.1.2.0/24 via 62.168.0.3;
80: route 10.1.3.0/24 via 62.168.0.4;
81: route 10.2.0.0/24 via "arc0";
82: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>