-/* Helper function for nl_dump_next(). */
-static int
-nl_dump_recv(struct nl_dump *dump)
-{
- struct nlmsghdr *nlmsghdr;
- int retval;
-
- retval = nl_sock_recv__(dump->sock, &dump->buffer, true);
- if (retval) {
- return retval == EINTR ? EAGAIN : retval;
- }
-
- nlmsghdr = nl_msg_nlmsghdr(&dump->buffer);
- if (dump->seq != nlmsghdr->nlmsg_seq) {
- VLOG_DBG_RL(&rl, "ignoring seq %#"PRIx32" != expected %#"PRIx32,
- nlmsghdr->nlmsg_seq, dump->seq);
- return EAGAIN;
- }
-
- if (nl_msg_nlmsgerr(&dump->buffer, &retval)) {
- VLOG_INFO_RL(&rl, "netlink dump request error (%s)",
- ovs_strerror(retval));
- return retval && retval != EAGAIN ? retval : EPROTO;
- }
-
- return 0;
-}
-
-/* Attempts to retrieve another reply from 'dump', which must have been
- * initialized with nl_dump_start().
+/* Attempts to retrieve another reply from 'dump' into 'buffer'. 'dump' must
+ * have been initialized with nl_dump_start(), and 'buffer' must have been
+ * initialized. 'buffer' should be at least NL_DUMP_BUFSIZE bytes long.