Changes required to adopt new loxi APIs into legacy OFMatch:
1. Added value getters to new value types
2. Changed Match, MatchBuilder interfaces according to new desing
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/EthType.java b/java_gen/pre-written/src/main/java/org/openflow/types/EthType.java
index f0f0a2c..ea16e67 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/EthType.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/EthType.java
@@ -8,7 +8,7 @@
*
* @author Yotam Harchol (yotam.harchol@bigswitch.com)
*/
-public class EthType implements OFValueType {
+public class EthType implements OFValueType<EthType> {
static final int LENGTH = 2;
private final int rawValue;
@@ -235,4 +235,14 @@
return EthType.of(c.readUnsignedShort());
}
+ @Override
+ public EthType applyMask(EthType mask) {
+ return EthType.of(this.rawValue & mask.rawValue);
+ }
+
+ public int getValue() {
+ return rawValue;
+ }
+
+
}