vswitchd: Configuration of allowed OpenFlow versions
[openvswitch] / lib / ofp-util.h
index a081cbf0bd26467c7ffffdd2a762993429ffdbe0..053cd843adbc35bb2bf469ba2824e616bb059820 100644 (file)
@@ -69,6 +69,7 @@ enum ofputil_protocol {
      * The protocols with "TID" mean that the nx_flow_mod_table_id Nicira
      * extension has been enabled.  The other protocols have it disabled.
      */
+#define OFPUTIL_P_NONE 0
     OFPUTIL_P_OF10_STD     = 1 << 0,
     OFPUTIL_P_OF10_STD_TID = 1 << 1,
     OFPUTIL_P_OF10_NXM     = 1 << 2,
@@ -86,10 +87,12 @@ enum ofputil_protocol {
     OFPUTIL_P_OF12_OXM      = 1 << 4,
 
     /* All protocols. */
-#define OFPUTIL_P_ANY (OFPUTIL_P_OF10_STD_ANY | OFPUTIL_P_OF10_NXM_ANY)
+#define OFPUTIL_P_ANY ((1 << 5) - 1)
 
     /* Protocols in which a specific table may be specified in flow_mods. */
-#define OFPUTIL_P_TID (OFPUTIL_P_OF10_STD_TID | OFPUTIL_P_OF10_NXM_TID)
+#define OFPUTIL_P_TID (OFPUTIL_P_OF10_STD_TID | \
+                       OFPUTIL_P_OF10_NXM_TID | \
+                       OFPUTIL_P_OF12_OXM)
 };
 
 /* Protocols to use for flow dumps, from most to least preferred. */
@@ -137,6 +140,7 @@ enum ofputil_protocol ofputil_protocols_from_string(const char *s);
 
 const char *ofputil_version_to_string(enum ofp_version ofp_version);
 uint32_t ofputil_versions_from_string(const char *s);
+uint32_t ofputil_versions_from_strings(char ** const s, size_t count);
 
 bool ofputil_decode_hello(const struct ofp_header *,
                           uint32_t *allowed_versions);