ofp-util: Add functions to support version number bitmaps.
authorSimon Horman <horms@verge.net.au>
Mon, 5 Nov 2012 05:40:54 +0000 (21:40 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 5 Nov 2012 06:05:11 +0000 (22:05 -0800)
The bitmap is simple a uint32_t, allowing for versions up until
wire-protocol number 31.

Bit offsets correspond to ofp_version numbers which in turn
correspond to wire-protocol numbers for Open Flow versions..
E.g. (1 << OFP10_VERSION) is the mask for Open Flow 1.1.
If the bit for a version is set then it is allowed, otherwise it is
disallowed.

This is in preparation for allowing the range of allowed OpenFlow
versions to be configured.

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com simplified some functions to constants, and rewrote
 a few functions in terms of utility bitwise functions]
Signed-off-by: Ben Pfaff <blp@nicira.com>

No differences found