Merge branch 'master' of github.com:floodlight/loxigen

Conflicts:
	java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
diff --git a/.abat-automerge b/.abat-automerge
index 1c2b4cb..36e8739 100755
--- a/.abat-automerge
+++ b/.abat-automerge
@@ -2,4 +2,5 @@
 ROOTDIR=$(dirname $(readlink -f $0))
 cd "$ROOTDIR"
 
-make all check check-c check-py
+ln -sf ../../.hooks/pre-commit .git/hooks/pre-commit
+make all check-all
diff --git a/java_gen/java_model.py b/java_gen/java_model.py
index f2a1c01..b03c224 100644
--- a/java_gen/java_model.py
+++ b/java_gen/java_model.py
@@ -247,7 +247,13 @@
     # registry of MaskedEnumGroups (see above).
     # map: ${java_enum_name}: tuple(MaskedEnumGroup)
     masked_enum_groups = defaultdict(lambda: (),
-            OFPortState= (MaskedEnumGroup("stp_flags", mask="STP_MASK", members=set(("STP_LISTEN", "STP_LEARN", "STP_FORWARD", "STP_BLOCK"))), )
+            OFPortState = (MaskedEnumGroup("stp_flags", mask="STP_MASK", members=set(("STP_LISTEN", "STP_LEARN", "STP_FORWARD", "STP_BLOCK"))), ),
+            OFConfigFlags = (
+                MaskedEnumGroup("frag_flags", mask="FRAG_MASK", members=set(("FRAG_NORMAL", "FRAG_DROP", "FRAG_REASM"))),
+            ),
+            OFTableConfig = (
+                MaskedEnumGroup("table_miss_flags", mask="TABLE_MISS_MASK", members=set(("TABLE_MISS_CONTROLLER", "TABLE_MISS_CONTINUE", "TABLE_MISS_DROP"))),
+            ),
     )
 
     # represents a metadata property associated with an EnumClass
diff --git a/java_gen/pre-written/pom.xml b/java_gen/pre-written/pom.xml
index dbd04a5..ea9a43f 100644
--- a/java_gen/pre-written/pom.xml
+++ b/java_gen/pre-written/pom.xml
@@ -10,7 +10,7 @@
 
     <groupId>org.projectfloodlight</groupId>
     <artifactId>openflowj</artifactId>
-    <version>0.1.0-SNAPSHOT</version>
+    <version>0.2.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <name>OpenFlowJ-Loxi</name>
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
index 6c83b16..95cfdca 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
@@ -31,7 +31,7 @@
     public static IPv4Address of(final byte[] address) {
         if (address.length != LENGTH) {
             throw new IllegalArgumentException(
-                    "Invalid byte array length for IPv4Address address: " + address);
+                    "Invalid byte array length for IPv4Address address: " + address.length);
         }
 
         int raw =
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
index c19f7c2..1239b74 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
@@ -36,7 +36,7 @@
     public static IPv6Address of(final byte[] address) {
         if (address.length != LENGTH) {
             throw new IllegalArgumentException(
-                    "Invalid byte array length for IPv6 address: " + address);
+                    "Invalid byte array length for IPv6 address: " + address.length);
         }
 
         long raw1 =
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFFlowModCmd.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFFlowModCmd.java
deleted file mode 100644
index 7173bde..0000000
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFFlowModCmd.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.projectfloodlight.openflow.types;
-
-/**
- * Version agnostic view of commands to an OFFlowMod
- *
- * @author capveg
- */
-
-public enum OFFlowModCmd {
-    ADD, MODIFY, MODIFY_STRICT, DELETE, DELETE_STRICT
-}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
index d812236..ddf0f25 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
@@ -50,12 +50,12 @@
         int i = 0;
         for (; i < (padTo * 2 - arr.length); i++) {
             ret += "0";
-            if ((i % 2) == 1)
+            if ((i % 2) != 0)
                 ret += ":";
         }
         for (int j = 0; j < arr.length; j++) {
             ret += arr[j];
-            if ((((i + j) % 2) == 1) && (j < (arr.length - 1)))
+            if ((((i + j) % 2) != 0) && (j < (arr.length - 1)))
                 ret += ":";
         }
         return ret;
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.java b/java_gen/templates/custom/OFMatchV1Ver10.java
index 7b1f110..eaaacb0 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.java
@@ -119,7 +119,6 @@
                 result = IPv4AddressWithMask.of(ipv4Src, IPv4Address.of(srcBitMask));
                 break;
             case IPV4_DST:
-                int dstMaskedBits = Math.min(32, (wildcards & OFPFW_NW_DST_MASK) >> OFPFW_NW_DST_SHIFT);
                 int dstBitMask = (-1) << (32 - getIpv4DstCidrMaskLen());
 
                 result = IPv4AddressWithMask.of(ipv4Dst, IPv4Address.of(dstBitMask));