+ ovs_assert(!error);
+}
+
+static bool
+ofp_is_stat_request(enum ofp_version version, uint8_t type)
+{
+ switch (version) {
+ case OFP10_VERSION:
+ return type == OFPT10_STATS_REQUEST;
+ case OFP11_VERSION:
+ case OFP12_VERSION:
+ case OFP13_VERSION:
+ case OFP14_VERSION:
+ return type == OFPT11_STATS_REQUEST;
+ }
+
+ return false;
+}
+
+static bool
+ofp_is_stat_reply(enum ofp_version version, uint8_t type)
+{
+ switch (version) {
+ case OFP10_VERSION:
+ return type == OFPT10_STATS_REPLY;
+ case OFP11_VERSION:
+ case OFP12_VERSION:
+ case OFP13_VERSION:
+ case OFP14_VERSION:
+ return type == OFPT11_STATS_REPLY;
+ }
+
+ return false;
+}
+
+static bool
+ofp_is_stat(enum ofp_version version, uint8_t type)
+{
+ return (ofp_is_stat_request(version, type) ||
+ ofp_is_stat_reply(version, type));