X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-util.h;h=9cc30289afb34a807c36e5b40ca3ad93f54cc3f6;hb=8706009e555bb9fa04a5679e4be2c7c67506802b;hp=9230b36fe7acc8d3c7ee60442d3c1385059ff3ee;hpb=2e3fa633aad59f9687e2b6e3aad3b0a308aa89fc;p=sliver-openvswitch.git diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 9230b36fe..9cc30289a 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -114,12 +114,14 @@ void ofputil_cls_rule_from_ofp10_match(const struct ofp10_match *, 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 *); @@ -246,6 +248,7 @@ struct ofputil_flow_removed { 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. */ }; @@ -275,6 +278,7 @@ struct ofputil_packet_in { 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); @@ -297,7 +301,8 @@ struct ofputil_packet_out { 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. */ @@ -346,19 +351,24 @@ struct ofputil_phy_port { }; 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 { @@ -489,10 +499,10 @@ void ofputil_append_port_desc_stats_reply(enum ofp_version ofp_version, 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 *);