Mon Jun 11 12:41:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>

* src/remote_internal.c, src/remote_internal.h,
	  src/driver.h, src/libvirt.c, src/Makefile.am: Client side
	  of the remote patch - adds a remote driver.
This commit is contained in:
Richard W.M. Jones 2007-06-11 11:43:41 +00:00
parent fc23185e84
commit b7c42619e6
6 changed files with 2644 additions and 6 deletions

View File

@ -1,7 +1,13 @@
Mon Jun 11 12:41:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c, src/remote_internal.h,
src/driver.h, src/libvirt.c, src/Makefile.am: Client side
of the remote patch - adds a remote driver.
Mon Jun 11 12:34:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote_protocol.x qemud/rpcgen_fix.pl
qemud/remote_protocol.c qemud/remote_protocol.h: Client/server
* qemud/remote_protocol.x, qemud/rpcgen_fix.pl,
qemud/remote_protocol.c, qemud/remote_protocol.h: Client/server
protocol used by remote.
Fri Jun 8 13:06:01 CEST 2007 Daniel Veillard <veillard@redhat.com>

View File

@ -1,9 +1,17 @@
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include @LIBXML_CFLAGS@ -I@top_srcdir@/qemud \
-DBINDIR=\""$(libexecdir)"\" -DSBINDIR=\""$(sbindir)"\" -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
INCLUDES = -I$(top_builddir)/include \
-I@top_srcdir@/include \
-I@top_srcdir@/qemud \
@LIBXML_CFLAGS@ \
-DBINDIR=\""$(libexecdir)"\" \
-DSBINDIR=\""$(sbindir)"\" \
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
-DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" $(WARN_CFLAGS) $(LIBVIRT_FEATURES)
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
$(WARN_CFLAGS) \
$(LIBVIRT_FEATURES)
DEPS = libvirt.la
LDADDS = @STATIC_BINARIES@ libvirt.la
VIRSH_LIBS = @VIRSH_LIBS@
@ -31,7 +39,10 @@ libvirt_la_SOURCES = \
proxy_internal.c proxy_internal.h \
conf.c conf.h \
xm_internal.c xm_internal.h \
qemu_internal.c qemu_internal.h
../qemud/protocol.h ../qemud/protocol.c \
qemu_internal.c qemu_internal.h \
../qemud/remote_protocol.c ../qemud/remote_protocol.h \
remote_internal.c remote_internal.h
bin_PROGRAMS = virsh

View File

@ -20,6 +20,7 @@ typedef enum {
VIR_DRV_XEN_UNIFIED = 1,
VIR_DRV_TEST = 2,
VIR_DRV_QEMU = 3,
VIR_DRV_REMOTE = 4,
} virDrvNo;

View File

@ -28,6 +28,7 @@
#include "test.h"
#include "xen_unified.h"
#include "qemu_internal.h"
#include "remote_internal.h"
/*
* TODO:
@ -64,6 +65,9 @@ virInitialize(void)
* Note that the order is important: the first ones have a higher
* priority when calling virConnectOpen.
*/
#ifdef WITH_REMOTE
if (remoteRegister () == -1) return -1;
#endif
#ifdef WITH_TEST
if (testRegister() == -1) return -1;
#endif
@ -402,6 +406,9 @@ virConnectClose(virConnectPtr conn)
* Get the name of the Hypervisor software used.
*
* Returns NULL in case of error, a static zero terminated string otherwise.
*
* See also:
* http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html
*/
const char *
virConnectGetType(virConnectPtr conn)

2547
src/remote_internal.c Normal file

File diff suppressed because it is too large Load Diff

66
src/remote_internal.h Normal file
View File

@ -0,0 +1,66 @@
/*
* remote_internal.h: driver to provide access to libvirtd running
* on a remote machine
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Richard Jones <rjones@redhat.com>
*/
#ifndef __VIR_REMOTE_INTERNAL_H__
#define __VIR_REMOTE_INTERNAL_H__
#include <libvirt/virterror.h>
#ifdef __cplusplus
extern "C" {
#endif
int remoteRegister (void);
#define LIBVIRTD_TLS_PORT "16514"
#define LIBVIRTD_TCP_PORT "16509"
#define LIBVIRTD_UNIX_SOCKET LOCAL_STATE_DIR "/run/libvirt/libvirt-sock"
#define LIBVIRTD_UNIX_SOCKET_RO LOCAL_STATE_DIR "/run/libvirt/libvirt-sock-ro"
#define LIBVIRTD_CONFIGURATION_FILE SYSCONF_DIR "/libvirtd.conf"
/* Defaults for PKI directory. */
#define LIBVIRT_PKI_DIR SYSCONF_DIR "/pki"
#define LIBVIRT_CACERT LIBVIRT_PKI_DIR "/CA/cacert.pem"
#define LIBVIRT_CLIENTKEY LIBVIRT_PKI_DIR "/libvirt/private/clientkey.pem"
#define LIBVIRT_CLIENTCERT LIBVIRT_PKI_DIR "/libvirt/clientcert.pem"
#define LIBVIRT_SERVERKEY LIBVIRT_PKI_DIR "/libvirt/private/serverkey.pem"
#define LIBVIRT_SERVERCERT LIBVIRT_PKI_DIR "/libvirt/servercert.pem"
#ifdef __cplusplus
}
#endif
#endif /* __VIR_REMOTE_INTERNAL_H__ */
/*
* vim: set tabstop=4:
* vim: set shiftwidth=4:
* vim: set expandtab:
*/
/*
* Local variables:
* indent-tabs-mode: nil
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/