From 3a51996b8a196e6b761e9d7e20ce573028a6dbcf Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Wed, 2 May 2012 16:35:49 -0700 Subject: [PATCH] OpenFlow: Move stats message enums into "common". We will be adding some OpenFlow 1.3 stats (aka multipart request) messages to our OpenFlow 1.0 implementation. As such, move the definition of those message numbers to the common location. Signed-off-by: Justin Pettit --- include/openflow/openflow-1.0.h | 36 ------------------------------ include/openflow/openflow-common.h | 36 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/openflow/openflow-1.0.h b/include/openflow/openflow-1.0.h index 802e80de..890676cb 100644 --- a/include/openflow/openflow-1.0.h +++ b/include/openflow/openflow-1.0.h @@ -514,42 +514,6 @@ struct ofp_error_msg { }; OFP_ASSERT(sizeof(struct ofp_error_msg) == 12); -enum ofp_stats_types { - /* Description of this OpenFlow switch. - * The request is struct ofp_stats_msg. - * The reply is struct ofp_desc_stats. */ - OFPST_DESC, - - /* Individual flow statistics. - * The request is struct ofp_flow_stats_request. - * The reply body is an array of struct ofp_flow_stats. */ - OFPST_FLOW, - - /* Aggregate flow statistics. - * The request is struct ofp_flow_stats_request. - * The reply is struct ofp_aggregate_stats_reply. */ - OFPST_AGGREGATE, - - /* Flow table statistics. - * The request is struct ofp_stats_msg. - * The reply body is an array of struct ofp_table_stats. */ - OFPST_TABLE, - - /* Physical port statistics. - * The request is struct ofp_port_stats_request. - * The reply body is an array of struct ofp_port_stats. */ - OFPST_PORT, - - /* Queue statistics for a port. - * The request body is struct ofp_queue_stats_request. - * The reply body is an array of struct ofp_queue_stats. */ - OFPST_QUEUE, - - /* Vendor extension. - * The request and reply begin with "struct ofp_vendor_stats". */ - OFPST_VENDOR = 0xffff -}; - /* Statistics request or reply message. */ struct ofp_stats_msg { struct ofp_header header; diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h index 57b7d51e..c3cf2750 100644 --- a/include/openflow/openflow-common.h +++ b/include/openflow/openflow-common.h @@ -242,6 +242,42 @@ struct ofp_port_status { }; OFP_ASSERT(sizeof(struct ofp_port_status) == 16); +enum ofp_stats_types { + /* Description of this OpenFlow switch. (OFPMP_DESC) + * The OF1.0 request is struct ofp_stats_msg. + * The OF1.0 reply is struct ofp_desc_stats. */ + OFPST_DESC = 0, + + /* Individual flow statistics. (OFPMP_FLOW) + * The OF1.0 request is struct ofp_flow_stats_request. + * The OF1.0 reply body is an array of struct ofp_flow_stats. */ + OFPST_FLOW = 1, + + /* Aggregate flow statistics. (OFPMP_AGGREGATE) + * The OF1.0 request is struct ofp_flow_stats_request. + * The OF1.0 reply is struct ofp_aggregate_stats_reply. */ + OFPST_AGGREGATE = 2, + + /* Flow table statistics. (OFPMP_TABLE) + * The OF1.0 request is struct ofp_stats_msg. + * The OF1.0 reply body is an array of struct ofp_table_stats. */ + OFPST_TABLE = 3, + + /* Physical port statistics. (OFPMP_PORT_STATS) + * The OF1.0 request is struct ofp_port_stats_request. + * The OF1.0 reply body is an array of struct ofp_port_stats. */ + OFPST_PORT = 4, + + /* Queue statistics for a port. (OFPMP_QUEUE) + * The OF1.0 request is struct ofp_stats_msg. + * The OF1.0 reply body is an array of struct ofp_queue_stats. */ + OFPST_QUEUE = 5, + + /* Vendor extension. + * The OF1.0 request and reply begin with struct ofp_vendor_stats. */ + OFPST_VENDOR = 0xffff +}; + /* The match type indicates the match structure (set of fields that compose the * match) in use. The match type is placed in the type field at the beginning * of all match structures. The "OpenFlow Extensible Match" type corresponds -- 2.30.2