- /* Queries 'dpif' for a flow entry. The flow is specified by the Netlink
- * attributes with types ODP_KEY_ATTR_* in the 'key_len' bytes starting at
- * 'key'.
- *
- * Returns 0 if successful. If no flow matches, returns ENOENT. On other
- * failure, returns a positive errno value.
- *
- * If 'actionsp' is nonnull, then on success '*actionsp' must be set to an
- * ofpbuf owned by the caller that contains the Netlink attributes for the
- * flow's actions. The caller must free the ofpbuf (with ofpbuf_delete())
- * when it is no longer needed.
- *
- * If 'stats' is nonnull, then on success it must be updated with the
- * flow's statistics. */
- int (*flow_get)(const struct dpif *dpif,
- const struct nlattr *key, size_t key_len,
- struct ofpbuf **actionsp, struct dpif_flow_stats *stats);
-
- /* Adds or modifies a flow in 'dpif'. The flow is specified by the Netlink
- * attributes with types ODP_KEY_ATTR_* in the 'key_len' bytes starting at
- * 'key'. The associated actions are specified by the Netlink attributes
- * with types ODP_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, must 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, must be set to
- * the flow's statistics before the update.
- */
- int (*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);
-
- /* 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 ODP_KEY_ATTR_* in the 'key_len' bytes starting at
- * 'key'.
- *
- * If the operation succeeds, then 'stats', if nonnull, must be set to the
- * flow's statistics before its deletion. */
- int (*flow_del)(struct dpif *dpif,
- const struct nlattr *key, size_t key_len,
- struct dpif_flow_stats *stats);
-