2 * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netvirt.aclservice.tests
10 import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
11 import org.opendaylight.genius.mdsalutil.MetaDataUtil
12 import org.opendaylight.genius.mdsalutil.NwConstants
13 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
14 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
15 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable
16 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
17 import org.opendaylight.genius.mdsalutil.matches.MatchArpSpa
18 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
19 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
20 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
21 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
22 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
23 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
24 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
25 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
26 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
27 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
28 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
29 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
32 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
33 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
34 import org.opendaylight.yangtools.yang.common.Uint64
36 class FlowEntryObjectsBase {
38 protected def fixedFlowsPort1(String ip1, String prefix) {
39 #[ fixedIngressFlowsPort1, fixedEgressFlowsPort1(ip1, prefix) ]
42 protected def fixedIngressFlowsPort1() {
44 new FlowEntityBuilder >> [
45 dpnId = Uint64.valueOf(123bi)
46 cookie = Uint64.valueOf(110100480bi)
47 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
48 flowName = "Ingress_DHCP_Server_v4123_987_Permit_"
49 instructionInfoList = #[
50 new InstructionApplyActions(#[
51 new ActionNxResubmit(220 as short)
55 new MatchEthernetType(2048L),
56 new MatchIpProtocol(17 as short),
57 new MatchUdpDestinationPort(68),
58 new MatchUdpSourcePort(67),
59 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
62 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
64 new FlowEntityBuilder >> [
65 dpnId = Uint64.valueOf(123bi)
66 cookie = Uint64.valueOf(110100480bi)
67 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
68 flowName = "Ingress_DHCP_Server_v6_123_987_Permit_"
69 instructionInfoList = #[
70 new InstructionApplyActions(#[
71 new ActionNxResubmit(220 as short)
75 new MatchEthernetType(34525L),
76 new MatchIpProtocol(17 as short),
77 new MatchUdpDestinationPort(546),
78 new MatchUdpSourcePort(547),
79 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
82 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
84 new FlowEntityBuilder >> [
85 dpnId = Uint64.valueOf(123bi)
86 cookie = Uint64.valueOf(110100480bi)
87 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
88 flowName = "Ingress_ICMPv6_123_987_130_Permit_"
89 instructionInfoList = #[
90 new InstructionApplyActions(#[
91 new ActionNxResubmit(220 as short)
95 new MatchEthernetType(34525L),
96 new MatchIpProtocol(58 as short),
97 new MatchIcmpv6(130 as short, 0 as short),
98 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
101 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
103 new FlowEntityBuilder >> [
104 dpnId = Uint64.valueOf(123bi)
105 cookie = Uint64.valueOf(110100480bi)
106 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
107 flowName = "Ingress_ICMPv6_123_987_135_Permit_"
108 instructionInfoList = #[
109 new InstructionApplyActions(#[
110 new ActionNxResubmit(220 as short)
114 new MatchEthernetType(34525L),
115 new MatchIpProtocol(58 as short),
116 new MatchIcmpv6(135 as short, 0 as short),
117 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
120 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
122 new FlowEntityBuilder >> [
123 dpnId = Uint64.valueOf(123bi)
124 cookie = Uint64.valueOf(110100480bi)
125 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
126 flowName = "Ingress_ICMPv6_123_987_136_Permit_"
127 instructionInfoList = #[
128 new InstructionApplyActions(#[
129 new ActionNxResubmit(220 as short)
133 new MatchEthernetType(34525L),
134 new MatchIpProtocol(58 as short),
135 new MatchIcmpv6(136 as short, 0 as short),
136 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
139 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
141 new FlowEntityBuilder >> [
142 dpnId = Uint64.valueOf(123bi)
143 cookie = Uint64.valueOf(110100480bi)
144 flowId = "Ingress_ARP_123_987"
145 flowName = "Ingress_ARP_123_987"
146 instructionInfoList = #[
147 new InstructionApplyActions(#[
148 new ActionNxResubmit(220 as short)
152 new MatchEthernetType(2054L),
153 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
156 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
162 protected def fixedEgressL2BroadcastFlowsPort1() {
164 new FlowEntityBuilder >> [
165 dpnId = Uint64.valueOf(123bi)
166 cookie = Uint64.valueOf(110100480bi)
167 flowId = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:F3"
168 flowName = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:F3"
169 instructionInfoList = #[
170 new InstructionApplyActions(#[
171 new ActionNxResubmit(17 as short)
175 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
176 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
179 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
184 protected def fixedIngressL3BroadcastFlows(String prefix) {
186 new FlowEntityBuilder >> [
187 cookie = Uint64.valueOf(110100480bi)
188 dpnId = Uint64.valueOf(123bi)
189 flowId = "Ingress_v4_Broadcast_123_987_10.0.0.255_Permit"
190 flowName = "Ingress_v4_Broadcast_123_987_10.0.0.255_Permit"
193 instructionInfoList = #[
194 new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
197 new MatchEthernetDestination(new MacAddress("ff:ff:ff:ff:ff:ff")),
198 new MatchEthernetType(2048L),
199 new MatchIpv4Destination(new Ipv4Prefix("10.0.0.255/" + prefix)),
200 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
203 sendFlowRemFlag = false
205 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
211 protected def fixedEgressFlowsPort1(String ip1, String prefix) {
213 new FlowEntityBuilder >> [
214 dpnId = Uint64.valueOf(123bi)
215 cookie = Uint64.valueOf(110100480bi)
216 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F3_Permit_"
217 flowName = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F3_Permit_"
218 instructionInfoList = #[
219 new InstructionApplyActions(#[
220 new ActionNxResubmit(17 as short)
224 new MatchEthernetType(2048L),
225 new MatchIpProtocol(17 as short),
226 new MatchUdpDestinationPort(67),
227 new MatchUdpSourcePort(68),
228 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG),
229 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3"))
232 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
234 new FlowEntityBuilder >> [
235 dpnId = Uint64.valueOf(123bi)
236 cookie = Uint64.valueOf(110100480bi)
237 flowId = "Egress_ICMPv6_123_987_133_Permit_"
238 flowName = "Egress_ICMPv6_123_987_133_Permit_"
239 instructionInfoList = #[
240 new InstructionApplyActions(#[
241 new ActionNxResubmit(17 as short)
245 new MatchEthernetType(34525L),
246 new MatchIpProtocol(58 as short),
247 new MatchIcmpv6(133 as short, 0 as short),
248 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
251 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
253 new FlowEntityBuilder >> [
254 dpnId = Uint64.valueOf(123bi)
255 cookie = Uint64.valueOf(110100480bi)
256 flowId = "Egress_ICMPv6_123_987_135_Permit_"
257 flowName = "Egress_ICMPv6_123_987_135_Permit_"
258 instructionInfoList = #[
259 new InstructionApplyActions(#[
260 new ActionNxResubmit(17 as short)
264 new MatchEthernetType(34525L),
265 new MatchIpProtocol(58 as short),
266 new MatchIcmpv6(135 as short, 0 as short),
267 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
270 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
272 new FlowEntityBuilder >> [
273 dpnId = Uint64.valueOf(123bi)
274 cookie = Uint64.valueOf(110100480bi)
275 flowId = "Egress_ICMPv6_123_987_136_Permit_"
276 flowName = "Egress_ICMPv6_123_987_136_Permit_"
277 instructionInfoList = #[
278 new InstructionApplyActions(#[
279 new ActionNxResubmit(17 as short)
283 new MatchEthernetType(34525L),
284 new MatchIpProtocol(58 as short),
285 new MatchIcmpv6(136 as short, 0 as short),
286 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
289 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
291 ] + fixedEgressArpFlowsPort1(ip1, prefix)
295 protected def fixedEgressArpFlowsPort1(String ip1, String prefix) {
297 new FlowEntityBuilder >> [
298 dpnId = Uint64.valueOf(123bi)
299 cookie = Uint64.valueOf(110100480bi)
300 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F3" + ip1 + "/" + prefix
301 flowName = "Egress_ARP_123_987_0D:AA:D8:42:30:F3" + ip1 + "/" + prefix
302 instructionInfoList = #[
303 new InstructionApplyActions(#[
304 new ActionNxResubmit(17 as short)
308 new MatchEthernetType(2054L),
309 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F3")),
310 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
311 new MatchArpSpa(new Ipv4Prefix(ip1 + "/" + prefix)),
312 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
315 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
320 protected def fixedIngressFlowsPort2() {
322 new FlowEntityBuilder >> [
323 dpnId = Uint64.valueOf(123bi)
324 cookie = Uint64.valueOf(110100480bi)
325 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
326 flowName = "Ingress_DHCP_Server_v4123_987_Permit_"
327 instructionInfoList = #[
328 new InstructionApplyActions(#[
329 new ActionNxResubmit(220 as short)
333 new MatchEthernetType(2048L),
334 new MatchIpProtocol(17 as short),
335 new MatchUdpDestinationPort(68),
336 new MatchUdpSourcePort(67),
337 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
340 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
342 new FlowEntityBuilder >> [
343 dpnId = Uint64.valueOf(123bi)
344 cookie = Uint64.valueOf(110100480bi)
345 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
346 flowName = "Ingress_DHCP_Server_v6_123_987_Permit_"
347 instructionInfoList = #[
348 new InstructionApplyActions(#[
349 new ActionNxResubmit(220 as short)
353 new MatchEthernetType(34525L),
354 new MatchIpProtocol(17 as short),
355 new MatchUdpDestinationPort(546),
356 new MatchUdpSourcePort(547),
357 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
360 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
362 new FlowEntityBuilder >> [
363 dpnId = Uint64.valueOf(123bi)
364 cookie = Uint64.valueOf(110100480bi)
365 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
366 flowName = "Ingress_ICMPv6_123_987_130_Permit_"
367 instructionInfoList = #[
368 new InstructionApplyActions(#[
369 new ActionNxResubmit(220 as short)
373 new MatchEthernetType(34525L),
374 new MatchIpProtocol(58 as short),
375 new MatchIcmpv6(130 as short, 0 as short),
376 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
379 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
381 new FlowEntityBuilder >> [
382 dpnId = Uint64.valueOf(123bi)
383 cookie = Uint64.valueOf(110100480bi)
384 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
385 flowName = "Ingress_ICMPv6_123_987_135_Permit_"
386 instructionInfoList = #[
387 new InstructionApplyActions(#[
388 new ActionNxResubmit(220 as short)
392 new MatchEthernetType(34525L),
393 new MatchIpProtocol(58 as short),
394 new MatchIcmpv6(135 as short, 0 as short),
395 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
398 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
400 new FlowEntityBuilder >> [
401 dpnId = Uint64.valueOf(123bi)
402 cookie = Uint64.valueOf(110100480bi)
403 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
404 flowName = "Ingress_ICMPv6_123_987_136_Permit_"
405 instructionInfoList = #[
406 new InstructionApplyActions(#[
407 new ActionNxResubmit(220 as short)
411 new MatchEthernetType(34525L),
412 new MatchIpProtocol(58 as short),
413 new MatchIcmpv6(136 as short, 0 as short),
414 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
417 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
419 new FlowEntityBuilder >> [
420 dpnId = Uint64.valueOf(123bi)
421 cookie = Uint64.valueOf(110100480bi)
422 flowId = "Ingress_ARP_123_987"
423 flowName = "Ingress_ARP_123_987"
424 instructionInfoList = #[
425 new InstructionApplyActions(#[
426 new ActionNxResubmit(220 as short)
430 new MatchEthernetType(2054L),
431 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
434 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
439 protected def fixedEgressL2BroadcastFlowsPort2 () {
441 new FlowEntityBuilder >> [
442 dpnId = Uint64.valueOf(123bi)
443 cookie = Uint64.valueOf(110100480bi)
444 flowId = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:F4"
445 flowName = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:F4"
446 instructionInfoList = #[
447 new InstructionApplyActions(#[
448 new ActionNxResubmit(17 as short)
452 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
453 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
456 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
461 protected def fixedEgressFlowsPort2 (String ip2, String prefix) {
463 new FlowEntityBuilder >> [
464 dpnId = Uint64.valueOf(123bi)
465 cookie = Uint64.valueOf(110100480bi)
466 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F4_Permit_"
467 flowName = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F4_Permit_"
468 instructionInfoList = #[
469 new InstructionApplyActions(#[
470 new ActionNxResubmit(17 as short)
474 new MatchEthernetType(2048L),
475 new MatchIpProtocol(17 as short),
476 new MatchUdpDestinationPort(67 as short),
477 new MatchUdpSourcePort(68 as short),
478 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG),
479 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4"))
482 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
484 new FlowEntityBuilder >> [
485 dpnId = Uint64.valueOf(123bi)
486 cookie = Uint64.valueOf(110100480bi)
487 flowId = "Egress_ICMPv6_123_987_133_Permit_"
488 flowName = "Egress_ICMPv6_123_987_133_Permit_"
489 instructionInfoList = #[
490 new InstructionApplyActions(#[
491 new ActionNxResubmit(17 as short)
495 new MatchEthernetType(34525L),
496 new MatchIpProtocol(58 as short),
497 new MatchIcmpv6(133 as short, 0 as short),
498 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
501 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
503 new FlowEntityBuilder >> [
504 dpnId = Uint64.valueOf(123bi)
505 cookie = Uint64.valueOf(110100480bi)
506 flowId = "Egress_ICMPv6_123_987_135_Permit_"
507 flowName = "Egress_ICMPv6_123_987_135_Permit_"
508 instructionInfoList = #[
509 new InstructionApplyActions(#[
510 new ActionNxResubmit(17 as short)
514 new MatchEthernetType(34525L),
515 new MatchIpProtocol(58 as short),
516 new MatchIcmpv6(135 as short, 0 as short),
517 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
520 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
522 new FlowEntityBuilder >> [
523 dpnId = Uint64.valueOf(123bi)
524 cookie = Uint64.valueOf(110100480bi)
525 flowId = "Egress_ICMPv6_123_987_136_Permit_"
526 flowName = "Egress_ICMPv6_123_987_136_Permit_"
527 instructionInfoList = #[
528 new InstructionApplyActions(#[
529 new ActionNxResubmit(17 as short)
533 new MatchEthernetType(34525L),
534 new MatchIpProtocol(58 as short),
535 new MatchIcmpv6(136 as short, 0 as short),
536 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
539 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
541 ] + fixedEgressArpFlowsPort2(ip2, prefix)
544 protected def fixedEgressArpFlowsPort2(String ip2, String prefix) {
546 new FlowEntityBuilder >> [
547 dpnId = Uint64.valueOf(123bi)
548 cookie = Uint64.valueOf(110100480bi)
549 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F4" + ip2 + "/" + prefix
550 flowName = "Egress_ARP_123_987_0D:AA:D8:42:30:F4" + ip2 + "/" + prefix
551 instructionInfoList = #[
552 new InstructionApplyActions(#[
553 new ActionNxResubmit(17 as short)
557 new MatchEthernetType(2054L),
558 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
559 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
560 new MatchArpSpa(new Ipv4Prefix(ip2 + "/" + prefix)),
561 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
564 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
569 protected def fixedIngressFlowsPort3() {
571 new FlowEntityBuilder >> [
572 dpnId = Uint64.valueOf(123bi)
573 cookie = Uint64.valueOf(110100480bi)
574 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
575 flowName = "Ingress_DHCP_Server_v4123_987_Permit_"
576 instructionInfoList = #[
577 new InstructionApplyActions(#[
578 new ActionNxResubmit(220 as short)
582 new MatchEthernetType(2048L),
583 new MatchIpProtocol(17 as short),
584 new MatchUdpDestinationPort(68),
585 new MatchUdpSourcePort(67),
586 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
589 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
591 new FlowEntityBuilder >> [
592 dpnId = Uint64.valueOf(123bi)
593 cookie = Uint64.valueOf(110100480bi)
594 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
595 flowName = "Ingress_DHCP_Server_v6_123_987_Permit_"
596 instructionInfoList = #[
597 new InstructionApplyActions(#[
598 new ActionNxResubmit(220 as short)
602 new MatchEthernetType(34525L),
603 new MatchIpProtocol(17 as short),
604 new MatchUdpDestinationPort(546),
605 new MatchUdpSourcePort(547),
606 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
609 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
611 new FlowEntityBuilder >> [
612 dpnId = Uint64.valueOf(123bi)
613 cookie = Uint64.valueOf(110100480bi)
614 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
615 flowName = "Ingress_ICMPv6_123_987_130_Permit_"
616 instructionInfoList = #[
617 new InstructionApplyActions(#[
618 new ActionNxResubmit(220 as short)
622 new MatchEthernetType(34525L),
623 new MatchIpProtocol(58 as short),
624 new MatchIcmpv6(130 as short, 0 as short),
625 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
628 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
630 new FlowEntityBuilder >> [
631 dpnId = Uint64.valueOf(123bi)
632 cookie = Uint64.valueOf(110100480bi)
633 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
634 flowName = "Ingress_ICMPv6_123_987_135_Permit_"
635 instructionInfoList = #[
636 new InstructionApplyActions(#[
637 new ActionNxResubmit(220 as short)
641 new MatchEthernetType(34525L),
642 new MatchIpProtocol(58 as short),
643 new MatchIcmpv6(135 as short, 0 as short),
644 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
647 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
649 new FlowEntityBuilder >> [
650 dpnId = Uint64.valueOf(123bi)
651 cookie = Uint64.valueOf(110100480bi)
652 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
653 flowName = "Ingress_ICMPv6_123_987_136_Permit_"
654 instructionInfoList = #[
655 new InstructionApplyActions(#[
656 new ActionNxResubmit(220 as short)
660 new MatchEthernetType(34525L),
661 new MatchIpProtocol(58 as short),
662 new MatchIcmpv6(136 as short, 0 as short),
663 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
666 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
668 new FlowEntityBuilder >> [
669 dpnId = Uint64.valueOf(123bi)
670 cookie = Uint64.valueOf(110100480bi)
671 flowId = "Ingress_ARP_123_987"
672 flowName = "Ingress_ARP_123_987"
673 instructionInfoList = #[
674 new InstructionApplyActions(#[
675 new ActionNxResubmit(220 as short)
679 new MatchEthernetType(2054L),
680 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
683 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
688 protected def fixedEgressL2BroadcastFlowsPort3 () {
690 new FlowEntityBuilder >> [
691 dpnId = Uint64.valueOf(123bi)
692 cookie = Uint64.valueOf(110100480bi)
693 flowId = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:F5"
694 flowName = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:F5"
695 instructionInfoList = #[
696 new InstructionApplyActions(#[
697 new ActionNxResubmit(17 as short)
701 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
702 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
705 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
710 protected def fixedEgressFlowsPort3 (String ip3, String prefix) {
712 new FlowEntityBuilder >> [
713 dpnId = Uint64.valueOf(123bi)
714 cookie = Uint64.valueOf(110100480bi)
715 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F5_Permit_"
716 flowName = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F5_Permit_"
717 instructionInfoList = #[
718 new InstructionApplyActions(#[
719 new ActionNxResubmit(17 as short)
723 new MatchEthernetType(2048L),
724 new MatchIpProtocol(17 as short),
725 new MatchUdpDestinationPort(67),
726 new MatchUdpSourcePort(68),
727 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG),
728 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5"))
731 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
733 new FlowEntityBuilder >> [
734 dpnId = Uint64.valueOf(123bi)
735 cookie = Uint64.valueOf(110100480bi)
736 flowId = "Egress_ICMPv6_123_987_133_Permit_"
737 flowName = "Egress_ICMPv6_123_987_133_Permit_"
738 instructionInfoList = #[
739 new InstructionApplyActions(#[
740 new ActionNxResubmit(17 as short)
744 new MatchEthernetType(34525L),
745 new MatchIpProtocol(58 as short),
746 new MatchIcmpv6(133 as short, 0 as short),
747 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
750 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
752 new FlowEntityBuilder >> [
753 dpnId = Uint64.valueOf(123bi)
754 cookie = Uint64.valueOf(110100480bi)
755 flowId = "Egress_ICMPv6_123_987_135_Permit_"
756 flowName = "Egress_ICMPv6_123_987_135_Permit_"
757 instructionInfoList = #[
758 new InstructionApplyActions(#[
759 new ActionNxResubmit(17 as short)
763 new MatchEthernetType(34525L),
764 new MatchIpProtocol(58 as short),
765 new MatchIcmpv6(135 as short, 0 as short),
766 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
769 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
771 new FlowEntityBuilder >> [
772 dpnId = Uint64.valueOf(123bi)
773 cookie = Uint64.valueOf(110100480bi)
774 flowId = "Egress_ICMPv6_123_987_136_Permit_"
775 flowName = "Egress_ICMPv6_123_987_136_Permit_"
776 instructionInfoList = #[
777 new InstructionApplyActions(#[
778 new ActionNxResubmit(17 as short)
782 new MatchEthernetType(34525L),
783 new MatchIpProtocol(58 as short),
784 new MatchIcmpv6(136 as short, 0 as short),
785 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
788 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
790 new FlowEntityBuilder >> [
791 dpnId = Uint64.valueOf(123bi)
792 cookie = Uint64.valueOf(110100480bi)
793 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F5" + ip3 + "/" + prefix
794 flowName = "Egress_ARP_123_987_0D:AA:D8:42:30:F5" + ip3 + "/" + prefix
795 instructionInfoList = #[
796 new InstructionApplyActions(#[
797 new ActionNxResubmit(17 as short)
801 new MatchEthernetType(2054L),
802 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F5")),
803 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
804 new MatchArpSpa(new Ipv4Prefix(ip3 + "/" + prefix)),
805 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
808 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
813 static def fixedIngressFlowsPort4() {
815 new FlowEntityBuilder >> [
816 dpnId = Uint64.valueOf(123bi)
817 cookie = Uint64.valueOf(110100480bi)
818 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
819 flowName = "Ingress_DHCP_Server_v4123_987_Permit_"
820 instructionInfoList = #[
821 new InstructionApplyActions(#[
822 new ActionNxResubmit(220 as short)
826 new MatchEthernetType(2048L),
827 new MatchIpProtocol(17 as short),
828 new MatchUdpDestinationPort(68),
829 new MatchUdpSourcePort(67),
830 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
833 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
835 new FlowEntityBuilder >> [
836 dpnId = Uint64.valueOf(123bi)
837 cookie = Uint64.valueOf(110100480bi)
838 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
839 flowName = "Ingress_DHCP_Server_v6_123_987_Permit_"
840 instructionInfoList = #[
841 new InstructionApplyActions(#[
842 new ActionNxResubmit(220 as short)
846 new MatchEthernetType(34525L),
847 new MatchIpProtocol(17 as short),
848 new MatchUdpDestinationPort(546),
849 new MatchUdpSourcePort(547),
850 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
853 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
855 new FlowEntityBuilder >> [
856 dpnId = Uint64.valueOf(123bi)
857 cookie = Uint64.valueOf(110100480bi)
858 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
859 flowName = "Ingress_ICMPv6_123_987_130_Permit_"
860 instructionInfoList = #[
861 new InstructionApplyActions(#[
862 new ActionNxResubmit(220 as short)
866 new MatchEthernetType(34525L),
867 new MatchIpProtocol(58 as short),
868 new MatchIcmpv6(130 as short, 0 as short),
869 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
872 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
874 new FlowEntityBuilder >> [
875 dpnId = Uint64.valueOf(123bi)
876 cookie = Uint64.valueOf(110100480bi)
877 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
878 flowName = "Ingress_ICMPv6_123_987_135_Permit_"
879 instructionInfoList = #[
880 new InstructionApplyActions(#[
881 new ActionNxResubmit(220 as short)
885 new MatchEthernetType(34525L),
886 new MatchIpProtocol(58 as short),
887 new MatchIcmpv6(135 as short, 0 as short),
888 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
891 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
893 new FlowEntityBuilder >> [
894 dpnId = Uint64.valueOf(123bi)
895 cookie = Uint64.valueOf(110100480bi)
896 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
897 flowName = "Ingress_ICMPv6_123_987_136_Permit_"
898 instructionInfoList = #[
899 new InstructionApplyActions(#[
900 new ActionNxResubmit(220 as short)
904 new MatchEthernetType(34525L),
905 new MatchIpProtocol(58 as short),
906 new MatchIcmpv6(136 as short, 0 as short),
907 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
910 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
912 new FlowEntityBuilder >> [
913 dpnId = Uint64.valueOf(123bi)
914 cookie = Uint64.valueOf(110100480bi)
915 flowId = "Ingress_ARP_123_987"
916 flowName = "Ingress_ARP_123_987"
917 instructionInfoList = #[
918 new InstructionApplyActions(#[
919 new ActionNxResubmit(220 as short)
923 new MatchEthernetType(2054L),
924 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
927 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
932 static def fixedEgressFlowsPort4 () {
934 new FlowEntityBuilder >> [
935 dpnId = Uint64.valueOf(123bi)
936 cookie = Uint64.valueOf(110100480bi)
937 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
938 flowName = "Egress_DHCP_Client_v4123_987__Permit_"
939 instructionInfoList = #[
940 new InstructionApplyActions(#[
941 new ActionNxResubmit(17 as short)
945 new MatchEthernetType(2048L),
946 new MatchIpProtocol(17 as short),
947 new MatchUdpDestinationPort(67),
948 new MatchUdpSourcePort(68),
949 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
952 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
954 new FlowEntityBuilder >> [
955 dpnId = Uint64.valueOf(123bi)
956 cookie = Uint64.valueOf(110100480bi)
957 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
958 flowName = "Egress_DHCP_Client_v6_123_987__Permit_"
959 instructionInfoList = #[
960 new InstructionApplyActions(#[
961 new ActionNxResubmit(17 as short)
965 new MatchEthernetType(34525L),
966 new MatchIpProtocol(17 as short),
967 new MatchUdpDestinationPort(547),
968 new MatchUdpSourcePort(546),
969 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
972 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
974 new FlowEntityBuilder >> [
975 dpnId = Uint64.valueOf(123bi)
976 cookie = Uint64.valueOf(110100480bi)
977 flowId = "Egress_ICMPv6_123_987_133_Permit_"
978 flowName = "Egress_ICMPv6_123_987_133_Permit_"
979 instructionInfoList = #[
980 new InstructionApplyActions(#[
981 new ActionNxResubmit(17 as short)
985 new MatchEthernetType(34525L),
986 new MatchIpProtocol(58 as short),
987 new MatchIcmpv6(133 as short, 0 as short),
988 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
991 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
993 new FlowEntityBuilder >> [
994 dpnId = Uint64.valueOf(123bi)
995 cookie = Uint64.valueOf(110100480bi)
996 flowId = "Egress_ICMPv6_123_987_135_Permit_"
997 flowName = "Egress_ICMPv6_123_987_135_Permit_"
998 instructionInfoList = #[
999 new InstructionApplyActions(#[
1000 new ActionNxResubmit(17 as short)
1004 new MatchEthernetType(34525L),
1005 new MatchIpProtocol(58 as short),
1006 new MatchIcmpv6(135 as short, 0 as short),
1007 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1010 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1012 new FlowEntityBuilder >> [
1013 dpnId = Uint64.valueOf(123bi)
1014 cookie = Uint64.valueOf(110100480bi)
1015 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1016 flowName = "Egress_ICMPv6_123_987_136_Permit_"
1017 instructionInfoList = #[
1018 new InstructionApplyActions(#[
1019 new ActionNxResubmit(17 as short)
1023 new MatchEthernetType(34525L),
1024 new MatchIpProtocol(58 as short),
1025 new MatchIcmpv6(136 as short, 0 as short),
1026 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1029 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1031 new FlowEntityBuilder >> [
1032 dpnId = Uint64.valueOf(123bi)
1033 cookie = Uint64.valueOf(110100480bi)
1034 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
1035 flowName = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
1036 instructionInfoList = #[
1037 new InstructionApplyActions(#[
1038 new ActionNxResubmit(17 as short)
1042 new MatchEthernetType(2054L),
1043 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F6")),
1044 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1045 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1048 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1050 new FlowEntityBuilder >> [
1051 dpnId = Uint64.valueOf(123bi)
1052 cookie = Uint64.valueOf(110100480bi)
1053 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
1054 flowName = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
1055 instructionInfoList = #[
1056 new InstructionApplyActions(#[
1057 new ActionNxResubmit(17 as short)
1061 new MatchEthernetType(2054L),
1062 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F6")),
1063 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1064 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1067 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1072 protected def remoteFlows(String ip1, String ip2, String prefix) {
1073 remoteIngressFlowsPort1(ip1, prefix)
1074 + remoteEgressFlowsPort1(ip1, prefix)
1075 + remoteIngressFlowsPort2(ip2, prefix)
1076 + remoteEgressFlowsPort2(ip2, prefix)
1079 protected def remoteIngressFlowsPort1(String ip1, String prefix) {
1081 remoteIngressFlowsPort(ip1, prefix)
1085 protected def remoteIngressFlowsPort2(String ip2, String prefix) {
1087 remoteIngressFlowsPort(ip2, prefix)
1092 protected def remoteEgressFlowsPort1(String ip1, String prefix) {
1094 remoteEgressFlowsPort(ip1, prefix)
1098 protected def remoteEgressFlowsPort2(String ip2, String prefix) {
1100 remoteEgressFlowsPort(ip2, prefix)
1104 protected def remoteIngressFlowsPort(String ip, String prefix) {
1105 new FlowEntityBuilder >> [
1106 dpnId = Uint64.valueOf(123bi)
1107 cookie = Uint64.valueOf(110100480bi)
1108 flowId = "Acl_Filter_Egress_" + ip + "/" + prefix + "_2"
1109 flowName = "Acl_Filter_Egress_" + ip + "/" + prefix + "_2"
1110 instructionInfoList = #[
1111 new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1114 new MatchMetadata(Uint64.valueOf(32bi), Uint64.valueOf(16777200bi)),
1115 new MatchEthernetType(2048L),
1116 new MatchIpv4Destination(ip, prefix)
1119 tableId = NwConstants.INGRESS_REMOTE_ACL_TABLE
1123 protected def remoteEgressFlowsPort(String ip, String prefix) {
1124 new FlowEntityBuilder >> [
1125 dpnId = Uint64.valueOf(123bi)
1126 cookie = Uint64.valueOf(110100480bi)
1127 flowId = "Acl_Filter_Ingress_" + ip + "/" + prefix + "_2"
1128 flowName = "Acl_Filter_Ingress_" + ip + "/" + prefix + "_2"
1129 instructionInfoList = #[
1130 new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1133 new MatchMetadata(Uint64.valueOf(32bi), Uint64.valueOf(16777200bi)),
1134 new MatchEthernetType(2048L),
1135 new MatchIpv4Source(ip, prefix)
1138 tableId = NwConstants.EGRESS_REMOTE_ACL_TABLE
1142 protected def remoteIngressFlowsPort3(String ip2, String prefix) {
1144 new FlowEntityBuilder >> [
1145 dpnId = Uint64.valueOf(123bi)
1146 cookie = Uint64.valueOf(110100480bi)
1147 flowId = "Acl_Filter_Ingress_" + ip2 + "/" + prefix + "_4"
1148 flowName = "Acl_Filter_Ingress_" + ip2 + "/" + prefix + "_4"
1149 instructionInfoList = #[
1150 new InstructionGotoTable(247 as short)
1153 new MatchMetadata(Uint64.valueOf(64bi), Uint64.valueOf(16777200bi)),
1154 new MatchEthernetType(2048L),
1155 new MatchIpv4Source(ip2, prefix)
1158 tableId = 246 as short
1163 protected def remoteEgressFlowsPort3(String ip2, String prefix) {
1165 new FlowEntityBuilder >> [
1166 dpnId = Uint64.valueOf(123bi)
1167 cookie = Uint64.valueOf(110100480bi)
1168 flowId = "Acl_Filter_Egress_" + ip2 + "/" + prefix + "_4"
1169 flowName = "Acl_Filter_Egress_" + ip2 + "/" + prefix + "_4"
1170 instructionInfoList = #[
1171 new InstructionGotoTable(217 as short)
1174 new MatchMetadata(Uint64.valueOf(64bi), Uint64.valueOf(16777200bi)),
1175 new MatchEthernetType(2048L),
1176 new MatchIpv4Destination(ip2, prefix)
1179 tableId = 216 as short
1184 protected def expectedFlows(String mac, String ip1, String prefix) {
1185 // Code auto. generated by https://github.com/vorburger/xtendbeans
1187 new FlowEntityBuilder >> [
1188 dpnId = Uint64.valueOf(123bi)
1189 cookie = Uint64.valueOf(110100480bi)
1190 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
1191 flowName = "Ingress_DHCP_Server_v4123_987_Permit_"
1192 instructionInfoList = #[
1193 new InstructionApplyActions(#[
1194 new ActionNxResubmit(220 as short)
1198 new MatchEthernetType(2048L),
1199 new MatchIpProtocol(17 as short),
1200 new MatchUdpDestinationPort(68),
1201 new MatchUdpSourcePort(67),
1202 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1205 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1207 new FlowEntityBuilder >> [
1208 dpnId = Uint64.valueOf(123bi)
1209 cookie = Uint64.valueOf(110100480bi)
1210 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
1211 flowName = "Ingress_DHCP_Server_v6_123_987_Permit_"
1212 instructionInfoList = #[
1213 new InstructionApplyActions(#[
1214 new ActionNxResubmit(220 as short)
1218 new MatchEthernetType(34525L),
1219 new MatchIpProtocol(17 as short),
1220 new MatchUdpDestinationPort(546),
1221 new MatchUdpSourcePort(547),
1222 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1225 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1227 new FlowEntityBuilder >> [
1228 dpnId = Uint64.valueOf(123bi)
1229 cookie = Uint64.valueOf(110100480bi)
1230 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
1231 flowName = "Ingress_ICMPv6_123_987_130_Permit_"
1232 instructionInfoList = #[
1233 new InstructionApplyActions(#[
1234 new ActionNxResubmit(220 as short)
1238 new MatchEthernetType(34525L),
1239 new MatchIpProtocol(58 as short),
1240 new MatchIcmpv6(130 as short, 0 as short),
1241 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1244 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1246 new FlowEntityBuilder >> [
1247 dpnId = Uint64.valueOf(123bi)
1248 cookie = Uint64.valueOf(110100480bi)
1249 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
1250 flowName = "Ingress_ICMPv6_123_987_135_Permit_"
1251 instructionInfoList = #[
1252 new InstructionApplyActions(#[
1253 new ActionNxResubmit(220 as short)
1257 new MatchEthernetType(34525L),
1258 new MatchIpProtocol(58 as short),
1259 new MatchIcmpv6(135 as short, 0 as short),
1260 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1263 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1265 new FlowEntityBuilder >> [
1266 dpnId = Uint64.valueOf(123bi)
1267 cookie = Uint64.valueOf(110100480bi)
1268 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
1269 flowName = "Ingress_ICMPv6_123_987_136_Permit_"
1270 instructionInfoList = #[
1271 new InstructionApplyActions(#[
1272 new ActionNxResubmit(220 as short)
1276 new MatchEthernetType(34525L),
1277 new MatchIpProtocol(58 as short),
1278 new MatchIcmpv6(136 as short, 0 as short),
1279 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1282 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1284 new FlowEntityBuilder >> [
1285 dpnId = Uint64.valueOf(123bi)
1286 cookie = Uint64.valueOf(110100480bi)
1287 flowId = "Ingress_ARP_123_987"
1288 flowName = "Ingress_ARP_123_987"
1289 instructionInfoList = #[
1290 new InstructionApplyActions(#[
1291 new ActionNxResubmit(220 as short)
1295 new MatchEthernetType(2054L),
1296 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1299 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1301 new FlowEntityBuilder >> [
1302 dpnId = Uint64.valueOf(123bi)
1303 cookie = Uint64.valueOf(110100480bi)
1304 flowId = "Egress_DHCP_Client_v4123_987_" + mac + "_Permit_"
1305 flowName = "Egress_DHCP_Client_v4123_987_" + mac + "_Permit_"
1306 instructionInfoList = #[
1307 new InstructionApplyActions(#[
1308 new ActionNxResubmit(17 as short)
1312 new MatchEthernetType(2048L),
1313 new MatchIpProtocol(17 as short),
1314 new MatchUdpDestinationPort(67),
1315 new MatchUdpSourcePort(68),
1316 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG),
1317 new MatchEthernetSource(new MacAddress(mac))
1320 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1322 new FlowEntityBuilder >> [
1323 dpnId = Uint64.valueOf(123bi)
1324 cookie = Uint64.valueOf(110100480bi)
1325 flowId = "Egress_DHCP_Client_v6_123_987_" + mac + "_Permit_"
1326 flowName = "Egress_DHCP_Client_v6_123_987_" + mac + "_Permit_"
1327 instructionInfoList = #[
1328 new InstructionApplyActions(#[
1329 new ActionNxResubmit(17 as short)
1333 new MatchEthernetType(34525L),
1334 new MatchIpProtocol(17 as short),
1335 new MatchUdpDestinationPort(547),
1336 new MatchUdpSourcePort(546),
1337 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG),
1338 new MatchEthernetSource(new MacAddress(mac))
1341 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1343 new FlowEntityBuilder >> [
1344 dpnId = Uint64.valueOf(123bi)
1345 cookie = Uint64.valueOf(110100480bi)
1346 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1347 flowName = "Egress_ICMPv6_123_987_133_Permit_"
1348 instructionInfoList = #[
1349 new InstructionApplyActions(#[
1350 new ActionNxResubmit(17 as short)
1354 new MatchEthernetType(34525L),
1355 new MatchIpProtocol(58 as short),
1356 new MatchIcmpv6(133 as short, 0 as short),
1357 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1360 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1362 new FlowEntityBuilder >> [
1363 dpnId = Uint64.valueOf(123bi)
1364 cookie = Uint64.valueOf(110100480bi)
1365 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1366 flowName = "Egress_ICMPv6_123_987_135_Permit_"
1367 instructionInfoList = #[
1368 new InstructionApplyActions(#[
1369 new ActionNxResubmit(17 as short)
1373 new MatchEthernetType(34525L),
1374 new MatchIpProtocol(58 as short),
1375 new MatchIcmpv6(135 as short, 0 as short),
1376 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1379 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1381 new FlowEntityBuilder >> [
1382 dpnId = Uint64.valueOf(123bi)
1383 cookie = Uint64.valueOf(110100480bi)
1384 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1385 flowName = "Egress_ICMPv6_123_987_136_Permit_"
1386 instructionInfoList = #[
1387 new InstructionApplyActions(#[
1388 new ActionNxResubmit(17 as short)
1392 new MatchEthernetType(34525L),
1393 new MatchIpProtocol(58 as short),
1394 new MatchIcmpv6(136 as short, 0 as short),
1395 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1398 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1400 new FlowEntityBuilder >> [
1401 dpnId = Uint64.valueOf(123bi)
1402 cookie = Uint64.valueOf(110100480bi)
1403 flowId = "Egress_ARP_123_987_" + mac
1404 flowName = "Egress_ARP_123_987_" + mac
1405 instructionInfoList = #[
1406 new InstructionApplyActions(#[
1407 new ActionNxResubmit
1411 new MatchEthernetType(2054L),
1412 new MatchArpSha(new MacAddress(mac)),
1413 new MatchEthernetSource(new MacAddress(mac)),
1414 new MatchMetadata(Uint64.valueOf(1085217976614912bi), MetaDataUtil.METADATA_MASK_LPORT_TAG)
1417 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE