+/* Attempts to retrieve another flow from 'dump', using 'state' for
+ * thread-local storage. 'dump' must have been initialized with a successful
+ * call to dpif_flow_dump_start(), and 'state' must have been initialized with
+ * dpif_flow_state_init().
+ *
+ * On success, updates the output parameters as described below and returns
+ * true. Otherwise, returns false. Failure might indicate an actual error or
+ * merely the end of the flow table. An error status for the entire dump
+ * operation is provided when it is completed by calling dpif_flow_dump_done().
+ * Multiple threads may use the same 'dump' with this function, but all other
+ * parameters must not be shared.
+ *
+ * On success, if 'key' and 'key_len' are nonnull then '*key' and '*key_len'
+ * will be set to Netlink attributes with types OVS_KEY_ATTR_* representing the
+ * dumped flow's key. If 'actions' and 'actions_len' are nonnull then they are
+ * set to Netlink attributes with types OVS_ACTION_ATTR_* representing the
+ * dumped flow's actions. If 'stats' is nonnull then it will be set to the
+ * dumped flow's statistics.
+ *
+ * All of the returned data is owned by 'dpif', not by the caller, and the
+ * caller must not modify or free it. 'dpif' guarantees that it remains
+ * accessible and unchanging until at least the next call to 'flow_dump_next'
+ * or 'flow_dump_done' for 'dump' and 'state'. */
+bool
+dpif_flow_dump_next(struct dpif_flow_dump *dump, void *state,
+ const struct nlattr **key, size_t *key_len,
+ const struct nlattr **mask, size_t *mask_len,
+ const struct nlattr **actions, size_t *actions_len,
+ const struct dpif_flow_stats **stats)
+{
+ const struct dpif *dpif = dump->dpif;
+ int error;
+
+ error = dpif->dpif_class->flow_dump_next(dpif, dump->iter, state,
+ key, key_len, mask, mask_len,
+ actions, actions_len, stats);
+ if (error) {
+ if (key) {
+ *key = NULL;
+ *key_len = 0;
+ }
+ if (mask) {
+ *mask = NULL;
+ *mask_len = 0;
+ }
+ if (actions) {
+ *actions = NULL;
+ *actions_len = 0;
+ }
+ if (stats) {
+ *stats = NULL;