From 50d25de67fe5b68fb2492e014a6f30a1f48bfdd3 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 30 Mar 2012 11:29:58 +0900 Subject: [PATCH] Move structures into openflow-common.h * Move ofp_packet_in_reason into openflow-common.h as it contains elements first defined in both the Openflow 1.0 and 1.2 specifications. * Move ofp_flow_removed_reason into openflow-common.h as subsequent patches will add an element first defined in the Openflow 1.1 specification. Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- include/openflow/openflow-1.0.h | 15 --------------- include/openflow/openflow-common.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/openflow/openflow-1.0.h b/include/openflow/openflow-1.0.h index 5844a96c..140ae3b8 100644 --- a/include/openflow/openflow-1.0.h +++ b/include/openflow/openflow-1.0.h @@ -178,14 +178,6 @@ struct ofp10_port_mod { }; OFP_ASSERT(sizeof(struct ofp10_port_mod) == 32); -/* Why is this packet being sent to the controller? */ -enum ofp_packet_in_reason { - OFPR_NO_MATCH, /* No matching flow. */ - OFPR_ACTION, /* Action explicitly output to controller. */ - OFPR_INVALID_TTL /* Packet has invalid TTL. */, - OFPR_N_REASONS -}; - /* Packet received on port (datapath -> controller). */ struct ofp_packet_in { struct ofp_header header; @@ -472,13 +464,6 @@ struct ofp_flow_mod { }; OFP_ASSERT(sizeof(struct ofp_flow_mod) == 72); -/* Why was this flow removed? */ -enum ofp_flow_removed_reason { - OFPRR_IDLE_TIMEOUT, /* Flow idle time exceeded idle_timeout. */ - OFPRR_HARD_TIMEOUT, /* Time exceeded hard_timeout. */ - OFPRR_DELETE /* Evicted by a DELETE flow mod. */ -}; - /* Flow removed (datapath -> controller). */ struct ofp_flow_removed { struct ofp_header header; diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h index 626585ad..f10862f6 100644 --- a/include/openflow/openflow-common.h +++ b/include/openflow/openflow-common.h @@ -209,6 +209,21 @@ enum ofp_capabilities { pkts. */ }; +/* Why is this packet being sent to the controller? */ +enum ofp_packet_in_reason { + OFPR_NO_MATCH, /* No matching flow. */ + OFPR_ACTION, /* Action explicitly output to controller. */ + OFPR_INVALID_TTL /* Packet has invalid TTL. */, + OFPR_N_REASONS +}; + +/* Why was this flow removed? */ +enum ofp_flow_removed_reason { + OFPRR_IDLE_TIMEOUT, /* Flow idle time exceeded idle_timeout. */ + OFPRR_HARD_TIMEOUT, /* Time exceeded hard_timeout. */ + OFPRR_DELETE /* Evicted by a DELETE flow mod. */ +}; + /* What changed about the physical port */ enum ofp_port_reason { OFPPR_ADD, /* The port was added. */ -- 2.30.2