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.h | |
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.h')
-rw-r--r-- | lib/vconn.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vconn.h b/lib/vconn.h index ee4a5681..fd8bb253 100644 --- a/lib/vconn.h +++ b/lib/vconn.h @@ -41,7 +41,7 @@ ovs_be32 vconn_get_remote_ip(const struct vconn *); ovs_be16 vconn_get_remote_port(const struct vconn *); ovs_be32 vconn_get_local_ip(const struct vconn *); ovs_be16 vconn_get_local_port(const struct vconn *); -int vconn_get_version(const struct vconn *); +enum ofp_version vconn_get_version(const struct vconn *); int vconn_connect(struct vconn *); int vconn_recv(struct vconn *, struct ofpbuf **); int vconn_send(struct vconn *, struct ofpbuf *); @@ -54,7 +54,8 @@ int vconn_transact_multiple_noreply(struct vconn *, struct list *requests, void vconn_run(struct vconn *); void vconn_run_wait(struct vconn *); -int vconn_open_block(const char *name, int min_version, struct vconn **); +int vconn_open_block(const char *name, enum ofp_version min_version, + struct vconn **); int vconn_send_block(struct vconn *, struct ofpbuf *); int vconn_recv_block(struct vconn *, struct ofpbuf **); |