aboutsummaryrefslogtreecommitdiff
path: root/lib/vconn.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-02-10 13:30:23 -0800
committerBen Pfaff <blp@nicira.com>2012-03-07 13:59:02 -0800
commit27527aa09ce456796eeea728cef9528aa5612b70 (patch)
treefe9f12d78b25a5520a25b6cec7e3dd5b2727ea20 /lib/vconn.h
parent032f3fbd856864cdcbdf505d404e826999b8a2ae (diff)
Introduce ofputil_protocol, to abstract the protocol in use on a connection.
Open vSwitch already handles a few different protocol variations, but it does so in a nonuniform manner: - OpenFlow 1.0 and NXM flow formats are distinguished using the NXFF_* constant values from nicira-ext.h. - The "flow_mod_table_id" feature setting is maintained in ofproto as part of an OpenFlow connection's (ofconn's) state. There's no way to easily communicate this state among components. It's not much of a problem yet, but as more protocol support is added it seems better to have an abstract, uniform way to represent protocol versions and variants. This commit implements that by introducing a new type "enum ofputil_protocol". Each ofputil_protocol value represents a variant of a protocol version. Each value is a separate bit, so a single enum can also represent a set of protocols, which is often useful as well. Reviewed-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/vconn.h b/lib/vconn.h
index 74b6b49c..516e2d3a 100644
--- a/lib/vconn.h
+++ b/lib/vconn.h
@@ -40,6 +40,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 *);
int vconn_connect(struct vconn *);
int vconn_recv(struct vconn *, struct ofpbuf **);
int vconn_send(struct vconn *, struct ofpbuf *);