netlink: Expose method to get Netlink pid of a socket.
[sliver-openvswitch.git] / lib / netlink-socket.c
index 8f9c3d5..3674bac 100644 (file)
@@ -667,6 +667,13 @@ nl_sock_wait(const struct nl_sock *sock, short int events)
 {
     poll_fd_wait(sock->fd, events);
 }
+
+/* Returns the PID associated with this socket. */
+uint32_t
+nl_sock_pid(const struct nl_sock *sock)
+{
+    return sock->pid;
+}
 \f
 /* Miscellaneous.  */