cisco_acl_intp 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +64 -3
- data/cisco_acl_intp.gemspec +2 -2
- data/lib/cisco_acl_intp/ace.rb +9 -286
- data/lib/cisco_acl_intp/ace_ip.rb +24 -22
- data/lib/cisco_acl_intp/ace_other_qualifiers.rb +23 -6
- data/lib/cisco_acl_intp/ace_port.rb +37 -182
- data/lib/cisco_acl_intp/ace_port_opr.rb +251 -0
- data/lib/cisco_acl_intp/ace_port_opr_base.rb +138 -0
- data/lib/cisco_acl_intp/ace_proto.rb +133 -328
- data/lib/cisco_acl_intp/ace_proto_base.rb +163 -0
- data/lib/cisco_acl_intp/ace_srcdst.rb +30 -40
- data/lib/cisco_acl_intp/ace_tcp_flags.rb +9 -3
- data/lib/cisco_acl_intp/acl.rb +1 -251
- data/lib/cisco_acl_intp/acl_base.rb +1 -1
- data/lib/cisco_acl_intp/acl_utils.rb +120 -0
- data/lib/cisco_acl_intp/extended_ace.rb +149 -0
- data/lib/cisco_acl_intp/mono_function_acl.rb +161 -0
- data/lib/cisco_acl_intp/parser.rb +237 -395
- data/lib/cisco_acl_intp/parser.ry +85 -243
- data/lib/cisco_acl_intp/parser_api.rb +2 -2
- data/lib/cisco_acl_intp/single_acl_base.rb +137 -0
- data/lib/cisco_acl_intp/standard_ace.rb +105 -0
- data/lib/cisco_acl_intp/version.rb +1 -1
- data/spec/cisco_acl_intp/ace_ip_spec.rb +63 -0
- data/spec/cisco_acl_intp/ace_other_qualifier_spec.rb +52 -1
- data/spec/cisco_acl_intp/ace_port_operator_spec.rb +340 -0
- data/spec/cisco_acl_intp/ace_port_spec.rb +67 -217
- data/spec/cisco_acl_intp/ace_proto_spec.rb +118 -41
- data/spec/cisco_acl_intp/ace_spec.rb +38 -547
- data/spec/cisco_acl_intp/ace_srcdst_spec.rb +115 -226
- data/spec/cisco_acl_intp/ace_tcp_flags_spec.rb +36 -4
- data/spec/cisco_acl_intp/acl_base_spec.rb +2 -2
- data/spec/cisco_acl_intp/extended_ace_spec.rb +411 -0
- data/spec/cisco_acl_intp/extended_acl_spec.rb +265 -0
- data/spec/cisco_acl_intp/scanner_spec.rb +13 -12
- data/spec/cisco_acl_intp/standard_ace_spec.rb +77 -0
- data/spec/cisco_acl_intp/standard_acl_spec.rb +245 -0
- data/spec/conf/scanner_spec_data.yml +32 -0
- data/spec/spec_helper.rb +2 -2
- metadata +20 -4
- data/spec/cisco_acl_intp/acl_spec.rb +0 -525
@@ -135,83 +135,57 @@ std_acl_log_spec:
|
|
135
135
|
|
136
136
|
ip_proto: 'ahp'
|
137
137
|
{
|
138
|
-
result = AceIpProtoSpec.new(
|
139
|
-
:name => val[0], :number => 51
|
140
|
-
)
|
138
|
+
result = AceIpProtoSpec.new(val[0])
|
141
139
|
}
|
142
140
|
| 'eigrp'
|
143
141
|
{
|
144
|
-
result = AceIpProtoSpec.new(
|
145
|
-
:name => val[0], :number => 88
|
146
|
-
)
|
142
|
+
result = AceIpProtoSpec.new(val[0])
|
147
143
|
}
|
148
144
|
| 'esp'
|
149
145
|
{
|
150
|
-
result = AceIpProtoSpec.new(
|
151
|
-
:name => val[0], :number => 50
|
152
|
-
)
|
146
|
+
result = AceIpProtoSpec.new(val[0])
|
153
147
|
}
|
154
148
|
| 'gre'
|
155
149
|
{
|
156
|
-
result = AceIpProtoSpec.new(
|
157
|
-
:name => val[0], :number => 47
|
158
|
-
)
|
150
|
+
result = AceIpProtoSpec.new(val[0])
|
159
151
|
}
|
160
152
|
| 'igmp'
|
161
153
|
{
|
162
|
-
result = AceIpProtoSpec.new(
|
163
|
-
:name => val[0], :number => 2
|
164
|
-
)
|
154
|
+
result = AceIpProtoSpec.new(val[0])
|
165
155
|
}
|
166
156
|
| 'igrp'
|
167
157
|
{
|
168
|
-
result = AceIpProtoSpec.new(
|
169
|
-
:name => val[0], :number => 9
|
170
|
-
)
|
158
|
+
result = AceIpProtoSpec.new(val[0])
|
171
159
|
}
|
172
160
|
| 'ip'
|
173
161
|
{
|
174
|
-
result = AceIpProtoSpec.new(
|
175
|
-
:name => val[0]
|
176
|
-
)
|
162
|
+
result = AceIpProtoSpec.new(val[0])
|
177
163
|
} # IS NOT 0! (no number)
|
178
164
|
| 'ipinip'
|
179
165
|
{
|
180
|
-
result = AceIpProtoSpec.new(
|
181
|
-
:name => val[0], :number => 94
|
182
|
-
)
|
166
|
+
result = AceIpProtoSpec.new(val[0])
|
183
167
|
}
|
184
168
|
| 'nos'
|
185
169
|
{
|
186
|
-
result = AceIpProtoSpec.new(
|
187
|
-
:name => val[0], :number => 4
|
188
|
-
)
|
170
|
+
result = AceIpProtoSpec.new(val[0])
|
189
171
|
}
|
190
172
|
| 'ospf'
|
191
173
|
{
|
192
|
-
result = AceIpProtoSpec.new(
|
193
|
-
:name => val[0], :number => 89
|
194
|
-
)
|
174
|
+
result = AceIpProtoSpec.new(val[0])
|
195
175
|
}
|
196
176
|
| 'pcp'
|
197
177
|
{
|
198
|
-
result = AceIpProtoSpec.new(
|
199
|
-
:name => val[0], :number => 108
|
200
|
-
)
|
178
|
+
result = AceIpProtoSpec.new(val[0])
|
201
179
|
}
|
202
180
|
| 'pim'
|
203
181
|
{
|
204
|
-
result = AceIpProtoSpec.new(
|
205
|
-
:name => val[0], :number => 103
|
206
|
-
)
|
182
|
+
result = AceIpProtoSpec.new(val[0])
|
207
183
|
}
|
208
184
|
| NUMBER # ip protocol number (0-255)
|
209
185
|
{
|
210
186
|
begin
|
211
187
|
dputs "ip_proto number: #{val[0]}"
|
212
|
-
result = AceIpProtoSpec.new(
|
213
|
-
:number => val[0].to_i
|
214
|
-
)
|
188
|
+
result = AceIpProtoSpec.new(val[0].to_i)
|
215
189
|
rescue => err
|
216
190
|
yyerror_with err.message
|
217
191
|
end
|
@@ -220,25 +194,19 @@ std_acl_log_spec:
|
|
220
194
|
icmp_proto: 'icmp'
|
221
195
|
{
|
222
196
|
dputs 'icmp_proto'
|
223
|
-
result = AceIpProtoSpec.new(
|
224
|
-
:name => val[0], :number => 1
|
225
|
-
)
|
197
|
+
result = AceIpProtoSpec.new(val[0])
|
226
198
|
}
|
227
199
|
|
228
200
|
tcp_proto: 'tcp'
|
229
201
|
{
|
230
202
|
dputs 'tcp_proto'
|
231
|
-
result = AceIpProtoSpec.new(
|
232
|
-
:name => val[0], :number => 6
|
233
|
-
)
|
203
|
+
result = AceIpProtoSpec.new(val[0])
|
234
204
|
}
|
235
205
|
|
236
206
|
udp_proto: 'udp'
|
237
207
|
{
|
238
208
|
dputs 'udp_proto'
|
239
|
-
result = AceIpProtoSpec.new(
|
240
|
-
:name => val[0], :number => 17
|
241
|
-
)
|
209
|
+
result = AceIpProtoSpec.new(val[0])
|
242
210
|
}
|
243
211
|
|
244
212
|
tcp_srcdst_spec: objgrp_srcdst_spec tcp_port_spec
|
@@ -594,12 +562,12 @@ tcp_port_spec:
|
|
594
562
|
{
|
595
563
|
# tcp any
|
596
564
|
dputs 'tcp port any'
|
597
|
-
result =
|
565
|
+
result = AcePortSpec.new(:operator => 'any')
|
598
566
|
}
|
599
567
|
| unary_operator tcp_port_qualifier
|
600
568
|
{
|
601
569
|
dputs "tcp port spec: #{val[0]}/#{val[1]}"
|
602
|
-
result =
|
570
|
+
result = AcePortSpec.new(
|
603
571
|
:operator => val[0],
|
604
572
|
:port => val[1]
|
605
573
|
)
|
@@ -607,7 +575,7 @@ tcp_port_spec:
|
|
607
575
|
| 'range' tcp_port_qualifier tcp_port_qualifier
|
608
576
|
{
|
609
577
|
dputs "tcp port spec: #{val[0]}/#{val[1]}/#{val[2]}"
|
610
|
-
result =
|
578
|
+
result = AcePortSpec.new(
|
611
579
|
:operator => val[0],
|
612
580
|
:begin_port => val[1],
|
613
581
|
:end_port => val[2]
|
@@ -618,12 +586,12 @@ udp_port_spec:
|
|
618
586
|
{
|
619
587
|
# udp any
|
620
588
|
dputs 'udp port: any'
|
621
|
-
result =
|
589
|
+
result = AcePortSpec.new(:operator => 'any')
|
622
590
|
}
|
623
591
|
| unary_operator udp_port_qualifier
|
624
592
|
{
|
625
593
|
dputs "udp port spec: #{val[0]}/#{val[1]}"
|
626
|
-
result =
|
594
|
+
result = AcePortSpec.new(
|
627
595
|
:operator => val[0],
|
628
596
|
:port => val[1]
|
629
597
|
)
|
@@ -631,7 +599,7 @@ udp_port_spec:
|
|
631
599
|
| 'range' udp_port_qualifier udp_port_qualifier
|
632
600
|
{
|
633
601
|
dputs "udp port spec: #{val[0]}/#{val[1]}/#{val[2]}"
|
634
|
-
result =
|
602
|
+
result = AcePortSpec.new(
|
635
603
|
:operator => val[0],
|
636
604
|
:begin_port => val[1],
|
637
605
|
:end_port => val[2]
|
@@ -647,386 +615,260 @@ tcp_port_qualifier: NUMBER
|
|
647
615
|
{
|
648
616
|
begin
|
649
617
|
# port number (0-65535)
|
650
|
-
result = AceTcpProtoSpec.new(
|
651
|
-
:number => val[0]
|
652
|
-
)
|
618
|
+
result = AceTcpProtoSpec.new(val[0])
|
653
619
|
rescue => err
|
654
620
|
yyerror_with err.message
|
655
621
|
end
|
656
622
|
}
|
657
623
|
| 'bgp'
|
658
624
|
{
|
659
|
-
result = AceTcpProtoSpec.new(
|
660
|
-
:name => val[0], :number => 179
|
661
|
-
)
|
625
|
+
result = AceTcpProtoSpec.new(val[0])
|
662
626
|
}
|
663
627
|
| 'chargen'
|
664
628
|
{
|
665
|
-
result = AceTcpProtoSpec.new(
|
666
|
-
:name => val[0], :number => 19
|
667
|
-
)
|
629
|
+
result = AceTcpProtoSpec.new(val[0])
|
668
630
|
}
|
669
631
|
| 'cmd'
|
670
632
|
{
|
671
|
-
result = AceTcpProtoSpec.new(
|
672
|
-
:name => val[0], :number => 514
|
673
|
-
)
|
633
|
+
result = AceTcpProtoSpec.new(val[0])
|
674
634
|
}
|
675
635
|
| 'daytime'
|
676
636
|
{
|
677
|
-
result = AceTcpProtoSpec.new(
|
678
|
-
:name => val[0], :number => 13
|
679
|
-
)
|
637
|
+
result = AceTcpProtoSpec.new(val[0])
|
680
638
|
}
|
681
639
|
| 'discard'
|
682
640
|
{
|
683
|
-
result = AceTcpProtoSpec.new(
|
684
|
-
:name => val[0], :number => 9
|
685
|
-
)
|
641
|
+
result = AceTcpProtoSpec.new(val[0])
|
686
642
|
}
|
687
643
|
| 'domain'
|
688
644
|
{
|
689
|
-
result = AceTcpProtoSpec.new(
|
690
|
-
:name => val[0], :number => 53
|
691
|
-
)
|
645
|
+
result = AceTcpProtoSpec.new(val[0])
|
692
646
|
}
|
693
647
|
| 'drip'
|
694
648
|
{
|
695
|
-
result = AceTcpProtoSpec.new(
|
696
|
-
:name => val[0], :number => 3949
|
697
|
-
)
|
649
|
+
result = AceTcpProtoSpec.new(val[0])
|
698
650
|
}
|
699
651
|
| 'echo'
|
700
652
|
{
|
701
|
-
result = AceTcpProtoSpec.new(
|
702
|
-
:name => val[0], :number => 7
|
703
|
-
)
|
653
|
+
result = AceTcpProtoSpec.new(val[0])
|
704
654
|
}
|
705
655
|
| 'exec'
|
706
656
|
{
|
707
|
-
result = AceTcpProtoSpec.new(
|
708
|
-
:name => val[0], :number => 512
|
709
|
-
)
|
657
|
+
result = AceTcpProtoSpec.new(val[0])
|
710
658
|
}
|
711
659
|
| 'finger'
|
712
660
|
{
|
713
|
-
result = AceTcpProtoSpec.new(
|
714
|
-
:name => val[0], :number => 79
|
715
|
-
)
|
661
|
+
result = AceTcpProtoSpec.new(val[0])
|
716
662
|
}
|
717
663
|
| 'ftp'
|
718
664
|
{
|
719
|
-
result = AceTcpProtoSpec.new(
|
720
|
-
:name => val[0], :number => 21
|
721
|
-
)
|
665
|
+
result = AceTcpProtoSpec.new(val[0])
|
722
666
|
}
|
723
667
|
| 'ftp-data'
|
724
668
|
{
|
725
|
-
result = AceTcpProtoSpec.new(
|
726
|
-
:name => val[0], :number => 20
|
727
|
-
)
|
669
|
+
result = AceTcpProtoSpec.new(val[0])
|
728
670
|
}
|
729
671
|
| 'gopher'
|
730
672
|
{
|
731
|
-
result = AceTcpProtoSpec.new(
|
732
|
-
:name => val[0], :number => 70
|
733
|
-
)
|
673
|
+
result = AceTcpProtoSpec.new(val[0])
|
734
674
|
}
|
735
675
|
| 'hostname'
|
736
676
|
{
|
737
|
-
result = AceTcpProtoSpec.new(
|
738
|
-
:name => val[0], :number => 101
|
739
|
-
)
|
677
|
+
result = AceTcpProtoSpec.new(val[0])
|
740
678
|
}
|
741
679
|
| 'ident'
|
742
680
|
{
|
743
|
-
result = AceTcpProtoSpec.new(
|
744
|
-
:name => val[0], :number => 113
|
745
|
-
)
|
681
|
+
result = AceTcpProtoSpec.new(val[0])
|
746
682
|
}
|
747
683
|
| 'irc'
|
748
684
|
{
|
749
|
-
result = AceTcpProtoSpec.new(
|
750
|
-
:name => val[0], :number => 194
|
751
|
-
)
|
685
|
+
result = AceTcpProtoSpec.new(val[0])
|
752
686
|
}
|
753
687
|
| 'klogin'
|
754
688
|
{
|
755
|
-
result = AceTcpProtoSpec.new(
|
756
|
-
:name => val[0], :number => 543
|
757
|
-
)
|
689
|
+
result = AceTcpProtoSpec.new(val[0])
|
758
690
|
}
|
759
691
|
| 'kshell'
|
760
692
|
{
|
761
|
-
result = AceTcpProtoSpec.new(
|
762
|
-
:name => val[0], :number => 544
|
763
|
-
)
|
693
|
+
result = AceTcpProtoSpec.new(val[0])
|
764
694
|
}
|
765
695
|
| 'login'
|
766
696
|
{
|
767
|
-
result = AceTcpProtoSpec.new(
|
768
|
-
:name => val[0], :number => 513
|
769
|
-
)
|
697
|
+
result = AceTcpProtoSpec.new(val[0])
|
770
698
|
}
|
771
699
|
| 'lpd'
|
772
700
|
{
|
773
|
-
result = AceTcpProtoSpec.new(
|
774
|
-
:name => val[0], :number => 515
|
775
|
-
)
|
701
|
+
result = AceTcpProtoSpec.new(val[0])
|
776
702
|
}
|
777
703
|
| 'nntp'
|
778
704
|
{
|
779
|
-
result = AceTcpProtoSpec.new(
|
780
|
-
:name => val[0], :number => 119
|
781
|
-
)
|
705
|
+
result = AceTcpProtoSpec.new(val[0])
|
782
706
|
}
|
783
707
|
| 'pim-auto-rp'
|
784
708
|
{
|
785
|
-
result = AceTcpProtoSpec.new(
|
786
|
-
:name => val[0], :number => 496
|
787
|
-
)
|
709
|
+
result = AceTcpProtoSpec.new(val[0])
|
788
710
|
}
|
789
711
|
| 'pop2'
|
790
712
|
{
|
791
|
-
result = AceTcpProtoSpec.new(
|
792
|
-
:name => val[0], :number => 109
|
793
|
-
)
|
713
|
+
result = AceTcpProtoSpec.new(val[0])
|
794
714
|
}
|
795
715
|
| 'pop3'
|
796
716
|
{
|
797
|
-
result = AceTcpProtoSpec.new(
|
798
|
-
:name => val[0], :number => 110
|
799
|
-
)
|
717
|
+
result = AceTcpProtoSpec.new(val[0])
|
800
718
|
}
|
801
719
|
| 'smtp'
|
802
720
|
{
|
803
|
-
result = AceTcpProtoSpec.new(
|
804
|
-
:name => val[0], :number => 25
|
805
|
-
)
|
721
|
+
result = AceTcpProtoSpec.new(val[0])
|
806
722
|
}
|
807
723
|
| 'sunrpc'
|
808
724
|
{
|
809
|
-
result = AceTcpProtoSpec.new(
|
810
|
-
:name => val[0], :number => 111
|
811
|
-
)
|
725
|
+
result = AceTcpProtoSpec.new(val[0])
|
812
726
|
}
|
813
727
|
| 'syslog'
|
814
728
|
{
|
815
|
-
result = AceTcpProtoSpec.new(
|
816
|
-
:name => val[0], :number => 514
|
817
|
-
)
|
729
|
+
result = AceTcpProtoSpec.new(val[0])
|
818
730
|
}
|
819
731
|
| 'tacacs'
|
820
732
|
{
|
821
|
-
result = AceTcpProtoSpec.new(
|
822
|
-
:name => val[0], :number => 49
|
823
|
-
)
|
733
|
+
result = AceTcpProtoSpec.new(val[0])
|
824
734
|
}
|
825
735
|
| 'talk'
|
826
736
|
{
|
827
|
-
result = AceTcpProtoSpec.new(
|
828
|
-
:name => val[0], :number => 517
|
829
|
-
)
|
737
|
+
result = AceTcpProtoSpec.new(val[0])
|
830
738
|
}
|
831
739
|
| 'telnet'
|
832
740
|
{
|
833
|
-
result = AceTcpProtoSpec.new(
|
834
|
-
:name => val[0], :number => 23
|
835
|
-
)
|
741
|
+
result = AceTcpProtoSpec.new(val[0])
|
836
742
|
}
|
837
743
|
| 'time'
|
838
744
|
{
|
839
|
-
result = AceTcpProtoSpec.new(
|
840
|
-
:name => val[0], :number => 37
|
841
|
-
)
|
745
|
+
result = AceTcpProtoSpec.new(val[0])
|
842
746
|
}
|
843
747
|
| 'uucp'
|
844
748
|
{
|
845
|
-
result = AceTcpProtoSpec.new(
|
846
|
-
:name => val[0], :number => 540
|
847
|
-
)
|
749
|
+
result = AceTcpProtoSpec.new(val[0])
|
848
750
|
}
|
849
751
|
| 'whois'
|
850
752
|
{
|
851
|
-
result = AceTcpProtoSpec.new(
|
852
|
-
:name => val[0], :number => 43
|
853
|
-
)
|
753
|
+
result = AceTcpProtoSpec.new(val[0])
|
854
754
|
}
|
855
755
|
| 'www'
|
856
756
|
{
|
857
|
-
result = AceTcpProtoSpec.new(
|
858
|
-
:name => val[0], :number => 80
|
859
|
-
)
|
757
|
+
result = AceTcpProtoSpec.new(val[0])
|
860
758
|
}
|
861
759
|
|
862
760
|
udp_port_qualifier: NUMBER
|
863
761
|
{
|
864
762
|
# port number (0-65535)
|
865
|
-
result = AceUdpProtoSpec.new(
|
866
|
-
:number => val[0]
|
867
|
-
)
|
763
|
+
result = AceUdpProtoSpec.new(val[0])
|
868
764
|
}
|
869
765
|
| 'biff'
|
870
766
|
{
|
871
|
-
result = AceUdpProtoSpec.new(
|
872
|
-
:name => val[0], :number => 512
|
873
|
-
)
|
767
|
+
result = AceUdpProtoSpec.new(val[0])
|
874
768
|
}
|
875
769
|
| 'bootpc'
|
876
770
|
{
|
877
|
-
result = AceUdpProtoSpec.new(
|
878
|
-
:name => val[0], :number => 68
|
879
|
-
)
|
771
|
+
result = AceUdpProtoSpec.new(val[0])
|
880
772
|
}
|
881
773
|
| 'bootps'
|
882
774
|
{
|
883
|
-
result = AceUdpProtoSpec.new(
|
884
|
-
:name => val[0], :number => 67
|
885
|
-
)
|
775
|
+
result = AceUdpProtoSpec.new(val[0])
|
886
776
|
}
|
887
777
|
| 'discard'
|
888
778
|
{
|
889
|
-
result = AceUdpProtoSpec.new(
|
890
|
-
:name => val[0], :number => 9
|
891
|
-
)
|
779
|
+
result = AceUdpProtoSpec.new(val[0])
|
892
780
|
}
|
893
781
|
| 'dnsix'
|
894
782
|
{
|
895
|
-
result = AceUdpProtoSpec.new(
|
896
|
-
:name => val[0], :number => 195
|
897
|
-
)
|
783
|
+
result = AceUdpProtoSpec.new(val[0])
|
898
784
|
}
|
899
785
|
| 'domain'
|
900
786
|
{
|
901
|
-
result = AceUdpProtoSpec.new(
|
902
|
-
:name => val[0], :number => 53
|
903
|
-
)
|
787
|
+
result = AceUdpProtoSpec.new(val[0])
|
904
788
|
}
|
905
789
|
| 'echo'
|
906
790
|
{
|
907
|
-
result = AceUdpProtoSpec.new(
|
908
|
-
:name => val[0], :number => 7
|
909
|
-
)
|
791
|
+
result = AceUdpProtoSpec.new(val[0])
|
910
792
|
}
|
911
793
|
| 'isakmp'
|
912
794
|
{
|
913
|
-
result = AceUdpProtoSpec.new(
|
914
|
-
:name => val[0], :number => 500
|
915
|
-
)
|
795
|
+
result = AceUdpProtoSpec.new(val[0])
|
916
796
|
}
|
917
797
|
| 'mobile-ip'
|
918
798
|
{
|
919
|
-
result = AceUdpProtoSpec.new(
|
920
|
-
:name => val[0], :number => 434
|
921
|
-
)
|
799
|
+
result = AceUdpProtoSpec.new(val[0])
|
922
800
|
}
|
923
801
|
| 'nameserver'
|
924
802
|
{
|
925
|
-
result = AceUdpProtoSpec.new(
|
926
|
-
:name => val[0], :number => 42
|
927
|
-
)
|
803
|
+
result = AceUdpProtoSpec.new(val[0])
|
928
804
|
}
|
929
805
|
| 'netbios-dgm'
|
930
806
|
{
|
931
|
-
result = AceUdpProtoSpec.new(
|
932
|
-
:name => val[0], :number => 138
|
933
|
-
)
|
807
|
+
result = AceUdpProtoSpec.new(val[0])
|
934
808
|
}
|
935
809
|
| 'netbios-ns'
|
936
810
|
{
|
937
|
-
result = AceUdpProtoSpec.new(
|
938
|
-
:name => val[0], :number => 137
|
939
|
-
)
|
811
|
+
result = AceUdpProtoSpec.new(val[0])
|
940
812
|
}
|
941
813
|
| 'netbios-ss'
|
942
814
|
{
|
943
|
-
result = AceUdpProtoSpec.new(
|
944
|
-
:name => val[0], :number => 139
|
945
|
-
)
|
815
|
+
result = AceUdpProtoSpec.new(val[0])
|
946
816
|
}
|
947
817
|
| 'non500-isakmp'
|
948
818
|
{
|
949
|
-
result = AceUdpProtoSpec.new(
|
950
|
-
:name => val[0], :number => 4500
|
951
|
-
)
|
819
|
+
result = AceUdpProtoSpec.new(val[0])
|
952
820
|
}
|
953
821
|
| 'ntp'
|
954
822
|
{
|
955
|
-
result = AceUdpProtoSpec.new(
|
956
|
-
:name => val[0], :number => 123
|
957
|
-
)
|
823
|
+
result = AceUdpProtoSpec.new(val[0])
|
958
824
|
}
|
959
825
|
| 'pim-auto-rp'
|
960
826
|
{
|
961
|
-
result = AceUdpProtoSpec.new(
|
962
|
-
:name => val[0], :number => 496
|
963
|
-
)
|
827
|
+
result = AceUdpProtoSpec.new(val[0])
|
964
828
|
}
|
965
829
|
| 'rip'
|
966
830
|
{
|
967
|
-
result = AceUdpProtoSpec.new(
|
968
|
-
:name => val[0], :number => 520
|
969
|
-
)
|
831
|
+
result = AceUdpProtoSpec.new(val[0])
|
970
832
|
}
|
971
833
|
| 'snmp'
|
972
834
|
{
|
973
|
-
result = AceUdpProtoSpec.new(
|
974
|
-
:name => val[0], :number => 161
|
975
|
-
)
|
835
|
+
result = AceUdpProtoSpec.new(val[0])
|
976
836
|
}
|
977
837
|
| 'snmptrap'
|
978
838
|
{
|
979
|
-
result = AceUdpProtoSpec.new(
|
980
|
-
:name => val[0], :number => 162
|
981
|
-
)
|
839
|
+
result = AceUdpProtoSpec.new(val[0])
|
982
840
|
}
|
983
841
|
| 'sunrpc'
|
984
842
|
{
|
985
|
-
result = AceUdpProtoSpec.new(
|
986
|
-
:name => val[0], :number => 111
|
987
|
-
)
|
843
|
+
result = AceUdpProtoSpec.new(val[0])
|
988
844
|
}
|
989
845
|
| 'syslog'
|
990
846
|
{
|
991
|
-
result = AceUdpProtoSpec.new(
|
992
|
-
:name => val[0], :number => 514
|
993
|
-
)
|
847
|
+
result = AceUdpProtoSpec.new(val[0])
|
994
848
|
}
|
995
849
|
| 'tacacs'
|
996
850
|
{
|
997
|
-
result = AceUdpProtoSpec.new(
|
998
|
-
:name => val[0], :number => 49
|
999
|
-
)
|
851
|
+
result = AceUdpProtoSpec.new(val[0])
|
1000
852
|
}
|
1001
853
|
| 'talk'
|
1002
854
|
{
|
1003
|
-
result = AceUdpProtoSpec.new(
|
1004
|
-
:name => val[0], :number => 517
|
1005
|
-
)
|
855
|
+
result = AceUdpProtoSpec.new(val[0])
|
1006
856
|
}
|
1007
857
|
| 'tftp'
|
1008
858
|
{
|
1009
|
-
result = AceUdpProtoSpec.new(
|
1010
|
-
:name => val[0], :number => 69
|
1011
|
-
)
|
859
|
+
result = AceUdpProtoSpec.new(val[0])
|
1012
860
|
}
|
1013
861
|
| 'time'
|
1014
862
|
{
|
1015
|
-
result = AceUdpProtoSpec.new(
|
1016
|
-
:name => val[0], :number => 37
|
1017
|
-
)
|
863
|
+
result = AceUdpProtoSpec.new(val[0])
|
1018
864
|
}
|
1019
865
|
| 'who'
|
1020
866
|
{
|
1021
|
-
result = AceUdpProtoSpec.new(
|
1022
|
-
:name => val[0], :number => 513
|
1023
|
-
)
|
867
|
+
result = AceUdpProtoSpec.new(val[0])
|
1024
868
|
}
|
1025
869
|
| 'xdmcp'
|
1026
870
|
{
|
1027
|
-
result = AceUdpProtoSpec.new(
|
1028
|
-
:name => val[0], :number => 177
|
1029
|
-
)
|
871
|
+
result = AceUdpProtoSpec.new(val[0])
|
1030
872
|
}
|
1031
873
|
|
1032
874
|
# tcp flags list
|
@@ -159,7 +159,7 @@ module CiscoAclIntp
|
|
159
159
|
|
160
160
|
# Syntax error handler
|
161
161
|
def on_error(tok, val, vstack)
|
162
|
-
errstr =
|
162
|
+
errstr = format(
|
163
163
|
'%s, near value: %s, (token: %s)',
|
164
164
|
err_pos_str, val, token_to_str(tok)
|
165
165
|
)
|
@@ -228,7 +228,7 @@ module CiscoAclIntp
|
|
228
228
|
# Generate error string
|
229
229
|
# @return [String] error position string
|
230
230
|
def err_pos_str
|
231
|
-
|
231
|
+
format(
|
232
232
|
'in acl: %s, line: %s',
|
233
233
|
@curr_acl_name,
|
234
234
|
if @acl_table.key?(@curr_acl_name)
|