[ONOS-3376] Create arp_tpa selector to onos
Change-Id: I4b40b5cd3862d470db8d12e7f6098f36777f982a
Showing
2 changed files
with
15 additions
and
0 deletions
... | @@ -23,6 +23,7 @@ import java.util.Objects; | ... | @@ -23,6 +23,7 @@ import java.util.Objects; |
23 | import java.util.Set; | 23 | import java.util.Set; |
24 | import java.util.TreeSet; | 24 | import java.util.TreeSet; |
25 | 25 | ||
26 | +import org.onlab.packet.Ip4Address; | ||
26 | import org.onlab.packet.Ip6Address; | 27 | import org.onlab.packet.Ip6Address; |
27 | import org.onlab.packet.IpPrefix; | 28 | import org.onlab.packet.IpPrefix; |
28 | import org.onlab.packet.MacAddress; | 29 | import org.onlab.packet.MacAddress; |
... | @@ -353,6 +354,11 @@ public final class DefaultTrafficSelector implements TrafficSelector { | ... | @@ -353,6 +354,11 @@ public final class DefaultTrafficSelector implements TrafficSelector { |
353 | } | 354 | } |
354 | 355 | ||
355 | @Override | 356 | @Override |
357 | + public Builder matchArpTpa(Ip4Address addr) { | ||
358 | + return add(Criteria.matchArpTpa(addr)); | ||
359 | + } | ||
360 | + | ||
361 | + @Override | ||
356 | public Builder matchArpTha(MacAddress addr) { | 362 | public Builder matchArpTha(MacAddress addr) { |
357 | return add(Criteria.matchArpTha(addr)); | 363 | return add(Criteria.matchArpTha(addr)); |
358 | } | 364 | } | ... | ... |
... | @@ -17,6 +17,7 @@ package org.onosproject.net.flow; | ... | @@ -17,6 +17,7 @@ package org.onosproject.net.flow; |
17 | 17 | ||
18 | import java.util.Set; | 18 | import java.util.Set; |
19 | 19 | ||
20 | +import org.onlab.packet.Ip4Address; | ||
20 | import org.onlab.packet.Ip6Address; | 21 | import org.onlab.packet.Ip6Address; |
21 | import org.onlab.packet.IpPrefix; | 22 | import org.onlab.packet.IpPrefix; |
22 | import org.onlab.packet.MacAddress; | 23 | import org.onlab.packet.MacAddress; |
... | @@ -386,6 +387,14 @@ public interface TrafficSelector { | ... | @@ -386,6 +387,14 @@ public interface TrafficSelector { |
386 | Builder matchIPv6ExthdrFlags(short exthdrFlags); | 387 | Builder matchIPv6ExthdrFlags(short exthdrFlags); |
387 | 388 | ||
388 | /** | 389 | /** |
390 | + * Matches a arp IPv4 destination address. | ||
391 | + * | ||
392 | + * @param addr a arp IPv4 destination address | ||
393 | + * @return a selection builder | ||
394 | + */ | ||
395 | + Builder matchArpTpa(Ip4Address addr); | ||
396 | + | ||
397 | + /** | ||
389 | * Matches a arp_eth_dst address. | 398 | * Matches a arp_eth_dst address. |
390 | * | 399 | * |
391 | * @param addr a arp_eth_dst address | 400 | * @param addr a arp_eth_dst address | ... | ... |
-
Please register or login to post a comment