add bsn_port/vlan_counter_stats_request/reply
diff --git a/c_gen/loxi_utils_legacy.py b/c_gen/loxi_utils_legacy.py
index 699006f..e20155d 100644
--- a/c_gen/loxi_utils_legacy.py
+++ b/c_gen/loxi_utils_legacy.py
@@ -125,7 +125,8 @@
     Return True if cls_name is an object which uses initial uint16 length
     """
     return cls in ["of_group_desc_stats_entry", "of_group_stats_entry",
-                   "of_flow_stats_entry", "of_bucket", "of_table_features"]
+                   "of_flow_stats_entry", "of_bucket", "of_table_features",
+                   "of_bsn_port_counter_stats_entry", "of_bsn_vlan_counter_stats_entry"]
 
 def class_is_oxm(cls):
     """
diff --git a/c_gen/templates/loci_show.h b/c_gen/templates/loci_show.h
index eebd235..3d55da8 100644
--- a/c_gen/templates/loci_show.h
+++ b/c_gen/templates/loci_show.h
@@ -239,6 +239,7 @@
 #define LOCI_SHOW_u64_rx_packets_unicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
 #define LOCI_SHOW_u64_rx_packets_multicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
 #define LOCI_SHOW_u64_rx_packets_broadcast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_uint64_value(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
 #define LOCI_SHOW_u64_tx_packets(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
 #define LOCI_SHOW_u64_tx_packets_unicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
 #define LOCI_SHOW_u64_tx_packets_multicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index eca00e7..1bed988 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -298,6 +298,12 @@
                 write='ChannelUtils.writeList(bb, $name)',
                 default="ImmutableList.<U32>of()",
                 funnel="FunnelUtils.putList($name, sink)")
+u64_list = JType('List<U64>', 'int[]') \
+        .op(
+                read='ChannelUtils.readList(bb, $length, U64.READER)',
+                write='ChannelUtils.writeList(bb, $name)',
+                default="ImmutableList.<U64>of()",
+                funnel="FunnelUtils.putList($name, sink)")
 u8obj = JType('U8', 'U8') \
         .op(read='U8.of(bb.readByte())', write='bb.writeByte($name.getRaw())', default="U8.ZERO")
 u32obj = JType('U32', 'U32') \
@@ -489,6 +495,7 @@
         'list(of_bucket_t)': buckets_list,
         'list(of_port_desc_t)' : port_desc_list,
         'list(of_packet_queue_t)' : packet_queue_list,
+        'list(of_uint64_t)' : u64_list,
         'list(of_uint32_t)' : u32_list,
         'list(of_uint8_t)' : u8_list,
         'list(of_oxm_t)' : oxm_list,
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
index d77d700..ffdce44 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
@@ -20,6 +20,8 @@
 import java.math.BigInteger;
 
 import org.jboss.netty.buffer.ChannelBuffer;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
 
 import com.google.common.hash.PrimitiveSink;
@@ -125,4 +127,13 @@
     public void putTo(PrimitiveSink sink) {
         sink.putLong(raw);
     }
-}
+
+    public final static Reader READER = new Reader();
+
+    private static class Reader implements OFMessageReader<U64> {
+        @Override
+        public U64 readFrom(ChannelBuffer bb) throws OFParseError {
+            return U64.ofRaw(bb.readLong());
+        }
+    }
+}
\ No newline at end of file
diff --git a/openflow_input/bsn_port_counter b/openflow_input/bsn_port_counter
index f9ebaa7..fe230b9 100644
--- a/openflow_input/bsn_port_counter
+++ b/openflow_input/bsn_port_counter
@@ -30,8 +30,19 @@
 
 #version 4
 
-struct of_bsn_port_entry {
-    of_port_no_t port_no;
+enum ofp_bsn_port_counter(wire_type=uint8_t, complete=False) {
+  OFP_RX_BYTES = 0,
+  OFP_RX_PACKETS_UNICAST = 1,
+  OFP_RX_PACKETS_BROADCAST = 2,
+  OFP_RX_PACKETS_MULTICAST = 3,
+  OFP_RX_DROPPED = 4,
+  OFP_RX_ERRORS = 5,
+  OFP_TX_BYTES = 6,
+  OFP_TX_PACKETS_UNICAST = 7,
+  OFP_TX_PACKETS_BROADCAST = 8,
+  OFP_TX_PACKETS_MULTICAST = 9,
+  OFP_TX_DROPPED = 10,
+  OFP_TX_ERRORS = 11,
 };
 
 struct of_bsn_port_counter_stats_request : of_bsn_stats_request {
@@ -44,24 +55,14 @@
     pad(4);
     uint32_t experimenter == 0x5c16c7;
     uint32_t subtype == 8;
-    list(of_bsn_port_entry_t) port_entries; //if port_entries is empty, reply counters of all ports.
+    of_port_no_t port_no;
 };
 
 struct of_bsn_port_counter_stats_entry {
+    uint16_t length;
+    pad(2);
     of_port_no_t port_no;
-    pad(4);
-    uint64_t rx_bytes;
-    uint64_t rx_packets_unicast;
-    uint64_t rx_packets_broadcast;
-    uint64_t rx_packets_multicast;
-    uint64_t rx_dropped;
-    uint64_t rx_errors;
-    uint64_t tx_bytes;
-    uint64_t tx_packets_unicast;
-    uint64_t tx_packets_broadcast;
-    uint64_t tx_packets_multicast;
-    uint64_t tx_dropped;
-    uint64_t tx_errors;
+    list(of_uint64_t) port_values;
 };
 
 struct of_bsn_port_counter_stats_reply : of_bsn_stats_reply {
@@ -74,5 +75,5 @@
     pad(4);
     uint32_t experimenter == 0x5c16c7;
     uint32_t subtype == 8;
-    list(of_bsn_port_counter_stats_entry_t) port_counter_entries;
+    list(of_bsn_port_counter_stats_entry_t) entries;
 };
diff --git a/openflow_input/bsn_vlan_counter b/openflow_input/bsn_vlan_counter
index b775df4..fb37bc2 100644
--- a/openflow_input/bsn_vlan_counter
+++ b/openflow_input/bsn_vlan_counter
@@ -30,8 +30,11 @@
 
 #version 4
 
-struct of_bsn_vlan_entry {
-    uint16_t vlan_vid;
+enum of_bsn_vlan_counter_t(wire_type=uint8_t, complete=False) {
+  OFP_RX_BYTES = 0,
+  OFP_RX_PACKETS = 1,
+  OFP_TX_BYTES = 2,
+  OFP_TX_PACKETS = 3,
 };
 
 struct of_bsn_vlan_counter_stats_request : of_bsn_stats_request {
@@ -44,17 +47,14 @@
     pad(4);
     uint32_t experimenter == 0x5c16c7;
     uint32_t subtype == 9;
-    list(of_bsn_vlan_entry_t) vlan_entries; //if vlan_entries is empty, reply counters of all vlans.
+    uint16_t vlan_vid;
 };
 
 struct of_bsn_vlan_counter_stats_entry {
-   uint16_t vlan_vid;
-   pad(2);
-   pad(4);
-   uint64_t rx_bytes;
-   uint64_t rx_packets;
-   uint64_t tx_bytes;
-   uint64_t tx_packets;
+    uint16_t length;
+    uint16_t vlan_vid;
+    pad(4);
+    list(of_uint64_t) vlan_values;
 };
 
 struct of_bsn_vlan_counter_stats_reply : of_bsn_stats_reply {
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
index 87adcc4..b4add39 100644
--- a/openflow_input/standard-1.3
+++ b/openflow_input/standard-1.3
@@ -567,6 +567,10 @@
     uint32_t xid;
 };
 
+struct of_uint64 {
+    uint64_t value;
+};
+
 // Special structures used for managing scalar list elements
 struct of_uint32 {
     uint32_t value;