VMware {code} Community
Andreas_Johanss
Contributor
Contributor

VMCI socket feature request

Hi,

I have just read through the VMCI socket guide and it looks to me that there are things that have been removed from the old VMCI implementation that are useful. In my current VMCI implementation I use the "VMCIDs_Register" call to register my VMCI server service as "IP-address:port", this allows me to address both IP and VMCI based sockets in the same way.

i.e.

-


sock = new Socket(host, port);

sock = new VmciSocket(host, port) ;

-


In the new API it's harder to hide the VMCI low level information and the result is that it propagates up into the higher levels of abstraction.

i.e.

-


sock = new VmciSocket(cid, port);

-


I would like to use both VMCI and ordinary IP-sockets and the CID information is really not necessary, it also breaks the socket contract. I would like the possibility to set an alias for a server service as was possible in the datagram implementation of VMCI (WS 6.0.x).

i.e.

-


// Server code...

service = IP-address;

VMCIDs_Register(service); // Bind an alias to servers CID

// Client code...

struct sockaddr_vm my_addr = ;

my_addr.svm_family = afVMCI;

my_addr.svm_cid = service;

my_addr.svm_port = port;

...

-


Is this possible with the new architecture or do I have to create a workaround?

Kind Regards

Andreas

Tags (3)
0 Kudos
4 Replies
admin
Immortal
Immortal

Hi Andreas,

The old VMCI Discovery service has been removed ... to connect you must know the context id and port of the endpoint that you are trying to connect to.

Andreas_Johanss
Contributor
Contributor

Ok, I'll take that as a no on my feature request.

Thanks for the reply arolett

Kind Regards

Andreas

0 Kudos
admin
Immortal
Immortal

Having a discovery service is something we have thought about / are thinking about ... but we do not have specific plans at this time.

I'm interested in hearing a little bit more about your use case. Are you communicating between the guest and the host? Multiple guests?

What are your specific requirements for identifying an endpoint providing a service?

0 Kudos
Andreas_Johanss
Contributor
Contributor

My communication goes from the host to multiple guests. I'm using both IP and VMCI for my communication and which to use is selected on demand. On the host I have created a service that all guests register itself to and provides information such as; IP-address, VMCI support, installed applications etc. With the VMCI-implementation in 6.0 I use the discovery service to create a listening endpoint that looks like it's going over IP (IP:port), by doing this I don't have to fetch the CID of the VM and send that to the host as well - the code is very clean and transparent for the developer that want's to use the library; it looks and work exactly the same as IP except for the classnames (VmciSocket, VmciServerSocket).

Kind Regards

Andreas

0 Kudos