-/* Body of reply to OFPST_DESC request. Each entry is a NULL-terminated
- * ASCII string. */
-struct ofp_desc_stats {
- char mfr_desc[DESC_STR_LEN]; /* Manufacturer description. */
- char hw_desc[DESC_STR_LEN]; /* Hardware description. */
- char sw_desc[DESC_STR_LEN]; /* Software description. */
- char serial_num[SERIAL_NUM_LEN]; /* Serial number. */
- char dp_desc[DESC_STR_LEN]; /* Human readable description of datapath. */
-};
-OFP_ASSERT(sizeof(struct ofp_desc_stats) == 1056);
-
-/* Body for ofp_stats_request of type OFPST_FLOW. */
-struct ofp_flow_stats_request {
- struct ofp_match match; /* Fields to match. */
- uint8_t table_id; /* ID of table to read (from ofp_table_stats),
- 0xff for all tables or 0xfe for emergency. */
- uint8_t pad; /* Align to 32 bits. */
- uint16_t out_port; /* Require matching entries to include this
- as an output port. A value of OFPP_NONE
- indicates no restriction. */
-};
-OFP_ASSERT(sizeof(struct ofp_flow_stats_request) == 44);
-
-/* Body of reply to OFPST_FLOW request. */
-struct ofp_flow_stats {
- uint16_t length; /* Length of this entry. */
- uint8_t table_id; /* ID of table flow came from. */
- uint8_t pad;
- struct ofp_match match; /* Description of fields. */
- uint32_t duration_sec; /* Time flow has been alive in seconds. */
- uint32_t duration_nsec; /* Time flow has been alive in nanoseconds beyond
- duration_sec. */
- uint16_t priority; /* Priority of the entry. Only meaningful
- when this is not an exact-match entry. */
- uint16_t idle_timeout; /* Number of seconds idle before expiration. */
- uint16_t hard_timeout; /* Number of seconds before expiration. */
- uint8_t pad2[6]; /* Align to 64-bits. */
- uint64_t cookie; /* Opaque controller-issued identifier. */
- uint64_t packet_count; /* Number of packets in flow. */
- uint64_t byte_count; /* Number of bytes in flow. */
- struct ofp_action_header actions[0]; /* Actions. */
-};
-OFP_ASSERT(sizeof(struct ofp_flow_stats) == 88);
-
-/* Body for ofp_stats_request of type OFPST_AGGREGATE. */
-struct ofp_aggregate_stats_request {
- struct ofp_match match; /* Fields to match. */
- uint8_t table_id; /* ID of table to read (from ofp_table_stats)
- 0xff for all tables or 0xfe for emergency. */
- uint8_t pad; /* Align to 32 bits. */
- uint16_t out_port; /* Require matching entries to include this
- as an output port. A value of OFPP_NONE
- indicates no restriction. */
-};
-OFP_ASSERT(sizeof(struct ofp_aggregate_stats_request) == 44);
-
-/* Body of reply to OFPST_AGGREGATE request. */
-struct ofp_aggregate_stats_reply {
- uint64_t packet_count; /* Number of packets in flows. */
- uint64_t byte_count; /* Number of bytes in flows. */
- uint32_t flow_count; /* Number of flows. */
- uint8_t pad[4]; /* Align to 64 bits. */
-};
-OFP_ASSERT(sizeof(struct ofp_aggregate_stats_reply) == 24);
-
-/* Body of reply to OFPST_TABLE request. */
-struct ofp_table_stats {
- uint8_t table_id; /* Identifier of table. Lower numbered tables
- are consulted first. */
- uint8_t pad[3]; /* Align to 32-bits. */
- char name[OFP_MAX_TABLE_NAME_LEN];
- uint32_t wildcards; /* Bitmap of OFPFW_* wildcards that are
- supported by the table. */
- uint32_t max_entries; /* Max number of entries supported. */
- uint32_t active_count; /* Number of active entries. */
- uint64_t lookup_count; /* Number of packets looked up in table. */
- uint64_t matched_count; /* Number of packets that hit table. */
-};
-OFP_ASSERT(sizeof(struct ofp_table_stats) == 64);
-
-/* Body for ofp_stats_request of type OFPST_PORT. */
-struct ofp_port_stats_request {
- uint16_t port_no; /* OFPST_PORT message must request statistics
- * either for a single port (specified in
- * port_no) or for all ports (if port_no ==
- * OFPP_NONE). */
- uint8_t pad[6];
-};
-OFP_ASSERT(sizeof(struct ofp_port_stats_request) == 8);
-
-/* Body of reply to OFPST_PORT request. If a counter is unsupported, set
- * the field to all ones. */
-struct ofp_port_stats {
- uint16_t port_no;
- uint8_t pad[6]; /* Align to 64-bits. */
- uint64_t rx_packets; /* Number of received packets. */
- uint64_t tx_packets; /* Number of transmitted packets. */
- uint64_t rx_bytes; /* Number of received bytes. */
- uint64_t tx_bytes; /* Number of transmitted bytes. */
- uint64_t rx_dropped; /* Number of packets dropped by RX. */
- uint64_t tx_dropped; /* Number of packets dropped by TX. */
- uint64_t rx_errors; /* Number of receive errors. This is a super-set
- of more specific receive errors and should be
- greater than or equal to the sum of all
- rx_*_err values. */
- uint64_t tx_errors; /* Number of transmit errors. This is a super-set
- of more specific transmit errors and should be
- greater than or equal to the sum of all
- tx_*_err values (none currently defined.) */
- uint64_t rx_frame_err; /* Number of frame alignment errors. */
- uint64_t rx_over_err; /* Number of packets with RX overrun. */
- uint64_t rx_crc_err; /* Number of CRC errors. */
- uint64_t collisions; /* Number of collisions. */
-};
-OFP_ASSERT(sizeof(struct ofp_port_stats) == 104);
-
-/* Vendor extension. */
-struct ofp_vendor_header {
- struct ofp_header header; /* Type OFPT_VENDOR. */
- uint32_t vendor; /* Vendor ID:
- * - MSB 0: low-order bytes are IEEE OUI.
- * - MSB != 0: defined by OpenFlow
- * consortium. */
- /* Vendor-defined arbitrary additional data. */
-};
-OFP_ASSERT(sizeof(struct ofp_vendor_header) == 12);