Merge into master from pull request #52:
Fixes for java loxigen - buffer reading and package name (https://github.com/floodlight/loxigen/pull/52)
diff --git a/java_gen/codegen.py b/java_gen/codegen.py
index 1e68acd..8606682 100644
--- a/java_gen/codegen.py
+++ b/java_gen/codegen.py
@@ -102,7 +102,7 @@
                     template='const.java', enum=enum, all_versions=self.java_model.versions)
 
             for version in enum.versions:
-                clazz = java_model.OFGenericClass(package="org.openflow.protocol.ver{}".format(version.of_version), name="{}SerializerVer{}".format(enum.name, version.of_version))
+                clazz = java_model.OFGenericClass(package="org.projectfloodlight.openflow.protocol.ver{}".format(version.of_version), name="{}SerializerVer{}".format(enum.name, version.of_version))
                 self.render_class(clazz=clazz, template="const_serializer.java", enum=enum, version=version)
 
     def create_of_interfaces(self):
@@ -151,7 +151,7 @@
             self.render_class(clazz=factory, template="of_factory_interface.java", factory=factory)
             for factory_class in factory.factory_classes:
                 self.render_class(clazz=factory_class, template="of_factory_class.java", factory=factory_class, model=self.java_model)
-            self.render_class(clazz=java_model.OFGenericClass(package="org.openflow.protocol", name="OFFactories"), template="of_factories.java", versions=self.java_model.versions)
+            self.render_class(clazz=java_model.OFGenericClass(package="org.projectfloodlight.openflow.protocol", name="OFFactories"), template="of_factories.java", versions=self.java_model.versions)
 
 def copy_prewrite_tree(basedir):
     """ Recursively copy the directory structure from ./java_gen/pre-write
diff --git a/java_gen/java_model.py b/java_gen/java_model.py
index d1adce0..65dac74 100644
--- a/java_gen/java_model.py
+++ b/java_gen/java_model.py
@@ -177,7 +177,7 @@
     @property
     @memoize
     def of_factories(self):
-        prefix = "org.openflow.protocol"
+        prefix = "org.projectfloodlight.openflow.protocol"
 
         factories = OrderedDict()
 
@@ -237,7 +237,7 @@
     @property
     def factory_classes(self):
             return [ OFFactoryClass(
-                    package="org.openflow.protocol.ver{}".format(version.of_version),
+                    package="org.projectfloodlight.openflow.protocol.ver{}".format(version.of_version),
                     name="{}Ver{}".format(self.name, version.of_version),
                     interface=self,
                     version=version
@@ -325,7 +325,7 @@
         self.constant_name = c_name.upper().replace("OF_", "")
 
         pck_suffix, parent_interface, self.type_annotation = self.class_info()
-        self.package = "org.openflow.protocol.%s" % pck_suffix if pck_suffix else "org.openflow.protocol"
+        self.package = "org.projectfloodlight.openflow.protocol.%s" % pck_suffix if pck_suffix else "org.projectfloodlight.openflow.protocol"
         if self.name != parent_interface:
             self.parent_interface = parent_interface
         else:
@@ -510,7 +510,7 @@
         self.c_name = self.ir_class.name
         self.version = version
         self.constant_name = self.c_name.upper().replace("OF_", "")
-        self.package = "org.openflow.protocol.ver%s" % version.of_version
+        self.package = "org.projectfloodlight.openflow.protocol.ver%s" % version.of_version
         self.generated = False
 
     @property
@@ -938,7 +938,7 @@
                          for (name, version_value_map) in entry_name_version_value_map.items() ]
 
         self.entries = [ e for e in self.entries if e.name not in model.enum_entry_blacklist[self.name] ]
-        self.package = "org.openflow.protocol"
+        self.package = "org.projectfloodlight.openflow.protocol"
 
     def wire_type(self, version):
         ir_enum = self.version_enums[version]
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFBsnVportQInQT.java b/java_gen/pre-written/src/main/java/org/openflow/protocol/OFBsnVportQInQT.java
deleted file mode 100644
index c5b884e..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFBsnVportQInQT.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openflow.protocol;
-
-public class OFBsnVportQInQT {
-
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMatchBmap.java b/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMatchBmap.java
deleted file mode 100644
index 6e4dc5b..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMatchBmap.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openflow.protocol;
-
-public class OFMatchBmap {
-
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMessageReader.java b/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMessageReader.java
deleted file mode 100644
index 3f34d9b..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMessageReader.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.openflow.protocol;
-
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-
-public interface OFMessageReader<T> {
-    T readFrom(ChannelBuffer bb) throws OFParseError;
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMessageWriter.java b/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMessageWriter.java
deleted file mode 100644
index bcca1fd..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFMessageWriter.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.openflow.protocol;
-
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-
-public interface OFMessageWriter<T> {
-    public void write(ChannelBuffer bb, T message) throws OFParseError;
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFTableFeature.java b/java_gen/pre-written/src/main/java/org/openflow/protocol/OFTableFeature.java
deleted file mode 100644
index 114f638..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFTableFeature.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openflow.protocol;
-
-public class OFTableFeature {
-    // FIXME implement
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/XidGenerator.java b/java_gen/pre-written/src/main/java/org/openflow/protocol/XidGenerator.java
deleted file mode 100644
index 0819ac2..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/XidGenerator.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openflow.protocol;
-
-public interface XidGenerator {
-    int nextXid();
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFHelloElement.java b/java_gen/pre-written/src/main/java/org/openflow/types/OFHelloElement.java
deleted file mode 100644
index 288e1b6..0000000
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFHelloElement.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openflow.types;
-
-public interface OFHelloElement {
-
-}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/annotations/Immutable.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/annotations/Immutable.java
similarity index 87%
rename from java_gen/pre-written/src/main/java/org/openflow/annotations/Immutable.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/annotations/Immutable.java
index 1d432c7..5de2171 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/annotations/Immutable.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/annotations/Immutable.java
@@ -1,4 +1,4 @@
-package org.openflow.annotations;
+package org.projectfloodlight.openflow.annotations;
 
 /**
  * This annotation marks a class that is considered externally immutable. I.e.,
diff --git a/java_gen/pre-written/src/main/java/org/openflow/exceptions/NonExistantMessage.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/NonExistantMessage.java
similarity index 93%
rename from java_gen/pre-written/src/main/java/org/openflow/exceptions/NonExistantMessage.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/NonExistantMessage.java
index 2d82ba2..e5192fd 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/exceptions/NonExistantMessage.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/NonExistantMessage.java
@@ -1,4 +1,4 @@
-package org.openflow.exceptions;
+package org.projectfloodlight.openflow.exceptions;
 
 /**
  * Error: someone asked to create an OFMessage with wireformat type and version,
diff --git a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFParseError.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFParseError.java
similarity index 88%
rename from java_gen/pre-written/src/main/java/org/openflow/exceptions/OFParseError.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFParseError.java
index 76afc79..658dce7 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFParseError.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFParseError.java
@@ -1,4 +1,4 @@
-package org.openflow.exceptions;
+package org.projectfloodlight.openflow.exceptions;
 
 public class OFParseError extends Exception {
     private static final long serialVersionUID = 1L;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFShortRead.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFShortRead.java
similarity index 66%
rename from java_gen/pre-written/src/main/java/org/openflow/exceptions/OFShortRead.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFShortRead.java
index 3007803..c68a678 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFShortRead.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFShortRead.java
@@ -1,4 +1,4 @@
-package org.openflow.exceptions;
+package org.projectfloodlight.openflow.exceptions;
 
 public class OFShortRead extends Exception {
     private static final long serialVersionUID = 1L;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFShortWrite.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFShortWrite.java
similarity index 67%
rename from java_gen/pre-written/src/main/java/org/openflow/exceptions/OFShortWrite.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFShortWrite.java
index fb0ddea..4f99118 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFShortWrite.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFShortWrite.java
@@ -1,4 +1,4 @@
-package org.openflow.exceptions;
+package org.projectfloodlight.openflow.exceptions;
 
 public class OFShortWrite extends Exception {
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFUnsupported.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFUnsupported.java
similarity index 67%
rename from java_gen/pre-written/src/main/java/org/openflow/exceptions/OFUnsupported.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFUnsupported.java
index 14e96db..fa52c08 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/exceptions/OFUnsupported.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/exceptions/OFUnsupported.java
@@ -1,4 +1,4 @@
-package org.openflow.exceptions;
+package org.projectfloodlight.openflow.exceptions;
 
 public class OFUnsupported extends Exception {
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFBsnVportQInQT.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFBsnVportQInQT.java
new file mode 100644
index 0000000..ff077ce
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFBsnVportQInQT.java
@@ -0,0 +1,5 @@
+package org.projectfloodlight.openflow.protocol;
+
+public class OFBsnVportQInQT {
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMatchBmap.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMatchBmap.java
new file mode 100644
index 0000000..e17796a
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMatchBmap.java
@@ -0,0 +1,5 @@
+package org.projectfloodlight.openflow.protocol;
+
+public class OFMatchBmap {
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java
new file mode 100644
index 0000000..8837867
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java
@@ -0,0 +1,8 @@
+package org.projectfloodlight.openflow.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+
+public interface OFMessageReader<T> {
+    T readFrom(ChannelBuffer bb) throws OFParseError;
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java
new file mode 100644
index 0000000..bec5634
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java
@@ -0,0 +1,8 @@
+package org.projectfloodlight.openflow.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+
+public interface OFMessageWriter<T> {
+    public void write(ChannelBuffer bb, T message) throws OFParseError;
+}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFObject.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObject.java
similarity index 73%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/OFObject.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObject.java
index aae6178..07759d7 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFObject.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObject.java
@@ -1,4 +1,4 @@
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 
 /**
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFObjectFactory.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java
similarity index 73%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/OFObjectFactory.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java
index 86cafb1..c5869ef 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFObjectFactory.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java
@@ -1,4 +1,4 @@
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFOxmList.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java
similarity index 87%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/OFOxmList.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java
index d9ede81..ac48c8d 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFOxmList.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java
@@ -1,4 +1,4 @@
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 import java.util.EnumMap;
 import java.util.Iterator;
@@ -6,12 +6,12 @@
 import java.util.Map;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.match.MatchField;
-import org.openflow.protocol.match.MatchFields;
-import org.openflow.protocol.oxm.OFOxm;
-import org.openflow.types.OFValueType;
-import org.openflow.util.ChannelUtils;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.match.MatchField;
+import org.projectfloodlight.openflow.protocol.match.MatchFields;
+import org.projectfloodlight.openflow.types.OFValueType;
+import org.projectfloodlight.openflow.util.ChannelUtils;
+import org.projectfloodlight.openflow.protocol.oxm.OFOxm;
 
 import com.google.common.collect.ImmutableMap;
 
@@ -90,7 +90,7 @@
         }
     }
 
-    public org.openflow.protocol.OFOxmList.Builder createBuilder() {
+    public OFOxmList.Builder createBuilder() {
         return new OFOxmList.Builder(new EnumMap<MatchFields, OFOxm<?>>(oxmMap));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFTableFeature.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFTableFeature.java
new file mode 100644
index 0000000..b722228
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFTableFeature.java
@@ -0,0 +1,5 @@
+package org.projectfloodlight.openflow.protocol;
+
+public class OFTableFeature {
+    // FIXME implement
+}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFVersion.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java
similarity index 84%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/OFVersion.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java
index 7241647..6f54e5f 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/OFVersion.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java
@@ -1,4 +1,4 @@
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 public enum OFVersion {
     OF_10(1), OF_11(2), OF_12(3), OF_13(4);
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/Wildcards.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Wildcards.java
similarity index 99%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/Wildcards.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Wildcards.java
index 8c03b93..2268ce6 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/Wildcards.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Wildcards.java
@@ -14,7 +14,7 @@
  *    under the License.
  **/
 
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 import java.util.ArrayList;
 import java.util.EnumSet;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/Writeable.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java
similarity index 69%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/Writeable.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java
index 0ff7df6..31ae9ab 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/Writeable.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java
@@ -1,4 +1,4 @@
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java
new file mode 100644
index 0000000..65976dc
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java
@@ -0,0 +1,5 @@
+package org.projectfloodlight.openflow.protocol;
+
+public interface XidGenerator {
+    int nextXid();
+}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/Match.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java
similarity index 97%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/match/Match.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java
index 3fc5527..5e68de5 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/Match.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java
@@ -1,8 +1,8 @@
-package org.openflow.protocol.match;
+package org.projectfloodlight.openflow.protocol.match;
 
-import org.openflow.protocol.OFObject;
-import org.openflow.types.Masked;
-import org.openflow.types.OFValueType;
+import org.projectfloodlight.openflow.protocol.OFObject;
+import org.projectfloodlight.openflow.types.Masked;
+import org.projectfloodlight.openflow.types.OFValueType;
 
 /**
  * Generic interface for version-agnostic immutable Match structure.
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/MatchField.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
similarity index 86%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/match/MatchField.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
index cbd3b14..333d25d 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/MatchField.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
@@ -1,22 +1,22 @@
-package org.openflow.protocol.match;
+package org.projectfloodlight.openflow.protocol.match;
 
-import org.openflow.types.ArpOpcode;
-import org.openflow.types.EthType;
-import org.openflow.types.ICMPv4Code;
-import org.openflow.types.ICMPv4Type;
-import org.openflow.types.IPv4;
-import org.openflow.types.IPv6;
-import org.openflow.types.IPv6FlowLabel;
-import org.openflow.types.IpDscp;
-import org.openflow.types.IpEcn;
-import org.openflow.types.IpProtocol;
-import org.openflow.types.MacAddress;
-import org.openflow.types.OFMetadata;
-import org.openflow.types.OFPort;
-import org.openflow.types.OFValueType;
-import org.openflow.types.TransportPort;
-import org.openflow.types.VlanPcp;
-import org.openflow.types.VlanVid;
+import org.projectfloodlight.openflow.types.ArpOpcode;
+import org.projectfloodlight.openflow.types.EthType;
+import org.projectfloodlight.openflow.types.ICMPv4Code;
+import org.projectfloodlight.openflow.types.ICMPv4Type;
+import org.projectfloodlight.openflow.types.IPv4;
+import org.projectfloodlight.openflow.types.IPv6;
+import org.projectfloodlight.openflow.types.IPv6FlowLabel;
+import org.projectfloodlight.openflow.types.IpDscp;
+import org.projectfloodlight.openflow.types.IpEcn;
+import org.projectfloodlight.openflow.types.IpProtocol;
+import org.projectfloodlight.openflow.types.MacAddress;
+import org.projectfloodlight.openflow.types.OFMetadata;
+import org.projectfloodlight.openflow.types.OFPort;
+import org.projectfloodlight.openflow.types.OFValueType;
+import org.projectfloodlight.openflow.types.TransportPort;
+import org.projectfloodlight.openflow.types.VlanPcp;
+import org.projectfloodlight.openflow.types.VlanVid;
 
 @SuppressWarnings("unchecked")
 public class MatchField<F extends OFValueType<F>> {
@@ -32,38 +32,38 @@
 
     public final static MatchField<OFPort> IN_PORT =
             new MatchField<OFPort>("in_port", MatchFields.IN_PORT);
-    
+
     public final static MatchField<OFPort> IN_PHY_PORT =
             new MatchField<OFPort>("in_phy_port", MatchFields.IN_PHY_PORT,
                     new Prerequisite<OFPort>(MatchField.IN_PORT));
-    
+
     public final static MatchField<OFMetadata> METADATA =
             new MatchField<OFMetadata>("metadata", MatchFields.METADATA);
 
     public final static MatchField<MacAddress> ETH_DST =
             new MatchField<MacAddress>("eth_dst", MatchFields.ETH_DST);
-    
+
     public final static MatchField<MacAddress> ETH_SRC =
             new MatchField<MacAddress>("eth_src", MatchFields.ETH_SRC);
 
     public final static MatchField<EthType> ETH_TYPE =
             new MatchField<EthType>("eth_type", MatchFields.ETH_TYPE);
-    
+
     public final static MatchField<VlanVid> VLAN_VID =
             new MatchField<VlanVid>("vlan_vid", MatchFields.VLAN_VID);
-    
+
     public final static MatchField<VlanPcp> VLAN_PCP =
             new MatchField<VlanPcp>("vlan_pcp", MatchFields.VLAN_PCP,
                     new Prerequisite<VlanVid>(MatchField.VLAN_VID));
-    
+
     public final static MatchField<IpDscp> IP_DSCP =
             new MatchField<IpDscp>("ip_dscp", MatchFields.IP_DSCP,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv4, EthType.ETH_TYPE_IPv6));
-    
+
     public final static MatchField<IpEcn> IP_ECN =
             new MatchField<IpEcn>("ip_dscp", MatchFields.IP_ECN,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv4, EthType.ETH_TYPE_IPv6));
-    
+
     public final static MatchField<IpProtocol> IP_PROTO =
             new MatchField<IpProtocol>("ip_proto", MatchFields.IP_PROTO,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv4, EthType.ETH_TYPE_IPv6));
@@ -71,7 +71,7 @@
     public final static MatchField<IPv4> IPV4_SRC =
             new MatchField<IPv4>("ipv4_src", MatchFields.IPV4_SRC,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv4));
-    
+
     public final static MatchField<IPv4> IPV4_DST =
             new MatchField<IPv4>("ipv4_dst", MatchFields.IPV4_DST,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv4));
@@ -79,7 +79,7 @@
     public final static MatchField<TransportPort> TCP_SRC = new MatchField<TransportPort>(
             "tcp_src", MatchFields.TCP_SRC,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP));
-    
+
     public final static MatchField<TransportPort> TCP_DST = new MatchField<TransportPort>(
             "tcp_dst", MatchFields.TCP_DST,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP));
@@ -87,7 +87,7 @@
     public final static MatchField<TransportPort> UDP_SRC = new MatchField<TransportPort>(
             "udp_src", MatchFields.UDP_SRC,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_UDP));
-    
+
     public final static MatchField<TransportPort> UDP_DST = new MatchField<TransportPort>(
             "udp_dst", MatchFields.UDP_DST,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_UDP));
@@ -95,7 +95,7 @@
     public final static MatchField<TransportPort> SCTP_SRC = new MatchField<TransportPort>(
             "sctp_src", MatchFields.SCTP_SRC,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_SCTP));
-    
+
     public final static MatchField<TransportPort> SCTP_DST = new MatchField<TransportPort>(
             "sctp_dst", MatchFields.SCTP_DST,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_SCTP));
@@ -103,7 +103,7 @@
     public final static MatchField<ICMPv4Type> ICMPV4_TYPE = new MatchField<ICMPv4Type>(
             "icmpv4_src", MatchFields.ICMPV4_TYPE,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_ICMP));
-    
+
     public final static MatchField<ICMPv4Code> ICMPV4_CODE = new MatchField<ICMPv4Code>(
             "icmpv4_dst", MatchFields.ICMPV4_CODE,
             new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_ICMP));
@@ -111,19 +111,19 @@
     public final static MatchField<ArpOpcode> ARP_OP = new MatchField<ArpOpcode>(
             "arp_op", MatchFields.ARP_OP,
             new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_ARP));
-    
+
     public final static MatchField<IPv4> ARP_SPA =
             new MatchField<IPv4>("arp_spa", MatchFields.ARP_SPA,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_ARP));
-    
+
     public final static MatchField<IPv4> ARP_TPA =
             new MatchField<IPv4>("arp_tpa", MatchFields.ARP_TPA,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_ARP));
-    
+
     public final static MatchField<MacAddress> ARP_SHA =
             new MatchField<MacAddress>("arp_sha", MatchFields.ARP_SHA,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_ARP));
-    
+
     public final static MatchField<MacAddress> ARP_THA =
             new MatchField<MacAddress>("arp_tha", MatchFields.ARP_THA,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_ARP));
@@ -131,7 +131,7 @@
     public final static MatchField<IPv6> IPV6_SRC =
             new MatchField<IPv6>("ipv6_src", MatchFields.IPV6_SRC,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv6));
-    
+
     public final static MatchField<IPv6> IPV6_DST =
             new MatchField<IPv6>("ipv6_dst", MatchFields.IPV6_DST,
                     new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ETH_TYPE_IPv6));
@@ -143,7 +143,7 @@
     public String getName() {
         return name;
     }
-    
+
     public boolean arePrerequisitesOK(Match match) {
         for (Prerequisite<?> p : this.prerequisites) {
             if (!p.isSatisfied(match)) {
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/MatchFields.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
similarity index 89%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/match/MatchFields.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
index ed79237..2fc10ae 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/MatchFields.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
@@ -1,4 +1,4 @@
-package org.openflow.protocol.match;
+package org.projectfloodlight.openflow.protocol.match;
 
 // MUST BE ORDERED BY THE ORDER OF OF SPEC!!!
 public enum MatchFields {
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/Prerequisite.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
similarity index 82%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/match/Prerequisite.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
index f7afc8b..4e667e7 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/match/Prerequisite.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
@@ -1,15 +1,15 @@
-package org.openflow.protocol.match;
+package org.projectfloodlight.openflow.protocol.match;
 
 import java.util.HashSet;
 import java.util.Set;
 
-import org.openflow.types.OFValueType;
+import org.projectfloodlight.openflow.types.OFValueType;
 
 public class Prerequisite<T extends OFValueType<T>> {
-    private MatchField<T> field;
-    private Set<OFValueType<T>> values;
+    private final MatchField<T> field;
+    private final Set<OFValueType<T>> values;
     private boolean any;
-    
+
     public Prerequisite(MatchField<T> field, OFValueType<T>... values) {
         this.values = new HashSet<OFValueType<T>>();
         this.field = field;
@@ -22,10 +22,10 @@
             }
         }
     }
-    
+
     /**
      * Returns true if this prerequisite is satisfied by the given match object.
-     * 
+     *
      * @param match Match object
      * @return true iff prerequisite is satisfied.
      */
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver10/ChannelUtilsVer10.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
similarity index 69%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/ver10/ChannelUtilsVer10.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
index 50acc7f..7a42d20 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver10/ChannelUtilsVer10.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
@@ -1,9 +1,10 @@
-package org.openflow.protocol.ver10;
+package org.projectfloodlight.openflow.protocol.ver10;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFBsnVportQInQ;
-import org.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.ver10.OFMatchV1Ver10;
+import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
 
 /**
  * Collection of helper functions for reading and writing into ChannelBuffers
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver11/ChannelUtilsVer11.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
similarity index 72%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/ver11/ChannelUtilsVer11.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
index 1322acd..735fe3b 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver11/ChannelUtilsVer11.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
@@ -1,11 +1,11 @@
-package org.openflow.protocol.ver11;
+package org.projectfloodlight.openflow.protocol.ver11;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFBsnVportQInQ;
-import org.openflow.protocol.OFMatchBmap;
-import org.openflow.protocol.match.Match;
-
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMatchBmap;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.ver11.OFMatchV2Ver11;
+import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
 
 /**
  * Collection of helper functions for reading and writing into ChannelBuffers
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver12/ChannelUtilsVer12.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java
similarity index 72%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/ver12/ChannelUtilsVer12.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java
index c194fbc..756363d 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver12/ChannelUtilsVer12.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java
@@ -1,11 +1,11 @@
-package org.openflow.protocol.ver12;
+package org.projectfloodlight.openflow.protocol.ver12;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFBsnVportQInQ;
-import org.openflow.protocol.OFMatchBmap;
-import org.openflow.protocol.match.Match;
-
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMatchBmap;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.ver12.OFMatchV3Ver12;
+import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
 
 /**
  * Collection of helper functions for reading and writing into ChannelBuffers
diff --git a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver13/ChannelUtilsVer13.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
similarity index 72%
rename from java_gen/pre-written/src/main/java/org/openflow/protocol/ver13/ChannelUtilsVer13.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
index bcfbdbc..0be26ae 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/protocol/ver13/ChannelUtilsVer13.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
@@ -1,10 +1,11 @@
-package org.openflow.protocol.ver13;
+package org.projectfloodlight.openflow.protocol.ver13;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFBsnVportQInQ;
-import org.openflow.protocol.OFMatchBmap;
-import org.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMatchBmap;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.ver13.OFMatchV3Ver13;
+import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
 
 /**
  * Collection of helper functions for reading and writing into ChannelBuffers
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
similarity index 99%
rename from java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
index 01e7bd8..5e710ca 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/ArpOpcode.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/EthType.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
similarity index 99%
rename from java_gen/pre-written/src/main/java/org/openflow/types/EthType.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
index c451a99..52f5455 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/EthType.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
similarity index 96%
rename from java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
index 724170e..46ada58 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Code.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
similarity index 99%
rename from java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
index 7aa45d8..00a789b 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/ICMPv4Type.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4.java
similarity index 98%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4.java
index da6f126..401d79b 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4WithMask.java
similarity index 97%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4WithMask.java
index 6ea4aa1..d2f2cc7 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv4WithMask.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4WithMask.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 public class IPv4WithMask extends Masked<IPv4> {
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6.java
similarity index 98%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6.java
index bf0f9b2..0907d17 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6.java
@@ -1,9 +1,9 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import java.util.regex.Pattern;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 /**
  * IPv6 address object. Instance controlled, immutable. Internal representation:
@@ -15,7 +15,7 @@
     static final int LENGTH = 16;
     private final long raw1;
     private final long raw2;
-    
+
     public static final IPv6 NO_MASK = IPv6.of(0xFFFFFFFFFFFFFFFFl, 0xFFFFFFFFFFFFFFFFl);
     public static final IPv6 FULL_MASK = IPv6.of(0x0, 0x0);
 
@@ -272,10 +272,10 @@
             return false;
         return true;
     }
-    
+
     public void write16Bytes(ChannelBuffer c) {
         c.writeLong(this.raw1);
-        c.writeLong(this.raw2);            
+        c.writeLong(this.raw2);
     }
 
     public static IPv6 read16Bytes(ChannelBuffer c) throws OFParseError {
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
similarity index 92%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
index def5947..7feb0d9 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6FlowLabel.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
@@ -1,21 +1,21 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public class IPv6FlowLabel implements OFValueType<IPv6FlowLabel> {
 
     static final int LENGTH = 4;
-    
+
     private final int label;
-    
+
     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;
     }
-    
+
     public static IPv6FlowLabel of(int label) {
         return new IPv6FlowLabel(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/projectfloodlight/openflow/types/IPv6WithMask.java
similarity index 98%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IPv6WithMask.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6WithMask.java
index dfebeba..894a6dd 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6WithMask.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6WithMask.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import java.math.BigInteger;
 import java.util.Arrays;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java
similarity index 97%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java
index 52598cb..f311d9d 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IpDscp.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java
@@ -1,7 +1,7 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public enum IpDscp implements OFValueType<IpDscp> {
     DSCP_0((byte)0),
@@ -69,18 +69,18 @@
     DSCP_62((byte)62),
     DSCP_63((byte)63),
     DSCP_NO_MASK((byte)0xFF);
-    
+
     static final int LENGTH = 1;
-    
+
     public static final IpDscp NO_MASK = DSCP_NO_MASK;
     public static final IpDscp FULL_MASK = DSCP_0;
-    
+
     private final byte dscp;
-    
+
     private IpDscp(byte dscp) {
         this.dscp = dscp;
     }
-    
+
     public static IpDscp of(byte dscp) {
         switch (dscp) {
             case 0:
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java
similarity index 92%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java
index 0d9721c..5ecd251 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IpEcn.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java
@@ -1,7 +1,7 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public enum IpEcn implements OFValueType<IpEcn> {
     ECN_00((byte)0),
@@ -9,18 +9,18 @@
     ECN_10((byte)2),
     ECN_11((byte)3),
     ECN_NO_MASK((byte)0xFF);
-    
+
     public static final IpEcn NO_MASK = ECN_NO_MASK;
     public static final IpEcn FULL_MASK = ECN_00;
 
     static final int LENGTH = 1;
-    
+
     private final byte ecn;
-    
+
     private IpEcn(byte ecn) {
         this.ecn = ecn;
     }
-    
+
     public static IpEcn of(byte ecn) {
         switch (ecn) {
             case 0:
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
similarity index 99%
rename from java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
index 6fc896f..e78c97b 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IpProtocol.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
similarity index 95%
rename from java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
index 7723d6f..040d875 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/MacAddress.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
@@ -1,8 +1,8 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.util.HexString;
 
 /**
  * Wrapper around a 6 byte mac address.
@@ -124,7 +124,7 @@
     public MacAddress applyMask(MacAddress mask) {
         return MacAddress.of(this.rawValue & mask.rawValue);
     }
-    
-    
+
+
 
 }
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/Masked.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java
similarity index 96%
rename from java_gen/pre-written/src/main/java/org/openflow/types/Masked.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java
index 433ca9d..ead7d62 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/Masked.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFFlowModCmd.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFFlowModCmd.java
similarity index 78%
rename from java_gen/pre-written/src/main/java/org/openflow/types/OFFlowModCmd.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFFlowModCmd.java
index 6ca2c04..7173bde 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFFlowModCmd.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFFlowModCmd.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 /**
  * Version agnostic view of commands to an OFFlowMod
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFHelloElement.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFHelloElement.java
new file mode 100644
index 0000000..10d06a0
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFHelloElement.java
@@ -0,0 +1,5 @@
+package org.projectfloodlight.openflow.types;
+
+public interface OFHelloElement {
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
similarity index 94%
rename from java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
index 86799eb..861d4a8 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFMetadata.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
@@ -1,10 +1,10 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
 public class OFMetadata implements OFValueType<OFMetadata> {
 
-    private static int LENGTH = 8;
+    static int LENGTH = 8;
 
     private final U64 u64;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPhysicalPort.java
similarity index 89%
rename from java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPhysicalPort.java
index d3b1c9f..ca662f7 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFPhysicalPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPhysicalPort.java
@@ -1,9 +1,9 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFMessageReader;
-import org.openflow.protocol.Writeable;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 /**
  * A wrapper around the OpenFlow physical port description. The interfaces to
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
similarity index 98%
rename from java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
index eaf96de..d65d0aa 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
@@ -1,8 +1,8 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.annotations.Immutable;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.annotations.Immutable;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 /**
  * Abstraction of an logical / OpenFlow switch port (ofp_port_no) in OpenFlow.
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/OFValueType.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java
similarity index 73%
rename from java_gen/pre-written/src/main/java/org/openflow/types/OFValueType.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java
index 8e2f9ed..5f41494 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/OFValueType.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
similarity index 94%
rename from java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
index 1ebb807..4cf5b90 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/TransportPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
@@ -1,7 +1,7 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 /**
  * Represents L4 (Transport Layer) port (TCP, UDP, etc.)
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/U16.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
similarity index 91%
rename from java_gen/pre-written/src/main/java/org/openflow/types/U16.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
index 54e72c1..55a467e 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/U16.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
@@ -15,12 +15,12 @@
  *    under the License.
  **/
 
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFMessageReader;
-import org.openflow.protocol.Writeable;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 public class U16 implements Writeable, OFValueType<U16> {
     public static int f(final short i) {
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/U32.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
similarity index 91%
rename from java_gen/pre-written/src/main/java/org/openflow/types/U32.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
index 9cd181c..2634ed1 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/U32.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
@@ -15,12 +15,12 @@
  *    under the License.
  **/
 
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFMessageReader;
-import org.openflow.protocol.Writeable;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 public class U32 implements Writeable, OFValueType<U32> {
     private final int raw;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/U64.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
similarity index 96%
rename from java_gen/pre-written/src/main/java/org/openflow/types/U64.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
index 5c69a7c..5de62dc 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/U64.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
@@ -15,12 +15,12 @@
  *    under the License.
  **/
 
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import java.math.BigInteger;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.protocol.Writeable;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 public class U64 implements Writeable, OFValueType<U64> {
     private static final long UNSIGNED_MASK = 0x7fffffffffffffffL;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/U8.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
similarity index 91%
rename from java_gen/pre-written/src/main/java/org/openflow/types/U8.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
index c15be0e..41e740e 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/U8.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
@@ -15,12 +15,12 @@
  *    under the License.
  **/
 
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFMessageReader;
-import org.openflow.protocol.Writeable;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 public class U8 implements Writeable, OFValueType<U8> {
     private final byte raw;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
similarity index 90%
rename from java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
index ccbaa63..9b5ef11 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/VlanPcp.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
@@ -1,22 +1,22 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public class VlanPcp implements OFValueType<VlanPcp> {
-    
+
     private static final byte VALIDATION_MASK = 0x07;
-    static final int LENGTH = 1; 
-    
+    static final int LENGTH = 1;
+
     private final byte pcp;
-    
+
     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;
     }
-    
+
     public static VlanPcp of(byte pcp) {
         if ((pcp & VALIDATION_MASK) != pcp)
             throw new IllegalArgumentException("Illegal VLAN PCP value: " + pcp);
@@ -52,7 +52,7 @@
     public int getLength() {
         return LENGTH;
     }
-    
+
     public void writeByte(ChannelBuffer c) {
         c.writeShort(this.pcp);
     }
@@ -65,5 +65,5 @@
     public VlanPcp applyMask(VlanPcp mask) {
         return VlanPcp.of((byte)(this.pcp & mask.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/projectfloodlight/openflow/types/VlanVid.java
similarity index 94%
rename from java_gen/pre-written/src/main/java/org/openflow/types/VlanVid.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
index 6a40f43..705464c 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/VlanVid.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
@@ -1,22 +1,22 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public class VlanVid implements OFValueType<VlanVid> {
-    
+
     private static final short VALIDATION_MASK = 0x0FFF;
     final static int LENGTH = 2;
-    
+
     public static final VlanVid NO_MASK = VlanVid.of((short)0xFFFF);
     public static final VlanVid FULL_MASK = VlanVid.of((short)0x0);
 
     private final short vid;
-    
+
     private VlanVid(short vid) {
         this.vid = vid;
     }
-    
+
     public static VlanVid of(short vid) {
         if ((vid & VALIDATION_MASK) != vid)
             throw new IllegalArgumentException("Illegal VLAN VID value: " + vid);
@@ -43,7 +43,7 @@
     public String toString() {
         return "0x" + Integer.toHexString(vid);
     }
-    
+
     public short getValue() {
         return vid;
     }
@@ -68,7 +68,7 @@
         }
         return bytesCache;
     }
-    
+
     public void write2Bytes(ChannelBuffer c) {
         c.writeShort(this.vid);
     }
@@ -81,5 +81,5 @@
     public VlanVid applyMask(VlanVid mask) {
         return VlanVid.of((short)(this.vid & mask.vid));
     }
-    
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
similarity index 89%
rename from java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
index e9a3356..ea2c4a9 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
@@ -1,11 +1,11 @@
-package org.openflow.util;
+package org.projectfloodlight.openflow.util;
 
 import java.util.List;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFMessageReader;
-import org.openflow.protocol.Writeable;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 import com.google.common.base.Charsets;
 import com.google.common.collect.ImmutableList;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/util/HexString.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
similarity index 96%
rename from java_gen/pre-written/src/main/java/org/openflow/util/HexString.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
index 8d17132..d812236 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/util/HexString.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
@@ -15,11 +15,11 @@
  *    under the License.
  **/
 
-package org.openflow.util;
+package org.projectfloodlight.openflow.util;
 
 import java.math.BigInteger;
 
-import org.openflow.types.U8;
+import org.projectfloodlight.openflow.types.U8;
 
 public class HexString {
     /**
diff --git a/java_gen/pre-written/src/main/java/org/openflow/util/LRULinkedHashMap.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/LRULinkedHashMap.java
similarity index 96%
rename from java_gen/pre-written/src/main/java/org/openflow/util/LRULinkedHashMap.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/LRULinkedHashMap.java
index 216319d..7798e67 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/util/LRULinkedHashMap.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/LRULinkedHashMap.java
@@ -15,7 +15,7 @@
  *    under the License.
  **/
 
-package org.openflow.util;
+package org.projectfloodlight.openflow.util;
 
 import java.util.LinkedHashMap;
 
diff --git a/java_gen/pre-written/src/main/java/org/openflow/util/LengthCountingPseudoChannelBuffer.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/LengthCountingPseudoChannelBuffer.java
similarity index 99%
rename from java_gen/pre-written/src/main/java/org/openflow/util/LengthCountingPseudoChannelBuffer.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/LengthCountingPseudoChannelBuffer.java
index bd0adce..48362da 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/util/LengthCountingPseudoChannelBuffer.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/LengthCountingPseudoChannelBuffer.java
@@ -1,4 +1,4 @@
-package org.openflow.util;
+package org.projectfloodlight.openflow.util;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/java_gen/pre-written/src/main/java/org/openflow/util/StringByteSerializer.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java
similarity index 97%
rename from java_gen/pre-written/src/main/java/org/openflow/util/StringByteSerializer.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java
index 72c1224..6949fb2 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/util/StringByteSerializer.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java
@@ -15,7 +15,7 @@
  *    under the License.
  **/
 
-package org.openflow.util;
+package org.projectfloodlight.openflow.util;
 
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
diff --git a/java_gen/pre-written/src/test/java/org/openflow/types/IPv4Test.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4Test.java
similarity index 97%
rename from java_gen/pre-written/src/test/java/org/openflow/types/IPv4Test.java
rename to java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4Test.java
index 8125b04..464323f 100644
--- a/java_gen/pre-written/src/test/java/org/openflow/types/IPv4Test.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4Test.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -6,7 +6,7 @@
 
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public class IPv4Test {
     byte[][] testAddresses = new byte[][] {
diff --git a/java_gen/pre-written/src/test/java/org/openflow/types/IPv6Test.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6Test.java
similarity index 97%
rename from java_gen/pre-written/src/test/java/org/openflow/types/IPv6Test.java
rename to java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6Test.java
index 352b8bc..092dacb 100644
--- a/java_gen/pre-written/src/test/java/org/openflow/types/IPv6Test.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6Test.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -10,7 +10,7 @@
 
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public class IPv6Test {
 
diff --git a/java_gen/pre-written/src/test/java/org/openflow/types/MacAddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java
similarity index 95%
rename from java_gen/pre-written/src/test/java/org/openflow/types/MacAddressTest.java
rename to java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java
index 2be3046..dc25b12 100644
--- a/java_gen/pre-written/src/test/java/org/openflow/types/MacAddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -8,7 +8,7 @@
 
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
-import org.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public class MacAddressTest {
     byte[][] testAddresses = new byte[][] {
diff --git a/java_gen/pre-written/src/test/java/org/openflow/types/U64Test.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U64Test.java
similarity index 94%
rename from java_gen/pre-written/src/test/java/org/openflow/types/U64Test.java
rename to java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U64Test.java
index aefd193..e45e8a0 100644
--- a/java_gen/pre-written/src/test/java/org/openflow/types/U64Test.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U64Test.java
@@ -1,4 +1,4 @@
-package org.openflow.types;
+package org.projectfloodlight.openflow.types;
 
 import static org.junit.Assert.assertEquals;
 
diff --git a/java_gen/templates/_imports.java b/java_gen/templates/_imports.java
index a4c564c..669db00 100644
--- a/java_gen/templates/_imports.java
+++ b/java_gen/templates/_imports.java
@@ -2,17 +2,16 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import org.openflow.protocol.*;
-import org.openflow.protocol.action.*;
-import org.openflow.protocol.meterband.*;
-import org.openflow.protocol.instruction.*;
-import org.openflow.protocol.match.*;
-import org.openflow.protocol.oxm.*;
-import org.openflow.protocol.queueprop.*;
-import org.openflow.types.*;
-import org.openflow.types.*;
-import org.openflow.util.*;
-import org.openflow.exceptions.*;
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.jboss.netty.buffer.ChannelBuffers;
 import com.google.common.collect.ImmutableList;
diff --git a/java_gen/templates/const.java b/java_gen/templates/const.java
index 11c09ab..b5c7ed0 100644
--- a/java_gen/templates/const.java
+++ b/java_gen/templates/const.java
@@ -33,7 +33,7 @@
 
 package ${package};
 
-import org.openflow.protocol.OFVersion;
+import org.projectfloodlight.openflow.protocol.OFVersion;
 
 public enum ${class_name} {
 //:: for i, entry in enumerate(enum.entries):
diff --git a/java_gen/templates/const_serializer.java b/java_gen/templates/const_serializer.java
index 4e21070..5710f9c 100644
--- a/java_gen/templates/const_serializer.java
+++ b/java_gen/templates/const_serializer.java
@@ -33,10 +33,10 @@
 
 package ${package};
 
-import org.openflow.types.*;
+import org.projectfloodlight.openflow.types.*;
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.exceptions.OFParseError;
-import org.openflow.protocol.OFVersion;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFVersion;
 import ${enum.package}.${enum.name};
 
 public class ${class_name} {
diff --git a/java_gen/templates/of_class.java b/java_gen/templates/of_class.java
index 4ea6ac9..2dc88fb 100644
--- a/java_gen/templates/of_class.java
+++ b/java_gen/templates/of_class.java
@@ -39,11 +39,11 @@
 
 class ${impl_class} implements ${msg.interface.inherited_declaration()} {
     // version: ${version}
-    private final static byte WIRE_VERSION = ${version.int_version};
+    final static byte WIRE_VERSION = ${version.int_version};
 //:: if msg.is_fixed_length:
-    private final static int LENGTH = ${msg.length};
+    final static int LENGTH = ${msg.length};
 //:: else:
-    private final static int MINIMUM_LENGTH = ${msg.min_length};
+    final static int MINIMUM_LENGTH = ${msg.min_length};
 //:: #endif
 
 //:: for prop in msg.data_members:
@@ -171,6 +171,13 @@
 //:: else:
     // fixme: todo ${prop.name}
 //:: #endif
+//:: if prop.is_length_value or prop.is_field_length_value:
+            if(bb.readableBytes() + (bb.readerIndex() - start) < ${prop.name}) {
+                // Buffer does not have all data yet
+                bb.readerIndex(start);
+                return null;
+            }
+//:: #endif
 //:: #endfor
             //:: if msg.align:
             // align message to ${msg.align} bytes
diff --git a/java_gen/templates/of_factories.java b/java_gen/templates/of_factories.java
index 9225510..0044335 100644
--- a/java_gen/templates/of_factories.java
+++ b/java_gen/templates/of_factories.java
@@ -31,7 +31,7 @@
 
 //:: include('_autogen.java')
 
-package org.openflow.protocol;
+package org.projectfloodlight.openflow.protocol;
 
 //:: include("_imports.java")
 
@@ -40,7 +40,7 @@
         switch(version) {
             //:: for v in versions:
             case ${v.constant_version}:
-                return org.openflow.protocol.ver${v.of_version}.OFFactoryVer${v.of_version}.INSTANCE;
+                return org.projectfloodlight.openflow.protocol.ver${v.of_version}.OFFactoryVer${v.of_version}.INSTANCE;
             //:: #endfor
             default:
                 throw new IllegalArgumentException("Unknown version: "+version);
diff --git a/java_gen/templates/of_virtual_class.java b/java_gen/templates/of_virtual_class.java
index fe5c66c..6237b8c 100644
--- a/java_gen/templates/of_virtual_class.java
+++ b/java_gen/templates/of_virtual_class.java
@@ -39,11 +39,11 @@
 
 abstract class ${msg.name} {
     // version: ${version}
-    private final static byte WIRE_VERSION = ${version.int_version};
+    final static byte WIRE_VERSION = ${version.int_version};
 //:: if msg.is_fixed_length:
-    private final static int LENGTH = ${msg.length};
+    final static int LENGTH = ${msg.length};
 //:: else:
-    private final static int MINIMUM_LENGTH = ${msg.min_length};
+    final static int MINIMUM_LENGTH = ${msg.min_length};
 //:: #endif
 
 
@@ -52,6 +52,12 @@
     static class Reader implements OFMessageReader<${msg.interface.inherited_declaration()}> {
         @Override
         public ${msg.interface.name} readFrom(ChannelBuffer bb) throws OFParseError {
+//:: if msg.is_fixed_length:
+            if(bb.readableBytes() < LENGTH)
+//:: else:
+            if(bb.readableBytes() < MINIMUM_LENGTH)
+//:: #endif
+                return null;
             int start = bb.readerIndex();
 //:: fields_with_length_member = {}
 //::    for prop in msg.members: