1ZMQ_VMCI(7) 0MQ Manual ZMQ_VMCI(7)
2
3
4
6 zmq_vmci - 0MQ transport over virtual machine communicatios interface
7 (VMCI) sockets
8
10 The VMCI transport passes messages between VMware virtual machines
11 running on the same host, between virtual machine and the host and
12 within virtual machines (inter-process transport like ipc).
13
14 Note
15 Communication between a virtual machine and the host is not
16 supported on Mac OS X 10.9 and above.
17
19 A 0MQ endpoint is a string consisting of a transport:// followed by an
20 address. The transport specifies the underlying protocol to use. The
21 address specifies the transport-specific address to connect to.
22
23 For the VMCI transport, the transport is vmci, and the meaning of the
24 address part is defined below.
25
26 Binding a socket
27 When binding a socket to a local address using zmq_bind() with the vmci
28 transport, the endpoint shall be interpreted as an interface followed
29 by a colon and the TCP port number to use.
30
31 An interface may be specified by either of the following:
32
33 • The wild-card *, meaning all available interfaces.
34
35 • An integer returned by VMCISock_GetLocalCID or @ (ZeroMQ will call
36 VMCISock_GetLocalCID internally).
37
38 The port may be specified by:
39
40 • A numeric value, usually above 1024 on POSIX systems.
41
42 • The wild-card *, meaning a system-assigned ephemeral port.
43
44 Unbinding wild-card address from a socket
45 When wild-card * endpoint was used in zmq_bind(), the caller should use
46 real endpoint obtained from the ZMQ_LAST_ENDPOINT socket option to
47 unbind this endpoint from a socket using zmq_unbind().
48
49 Connecting a socket
50 When connecting a socket to a peer address using zmq_connect() with the
51 vmci transport, the endpoint shall be interpreted as a peer address
52 followed by a colon and the port number to use.
53
54 A peer address must be a CID of the peer.
55
57 Assigning a local address to a socket.
58
59 // VMCI port 5555 on all available interfaces
60 rc = zmq_bind(socket, "vmci://*:5555");
61 assert (rc == 0);
62 // VMCI port 5555 on the local loop-back interface on all platforms
63 cid = VMCISock_GetLocalCID();
64 sprintf(endpoint, "vmci://%d:5555", cid);
65 rc = zmq_bind(socket, endpoint);
66 assert (rc == 0);
67
68 Connecting a socket.
69
70 // Connecting using a CID
71 sprintf(endpoint, "vmci://%d:5555", cid);
72 rc = zmq_connect(socket, endpoint);
73 assert (rc == 0);
74
75
77 zmq_bind(3) zmq_connect(3) zmq_inproc(7) zmq_tcp(7) zmq_pgm(7)
78 zmq_vmci(7) zmq_getsockopt(3) zmq(7)
79
81 This page was written by the 0MQ community. To make a change please
82 read the 0MQ Contribution Policy at
83 http://www.zeromq.org/docs:contributing.
84
85
86
870MQ 4.3.4 07/22/2023 ZMQ_VMCI(7)