extern enum ofputil_protocol ofputil_flow_dump_protocols[];
extern size_t ofputil_n_flow_dump_protocols;
-enum ofputil_protocol ofputil_protocol_from_ofp_version(int version);
-uint8_t ofputil_protocol_to_ofp_version(enum ofputil_protocol);
+enum ofputil_protocol
+ofputil_protocol_from_ofp_version(enum ofp_version version);
+enum ofp_version ofputil_protocol_to_ofp_version(enum ofputil_protocol);
bool ofputil_protocol_is_valid(enum ofputil_protocol);
enum ofputil_protocol ofputil_protocol_set_tid(enum ofputil_protocol,
struct ofp10_match *);
/* Work with ofp11_match. */
+enum ofperr ofputil_pull_ofp11_match(struct ofpbuf *, unsigned int priority,
+ struct cls_rule *);
enum ofperr ofputil_cls_rule_from_ofp11_match(const struct ofp11_match *,
unsigned int priority,
struct cls_rule *);
};
enum ofputil_capabilities {
- /* OpenFlow 1.0 and 1.1 share these values for these capabilities. */
+ /* OpenFlow 1.0, 1.1 and 1.2 share these values for these capabilities. */
OFPUTIL_C_FLOW_STATS = 1 << 0, /* Flow statistics. */
OFPUTIL_C_TABLE_STATS = 1 << 1, /* Table statistics. */
OFPUTIL_C_PORT_STATS = 1 << 2, /* Port statistics. */
OFPUTIL_C_IP_REASM = 1 << 5, /* Can reassemble IP fragments. */
OFPUTIL_C_QUEUE_STATS = 1 << 6, /* Queue statistics. */
+
+ /* OpenFlow 1.0 and 1.1 share this capability. */
OFPUTIL_C_ARP_MATCH_IP = 1 << 7, /* Match IP addresses in ARP pkts. */
/* OpenFlow 1.0 only. */
OFPUTIL_C_STP = 1 << 3, /* 802.1d spanning tree. */
- /* OpenFlow 1.1 only. */
+ /* OpenFlow 1.1 and 1.2 share this capability. */
OFPUTIL_C_GROUP_STATS = 1 << 4, /* Group statistics. */
+
+ /* OpenFlow 1.2 only */
+ OFPUTIL_C_PORT_BLOCKED = 1 << 8, /* Switch will block looping ports */
};
enum ofputil_action_bitmap {
bool ofputil_switch_features_ports_trunc(struct ofpbuf *b);
/* phy_port helper functions. */
-int ofputil_pull_phy_port(uint8_t ofp_version, struct ofpbuf *,
+int ofputil_pull_phy_port(enum ofp_version ofp_version, struct ofpbuf *,
struct ofputil_phy_port *);
size_t ofputil_count_phy_ports(uint8_t ofp_version, struct ofpbuf *);
struct ofpbuf *ofputil_encode_flow_monitor_cancel(uint32_t id);
/* Encoding OpenFlow stats messages. */
-void ofputil_append_port_desc_stats_reply(uint8_t ofp_version,
+void ofputil_append_port_desc_stats_reply(enum ofp_version ofp_version,
const struct ofputil_phy_port *pp,
struct list *replies);
struct ofpbuf *make_echo_request(void);
struct ofpbuf *make_echo_reply(const struct ofp_header *rq);
-struct ofpbuf *ofputil_encode_barrier_request(void);
+struct ofpbuf *ofputil_encode_barrier_request(enum ofp_version);
const char *ofputil_frag_handling_to_string(enum ofp_config_flags);
bool ofputil_frag_handling_from_string(const char *, enum ofp_config_flags *);