diff options
author | Simon Horman <horms@verge.net.au> | 2012-07-30 11:02:59 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-07-30 21:32:19 -0700 |
commit | 2e3fa633aad59f9687e2b6e3aad3b0a308aa89fc (patch) | |
tree | 505f2bd4cfa8346848cc3464ac89c472d032897e /lib/vconn.c | |
parent | aa319503aa099030d4e4796710b0ebace8907f2b (diff) |
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>
Diffstat (limited to 'lib/vconn.c')
-rw-r--r-- | lib/vconn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vconn.c b/lib/vconn.c index 8f4052cc..caa1bccf 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -278,7 +278,8 @@ vconn_run_wait(struct vconn *vconn) } int -vconn_open_block(const char *name, int min_version, struct vconn **vconnp) +vconn_open_block(const char *name, enum ofp_version min_version, + struct vconn **vconnp) { struct vconn *vconn; int error; @@ -361,7 +362,7 @@ vconn_get_local_port(const struct vconn *vconn) * * A vconn that has successfully connected (that is, vconn_connect() or * vconn_send() or vconn_recv() has returned 0) always negotiated a version. */ -int +enum ofp_version vconn_get_version(const struct vconn *vconn) { return vconn->version; |