Flipped NO_MASK and FULL_MASK, fixed (IPv4|IPv6)WithMask to use constant masks and a typo in Prerequisites.java.
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java b/java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java
index 92d7e18..01e7bd8 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java
@@ -61,8 +61,8 @@
private static final int MIN_OPCODE = 0;
private static final int MAX_OPCODE = 0xFFFF;
- public static final ArpOpcode FULL_MASK = new ArpOpcode(0xFFFFFFFF);
- public static final ArpOpcode NO_MASK = new ArpOpcode(0x00000000);
+ public static final ArpOpcode NO_MASK = new ArpOpcode(0xFFFFFFFF);
+ public static final ArpOpcode FULL_MASK = new ArpOpcode(0x00000000);
private final int opcode;
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 ff843ce..c451a99 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
@@ -101,8 +101,8 @@
public static final EthType ETH_TYPE_Q_IN_Q = new EthType(ETH_TYPE_VAL_Q_IN_Q );
public static final EthType ETH_TYPE_LLT = new EthType(ETH_TYPE_VAL_LLT );
- public static final EthType FULL_MASK = new EthType(0xFFFFFFFF);
- public static final EthType NO_MASK = new EthType(0x00000000);
+ public static final EthType NO_MASK = new EthType(0xFFFFFFFF);
+ public static final EthType FULL_MASK = new EthType(0x00000000);
private EthType(int type) {
this.rawValue = type;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java b/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java
index 21c9c1e..724170e 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java
@@ -14,8 +14,8 @@
private final short code;
- public static final ICMPv4Code FULL_MASK = new ICMPv4Code((short)0xFFFF);
- public static final ICMPv4Code NO_MASK = new ICMPv4Code((short)0x0000);
+ public static final ICMPv4Code NO_MASK = new ICMPv4Code((short)0xFFFF);
+ public static final ICMPv4Code FULL_MASK = new ICMPv4Code((short)0x0000);
private ICMPv4Code(short code) {
this.code = code;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java b/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java
index c8cf9dd..7aa45d8 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java
@@ -64,8 +64,8 @@
public static final ICMPv4Type ICMPV4_TYPE_PHOTURIS = new ICMPv4Type(ICMPV4_TYPE_VAL_PHOTURIS);
public static final ICMPv4Type ICMPV4_TYPE_EXPERIMENTAL_MOBILITY = new ICMPv4Type(ICMPV4_TYPE_VAL_EXPERIMENTAL_MOBILITY);
- public static final ICMPv4Type FULL_MASK = new ICMPv4Type((short)0xFFFF);
- public static final ICMPv4Type NO_MASK = new ICMPv4Type((short)0x0000);
+ public static final ICMPv4Type NO_MASK = new ICMPv4Type((short)0xFFFF);
+ public static final ICMPv4Type FULL_MASK = new ICMPv4Type((short)0x0000);
private final short type;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java b/java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java
index 9690a35..da6f126 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java
@@ -13,8 +13,8 @@
static final int LENGTH = 4;
private final int rawValue;
- public static final IPv4 FULL_MASK = IPv4.of(0xFFFFFFFF);
- public static final IPv4 NO_MASK = IPv4.of(0x00000000);
+ public static final IPv4 NO_MASK = IPv4.of(0xFFFFFFFF);
+ public static final IPv4 FULL_MASK = IPv4.of(0x00000000);
private IPv4(final int rawValue) {
this.rawValue = rawValue;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java b/java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java
index 0a1a6d3..6ea4aa1 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java
@@ -72,7 +72,7 @@
return IPv4WithMask.of(ipv4, maskAddress);
} else if (maskBits == 0) {
// No mask
- return IPv4WithMask.of(ipv4, IPv4.of(0xFFFFFFFF));
+ return IPv4WithMask.of(ipv4, IPv4.NO_MASK);
} else {
// With mask
int mask = (-1) << (32 - maskBits);
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
index 2a9304c..bf0f9b2 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
@@ -16,8 +16,8 @@
private final long raw1;
private final long raw2;
- public static final IPv6 FULL_MASK = IPv6.of(0xFFFFFFFFFFFFFFFFl, 0xFFFFFFFFFFFFFFFFl);
- public static final IPv6 NO_MASK = IPv6.of(0x0, 0x0);
+ public static final IPv6 NO_MASK = IPv6.of(0xFFFFFFFFFFFFFFFFl, 0xFFFFFFFFFFFFFFFFl);
+ public static final IPv6 FULL_MASK = IPv6.of(0x0, 0x0);
private IPv6(final long raw1, final long raw2) {
this.raw1 = raw1;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java
index cf7123c..def5947 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java
@@ -9,8 +9,8 @@
private final int label;
- public static final IPv6FlowLabel FULL_MASK = IPv6FlowLabel.of(0xFFFFFFFF);
- public static final IPv6FlowLabel NO_MASK = IPv6FlowLabel.of(0x0);
+ public static final IPv6FlowLabel NO_MASK = IPv6FlowLabel.of(0xFFFFFFFF);
+ public static final IPv6FlowLabel FULL_MASK = IPv6FlowLabel.of(0x0);
private IPv6FlowLabel(int label) {
this.label = label;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6WithMask.java b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6WithMask.java
index 453507a..dfebeba 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6WithMask.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6WithMask.java
@@ -67,7 +67,7 @@
return IPv6WithMask.of(ipv6, maskAddress);
} else if (maskBits == 0) {
// No mask
- return IPv6WithMask.of(ipv6, IPv6.of(0xFFFFFFFFFFFFFFFFl, 0xFFFFFFFFFFFFFFFFl));
+ return IPv6WithMask.of(ipv6, IPv6.NO_MASK);
} else {
// With mask
BigInteger mask = BigInteger.ONE.negate().shiftLeft(128 - maskBits);
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java b/java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java
index 5727d2f..52598cb 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java
@@ -68,12 +68,12 @@
DSCP_61((byte)61),
DSCP_62((byte)62),
DSCP_63((byte)63),
- DSCP_FULL_MASK((byte)0xFF);
+ DSCP_NO_MASK((byte)0xFF);
static final int LENGTH = 1;
- public static final IpDscp FULL_MASK = DSCP_FULL_MASK;
- public static final IpDscp NO_MASK = DSCP_0;
+ public static final IpDscp NO_MASK = DSCP_NO_MASK;
+ public static final IpDscp FULL_MASK = DSCP_0;
private final byte dscp;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java b/java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java
index dfcce51..0d9721c 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java
@@ -8,10 +8,10 @@
ECN_01((byte)1),
ECN_10((byte)2),
ECN_11((byte)3),
- ECN_FULL_MASK((byte)0xFF);
+ ECN_NO_MASK((byte)0xFF);
- public static final IpEcn FULL_MASK = ECN_FULL_MASK;
- public static final IpEcn NO_MASK = ECN_00;
+ public static final IpEcn NO_MASK = ECN_NO_MASK;
+ public static final IpEcn FULL_MASK = ECN_00;
static final int LENGTH = 1;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java b/java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java
index fa05358..6fc896f 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java
@@ -298,8 +298,8 @@
public static final IpProtocol IP_PROTO_HIP = new IpProtocol(IP_PROTO_NUM_HIP);
public static final IpProtocol IP_PROTO_SHIM6 = new IpProtocol(IP_PROTO_NUM_SHIM6);
- public static final IpProtocol FULL_MASK = IP_PROTO_HOPOPT;
- public static final IpProtocol NO_MASK = new IpProtocol((short)0x0000);
+ public static final IpProtocol NO_MASK = IP_PROTO_HOPOPT;
+ public static final IpProtocol FULL_MASK = new IpProtocol((short)0x0000);
private IpProtocol(short version) {
this.proto = version;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java b/java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java
index 172af71..7723d6f 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java
@@ -14,8 +14,8 @@
static final int MacAddrLen = 6;
private final long rawValue;
- public static final MacAddress FULL_MASK = MacAddress.of(0xFFFFFFFFFFFFFFFFl);
- public static final MacAddress NO_MASK = MacAddress.of(0x0);
+ public static final MacAddress NO_MASK = MacAddress.of(0xFFFFFFFFFFFFFFFFl);
+ public static final MacAddress FULL_MASK = MacAddress.of(0x0);
private MacAddress(final long rawValue) {
this.rawValue = rawValue;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java b/java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java
index 2a06530..e27679c 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java
@@ -6,8 +6,8 @@
private static int LENGTH = 8;
- public static final OFMetadata FULL_MASK = OFMetadata.of(0xFFFFFFFFFFFFFFFFl);
- public static final OFMetadata NO_MASK = OFMetadata.of(0x0);
+ public static final OFMetadata NO_MASK = OFMetadata.of(0xFFFFFFFFFFFFFFFFl);
+ public static final OFMetadata FULL_MASK = OFMetadata.of(0x0);
protected OFMetadata(long raw) {
super(raw);
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java b/java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java
index 3f1e173..d3b1c9f 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java
@@ -18,8 +18,8 @@
private final int port;
- public static final OFPhysicalPort FULL_MASK = OFPhysicalPort.of(0xFFFFFFFF);
- public static final OFPhysicalPort NO_MASK = OFPhysicalPort.of(0x0);
+ public static final OFPhysicalPort NO_MASK = OFPhysicalPort.of(0xFFFFFFFF);
+ public static final OFPhysicalPort FULL_MASK = OFPhysicalPort.of(0x0);
private OFPhysicalPort(int port) {
this.port = port;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java b/java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java
index fe6c0cf..eaf96de 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java
@@ -86,8 +86,8 @@
*/
public final static OFPort ANY = new NamedPort(OFPP_ANY_INT, "any");
- public static final OFPort FULL_MASK = OFPort.of(0xFFFFFFFF);
- public static final OFPort NO_MASK = OFPort.of(0x0);
+ public static final OFPort NO_MASK = OFPort.of(0xFFFFFFFF);
+ public static final OFPort FULL_MASK = OFPort.of(0x0);
/** cache of frequently used ports */
private static class PrecachedPort {
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java b/java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java
index ed6a4fe..2c5687e 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java
@@ -14,8 +14,8 @@
static final int MAX_PORT = 0xFFFF;
static final int MIN_PORT = 0;
- public static final TransportPort FULL_MASK = TransportPort.of(0xFFFFFFFF);
- public static final TransportPort NO_MASK = TransportPort.of(0x0);
+ public static final TransportPort NO_MASK = TransportPort.of(0xFFFFFFFF);
+ public static final TransportPort FULL_MASK = TransportPort.of(0x0);
private final int port;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java b/java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java
index 138d7be..ccbaa63 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java
@@ -10,8 +10,8 @@
private final byte pcp;
- public static final VlanPcp FULL_MASK = VlanPcp.of((byte)0xFF);
- public static final VlanPcp NO_MASK = VlanPcp.of((byte)0x0);
+ public static final VlanPcp NO_MASK = VlanPcp.of((byte)0xFF);
+ public static final VlanPcp FULL_MASK = VlanPcp.of((byte)0x0);
private VlanPcp(byte pcp) {
this.pcp = pcp;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/VlanVid.java b/java_gen/pre-written/src/main/java/org/openflow/types/VlanVid.java
index f64f4e4..6a40f43 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/VlanVid.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/VlanVid.java
@@ -8,8 +8,8 @@
private static final short VALIDATION_MASK = 0x0FFF;
final static int LENGTH = 2;
- public static final VlanVid FULL_MASK = VlanVid.of((short)0xFFFF);
- public static final VlanVid NO_MASK = VlanVid.of((short)0x0);
+ public static final VlanVid NO_MASK = VlanVid.of((short)0xFFFF);
+ public static final VlanVid FULL_MASK = VlanVid.of((short)0x0);
private final short vid;