summaryrefslogtreecommitdiff
path: root/include/openflow
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-06-10 19:27:05 +0900
committerBen Pfaff <blp@nicira.com>2014-06-13 10:55:50 -0700
commit0f75cc62e1c38e60efb63bb4521fd07b6734cef7 (patch)
treee89af14e5c390cf79327bfc4a794d1336ef24e8a /include/openflow
parentcb220b393ab5c60f0552029a9a642a0813069e50 (diff)
downloadopenvswitch-0f75cc62e1c38e60efb63bb4521fd07b6734cef7.tar.gz
ofproto: Add ofp14_flow_monitor_{request, command, flags}
This is in preparation for supporting OpenFlow1.4 flow monitor requests. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'include/openflow')
-rw-r--r--include/openflow/openflow-1.4.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/openflow/openflow-1.4.h b/include/openflow/openflow-1.4.h
index f7bdecbc0..2a765cfe2 100644
--- a/include/openflow/openflow-1.4.h
+++ b/include/openflow/openflow-1.4.h
@@ -367,4 +367,51 @@ struct ofp14_bundle_ctrl_msg {
};
OFP_ASSERT(sizeof(struct ofp14_bundle_ctrl_msg) == 8);
+/* Body for ofp14_multipart_request of type OFPMP_FLOW_MONITOR.
+ *
+ * The OFPMP_FLOW_MONITOR request's body consists of an array of zero or more
+ * instances of this structure. The request arranges to monitor the flows
+ * that match the specified criteria, which are interpreted in the same way as
+ * for OFPMP_FLOW.
+ *
+ * 'id' identifies a particular monitor for the purpose of allowing it to be
+ * canceled later with OFPFMC_DELETE. 'id' must be unique among
+ * existing monitors that have not already been canceled.
+ */
+struct ofp14_flow_monitor_request {
+ ovs_be32 monitor_id; /* Controller-assigned ID for this monitor. */
+ ovs_be32 out_port; /* Required output port, if not OFPP_ANY. */
+ ovs_be32 out_group; /* Required output port, if not OFPG_ANY. */
+ ovs_be16 flags; /* OFPMF14_*. */
+ uint8_t table_id; /* One table's ID or OFPTT_ALL (all tables). */
+ uint8_t command; /* One of OFPFMC14_*. */
+ /* Followed by an ofp11_match structure. */
+};
+OFP_ASSERT(sizeof(struct ofp14_flow_monitor_request) == 16);
+
+/* Flow monitor commands */
+enum ofp14_flow_monitor_command {
+ OFPFMC14_ADD = 0, /* New flow monitor. */
+ OFPFMC14_MODIFY = 1, /* Modify existing flow monitor. */
+ OFPFMC14_DELETE = 2, /* Delete/cancel existing flow monitor. */
+};
+
+/* 'flags' bits in struct of_flow_monitor_request. */
+enum ofp14_flow_monitor_flags {
+ /* When to send updates. */
+ /* Common to NX and OpenFlow 1.4 */
+ OFPFMF14_INITIAL = 1 << 0, /* Initially matching flows. */
+ OFPFMF14_ADD = 1 << 1, /* New matching flows as they are added. */
+ OFPFMF14_REMOVED = 1 << 2, /* Old matching flows as they are removed. */
+ OFPFMF14_MODIFY = 1 << 3, /* Matching flows as they are changed. */
+
+ /* What to include in updates. */
+ /* Common to NX and OpenFlow 1.4 */
+ OFPFMF14_INSTRUCTIONS = 1 << 4, /* If set, instructions are included. */
+ OFPFMF14_NO_ABBREV = 1 << 5, /* If set, include own changes in full. */
+ /* OpenFlow 1.4 */
+ OFPFMF14_ONLY_OWN = 1 << 6, /* If set, don't include other controllers.
+ */
+};
+
#endif /* openflow/openflow-1.4.h */