This is the final step to move the QEMU code out of the daemon binary and
into the main libvirt.so library. Practically all of protocol.x goes away
apart from a single struct representing the header - this should probably
be moved into remote_protocol.x - or vica-verca. The --remote switch to
the daemon is removed since its no longer needed. A single --listen switch
is added to control whether the daemon opens any TCP/IP sockets or not,
and a config file in /etc/sysconfig/libvirtd is provided to toggle this.
By default the daemon will only listen on a UNIX socket, unless the admin
edits /etc/sysconfig/libvirtd to enable TCP - whether it uses TCP or TLS
is still upto the libvirtd.conf config file.
The driver.c file is switched over to using virGetDomain and virGetNetwork
instead of its previous temporary / nasty hack. A qemudRegister function
is added to make the new implementation be registered.
The daemon now registers an event loop implementation to be used by the
QEMU driver. Various bits of code relating to the QEMU protocol are killed
off in the qemud.c file.
The remote_internal.c file is adapted so that it will handle qemu:///sesion
and qemu:///system URLs as if they were qemu+unix:///session and
qemu+unix:///system respectively. It is also adapted so that in the case
of qemu:///session is uses $HOME/.libvirt/libvirt-sock for the UNIX domain
socket path. It is also tweaked to use the abstract namespace if the first
character is @
Rather than showing a huge +10000 lines, -10000 lines diff caused by
moving files from qemud/ into src/, i've applied some makefile trickery
to make libvirt.so compile some files out of qemud/ directly. I intend
to commit it in this format, and then do the actual file names in a second
commit. This will avoid mixing functional changes, with plain renames
to preserve better historical CVS logs.
The files to be moved from qemud/ to src/ are:
driver.c -> qemud_driver.c
driver.h -> qemud_driver.h
conf.c -> qemud_conf.c
conf.h -> qemud_conf.h
bridge.c
bridge.h
iptables.c
iptables.h
uuid.c
uuid.h
The files to be completely deleted are:
dispatch.c
dispatch.h
protocol.c
protocol.h
protocol.x
qemu_internal.c
qemu_internal.h
NB. one feature I've just realized is missing is the autostart of the
daemon when using qemu:///session in remote_internal.c. Shouldn't be
much work to move the neccessary code from qemu_internal.c across.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|