413a4317ac
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 <stefanha@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
20 lines
656 B
Makefile
20 lines
656 B
Makefile
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
|
|
obj-$(CONFIG_HYPERV_VSOCKETS) += hv_sock.o
|
|
|
|
vsock-y += af_vsock.o af_vsock_tap.o vsock_addr.o
|
|
|
|
vsock_diag-y += diag.o
|
|
|
|
vmw_vsock_vmci_transport-y += vmci_transport.o vmci_transport_notify.o \
|
|
vmci_transport_notify_qstate.o
|
|
|
|
vmw_vsock_virtio_transport-y += virtio_transport.o
|
|
|
|
vmw_vsock_virtio_transport_common-y += virtio_transport_common.o
|
|
|
|
hv_sock-y += hyperv_transport.o
|