2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

openflow: Add enum ofp_version

Use an enum for ofp_version in ofp-util and ofp-msg.
This in conjunction with the use of switch() statements
allows the compiler to warn when a new ofp_version isn't handled.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2012-07-30 11:02:59 +09:00
committed by Ben Pfaff
parent aa319503aa
commit 2e3fa633aa
8 changed files with 163 additions and 61 deletions

View File

@@ -71,9 +71,11 @@
/* The most significant bit being set in the version field indicates an
* experimental OpenFlow version.
*/
#define OFP10_VERSION 0x01
#define OFP11_VERSION 0x02
#define OFP12_VERSION 0x03
enum ofp_version {
OFP10_VERSION = 0x01,
OFP11_VERSION = 0x02,
OFP12_VERSION = 0x03,
};
#define OFP_MAX_TABLE_NAME_LEN 32
#define OFP_MAX_PORT_NAME_LEN 16