[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Using libvchan library

On Mon, 2014-01-20 at 16:30 +0100, Aastha Mehta wrote:
> Hi,
> I want to use the libvchan library for setting up communication
> channels between Dom0 and DomU. I do not understand how the library
> has to be plugged in with the domains. Could anyone explain how to use
> the library, or point me to any documentation available?

Not sure what you mean by "plugged in" but the negotiation of the
initial grant reference happens outside of the library under application

There are examples of simple apps in the source node.c and
node-select.c. node-select for example takes a xenstore path on the
command line which it uses to negotiate the vchan parameters. Here is
what I wrote a while back in a mail which was supposed to go the list
but didn't:
        domU# vchan-node1 server read 0 data/vchan
        dom0# domU=$(xl domid d32-1)
        dom0# vchan-node1 client write ${domid} 
        Now I can type into the dom0 window and the data appears on the domU
        end. I can also invert the read/write parameter and go the other way.
        This demo code doesn't appear to be bidirectional.
        Running the server in dom0 didn't initially work for me, because dom0's
        domid node is missing. However this was easy to work around:
        dom0# xenstore-write /local/domain/0/domid 0
        dom0# domU=$(xl domid d32-1)
        dom0# vchan-node1 server read $(xl domid d32-1) data/vchan
        domU# vchan-node1 client write 0 /local/domain/0/data/vchan
        Then I can type in the client end and receive on the server end.
        There seems to be a certain amount of docs in the header too.
(this is also quoted in
http://lists.xen.org/archives/html/xen-devel/2013-06/msg00061.html but I
can see it would be easy to miss when looking in the archives)

But in general the docs seem a bit lacking -- I've added this to
http://wiki.xen.org/wiki/Xen_Document_Days/TODO (or rather I will when
this mail hits the archives so I can link to it).


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.