diff options
Diffstat (limited to 'framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java')
-rw-r--r-- | framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java index bc1a094c..554b8e74 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java @@ -510,9 +510,9 @@ public final class Criteria { } /** - * Creates a match on IPv4 source field using the specified value. + * Creates a match on IPv4 destination field using the specified value. * - * @param ip ipv4 source value + * @param ip ipv4 destination value * @return match criterion */ public static Criterion matchArpTpa(Ip4Address ip) { @@ -520,15 +520,35 @@ public final class Criteria { } /** - * Creates a match on MAC source field using the specified value. + * Creates a match on IPv4 source field using the specified value. * - * @param mac MAC source 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 * @return match criterion */ public static Criterion matchArpTha(MacAddress mac) { return new ArpHaCriterion(mac, Type.ARP_THA); } + /** + * Creates a match on MAC source field using the specified value. + * + * @param mac MAC source value + * @return match criterion + */ + public static Criterion matchArpSha(MacAddress mac) { + return new ArpHaCriterion(mac, Type.ARP_SHA); + } + public static Criterion dummy() { return new DummyCriterion(); } |