
one_address = 10.1.1.1   # comment is allowed here
addr_list_1 = "{ 10.123.12.32/27 10.123.14.8/27 10.123.10.16/28 10.123.0.0/24 }"
# another macro is used inside this one recursively and only {} are in quotes
addr_list_2 = "{" $one_address 10.123.12.32/27 10.123.14.8/27 10.123.10.16/28 10.123.0.0/24 "}"
# now use comma as a separator
addr_list_3 = "{" $one_address, 10.123.12.33/27, 10.123.14.9/27 "}"
# spaces are mixed with tabs and messed up
addr_list_4 = "{$one_address,	 10.123.12.34/27,		 10.123.14.10/27}"

# multi-line
addr_list_5 = "{$one_address, \
                10.123.12.35/27,\
                10.123.14.11/27}"

# another macro name is a substring of this one's name
addr_list_1_foo = "{ 10.1.2.3 10.4.5.6 10.7.8.9 }"

host1 = "192.168.1.1"
host2 = "192.168.1.2"
recursive_macro = "{" $host1 $host2 "}"
tcp_services = "{ ssh, smtp }"
ext_if = "em1"

mixed_macro_1 = "{ $host1 192.168.2.1 www.fwbuilder.org }"
mixed_macro_2 = "{ $host1 192.168.2.1 em1 }"
mixed_macro_3 = "{ $host1 192.168.2.1 em1:network }"
mixed_macro_4 = "{ em1:network www.fwbuilder.org }"

# test for an undefined macro
# undefined_macro = 192.168.23.45

pass in quick from any to $one_address

pass in quick from any to { 10.11.11.11 $one_address }
pass in quick from any to { 10.12.12.12 $one_address}
pass in quick from any to { 10.13.13.13, $one_address }
pass in quick from any to { $one_address 10.14.14.14 }
pass in quick from any to {$one_address 10.15.15.15 }
pass in quick from any to { $one_address, 10.16.16.16 }
pass in quick from any to { $one_address , 10.17.17.17 }
pass in quick from any to {$one_address , 10.18.18.18 }

pass in quick from any to $addr_list_1
pass in quick from any to $addr_list_2
pass in quick from any to $addr_list_3
pass in quick from any to $addr_list_4
pass in quick from any to $addr_list_5
pass in quick from any to $addr_list_1_foo

# test for undefined macro
pass in quick from any to $undefined_macro

pass out quick on $ext_if proto tcp to $recursive_macro port $tcp_services

pass in quick on $ext_if proto tcp from any to $mixed_macro_1 port 80
pass in quick on $ext_if proto tcp from any to $mixed_macro_2 port 80
pass in quick on $ext_if proto tcp from any to $mixed_macro_3 port 80
pass in quick on $ext_if proto tcp from any to $mixed_macro_4 port 80
