BitOhenry
Committed by Gerrit Code Review

[ONOS-3391] create arp_spa selector to onos

Change-Id: I2508a3ca7acb95b9792f0b23e085074a5b030a3b
......@@ -359,6 +359,11 @@ public final class DefaultTrafficSelector implements TrafficSelector {
}
@Override
public Builder matchArpSpa(Ip4Address addr) {
return add(Criteria.matchArpSpa(addr));
}
@Override
public Builder matchArpTha(MacAddress addr) {
return add(Criteria.matchArpTha(addr));
}
......
......@@ -395,6 +395,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.
*
* @param addr a arp_eth_dst address
......
......@@ -520,6 +520,16 @@ public final class Criteria {
}
/**
* 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.
*
* @param mac MAC destination value
......