diff --git a/of/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver11/OFBsnStatsRequestVer11.java b/of/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver11/OFBsnStatsRequestVer11.java
new file mode 100644
index 0000000..d1e8589
--- /dev/null
+++ b/of/lib/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver11/OFBsnStatsRequestVer11.java
@@ -0,0 +1,73 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template of_virtual_class.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver11;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+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;
+
+abstract class OFBsnStatsRequestVer11 {
+    // version: 1.1
+    final static byte WIRE_VERSION = 2;
+    final static int MINIMUM_LENGTH = 24;
+
+
+    public final static OFBsnStatsRequestVer11.Reader READER = new Reader();
+
+    static class Reader implements OFMessageReader<OFBsnStatsRequest<?>> {
+        @Override
+        public OFBsnStatsRequest<?> readFrom(ChannelBuffer bb) throws OFParseError {
+            if(bb.readableBytes() < MINIMUM_LENGTH)
+                return null;
+            int start = bb.readerIndex();
+            // fixed value property version == 2
+            byte version = bb.readByte();
+            if(version != (byte) 0x2)
+                throw new OFParseError("Wrong version: Expected=OFVersion.OF_11(2), got="+version);
+            // fixed value property type == 18
+            byte type = bb.readByte();
+            if(type != (byte) 0x12)
+                throw new OFParseError("Wrong type: Expected=OFType.STATS_REQUEST(18), got="+type);
+            int length = U16.f(bb.readShort());
+            if(length < MINIMUM_LENGTH)
+                throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
+            U32.f(bb.readInt());
+            // fixed value property statsType == 65535
+            short statsType = bb.readShort();
+            if(statsType != (short) 0xffff)
+                throw new OFParseError("Wrong statsType: Expected=OFStatsType.EXPERIMENTER(65535), got="+statsType);
+            OFStatsRequestFlagsSerializerVer11.readFrom(bb);
+            // pad: 4 bytes
+            bb.skipBytes(4);
+            // fixed value property experimenter == 0x5c16c7L
+            int experimenter = bb.readInt();
+            if(experimenter != 0x5c16c7)
+                throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
+            int subtype = bb.readInt();
+            bb.readerIndex(start);
+            switch(subtype) {
+               default:
+                   throw new OFParseError("Unknown value for discriminator subtype of class OFBsnStatsRequestVer11: " + subtype);
+            }
+        }
+    }
+}
