#include "dynamic-string.h"
#include "netlink-protocol.h"
#include "ofpbuf.h"
+#include "poll-loop.h"
#include "timeval.h"
#include "util.h"
return 0;
}
-/* Returns 'sock''s underlying file descriptor. */
-int
-nl_sock_fd(const struct nl_sock *sock)
+/* Causes poll_block() to wake up when any of the specified 'events' (which is
+ * a OR'd combination of POLLIN, POLLOUT, etc.) occur on 'sock'. */
+void
+nl_sock_wait(const struct nl_sock *sock, short int events)
{
- return sock->fd;
+ poll_fd_wait(sock->fd, events);
}
\f
/* Netlink messages. */
int nl_sock_transact(struct nl_sock *, const struct ofpbuf *request,
struct ofpbuf **reply);
-int nl_sock_fd(const struct nl_sock *);
+void nl_sock_wait(const struct nl_sock *, short int events);
\f
/* Netlink messages. */
default:
NOT_REACHED();
}
- poll_fd_wait(nl_sock_fd(netlink->dp.sock), events);
+ nl_sock_wait(netlink->dp.sock, events);
}
struct vconn_class netlink_vconn_class = {