/[libconf]/libconf/perl-Libconf/templates/pf_template.pm
ViewVC logotype

Diff of /libconf/perl-Libconf/templates/pf_template.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by logarno, Mon Apr 21 16:33:10 2003 UTC revision 1.2 by dams, Mon Apr 21 17:11:12 2003 UTC
# Line 31  $templates{pf} = { Line 31  $templates{pf} = {
31                             rules => [                             rules => [
32                                       q(                                       q(
33                                         foreach my $regex (qw(from to proto on)) {                                         foreach my $regex (qw(from to proto on)) {
34                                                 if ($in =~ s/^.*($regex)\s+(\S*)//) {                                             if ($in =~ s/\s*($regex)\s+(\S*)//) {
35                                                     $atom->{$regex} = $2;                                                 $atom->{type} = 'VALUES_LIST';
36                                                 }                                                 $atom->{type2} = 'PF_RULE';
37                                                   $atom->{values}{$regex} = $2;
38                                             }                                             }
39                                         foreach my $regex (qw(in|out log pass|block quick)) {                                         }
40                                             if ($in =~ s/^.*\s+($regex)\s+.*$//) {                                         foreach my $regex ('in|out', 'log', 'pass|block', 'quick', 'keep state', 'all') {
41                                                  $atom->{$regex} = $1;                                             if ($in =~ s/\s*($regex)//) {
42                                                   $atom->{type} = 'VALUES_LIST';
43                                                   $atom->{type2} = 'PF_RULE';
44                                                   $atom->{list} ||= [];
45                                                   push @{$atom->{list}}, $1;
46                                             }                                             }
47                                         }                                         }
48                                         if ($in =~ s/^.*port\s+?(\.*?)\s+?(\.*?)\s*.*$//) {                                         if ($in =~ s/\s*port\s+(\S+)\s+(\S+)//) {
49                                             $atom->{port} = $2;                                             $atom->{type} = 'VALUES';
50                                             $atom->{cmp} = $1;                                             $atom->{type2} = 'PF_RULE';
51                                               $atom->{values}{port} = $2;
52                                               $atom->{values}{cmp} = $1;
53                                         }                                         }
54                                         )                                         )
55                                       ],                                       ],

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26