unsigned int priority,
struct cls_rule *);
void ofputil_normalize_rule(struct cls_rule *);
+void ofputil_normalize_rule_quiet(struct cls_rule *);
void ofputil_cls_rule_to_ofp10_match(const struct cls_rule *,
struct ofp10_match *);
/* Work with ofp11_match. */
enum ofperr ofputil_pull_ofp11_match(struct ofpbuf *, unsigned int priority,
- struct cls_rule *);
+ struct cls_rule *,
+ uint16_t *padded_match_len);
enum ofperr ofputil_cls_rule_from_ofp11_match(const struct ofp11_match *,
unsigned int priority,
struct cls_rule *);
uint32_t duration_sec;
uint32_t duration_nsec;
uint16_t idle_timeout;
+ uint16_t hard_timeout;
uint64_t packet_count; /* Packet count, UINT64_MAX if unknown. */
uint64_t byte_count; /* Byte count, UINT64_MAX if unknown. */
};
enum ofperr ofputil_decode_packet_in(struct ofputil_packet_in *,
const struct ofp_header *);
struct ofpbuf *ofputil_encode_packet_in(const struct ofputil_packet_in *,
+ enum ofputil_protocol protocol,
enum nx_packet_in_format);
const char *ofputil_packet_in_reason_to_string(enum ofp_packet_in_reason);
enum ofperr ofputil_decode_packet_out(struct ofputil_packet_out *,
const struct ofp_header *,
struct ofpbuf *ofpacts);
-struct ofpbuf *ofputil_encode_packet_out(const struct ofputil_packet_out *);
+struct ofpbuf *ofputil_encode_packet_out(const struct ofputil_packet_out *,
+ enum ofputil_protocol protocol);
enum ofputil_port_config {
/* OpenFlow 1.0 and 1.1 share these values for these port config bits. */
};
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 {
struct list *replies);
/* Encoding simple OpenFlow messages. */
-struct ofpbuf *make_echo_request(void);
+struct ofpbuf *make_echo_request(enum ofp_version);
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 *);