[ONOS-3391] create arp_spa selector to onos

Change-Id: I2508a3ca7acb95b9792f0b23e085074a5b030a3b
This commit is contained in:
BitOhenry 2015-11-18 14:44:29 +08:00 committed by Gerrit Code Review
parent 7ec0d1be85
commit 08c7294c6f
3 changed files with 23 additions and 0 deletions

View File

@ -358,6 +358,11 @@ public final class DefaultTrafficSelector implements TrafficSelector {
return add(Criteria.matchArpTpa(addr));
}
@Override
public Builder matchArpSpa(Ip4Address addr) {
return add(Criteria.matchArpSpa(addr));
}
@Override
public Builder matchArpTha(MacAddress addr) {
return add(Criteria.matchArpTha(addr));

View File

@ -394,6 +394,14 @@ public interface TrafficSelector {
*/
Builder matchArpTpa(Ip4Address addr);
/**
* Matches a arp IPv4 source address.
*
* @param addr a arp IPv4 source address
* @return a selection builder
*/
Builder matchArpSpa(Ip4Address addr);
/**
* Matches a arp_eth_dst address.
*

View File

@ -519,6 +519,16 @@ public final class Criteria {
return new ArpPaCriterion(ip, Type.ARP_TPA);
}
/**
* Creates a match on IPv4 source field using the specified value.
*
* @param ip ipv4 source value
* @return match criterion
*/
public static Criterion matchArpSpa(Ip4Address ip) {
return new ArpPaCriterion(ip, Type.ARP_SPA);
}
/**
* Creates a match on MAC destination field using the specified value.
*