2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netlink: Expose method to get Netlink pid of a socket.

In the future, the kernel will use unicast messages instead of
multicast to send upcalls.  As a result, we need to be able to
tell it where to direct the traffic.  This adds a function to expose
the Netlink pid of a socket so it can be included in messages to the
kernel.
This commit is contained in:
Jesse Gross
2011-09-16 09:37:16 -07:00
parent e60a5e2637
commit 50802adb0e
2 changed files with 9 additions and 0 deletions

View 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;
}
/* Miscellaneous. */