mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 00:35:33 +00:00
ofp-protocol: Better abstract changing the protocol used for flow matches.
The previous interface here required the client to understand, to some extent, the low-level NXFF_* values and the encoding format for the NXT_SET_FLOW_FORMAT and NXT_SET_FLOW_MOD_TABLE_ID messages. This commit changes the interface so that the client only has to understand the ofputil_protocol type used elsewhere and none of the encoding otherwise. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
@@ -162,11 +162,22 @@ 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);
|
||||
|
||||
/* Messages for changing the protocol. */
|
||||
|
||||
/* Changing the protocol at a high level. */
|
||||
struct ofpbuf *ofputil_encode_set_protocol(enum ofputil_protocol current,
|
||||
enum ofputil_protocol want,
|
||||
enum ofputil_protocol *next);
|
||||
|
||||
/* Changing the protocol at a low level. */
|
||||
struct ofpbuf *ofputil_encode_nx_set_flow_format(enum ofputil_protocol);
|
||||
enum ofputil_protocol ofputil_decode_nx_set_flow_format(
|
||||
const struct ofp_header *);
|
||||
|
||||
struct ofpbuf *ofputil_encode_nx_flow_mod_table_id(bool enable);
|
||||
bool ofputil_decode_nx_flow_mod_table_id(const struct ofp_header *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user