As the structures uses for encoding and decoding statistics request and reply messages are largely the same between OpenFlow 1.1 and 1.2 it seems to make sense to use OFPT11_STATS_{REQUEST,REPLY} for OpenFlow 1.2.
This patch prepares the decode path. Signed-off-by: Simon Horman <ho...@verge.net.au> --- v4 * Initial post --- lib/ofp-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index cfaad7b..953eaf0 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -655,7 +655,8 @@ ofputil_decode_raw_msg_type(const struct ofp_header *oh, size_t length, return OFPERR_OFPBRC_BAD_VENDOR; } } - } else if (raw->version == OFP11_VERSION + } else if ((raw->version == OFP11_VERSION || + raw->version == OFP12_VERSION) && (raw->type == OFPT11_STATS_REQUEST || raw->type == OFPT11_STATS_REPLY)) { const struct ofp11_stats_msg *osm; -- 1.7.10.2.484.gcd07cc5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev