From: Stefan Hajnoczi <stefa...@redhat.com> Date: Wed, 4 Oct 2017 12:37:15 -0400
> This patch adds the sock_diag interface for querying sockets from > userspace. Tools like ss(8) and netstat(8) can use this interface to > list open sockets. > > The userspace ABI is defined in <linux/vm_sockets_diag.h> and includes > netlink request and response structs. The request can query sockets > based on their sk_state (e.g. listening sockets only) and the response > contains socket information fields including the local/remote addresses, > inode number, etc. > > This patch does not dump VMCI pending sockets because I have only tested > the virtio transport, which does not use pending sockets. Support can > be added later by extending vsock_diag_dump() if needed by VMCI users. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Please post new feature patches against net-next. > diff --git a/net/vmw_vsock/Makefile b/net/vmw_vsock/Makefile > index 09fc2eb29dc8..e5dbf153aff0 100644 > --- a/net/vmw_vsock/Makefile > +++ b/net/vmw_vsock/Makefile > @@ -1,10 +1,13 @@ > obj-$(CONFIG_VSOCKETS) += vsock.o > +obj-$(CONFIG_VSOCKETS_DIAG) += vsock_diag.o > obj-$(CONFIG_VMWARE_VMCI_VSOCKETS) += vmw_vsock_vmci_transport.o > obj-$(CONFIG_VIRTIO_VSOCKETS) += vmw_vsock_virtio_transport.o > obj-$(CONFIG_VIRTIO_VSOCKETS_COMMON) += vmw_vsock_virtio_transport_common.o > This hunk fails to apply to the net-next tree, the context looks different. Thanks.