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:
@@ -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. */
|
||||
|
||||
|
Reference in New Issue
Block a user