Merge into master from pull request #193:
bsn_flow_checksum extension (https://github.com/floodlight/loxigen/pull/193)
diff --git a/c_gen/c_test_gen.py b/c_gen/c_test_gen.py
index 637819c..cf03e0e 100644
--- a/c_gen/c_test_gen.py
+++ b/c_gen/c_test_gen.py
@@ -147,7 +147,12 @@
                "of_bsn_gentable_stats_request",
                "of_bsn_gentable_stats_reply",
                "of_bsn_gentable_bucket_stats_request",
-               "of_bsn_gentable_bucket_stats_reply"]
+               "of_bsn_gentable_bucket_stats_reply",
+               "of_bsn_flow_checksum_bucket_stats_request",
+               "of_bsn_flow_checksum_bucket_stats_reply",
+               "of_bsn_table_checksum_stats_request",
+               "of_bsn_table_checksum_stats_reply",
+            ]
 
     if (cls in classes and (
             m_name == "experimenter" or
diff --git a/c_gen/templates/loci_show.h b/c_gen/templates/loci_show.h
index 635c41e..e7cc2a8 100644
--- a/c_gen/templates/loci_show.h
+++ b/c_gen/templates/loci_show.h
@@ -384,5 +384,6 @@
 #define LOCI_SHOW_u32_buckets_size(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
 #define LOCI_SHOW_u32_entry_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
 #define LOCI_SHOW_u32_num_aux(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u64_checksum(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
 
 #endif /* _LOCI_SHOW_H_ */
diff --git a/c_gen/templates/of_type_maps.c b/c_gen/templates/of_type_maps.c
index f4e2550..9bc3d5c 100644
--- a/c_gen/templates/of_type_maps.c
+++ b/c_gen/templates/of_type_maps.c
@@ -742,6 +742,8 @@
         case 7: return OF_BSN_GENTABLE_STATS_REQUEST;
         case 8: return OF_BSN_PORT_COUNTER_STATS_REQUEST;
         case 9: return OF_BSN_VLAN_COUNTER_STATS_REQUEST;
+        case 10: return OF_BSN_FLOW_CHECKSUM_BUCKET_STATS_REQUEST;
+        case 11: return OF_BSN_TABLE_CHECKSUM_STATS_REQUEST;
         }
     }
     return OF_OBJECT_INVALID;
@@ -762,6 +764,8 @@
         case 7: return OF_BSN_GENTABLE_STATS_REPLY;
         case 8: return OF_BSN_PORT_COUNTER_STATS_REPLY;
         case 9: return OF_BSN_VLAN_COUNTER_STATS_REPLY;
+        case 10: return OF_BSN_FLOW_CHECKSUM_BUCKET_STATS_REPLY;
+        case 11: return OF_BSN_TABLE_CHECKSUM_STATS_REPLY;
         }
     }
     return OF_OBJECT_INVALID;
diff --git a/c_gen/type_maps.py b/c_gen/type_maps.py
index 2a53519..875a34e 100644
--- a/c_gen/type_maps.py
+++ b/c_gen/type_maps.py
@@ -477,86 +477,6 @@
             arr_len = len(ar)
     return arr_len
 
-# FIXME:  Need to move update for multipart messages
-
-stats_reply_list = [
-    "of_aggregate_stats_reply",
-    "of_desc_stats_reply",
-    "of_experimenter_stats_reply",
-    "of_flow_stats_reply",
-    "of_group_stats_reply",
-    "of_group_desc_stats_reply",
-    "of_group_features_stats_reply",
-    "of_meter_stats_reply",
-    "of_meter_config_stats_reply",
-    "of_meter_features_stats_reply",
-    "of_port_stats_reply",
-    "of_port_desc_stats_reply",
-    "of_queue_stats_reply",
-    "of_table_stats_reply",
-    "of_table_features_stats_reply",
-    "of_bsn_stats_reply",
-    "of_bsn_lacp_stats_reply",
-    "of_bsn_switch_pipeline_stats_reply",
-    "of_bsn_port_counter_stats_reply",
-    "of_bsn_vlan_counter_stats_reply",
-]
-
-stats_request_list = [
-    "of_aggregate_stats_request",
-    "of_desc_stats_request",
-    "of_experimenter_stats_request",
-    "of_flow_stats_request",
-    "of_group_stats_request",
-    "of_group_desc_stats_request",
-    "of_group_features_stats_request",
-    "of_meter_stats_request",
-    "of_meter_config_stats_request",
-    "of_meter_features_stats_request",
-    "of_port_stats_request",
-    "of_port_desc_stats_request",
-    "of_queue_stats_request",
-    "of_table_stats_request",
-    "of_table_features_stats_request",
-    "of_bsn_stats_request",
-    "of_bsn_lacp_stats_request",
-    "of_bsn_switch_pipeline_stats_request",
-    "of_bsn_port_counter_stats_request",
-    "of_bsn_vlan_counter_stats_request",
-]
-
-flow_mod_list = [
-    "of_flow_add",
-    "of_flow_modify",
-    "of_flow_modify_strict",
-    "of_flow_delete",
-    "of_flow_delete_strict"
-]
-
-error_msg_list = [
-    "of_hello_failed_error_msg",
-    "of_bad_request_error_msg",
-    "of_bad_action_error_msg",
-    "of_bad_instruction_error_msg",
-    "of_bad_match_error_msg",
-    "of_flow_mod_failed_error_msg",
-    "of_group_mod_failed_error_msg",
-    "of_port_mod_failed_error_msg",
-    "of_table_mod_failed_error_msg",
-    "of_queue_op_failed_error_msg",
-    "of_switch_config_failed_error_msg",
-    "of_role_request_failed_error_msg",
-    "of_meter_mod_failed_error_msg",
-    "of_table_features_failed_error_msg",
-    "of_experimenter_error_msg"
-]
-
-group_mod_list = [
-    "of_group_add",
-    "of_group_modify",
-    "of_group_delete",
-]
-
 def sub_class_map(base_type, version):
     """
     Returns an iterable object giving the instance nameys and subclass types
diff --git a/openflow_input/bsn_flow_checksum b/openflow_input/bsn_flow_checksum
new file mode 100644
index 0000000..f8d9b51
--- /dev/null
+++ b/openflow_input/bsn_flow_checksum
@@ -0,0 +1,116 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License,
+// version 1.0 (EPL), with the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may
+// distribute libraries generated by LoxiGen (LoxiGen Libraries)
+// under the terms of your choice, provided that copyright and
+// licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i)
+// included in the LoxiGen Libraries, if distributed in source code
+// form and (ii) included in any documentation for the LoxiGen
+// Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or
+// LOXI Exception. You may obtain a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an "AS
+// IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the EPL for the specific language
+// governing permissions and limitations under the EPL.
+
+#version 4
+
+// Retrieves the checksum for every bucket in a table. The entries are ordered
+// by bucket index.
+//
+// The checksum of a bucket is the XOR of the cookies of all entries in the
+// bucket. Flows are bucketed based on a prefix of the cookie.
+struct of_bsn_flow_checksum_bucket_stats_request : of_bsn_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0xffff;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 10;
+    uint8_t table_id;
+};
+
+struct of_bsn_flow_checksum_bucket_stats_entry {
+    uint64_t checksum;
+};
+
+struct of_bsn_flow_checksum_bucket_stats_reply : of_bsn_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0xffff;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 10;
+    list(of_bsn_flow_checksum_bucket_stats_entry_t) entries;
+};
+
+
+// Retrieves the checksum for every table.
+//
+// The checksum of a table is the XOR of the cookies of all entries in the
+// table.
+struct of_bsn_table_checksum_stats_request : of_bsn_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0xffff;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 11;
+};
+
+struct of_bsn_table_checksum_stats_entry {
+    uint8_t table_id;
+    uint64_t checksum;
+};
+
+struct of_bsn_table_checksum_stats_reply : of_bsn_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0xffff;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 11;
+    list(of_bsn_table_checksum_stats_entry_t) entries;
+};
+
+
+// This message sets the size of the buckets array. The switch may reject this
+// message if the table has entries. buckets_size must be a power of 2.
+struct of_bsn_table_set_buckets_size : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 61;
+    uint16_t table_id;
+    pad(2);
+    uint32_t buckets_size;
+};
diff --git a/openflow_input/bsn_gentable b/openflow_input/bsn_gentable
index 674d298..6500789 100644
--- a/openflow_input/bsn_gentable
+++ b/openflow_input/bsn_gentable
@@ -96,7 +96,7 @@
 //
 // If the switch cannot process the message then it should reply with an error
 // message. The contents of the table must not be changed in case of an error.
-// If the key does not exist in the table an error message will be generated.
+// If the key does not exist in the table no error will be generated.
 struct of_bsn_gentable_entry_delete : of_bsn_header {
     uint8_t version;
     uint8_t type == 4;