diff options
| author | Stefano Garzarella <sgarzare@redhat.com> | 2020-02-18 16:54:35 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-03-14 19:41:57 +0100 |
| commit | cab58dfe1ea746b4450f50b73584ad804a658e6a (patch) | |
| tree | 892ed1c9de0c15c4e245a67b117c56cb251e723b /man7 | |
| parent | 3d5a6df0773a56ce78b7514f449810061b53f700 (diff) | |
| download | man-pages-cab58dfe1ea746b4450f50b73584ad804a658e6a.tar.gz | |
vsock.7: Add VMADDR_CID_LOCAL description
Linux 5.6 added the new well-known VMADDR_CID_LOCAL for
local communication.
This patch explains how to use it and removes the legacy
VMADDR_CID_RESERVED no longer available.
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
| -rw-r--r-- | man7/vsock.7 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/man7/vsock.7 b/man7/vsock.7 index c5ffcf07d8..fa2c6e17e8 100644 --- a/man7/vsock.7 +++ b/man7/vsock.7 @@ -127,8 +127,8 @@ There are several special addresses: means any address for binding; .B VMADDR_CID_HYPERVISOR (0) is reserved for services built into the hypervisor; -.B VMADDR_CID_RESERVED -(1) must not be used; +.B VMADDR_CID_LOCAL +(1) is the well-known address for local communication (loopback); .B VMADDR_CID_HOST (2) is the well-known address of the host. @@ -164,6 +164,15 @@ Consider using .B VMADDR_CID_ANY when binding instead of getting the local CID with .BR IOCTL_VM_SOCKETS_GET_LOCAL_CID . +.SS Local communication +.B VMADDR_CID_LOCAL +(1) directs packets to the same host that generated them. This is useful +for testing applications on a single host and for debugging. +.PP +The local CID obtained with +.BR IOCTL_VM_SOCKETS_GET_LOCAL_CID +can be used for the same purpose, but it is preferable to use +.B VMADDR_CID_LOCAL . .SH ERRORS .TP .B EACCES @@ -222,6 +231,11 @@ are valid. Support for VMware (VMCI) has been available since Linux 3.9. KVM (virtio) is supported since Linux 4.8. Hyper-V is supported since Linux 4.14. +.PP +VMADDR_CID_LOCAL is supported since Linux 5.6. +Local communication in the guest and on the host is available since Linux 5.6. +Previous versions only supported local communication within a guest +(not on the host), and only with some transports (VMCI and virtio). .SH SEE ALSO .BR bind (2), .BR connect (2), |
