+/* Adds or modifies a flow in 'dpif'. The flow is specified by the Netlink
+ * attributes with types OVS_KEY_ATTR_* in the 'key_len' bytes starting at
+ * 'key'. The associated actions are specified by the Netlink attributes with
+ * types OVS_ACTION_ATTR_* in the 'actions_len' bytes starting at 'actions'.
+ *
+ * - If the flow's key does not exist in 'dpif', then the flow will be added if
+ * 'flags' includes DPIF_FP_CREATE. Otherwise the operation will fail with
+ * ENOENT.
+ *
+ * If the operation succeeds, then 'stats', if nonnull, will be zeroed.
+ *
+ * - If the flow's key does exist in 'dpif', then the flow's actions will be
+ * updated if 'flags' includes DPIF_FP_MODIFY. Otherwise the operation will
+ * fail with EEXIST. If the flow's actions are updated, then its statistics
+ * will be zeroed if 'flags' includes DPIF_FP_ZERO_STATS, and left as-is
+ * otherwise.
+ *
+ * If the operation succeeds, then 'stats', if nonnull, will be set to the
+ * flow's statistics before the update.
+ */
+int
+dpif_flow_put(struct dpif *dpif, enum dpif_flow_put_flags flags,
+ const struct nlattr *key, size_t key_len,
+ const struct nlattr *actions, size_t actions_len,
+ struct dpif_flow_stats *stats)
+{
+ struct dpif_flow_put put;
+
+ put.flags = flags;
+ put.key = key;
+ put.key_len = key_len;
+ put.actions = actions;
+ put.actions_len = actions_len;
+ put.stats = stats;
+ return dpif_flow_put__(dpif, &put);
+}
+
+/* Deletes a flow from 'dpif' and returns 0, or returns ENOENT if 'dpif' does
+ * not contain such a flow. The flow is specified by the Netlink attributes
+ * with types OVS_KEY_ATTR_* in the 'key_len' bytes starting at 'key'.