From: Daniel P. Berrange Date: Fri, 29 May 2009 14:29:22 +0000 (+0000) Subject: Fix Win32 portability problems with 'inteface' symbol clash X-Git-Tag: LIBVIRT_0_6_4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a1a2ac5587e1034c14523974af351f28743a8c3;p=thirdparty%2Flibvirt.git Fix Win32 portability problems with 'inteface' symbol clash --- diff --git a/ChangeLog b/ChangeLog index e81df2bd74..e3f865cf44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Fri May 29 15:26:30 BST 2009 Daniel P. Berrange + + Win32 portability fixes + * docs/libvirt-api.xml, docs/libvirt-refs.xml, + docs/devhelp/libvirt-libvirt.html, docs/devhelp/libvirt-virterror.html, + docs/html/libvirt-libvirt.html, docs/html/libvirt-virterror.html: + Regenerate docs from new API docs + * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, + qemud/remote.c, qemud/remote_protocol.c, qemud/remote_protocol.h, + qemud/remote_protocol.x, src/datatypes.c, src/datatypes.h, + src/driver.h, src/libvirt.c, src/remote_internal.c: Change + all variable and field names from 'interface' to 'iface' to + avoid clash with Win32 COM object name + * tests/testutils.c: Disable regex code if not avaialble + * qemud/Makefile.am: Fix BUILT_SOURCES on non-libvirtd builds + Fri May 29 16:25:32 CEST 2009 Daniel Veillard * src/lxc_container.c: fix a portability issue if PR_CAPBSET_DROP diff --git a/docs/devhelp/libvirt-libvirt.html b/docs/devhelp/libvirt-libvirt.html index 587b5bd08a..5fff400fd7 100644 --- a/docs/devhelp/libvirt-libvirt.html +++ b/docs/devhelp/libvirt-libvirt.html @@ -133,7 +133,7 @@ int virDomainGetSchedulerParametersvirConnectNumOfDefinedNetworks (virConnectPtr conn); int virConnectNumOfDomains (virConnectPtr conn); int virNetworkGetUUID (virNetworkPtr network,
unsigned char * uuid); -char * virInterfaceGetXMLDesc (virInterfacePtr interface,
unsigned int flags); +char * virInterfaceGetXMLDesc (virInterfacePtr iface,
unsigned int flags); virConnectPtr virStoragePoolGetConnect (virStoragePoolPtr pool); int virConnectGetVersion (virConnectPtr conn,
unsigned long * hvVer); int virDomainFree (virDomainPtr domain); @@ -155,7 +155,7 @@ typedef void virEventUpdateHandleFunc (i int virDomainDestroy (virDomainPtr domain); int virConnectNumOfNetworks (virConnectPtr conn); virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn,
const char * uuidstr); -int virInterfaceCreate (virInterfacePtr interface,
unsigned int flags); +int virInterfaceCreate (virInterfacePtr iface,
unsigned int flags); char * virDomainGetXMLDesc (virDomainPtr domain,
int flags); int virStoragePoolGetUUID (virStoragePoolPtr pool,
unsigned char * uuid); int virNodeDeviceFree (virNodeDevicePtr dev); @@ -177,7 +177,7 @@ int virDomainCreate (virConnectListDomains (virConnectPtr conn,
int * ids,
int maxids); int virDomainCoreDump (virDomainPtr domain,
const char * to,
int flags); int virDomainSetMemory (virDomainPtr domain,
unsigned long memory); -const char * virInterfaceGetName (virInterfacePtr interface); +const char * virInterfaceGetName (virInterfacePtr iface); int virStoragePoolCreate (virStoragePoolPtr pool,
unsigned int flags); int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info); int virNetworkSetAutostart (virNetworkPtr network,
int autostart); @@ -200,7 +200,7 @@ const char * virDomainGetName (virStoragePoolRef (virStoragePoolPtr pool); char * virNetworkGetXMLDesc (virNetworkPtr network,
int flags); int virConnectNumOfStoragePools (virConnectPtr conn); -virConnectPtr virInterfaceGetConnect (virInterfacePtr interface); +virConnectPtr virInterfaceGetConnect (virInterfacePtr iface); const char * virNetworkGetName (virNetworkPtr network); int virConnectListDefinedDomains (virConnectPtr conn,
char ** const names,
int maxnames); char * virConnectGetCapabilities (virConnectPtr conn); @@ -228,8 +228,8 @@ int virDomainGetVcpus (virNodeDevicePtr virNodeDeviceLookupByName (virConnectPtr conn,
const char * name); int virStoragePoolGetInfo (virStoragePoolPtr pool,
virStoragePoolInfoPtr info); int virDomainResume (virDomainPtr domain); -int virInterfaceRef (virInterfacePtr interface); -const char * virInterfaceGetMACString (virInterfacePtr interface); +int virInterfaceRef (virInterfacePtr iface); +const char * virInterfaceGetMACString (virInterfacePtr iface); int virNetworkRef (virNetworkPtr network); int virStoragePoolRefresh (virStoragePoolPtr pool,
unsigned int flags); int virConnectNumOfDefinedDomains (virConnectPtr conn); @@ -257,12 +257,12 @@ typedef int virEventAddHandleFunc (int fd, int virNetworkUndefine (virNetworkPtr network); int virConnectListDefinedStoragePools (virConnectPtr conn,
char ** const names,
int maxnames); typedef void virEventTimeoutCallback (int timer,
void * opaque); -int virInterfaceFree (virInterfacePtr interface); +int virInterfaceFree (virInterfacePtr iface); int virNodeDeviceNumOfCaps (virNodeDevicePtr dev); virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn,
const char * macstr); virConnectPtr virNetworkGetConnect (virNetworkPtr net); unsigned long long virNodeGetFreeMemory (virConnectPtr conn); -int virInterfaceDestroy (virInterfacePtr interface,
unsigned int flags); +int virInterfaceDestroy (virInterfacePtr iface,
unsigned int flags); virConnectPtr virStorageVolGetConnect (virStorageVolPtr vol); int virNodeNumOfDevices (virConnectPtr conn,
const char * cap,
unsigned int flags); int virStoragePoolDestroy (virStoragePoolPtr pool); @@ -279,7 +279,7 @@ const char * virNodeDeviceGetParent (virConnectPtr virConnectOpen (const char * name); virDomainPtr virDomainCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags); int virNodeDeviceRef (virNodeDevicePtr dev); -int virInterfaceUndefine (virInterfacePtr interface); +int virInterfaceUndefine (virInterfacePtr iface); int virDomainSetVcpus (virDomainPtr domain,
unsigned int nvcpus); int virDomainRef (virDomainPtr domain); int virConnectNumOfInterfaces (virConnectPtr conn); @@ -1131,37 +1131,37 @@ The content of this structure is not made public by the API.

Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.

Returns:0 in case of success, -1 in case of error

-

virInterfaceCreate ()

int	virInterfaceCreate		(virInterfacePtr interface, 
unsigned int flags)
+

virInterfaceCreate ()

int	virInterfaceCreate		(virInterfacePtr iface, 
unsigned int flags)

Activate an interface (ie call "ifup")

-
interface:pointer to a defined interface
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success, -1 in case of error
+
iface:pointer to a defined interface
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success, -1 in case of error

virInterfaceDefineXML ()

virInterfacePtr	virInterfaceDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)

Define an interface (or modify existing interface configuration)

conn:pointer to the hypervisor connection
xml:the XML description for the interface, preferably in UTF-8
flags:and OR'ed set of extraction flags, not used yet
Returns:NULL in case of error, a pointer to the interface otherwise

-

virInterfaceDestroy ()

int	virInterfaceDestroy		(virInterfacePtr interface, 
unsigned int flags)
+

virInterfaceDestroy ()

int	virInterfaceDestroy		(virInterfacePtr iface, 
unsigned int flags)

deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.

-
interface:an interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success and -1 in case of failure.
+
iface:an interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success and -1 in case of failure.

-

virInterfaceFree ()

int	virInterfaceFree		(virInterfacePtr interface)
+

virInterfaceFree ()

int	virInterfaceFree		(virInterfacePtr iface)

Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.

-
interface:a interface object
Returns:0 in case of success and -1 in case of failure.
+
iface:a interface object
Returns:0 in case of success and -1 in case of failure.

-

virInterfaceGetConnect ()

virConnectPtr	virInterfaceGetConnect	(virInterfacePtr interface)
+

virInterfaceGetConnect ()

virConnectPtr	virInterfaceGetConnect	(virInterfacePtr iface)

Provides the connection pointer associated with an interface. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the interface object together.

-
interface:
Returns:the virConnectPtr or NULL in case of failure.
+
iface:
Returns:the virConnectPtr or NULL in case of failure.

-

virInterfaceGetMACString ()

const char *	virInterfaceGetMACString	(virInterfacePtr interface)
+

virInterfaceGetMACString ()

const char *	virInterfaceGetMACString	(virInterfacePtr iface)

Get the MAC for a interface as string. For more information about MAC see RFC4122.

-
interface:a interface object
Returns:a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.
+
iface:a interface object
Returns:a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

-

virInterfaceGetName ()

const char *	virInterfaceGetName	(virInterfacePtr interface)
+

virInterfaceGetName ()

const char *	virInterfaceGetName	(virInterfacePtr iface)

Get the public name for that interface

-
interface:a interface object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.
+
iface:a interface object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

-

virInterfaceGetXMLDesc ()

char *	virInterfaceGetXMLDesc		(virInterfacePtr interface, 
unsigned int flags)
+

virInterfaceGetXMLDesc ()

char *	virInterfaceGetXMLDesc		(virInterfacePtr iface, 
unsigned int flags)

Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().

-
interface:a interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.
+
iface:a interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virInterfaceLookupByMACString ()

virInterfacePtr	virInterfaceLookupByMACString	(virConnectPtr conn, 
const char * macstr)

Try to lookup an interface on the given hypervisor based on its MAC.

@@ -1171,13 +1171,13 @@ The content of this structure is not made public by the API.

Try to lookup an interface on the given hypervisor based on its name.

conn:pointer to the hypervisor connection
name:name for the interface
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.

-

virInterfaceRef ()

int	virInterfaceRef			(virInterfacePtr interface)
+

virInterfaceRef ()

int	virInterfaceRef			(virInterfacePtr iface)

Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.

-
interface:the interface to hold a reference on
Returns:0 in case of success, -1 in case of failure.
+
iface:the interface to hold a reference on
Returns:0 in case of success, -1 in case of failure.

-

virInterfaceUndefine ()

int	virInterfaceUndefine		(virInterfacePtr interface)
+

virInterfaceUndefine ()

int	virInterfaceUndefine		(virInterfacePtr iface)

Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.

-
interface:pointer to a defined interface
Returns:0 in case of success, -1 in case of error
+
iface:pointer to a defined interface
Returns:0 in case of success, -1 in case of error

virNetworkCreate ()

int	virNetworkCreate		(virNetworkPtr network)

Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.

diff --git a/docs/devhelp/libvirt-virterror.html b/docs/devhelp/libvirt-virterror.html index e9e98965e2..9f2efae0ca 100644 --- a/docs/devhelp/libvirt-virterror.html +++ b/docs/devhelp/libvirt-virterror.html @@ -108,7 +108,8 @@ void virConnResetLastError (VIR_FROM_XEN_INOTIFY = 23 /* Error from xen inotify layer */ VIR_FROM_SECURITY = 24 /* Error from security framework */ VIR_FROM_VBOX = 25 /* Error from VirtualBox driver */ - VIR_FROM_INTERFACE = 26 /* Error when operating on an interface */ + VIR_FROM_INTERFACE = 26 /* Error when operating on an interface */ + VIR_FROM_ONE = 27 /* Error from OpenNebula driver */ };

diff --git a/docs/html/libvirt-libvirt.html b/docs/html/libvirt-libvirt.html index 073d2d7138..e0e7ac81d0 100644 --- a/docs/html/libvirt-libvirt.html +++ b/docs/html/libvirt-libvirt.html @@ -190,18 +190,18 @@ void virFreeCallback (void * opaque) int virGetVersion (unsigned long * libVer,
const char * type,
unsigned long * typeVer) int virInitialize (void) -int virInterfaceCreate (virInterfacePtr interface,
unsigned int flags) +int virInterfaceCreate (virInterfacePtr iface,
unsigned int flags) virInterfacePtr virInterfaceDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags) -int virInterfaceDestroy (virInterfacePtr interface,
unsigned int flags) -int virInterfaceFree (virInterfacePtr interface) -virConnectPtr virInterfaceGetConnect (virInterfacePtr interface) -const char * virInterfaceGetMACString (virInterfacePtr interface) -const char * virInterfaceGetName (virInterfacePtr interface) -char * virInterfaceGetXMLDesc (virInterfacePtr interface,
unsigned int flags) +int virInterfaceDestroy (virInterfacePtr iface,
unsigned int flags) +int virInterfaceFree (virInterfacePtr iface) +virConnectPtr virInterfaceGetConnect (virInterfacePtr iface) +const char * virInterfaceGetMACString (virInterfacePtr iface) +const char * virInterfaceGetName (virInterfacePtr iface) +char * virInterfaceGetXMLDesc (virInterfacePtr iface,
unsigned int flags) virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn,
const char * macstr) virInterfacePtr virInterfaceLookupByName (virConnectPtr conn,
const char * name) -int virInterfaceRef (virInterfacePtr interface) -int virInterfaceUndefine (virInterfacePtr interface) +int virInterfaceRef (virInterfacePtr iface) +int virInterfaceUndefine (virInterfacePtr iface) int virNetworkCreate (virNetworkPtr network) virNetworkPtr virNetworkCreateXML (virConnectPtr conn,
const char * xmlDesc) virNetworkPtr virNetworkDefineXML (virConnectPtr conn,
const char * xml) @@ -469,19 +469,19 @@ int virStorageVolRef (
timer:the timer to modify
timeout:the new timeout value

virFreeCallback

typedef void	(*virFreeCallback		)	(void * opaque)
 

opaque:

virGetVersion

int	virGetVersion			(unsigned long * libVer, 
const char * type,
unsigned long * typeVer)

Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not available, an error code will be returned and @typeVer will be 0.

libVer:return value for the library version (OUT)
type:the type of connection/driver looked at
typeVer:return value for the version of the hypervisor (OUT)
Returns:-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.

virInitialize

int	virInitialize			(void)
-

Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.

Returns:0 in case of success, -1 in case of error

virInterfaceCreate

int	virInterfaceCreate		(virInterfacePtr interface, 
unsigned int flags)
-

Activate an interface (ie call "ifup")

interface:pointer to a defined interface
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success, -1 in case of error

virInterfaceDefineXML

virInterfacePtr	virInterfaceDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

Define an interface (or modify existing interface configuration)

conn:pointer to the hypervisor connection
xml:the XML description for the interface, preferably in UTF-8
flags:and OR'ed set of extraction flags, not used yet
Returns:NULL in case of error, a pointer to the interface otherwise

virInterfaceDestroy

int	virInterfaceDestroy		(virInterfacePtr interface, 
unsigned int flags)
-

deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.

interface:an interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success and -1 in case of failure.

virInterfaceFree

int	virInterfaceFree		(virInterfacePtr interface)
-

Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.

interface:a interface object
Returns:0 in case of success and -1 in case of failure.

virInterfaceGetConnect

virConnectPtr	virInterfaceGetConnect	(virInterfacePtr interface)
-

Provides the connection pointer associated with an interface. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the interface object together.

interface:
Returns:the virConnectPtr or NULL in case of failure.

virInterfaceGetMACString

const char *	virInterfaceGetMACString	(virInterfacePtr interface)
-

Get the MAC for a interface as string. For more information about MAC see RFC4122.

interface:a interface object
Returns:a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

virInterfaceGetName

const char *	virInterfaceGetName	(virInterfacePtr interface)
-

Get the public name for that interface

interface:a interface object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

virInterfaceGetXMLDesc

char *	virInterfaceGetXMLDesc		(virInterfacePtr interface, 
unsigned int flags)
-

Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().

interface:a interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virInterfaceLookupByMACString

virInterfacePtr	virInterfaceLookupByMACString	(virConnectPtr conn, 
const char * macstr)
+

Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.

Returns:0 in case of success, -1 in case of error

virInterfaceCreate

int	virInterfaceCreate		(virInterfacePtr iface, 
unsigned int flags)
+

Activate an interface (ie call "ifup")

iface:pointer to a defined interface
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success, -1 in case of error

virInterfaceDefineXML

virInterfacePtr	virInterfaceDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
+

Define an interface (or modify existing interface configuration)

conn:pointer to the hypervisor connection
xml:the XML description for the interface, preferably in UTF-8
flags:and OR'ed set of extraction flags, not used yet
Returns:NULL in case of error, a pointer to the interface otherwise

virInterfaceDestroy

int	virInterfaceDestroy		(virInterfacePtr iface, 
unsigned int flags)
+

deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.

iface:an interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success and -1 in case of failure.

virInterfaceFree

int	virInterfaceFree		(virInterfacePtr iface)
+

Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.

iface:a interface object
Returns:0 in case of success and -1 in case of failure.

virInterfaceGetConnect

virConnectPtr	virInterfaceGetConnect	(virInterfacePtr iface)
+

Provides the connection pointer associated with an interface. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the interface object together.

iface:
Returns:the virConnectPtr or NULL in case of failure.

virInterfaceGetMACString

const char *	virInterfaceGetMACString	(virInterfacePtr iface)
+

Get the MAC for a interface as string. For more information about MAC see RFC4122.

iface:a interface object
Returns:a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

virInterfaceGetName

const char *	virInterfaceGetName	(virInterfacePtr iface)
+

Get the public name for that interface

iface:a interface object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

virInterfaceGetXMLDesc

char *	virInterfaceGetXMLDesc		(virInterfacePtr iface, 
unsigned int flags)
+

Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().

iface:a interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virInterfaceLookupByMACString

virInterfacePtr	virInterfaceLookupByMACString	(virConnectPtr conn, 
const char * macstr)

Try to lookup an interface on the given hypervisor based on its MAC.

conn:pointer to the hypervisor connection
macstr:the MAC for the interface (null-terminated ASCII format)
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.

virInterfaceLookupByName

virInterfacePtr	virInterfaceLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup an interface on the given hypervisor based on its name.

conn:pointer to the hypervisor connection
name:name for the interface
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.

virInterfaceRef

int	virInterfaceRef			(virInterfacePtr interface)
-

Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.

interface:the interface to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virInterfaceUndefine

int	virInterfaceUndefine		(virInterfacePtr interface)
-

Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.

interface:pointer to a defined interface
Returns:0 in case of success, -1 in case of error

virNetworkCreate

int	virNetworkCreate		(virNetworkPtr network)
+

Try to lookup an interface on the given hypervisor based on its name.

conn:pointer to the hypervisor connection
name:name for the interface
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.

virInterfaceRef

int	virInterfaceRef			(virInterfacePtr iface)
+

Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.

iface:the interface to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virInterfaceUndefine

int	virInterfaceUndefine		(virInterfacePtr iface)
+

Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.

iface:pointer to a defined interface
Returns:0 in case of success, -1 in case of error

virNetworkCreate

int	virNetworkCreate		(virNetworkPtr network)

Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.

network:pointer to a defined network
Returns:0 in case of success, -1 in case of error

virNetworkCreateXML

virNetworkPtr	virNetworkCreateXML	(virConnectPtr conn, 
const char * xmlDesc)

Create and start a new virtual network, based on an XML description similar to the one returned by virNetworkGetXMLDesc()

conn:pointer to the hypervisor connection
xmlDesc:an XML description of the network
Returns:a new network object or NULL in case of failure

virNetworkDefineXML

virNetworkPtr	virNetworkDefineXML	(virConnectPtr conn, 
const char * xml)

Define a network, but does not create it

conn:pointer to the hypervisor connection
xml:the XML description for the network, preferably in UTF-8
Returns:NULL in case of error, a pointer to the network otherwise

virNetworkDestroy

int	virNetworkDestroy		(virNetworkPtr network)
diff --git a/docs/html/libvirt-virterror.html b/docs/html/libvirt-virterror.html index 34d21eb181..53b8825d42 100644 --- a/docs/html/libvirt-virterror.html +++ b/docs/html/libvirt-virterror.html @@ -27,7 +27,7 @@ void virSetErrorFunc (void * userData,
intcode : The error code, a virErrorNumber
intdomain : What part of the library raised this error
char *message : human-readable informative error message
virErrorLevellevel : how consequent is the error
virConnectPtrconn : connection if available, deprecated see note above
virDomainPtrdom : domain if available, deprecated see note above
char *str1 : extra string information
char *str2 : extra string information
char *str3 : extra string information
intint1 : extra number information
intint2 : extra number information
virNetworkPtrnet : network if available, deprecated see note above
 }
 

virErrorDomain

enum virErrorDomain {
-
VIR_FROM_NONE = 0
VIR_FROM_XEN = 1 : Error at Xen hypervisor layer
VIR_FROM_XEND = 2 : Error at connection with xend daemon
VIR_FROM_XENSTORE = 3 : Error at connection with xen store
VIR_FROM_SEXPR = 4 : Error in the S-Expression code
VIR_FROM_XML = 5 : Error in the XML code
VIR_FROM_DOM = 6 : Error when operating on a domain
VIR_FROM_RPC = 7 : Error in the XML-RPC code
VIR_FROM_PROXY = 8 : Error in the proxy code
VIR_FROM_CONF = 9 : Error in the configuration file handling
VIR_FROM_QEMU = 10 : Error at the QEMU daemon
VIR_FROM_NET = 11 : Error when operating on a network
VIR_FROM_TEST = 12 : Error from test driver
VIR_FROM_REMOTE = 13 : Error from remote driver
VIR_FROM_OPENVZ = 14 : Error from OpenVZ driver
VIR_FROM_XENXM = 15 : Error at Xen XM layer
VIR_FROM_STATS_LINUX = 16 : Error in the Linux Stats code
VIR_FROM_LXC = 17 : Error from Linux Container driver
VIR_FROM_STORAGE = 18 : Error from storage driver
VIR_FROM_NETWORK = 19 : Error from network config
VIR_FROM_DOMAIN = 20 : Error from domain config
VIR_FROM_UML = 21 : Error at the UML driver
VIR_FROM_NODEDEV = 22 : Error from node device monitor
VIR_FROM_XEN_INOTIFY = 23 : Error from xen inotify layer
VIR_FROM_SECURITY = 24 : Error from security framework
VIR_FROM_VBOX = 25 : Error from VirtualBox driver
VIR_FROM_INTERFACE = 26 : Error when operating on an interface
}
+
VIR_FROM_NONE = 0
VIR_FROM_XEN = 1 : Error at Xen hypervisor layer
VIR_FROM_XEND = 2 : Error at connection with xend daemon
VIR_FROM_XENSTORE = 3 : Error at connection with xen store
VIR_FROM_SEXPR = 4 : Error in the S-Expression code
VIR_FROM_XML = 5 : Error in the XML code
VIR_FROM_DOM = 6 : Error when operating on a domain
VIR_FROM_RPC = 7 : Error in the XML-RPC code
VIR_FROM_PROXY = 8 : Error in the proxy code
VIR_FROM_CONF = 9 : Error in the configuration file handling
VIR_FROM_QEMU = 10 : Error at the QEMU daemon
VIR_FROM_NET = 11 : Error when operating on a network
VIR_FROM_TEST = 12 : Error from test driver
VIR_FROM_REMOTE = 13 : Error from remote driver
VIR_FROM_OPENVZ = 14 : Error from OpenVZ driver
VIR_FROM_XENXM = 15 : Error at Xen XM layer
VIR_FROM_STATS_LINUX = 16 : Error in the Linux Stats code
VIR_FROM_LXC = 17 : Error from Linux Container driver
VIR_FROM_STORAGE = 18 : Error from storage driver
VIR_FROM_NETWORK = 19 : Error from network config
VIR_FROM_DOMAIN = 20 : Error from domain config
VIR_FROM_UML = 21 : Error at the UML driver
VIR_FROM_NODEDEV = 22 : Error from node device monitor
VIR_FROM_XEN_INOTIFY = 23 : Error from xen inotify layer
VIR_FROM_SECURITY = 24 : Error from security framework
VIR_FROM_VBOX = 25 : Error from VirtualBox driver
VIR_FROM_INTERFACE = 26 : Error when operating on an interface
VIR_FROM_ONE = 27 : Error from OpenNebula driver
}
 

virErrorLevel

enum virErrorLevel {
 
VIR_ERR_NONE = 0
VIR_ERR_WARNING = 1 : A simple warning
VIR_ERR_ERROR = 2 : An error
}
 

virErrorNumber

enum virErrorNumber {
diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml
index 4ce9384265..b56774f2d5 100644
--- a/docs/libvirt-api.xml
+++ b/docs/libvirt-api.xml
@@ -346,6 +346,7 @@
      Provides the interfaces of the libvirt library to handle errors raised while using the library. 
      Daniel Veillard <veillard@redhat.com> 
      
+     
      
      
      
@@ -628,12 +629,13 @@
     
     
     
-    
+    
     
     
     
     
     
+    
     
     
     
@@ -1463,7 +1465,7 @@ see note above'/>
     
       Activate an interface (ie call "ifup")
       
-      
+      
       
     
     
@@ -1476,33 +1478,33 @@ see note above'/>
     
       deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.
       
-      
+      
       
     
     
       Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.
       
-      
+      
     
     
       Provides the connection pointer associated with an interface.  The reference counter on the connection is not increased by this call.  WARNING: When writing libvirt bindings in other languages, do not use this function.  Instead, store the connection and the interface object together.
       
-      
+      
     
     
       Get the MAC for a interface as string. For more information about MAC see RFC4122.
       
-      
+      
     
     
       Get the public name for that interface
       
-      
+      
     
     
       Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().
       
-      
+      
       
     
     
@@ -1520,12 +1522,12 @@ see note above'/>
     
       Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree to release the reference count, once the caller no longer needs the reference to this object.  This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.
       
-      
+      
     
     
       Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.
       
-      
+      
     
     
       Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.
diff --git a/docs/libvirt-refs.xml b/docs/libvirt-refs.xml
index 7d1db12b31..7d28d422fc 100644
--- a/docs/libvirt-refs.xml
+++ b/docs/libvirt-refs.xml
@@ -125,6 +125,7 @@
     
     
     
+    
     
     
     
@@ -573,6 +574,7 @@
       
       
       
+      
       
       
       
@@ -1738,6 +1740,7 @@
       
       
       
+      
       
       
       
diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h
index 633be86a46..52afa3f6b5 100644
--- a/include/libvirt/libvirt.h
+++ b/include/libvirt/libvirt.h
@@ -883,7 +883,7 @@ typedef struct _virInterface virInterface;
  */
 typedef virInterface *virInterfacePtr;
 
-virConnectPtr           virInterfaceGetConnect    (virInterfacePtr interface);
+virConnectPtr           virInterfaceGetConnect    (virInterfacePtr iface);
 
 int                     virConnectNumOfInterfaces (virConnectPtr conn);
 int                     virConnectListInterfaces  (virConnectPtr conn,
@@ -895,25 +895,25 @@ virInterfacePtr         virInterfaceLookupByName  (virConnectPtr conn,
 virInterfacePtr         virInterfaceLookupByMACString (virConnectPtr conn,
                                                        const char *mac);
 
-const char*             virInterfaceGetName       (virInterfacePtr interface);
-const char*             virInterfaceGetMACString  (virInterfacePtr interface);
+const char*             virInterfaceGetName       (virInterfacePtr iface);
+const char*             virInterfaceGetMACString  (virInterfacePtr iface);
 
-char *                  virInterfaceGetXMLDesc    (virInterfacePtr interface,
+char *                  virInterfaceGetXMLDesc    (virInterfacePtr iface,
                                                    unsigned int flags);
 virInterfacePtr         virInterfaceDefineXML     (virConnectPtr conn,
                                                    const char *xmlDesc,
                                                    unsigned int flags);
 
-int                     virInterfaceUndefine      (virInterfacePtr interface);
+int                     virInterfaceUndefine      (virInterfacePtr iface);
 
-int                     virInterfaceCreate        (virInterfacePtr interface,
+int                     virInterfaceCreate        (virInterfacePtr iface,
                                                    unsigned int flags);
 
-int                     virInterfaceDestroy       (virInterfacePtr interface,
+int                     virInterfaceDestroy       (virInterfacePtr iface,
                                                    unsigned int flags);
 
-int                     virInterfaceRef           (virInterfacePtr interface);
-int                     virInterfaceFree          (virInterfacePtr interface);
+int                     virInterfaceRef           (virInterfacePtr iface);
+int                     virInterfaceFree          (virInterfacePtr iface);
 
 /**
  * virStoragePool:
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 025e2a7f80..869c3614cd 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -883,7 +883,7 @@ typedef struct _virInterface virInterface;
  */
 typedef virInterface *virInterfacePtr;
 
-virConnectPtr           virInterfaceGetConnect    (virInterfacePtr interface);
+virConnectPtr           virInterfaceGetConnect    (virInterfacePtr iface);
 
 int                     virConnectNumOfInterfaces (virConnectPtr conn);
 int                     virConnectListInterfaces  (virConnectPtr conn,
@@ -895,25 +895,25 @@ virInterfacePtr         virInterfaceLookupByName  (virConnectPtr conn,
 virInterfacePtr         virInterfaceLookupByMACString (virConnectPtr conn,
                                                        const char *mac);
 
-const char*             virInterfaceGetName       (virInterfacePtr interface);
-const char*             virInterfaceGetMACString  (virInterfacePtr interface);
+const char*             virInterfaceGetName       (virInterfacePtr iface);
+const char*             virInterfaceGetMACString  (virInterfacePtr iface);
 
-char *                  virInterfaceGetXMLDesc    (virInterfacePtr interface,
+char *                  virInterfaceGetXMLDesc    (virInterfacePtr iface,
                                                    unsigned int flags);
 virInterfacePtr         virInterfaceDefineXML     (virConnectPtr conn,
                                                    const char *xmlDesc,
                                                    unsigned int flags);
 
-int                     virInterfaceUndefine      (virInterfacePtr interface);
+int                     virInterfaceUndefine      (virInterfacePtr iface);
 
-int                     virInterfaceCreate        (virInterfacePtr interface,
+int                     virInterfaceCreate        (virInterfacePtr iface,
                                                    unsigned int flags);
 
-int                     virInterfaceDestroy       (virInterfacePtr interface,
+int                     virInterfaceDestroy       (virInterfacePtr iface,
                                                    unsigned int flags);
 
-int                     virInterfaceRef           (virInterfacePtr interface);
-int                     virInterfaceFree          (virInterfacePtr interface);
+int                     virInterfaceRef           (virInterfacePtr iface);
+int                     virInterfaceFree          (virInterfacePtr iface);
 
 /**
  * virStoragePool:
diff --git a/qemud/Makefile.am b/qemud/Makefile.am
index d5b1064232..403846aba8 100644
--- a/qemud/Makefile.am
+++ b/qemud/Makefile.am
@@ -31,7 +31,7 @@ EXTRA_DIST =						\
 	$(AVAHI_SOURCES)				\
 	$(DAEMON_SOURCES)
 
-BUILT_SOURCES = libvirtd.init libvirtd.logrotate
+BUILT_SOURCES =
 
 if HAVE_RPCGEN
 #
@@ -218,6 +218,8 @@ remote_dispatch_args.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x
 remote_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x
 	perl -w $(srcdir)/remote_generate_stubs.pl -r $(srcdir)/remote_protocol.x > $@
 
+BUILT_SOURCES += libvirtd.logrotate
+
 libvirtd.logrotate: libvirtd.logrotate.in
 	sed						\
 	    -e s!\@localstatedir\@!@localstatedir@!g	\
@@ -242,6 +244,8 @@ uninstall-init:
 	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
 		$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
 
+BUILT_SOURCES += libvirtd.init
+
 libvirtd.init: libvirtd.init.in
 	sed						\
 	    -e s!\@localstatedir\@!@localstatedir@!g	\
diff --git a/qemud/remote.c b/qemud/remote.c
index 0c211cb8ad..2cc2185f02 100644
--- a/qemud/remote.c
+++ b/qemud/remote.c
@@ -2664,16 +2664,16 @@ remoteDispatchInterfaceLookupByName (struct qemud_server *server ATTRIBUTE_UNUSE
                                      remote_interface_lookup_by_name_args *args,
                                      remote_interface_lookup_by_name_ret *ret)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = virInterfaceLookupByName (conn, args->name);
-    if (interface == NULL) {
+    iface = virInterfaceLookupByName (conn, args->name);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
-    make_nonnull_interface (&ret->interface, interface);
-    virInterfaceFree(interface);
+    make_nonnull_interface (&ret->iface, iface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -2685,16 +2685,16 @@ remoteDispatchInterfaceLookupByMacString (struct qemud_server *server ATTRIBUTE_
                                           remote_interface_lookup_by_mac_string_args *args,
                                           remote_interface_lookup_by_mac_string_ret *ret)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = virInterfaceLookupByMACString (conn, args->mac);
-    if (interface == NULL) {
+    iface = virInterfaceLookupByMACString (conn, args->mac);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
-    make_nonnull_interface (&ret->interface, interface);
-    virInterfaceFree(interface);
+    make_nonnull_interface (&ret->iface, iface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -2706,22 +2706,22 @@ remoteDispatchInterfaceGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
                                    remote_interface_get_xml_desc_args *args,
                                    remote_interface_get_xml_desc_ret *ret)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = get_nonnull_interface (conn, args->interface);
-    if (interface == NULL) {
+    iface = get_nonnull_interface (conn, args->iface);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
     /* remoteDispatchClientRequest will free this. */
-    ret->xml = virInterfaceGetXMLDesc (interface, args->flags);
+    ret->xml = virInterfaceGetXMLDesc (iface, args->flags);
     if (!ret->xml) {
-        virInterfaceFree(interface);
+        virInterfaceFree(iface);
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
-    virInterfaceFree(interface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -2733,16 +2733,16 @@ remoteDispatchInterfaceDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
                                   remote_interface_define_xml_args *args,
                                   remote_interface_define_xml_ret *ret)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = virInterfaceDefineXML (conn, args->xml, args->flags);
-    if (interface == NULL) {
+    iface = virInterfaceDefineXML (conn, args->xml, args->flags);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
-    make_nonnull_interface (&ret->interface, interface);
-    virInterfaceFree(interface);
+    make_nonnull_interface (&ret->iface, iface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -2754,20 +2754,20 @@ remoteDispatchInterfaceUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
                                remote_interface_undefine_args *args,
                                void *ret ATTRIBUTE_UNUSED)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = get_nonnull_interface (conn, args->interface);
-    if (interface == NULL) {
+    iface = get_nonnull_interface (conn, args->iface);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
-    if (virInterfaceUndefine (interface) == -1) {
-        virInterfaceFree(interface);
+    if (virInterfaceUndefine (iface) == -1) {
+        virInterfaceFree(iface);
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
-    virInterfaceFree(interface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -2779,20 +2779,20 @@ remoteDispatchInterfaceCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
                              remote_interface_create_args *args,
                              void *ret ATTRIBUTE_UNUSED)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = get_nonnull_interface (conn, args->interface);
-    if (interface == NULL) {
+    iface = get_nonnull_interface (conn, args->iface);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
-    if (virInterfaceCreate (interface, args->flags) == -1) {
-        virInterfaceFree(interface);
+    if (virInterfaceCreate (iface, args->flags) == -1) {
+        virInterfaceFree(iface);
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
-    virInterfaceFree(interface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -2804,20 +2804,20 @@ remoteDispatchInterfaceDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
                               remote_interface_destroy_args *args,
                               void *ret ATTRIBUTE_UNUSED)
 {
-    virInterfacePtr interface;
+    virInterfacePtr iface;
 
-    interface = get_nonnull_interface (conn, args->interface);
-    if (interface == NULL) {
+    iface = get_nonnull_interface (conn, args->iface);
+    if (iface == NULL) {
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
 
-    if (virInterfaceDestroy (interface, args->flags) == -1) {
-        virInterfaceFree(interface);
+    if (virInterfaceDestroy (iface, args->flags) == -1) {
+        virInterfaceFree(iface);
         remoteDispatchConnError(rerr, conn);
         return -1;
     }
-    virInterfaceFree(interface);
+    virInterfaceFree(iface);
     return 0;
 }
 
@@ -4823,9 +4823,9 @@ get_nonnull_network (virConnectPtr conn, remote_nonnull_network network)
 }
 
 static virInterfacePtr
-get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface interface)
+get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface iface)
 {
-    return virGetInterface (conn, interface.name, interface.mac);
+    return virGetInterface (conn, iface.name, iface.mac);
 }
 
 static virStoragePoolPtr
diff --git a/qemud/remote_protocol.c b/qemud/remote_protocol.c
index 8151e65014..5d09167cb1 100644
--- a/qemud/remote_protocol.c
+++ b/qemud/remote_protocol.c
@@ -1530,7 +1530,7 @@ bool_t
 xdr_remote_interface_lookup_by_name_ret (XDR *xdrs, remote_interface_lookup_by_name_ret *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
         return TRUE;
 }
@@ -1548,7 +1548,7 @@ bool_t
 xdr_remote_interface_lookup_by_mac_string_ret (XDR *xdrs, remote_interface_lookup_by_mac_string_ret *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
         return TRUE;
 }
@@ -1557,7 +1557,7 @@ bool_t
 xdr_remote_interface_get_xml_desc_args (XDR *xdrs, remote_interface_get_xml_desc_args *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
          if (!xdr_u_int (xdrs, &objp->flags))
                  return FALSE;
@@ -1588,7 +1588,7 @@ bool_t
 xdr_remote_interface_define_xml_ret (XDR *xdrs, remote_interface_define_xml_ret *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
         return TRUE;
 }
@@ -1597,7 +1597,7 @@ bool_t
 xdr_remote_interface_undefine_args (XDR *xdrs, remote_interface_undefine_args *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
         return TRUE;
 }
@@ -1606,7 +1606,7 @@ bool_t
 xdr_remote_interface_create_args (XDR *xdrs, remote_interface_create_args *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
          if (!xdr_u_int (xdrs, &objp->flags))
                  return FALSE;
@@ -1617,7 +1617,7 @@ bool_t
 xdr_remote_interface_destroy_args (XDR *xdrs, remote_interface_destroy_args *objp)
 {
 
-         if (!xdr_remote_nonnull_interface (xdrs, &objp->interface))
+         if (!xdr_remote_nonnull_interface (xdrs, &objp->iface))
                  return FALSE;
          if (!xdr_u_int (xdrs, &objp->flags))
                  return FALSE;
diff --git a/qemud/remote_protocol.h b/qemud/remote_protocol.h
index 498b840d8c..87a5925be0 100644
--- a/qemud/remote_protocol.h
+++ b/qemud/remote_protocol.h
@@ -853,7 +853,7 @@ struct remote_interface_lookup_by_name_args {
 typedef struct remote_interface_lookup_by_name_args remote_interface_lookup_by_name_args;
 
 struct remote_interface_lookup_by_name_ret {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
 };
 typedef struct remote_interface_lookup_by_name_ret remote_interface_lookup_by_name_ret;
 
@@ -863,12 +863,12 @@ struct remote_interface_lookup_by_mac_string_args {
 typedef struct remote_interface_lookup_by_mac_string_args remote_interface_lookup_by_mac_string_args;
 
 struct remote_interface_lookup_by_mac_string_ret {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
 };
 typedef struct remote_interface_lookup_by_mac_string_ret remote_interface_lookup_by_mac_string_ret;
 
 struct remote_interface_get_xml_desc_args {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
         u_int flags;
 };
 typedef struct remote_interface_get_xml_desc_args remote_interface_get_xml_desc_args;
@@ -885,23 +885,23 @@ struct remote_interface_define_xml_args {
 typedef struct remote_interface_define_xml_args remote_interface_define_xml_args;
 
 struct remote_interface_define_xml_ret {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
 };
 typedef struct remote_interface_define_xml_ret remote_interface_define_xml_ret;
 
 struct remote_interface_undefine_args {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
 };
 typedef struct remote_interface_undefine_args remote_interface_undefine_args;
 
 struct remote_interface_create_args {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
         u_int flags;
 };
 typedef struct remote_interface_create_args remote_interface_create_args;
 
 struct remote_interface_destroy_args {
-        remote_nonnull_interface interface;
+        remote_nonnull_interface iface;
         u_int flags;
 };
 typedef struct remote_interface_destroy_args remote_interface_destroy_args;
diff --git a/qemud/remote_protocol.x b/qemud/remote_protocol.x
index 26cbb05390..56385f44ac 100644
--- a/qemud/remote_protocol.x
+++ b/qemud/remote_protocol.x
@@ -798,7 +798,7 @@ struct remote_interface_lookup_by_name_args {
 };
 
 struct remote_interface_lookup_by_name_ret {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
 };
 
 struct remote_interface_lookup_by_mac_string_args {
@@ -806,11 +806,11 @@ struct remote_interface_lookup_by_mac_string_args {
 };
 
 struct remote_interface_lookup_by_mac_string_ret {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
 };
 
 struct remote_interface_get_xml_desc_args {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
     unsigned int flags;
 };
 
@@ -824,20 +824,20 @@ struct remote_interface_define_xml_args {
 };
 
 struct remote_interface_define_xml_ret {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
 };
 
 struct remote_interface_undefine_args {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
 };
 
 struct remote_interface_create_args {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
     unsigned int flags;
 };
 
 struct remote_interface_destroy_args {
-    remote_nonnull_interface interface;
+    remote_nonnull_interface iface;
     unsigned int flags;
 };
 
diff --git a/src/datatypes.c b/src/datatypes.c
index e1227aaac5..a8bffd2e4b 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -75,9 +75,9 @@ virNetworkFreeName(virNetworkPtr network, const char *name ATTRIBUTE_UNUSED)
  * Returns 0 in case of success and -1 in case of failure.
  */
 static int
-virInterfaceFreeName(virInterfacePtr interface, const char *name ATTRIBUTE_UNUSED)
+virInterfaceFreeName(virInterfacePtr iface, const char *name ATTRIBUTE_UNUSED)
 {
-    return (virUnrefInterface(interface));
+    return (virUnrefInterface(iface));
 }
 
 /**
@@ -589,19 +589,19 @@ virGetInterface(virConnectPtr conn, const char *name, const char *mac) {
  * which may also be released if its ref count hits zero.
  */
 static void
-virReleaseInterface(virInterfacePtr interface) {
-    virConnectPtr conn = interface->conn;
-    DEBUG("release interface %p %s", interface, interface->name);
+virReleaseInterface(virInterfacePtr iface) {
+    virConnectPtr conn = iface->conn;
+    DEBUG("release interface %p %s", iface, iface->name);
 
     /* TODO search by MAC first as they are better differenciators */
-    if (virHashRemoveEntry(conn->interfaces, interface->name, NULL) < 0)
+    if (virHashRemoveEntry(conn->interfaces, iface->name, NULL) < 0)
         virLibConnError(conn, VIR_ERR_INTERNAL_ERROR,
                         _("interface missing from connection hash table"));
 
-    interface->magic = -1;
-    VIR_FREE(interface->name);
-    VIR_FREE(interface->mac);
-    VIR_FREE(interface);
+    iface->magic = -1;
+    VIR_FREE(iface->name);
+    VIR_FREE(iface->mac);
+    VIR_FREE(iface);
 
     DEBUG("unref connection %p %d", conn, conn->refs);
     conn->refs--;
@@ -625,24 +625,24 @@ virReleaseInterface(virInterfacePtr interface) {
  * Returns the reference count or -1 in case of failure.
  */
 int
-virUnrefInterface(virInterfacePtr interface) {
+virUnrefInterface(virInterfacePtr iface) {
     int refs;
 
-    if (!VIR_IS_CONNECTED_INTERFACE(interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
         virLibConnError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__);
         return(-1);
     }
-    virMutexLock(&interface->conn->lock);
-    DEBUG("unref interface %p %s %d", interface, interface->name, interface->refs);
-    interface->refs--;
-    refs = interface->refs;
+    virMutexLock(&iface->conn->lock);
+    DEBUG("unref interface %p %s %d", iface, iface->name, iface->refs);
+    iface->refs--;
+    refs = iface->refs;
     if (refs == 0) {
-        virReleaseInterface(interface);
+        virReleaseInterface(iface);
         /* Already unlocked mutex */
         return (0);
     }
 
-    virMutexUnlock(&interface->conn->lock);
+    virMutexUnlock(&iface->conn->lock);
     return (refs);
 }
 
diff --git a/src/datatypes.h b/src/datatypes.h
index a83777a741..da83e02bb1 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -254,7 +254,7 @@ int virUnrefNetwork(virNetworkPtr network);
 virInterfacePtr virGetInterface(virConnectPtr conn,
                                 const char *name,
                                 const char *mac);
-int virUnrefInterface(virInterfacePtr interface);
+int virUnrefInterface(virInterfacePtr iface);
 
 virStoragePoolPtr virGetStoragePool(virConnectPtr conn,
                                       const char *name,
diff --git a/src/driver.h b/src/driver.h
index 7957915d2d..ef81af2b95 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -516,7 +516,7 @@ typedef virInterfacePtr
                                                const char *mac);
 
 typedef char *
-        (*virDrvInterfaceGetXMLDesc)    (virInterfacePtr interface,
+        (*virDrvInterfaceGetXMLDesc)    (virInterfacePtr iface,
                                          unsigned int flags);
 
 typedef virInterfacePtr
@@ -524,12 +524,12 @@ typedef virInterfacePtr
                                          const char *xmlDesc,
                                          unsigned int flags);
 typedef int
-        (*virDrvInterfaceUndefine)      (virInterfacePtr interface);
+        (*virDrvInterfaceUndefine)      (virInterfacePtr iface);
 typedef int
-        (*virDrvInterfaceCreate)        (virInterfacePtr interface,
+        (*virDrvInterfaceCreate)        (virInterfacePtr iface,
                                          unsigned int flags);
 typedef int
-        (*virDrvInterfaceDestroy)       (virInterfacePtr interface,
+        (*virDrvInterfaceDestroy)       (virInterfacePtr iface,
                                          unsigned int flags);
 
 typedef struct _virInterfaceDriver virInterfaceDriver;
diff --git a/src/libvirt.c b/src/libvirt.c
index d50e972e2f..2fa215cf67 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -472,7 +472,7 @@ virLibNetworkError(virNetworkPtr network, virErrorNumber error,
  * Handle an error at the connection level
  */
 static void
-virLibInterfaceError(virInterfacePtr interface, virErrorNumber error,
+virLibInterfaceError(virInterfacePtr iface, virErrorNumber error,
                    const char *info)
 {
     virConnectPtr conn = NULL;
@@ -483,7 +483,7 @@ virLibInterfaceError(virInterfacePtr interface, virErrorNumber error,
 
     errmsg = virErrorMsg(error, info);
     if (error != VIR_ERR_INVALID_INTERFACE) {
-        conn = interface->conn;
+        conn = iface->conn;
     }
     virRaiseError(conn, NULL, NULL, VIR_FROM_INTERFACE, error, VIR_ERR_ERROR,
                   errmsg, info, NULL, 0, 0, errmsg, info);
@@ -5485,17 +5485,17 @@ error:
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
-virInterfaceGetConnect (virInterfacePtr interface)
+virInterfaceGetConnect (virInterfacePtr iface)
 {
-    DEBUG("interface=%p", interface);
+    DEBUG("iface=%p", iface);
 
     virResetLastError();
 
-    if (!VIR_IS_CONNECTED_INTERFACE (interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE (iface)) {
         virLibInterfaceError (NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return NULL;
     }
-    return interface->conn;
+    return iface->conn;
 }
 
 /**
@@ -5663,7 +5663,7 @@ error:
 
 /**
  * virInterfaceGetName:
- * @interface: a interface object
+ * @iface: a interface object
  *
  * Get the public name for that interface
  *
@@ -5671,22 +5671,22 @@ error:
  * its lifetime will be the same as the interface object.
  */
 const char *
-virInterfaceGetName(virInterfacePtr interface)
+virInterfaceGetName(virInterfacePtr iface)
 {
-    DEBUG("interface=%p", interface);
+    DEBUG("iface=%p", iface);
 
     virResetLastError();
 
-    if (!VIR_IS_INTERFACE(interface)) {
+    if (!VIR_IS_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (NULL);
     }
-    return (interface->name);
+    return (iface->name);
 }
 
 /**
  * virInterfaceGetMACString:
- * @interface: a interface object
+ * @iface: a interface object
  *
  * Get the MAC for a interface as string. For more information about
  * MAC see RFC4122.
@@ -5696,22 +5696,22 @@ virInterfaceGetName(virInterfacePtr interface)
  * will be the same as the interface object.
  */
 const char *
-virInterfaceGetMACString(virInterfacePtr interface)
+virInterfaceGetMACString(virInterfacePtr iface)
 {
-    DEBUG("interface=%p", interface);
+    DEBUG("iface=%p", iface);
 
     virResetLastError();
 
-    if (!VIR_IS_INTERFACE(interface)) {
+    if (!VIR_IS_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (NULL);
     }
-    return (interface->mac);
+    return (iface->mac);
 }
 
 /**
  * virInterfaceGetXMLDesc:
- * @interface: a interface object
+ * @iface: a interface object
  * @flags: and OR'ed set of extraction flags, not used yet
  *
  * Provide an XML description of the interface. The description may be reused
@@ -5721,27 +5721,27 @@ virInterfaceGetMACString(virInterfacePtr interface)
  *         the caller must free() the returned value.
  */
 char *
-virInterfaceGetXMLDesc(virInterfacePtr interface, unsigned int flags)
+virInterfaceGetXMLDesc(virInterfacePtr iface, unsigned int flags)
 {
     virConnectPtr conn;
-    DEBUG("interface=%p, flags=%d", interface, flags);
+    DEBUG("iface=%p, flags=%d", iface, flags);
 
     virResetLastError();
 
-    if (!VIR_IS_CONNECTED_INTERFACE(interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (NULL);
     }
     if (flags != 0) {
-        virLibInterfaceError(interface, VIR_ERR_INVALID_ARG, __FUNCTION__);
+        virLibInterfaceError(iface, VIR_ERR_INVALID_ARG, __FUNCTION__);
         goto error;
     }
 
-    conn = interface->conn;
+    conn = iface->conn;
 
     if (conn->interfaceDriver && conn->interfaceDriver->interfaceGetXMLDesc) {
         char *ret;
-        ret = conn->interfaceDriver->interfaceGetXMLDesc (interface, flags);
+        ret = conn->interfaceDriver->interfaceGetXMLDesc (iface, flags);
         if (!ret)
             goto error;
         return ret;
@@ -5751,7 +5751,7 @@ virInterfaceGetXMLDesc(virInterfacePtr interface, unsigned int flags)
 
 error:
     /* Copy to connection error object for back compatability */
-    virSetConnError(interface->conn);
+    virSetConnError(iface->conn);
     return NULL;
 }
 
@@ -5803,7 +5803,7 @@ error:
 
 /**
  * virInterfaceUndefine:
- * @interface: pointer to a defined interface
+ * @iface: pointer to a defined interface
  *
  * Undefine an interface, ie remove it from the config.
  * This does not free the associated virInterfacePtr object.
@@ -5811,25 +5811,25 @@ error:
  * Returns 0 in case of success, -1 in case of error
  */
 int
-virInterfaceUndefine(virInterfacePtr interface) {
+virInterfaceUndefine(virInterfacePtr iface) {
     virConnectPtr conn;
-    DEBUG("interface=%p", interface);
+    DEBUG("iface=%p", iface);
 
     virResetLastError();
 
-    if (!VIR_IS_CONNECTED_INTERFACE(interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (-1);
     }
-    conn = interface->conn;
+    conn = iface->conn;
     if (conn->flags & VIR_CONNECT_RO) {
-        virLibInterfaceError(interface, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
+        virLibInterfaceError(iface, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
         goto error;
     }
 
     if (conn->interfaceDriver && conn->interfaceDriver->interfaceUndefine) {
         int ret;
-        ret = conn->interfaceDriver->interfaceUndefine (interface);
+        ret = conn->interfaceDriver->interfaceUndefine (iface);
         if (ret < 0)
             goto error;
         return ret;
@@ -5839,13 +5839,13 @@ virInterfaceUndefine(virInterfacePtr interface) {
 
 error:
     /* Copy to connection error object for back compatability */
-    virSetConnError(interface->conn);
+    virSetConnError(iface->conn);
     return -1;
 }
 
 /**
  * virInterfaceCreate:
- * @interface: pointer to a defined interface
+ * @iface: pointer to a defined interface
  * @flags: and OR'ed set of extraction flags, not used yet
  *
  * Activate an interface (ie call "ifup")
@@ -5853,26 +5853,26 @@ error:
  * Returns 0 in case of success, -1 in case of error
  */
 int
-virInterfaceCreate(virInterfacePtr interface, unsigned int flags)
+virInterfaceCreate(virInterfacePtr iface, unsigned int flags)
 {
     virConnectPtr conn;
-    DEBUG("interface=%p, flags=%d", interface, flags);
+    DEBUG("iface=%p, flags=%d", iface, flags);
 
     virResetLastError();
 
-    if (!VIR_IS_CONNECTED_INTERFACE(interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (-1);
     }
-    conn = interface->conn;
+    conn = iface->conn;
     if (conn->flags & VIR_CONNECT_RO) {
-        virLibInterfaceError(interface, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
+        virLibInterfaceError(iface, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
         goto error;
     }
 
     if (conn->interfaceDriver && conn->interfaceDriver->interfaceCreate) {
         int ret;
-        ret = conn->interfaceDriver->interfaceCreate (interface, flags);
+        ret = conn->interfaceDriver->interfaceCreate (iface, flags);
         if (ret < 0)
             goto error;
         return ret;
@@ -5882,13 +5882,13 @@ virInterfaceCreate(virInterfacePtr interface, unsigned int flags)
 
 error:
     /* Copy to connection error object for back compatability */
-    virSetConnError(interface->conn);
+    virSetConnError(iface->conn);
     return -1;
 }
 
 /**
  * virInterfaceDestroy:
- * @interface: an interface object
+ * @iface: an interface object
  * @flags: and OR'ed set of extraction flags, not used yet
  *
  * deactivate an interface (ie call "ifdown")
@@ -5898,27 +5898,27 @@ error:
  * Returns 0 in case of success and -1 in case of failure.
  */
 int
-virInterfaceDestroy(virInterfacePtr interface, unsigned int flags)
+virInterfaceDestroy(virInterfacePtr iface, unsigned int flags)
 {
     virConnectPtr conn;
-    DEBUG("interface=%p, flags=%d", interface, flags);
+    DEBUG("iface=%p, flags=%d", iface, flags);
 
     virResetLastError();
 
-    if (!VIR_IS_CONNECTED_INTERFACE(interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (-1);
     }
 
-    conn = interface->conn;
+    conn = iface->conn;
     if (conn->flags & VIR_CONNECT_RO) {
-        virLibInterfaceError(interface, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
+        virLibInterfaceError(iface, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
         goto error;
     }
 
     if (conn->interfaceDriver && conn->interfaceDriver->interfaceDestroy) {
         int ret;
-        ret = conn->interfaceDriver->interfaceDestroy (interface, flags);
+        ret = conn->interfaceDriver->interfaceDestroy (iface, flags);
         if (ret < 0)
             goto error;
         return ret;
@@ -5928,13 +5928,13 @@ virInterfaceDestroy(virInterfacePtr interface, unsigned int flags)
 
 error:
     /* Copy to connection error object for back compatability */
-    virSetConnError(interface->conn);
+    virSetConnError(iface->conn);
     return -1;
 }
 
 /**
  * virInterfaceRef:
- * @interface: the interface to hold a reference on
+ * @iface: the interface to hold a reference on
  *
  * Increment the reference count on the interface. For each
  * additional call to this method, there shall be a corresponding
@@ -5950,22 +5950,22 @@ error:
  * Returns 0 in case of success, -1 in case of failure.
  */
 int
-virInterfaceRef(virInterfacePtr interface)
+virInterfaceRef(virInterfacePtr iface)
 {
-    if ((!VIR_IS_CONNECTED_INTERFACE(interface))) {
+    if ((!VIR_IS_CONNECTED_INTERFACE(iface))) {
         virLibConnError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__);
         return(-1);
     }
-    virMutexLock(&interface->conn->lock);
-    DEBUG("interface=%p refs=%d", interface, interface->refs);
-    interface->refs++;
-    virMutexUnlock(&interface->conn->lock);
+    virMutexLock(&iface->conn->lock);
+    DEBUG("iface=%p refs=%d", iface, iface->refs);
+    iface->refs++;
+    virMutexUnlock(&iface->conn->lock);
     return 0;
 }
 
 /**
  * virInterfaceFree:
- * @interface: a interface object
+ * @iface: a interface object
  *
  * Free the interface object. The interface itself is unaltered.
  * The data structure is freed and should not be used thereafter.
@@ -5973,17 +5973,17 @@ virInterfaceRef(virInterfacePtr interface)
  * Returns 0 in case of success and -1 in case of failure.
  */
 int
-virInterfaceFree(virInterfacePtr interface)
+virInterfaceFree(virInterfacePtr iface)
 {
-    DEBUG("interface=%p", interface);
+    DEBUG("iface=%p", iface);
 
     virResetLastError();
 
-    if (!VIR_IS_CONNECTED_INTERFACE(interface)) {
+    if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
         virLibInterfaceError(NULL, VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
         return (-1);
     }
-    if (virUnrefInterface(interface) < 0)
+    if (virUnrefInterface(iface) < 0)
         return (-1);
     return(0);
 }
diff --git a/src/remote_internal.c b/src/remote_internal.c
index 4fedf94f3d..e70527a54b 100644
--- a/src/remote_internal.c
+++ b/src/remote_internal.c
@@ -212,7 +212,7 @@ static void errorf (virConnectPtr conn, virErrorNumber code,
 static void server_error (virConnectPtr conn, remote_error *err);
 static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
 static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
-static virInterfacePtr get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface interface);
+static virInterfacePtr get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface iface);
 static virStoragePoolPtr get_nonnull_storage_pool (virConnectPtr conn, remote_nonnull_storage_pool pool);
 static virStorageVolPtr get_nonnull_storage_vol (virConnectPtr conn, remote_nonnull_storage_vol vol);
 static virNodeDevicePtr get_nonnull_node_device (virConnectPtr conn, remote_nonnull_node_device dev);
@@ -3876,7 +3876,7 @@ static virInterfacePtr
 remoteInterfaceLookupByName (virConnectPtr conn,
                              const char *name)
 {
-    virInterfacePtr interface = NULL;
+    virInterfacePtr iface = NULL;
     remote_interface_lookup_by_name_args args;
     remote_interface_lookup_by_name_ret ret;
     struct private_data *priv = conn->interfacePrivateData;
@@ -3891,19 +3891,19 @@ remoteInterfaceLookupByName (virConnectPtr conn,
               (xdrproc_t) xdr_remote_interface_lookup_by_name_ret, (char *) &ret) == -1)
         goto done;
 
-    interface = get_nonnull_interface (conn, ret.interface);
+    iface = get_nonnull_interface (conn, ret.iface);
     xdr_free ((xdrproc_t) &xdr_remote_interface_lookup_by_name_ret, (char *) &ret);
 
 done:
     remoteDriverUnlock(priv);
-    return interface;
+    return iface;
 }
 
 static virInterfacePtr
 remoteInterfaceLookupByMACString (virConnectPtr conn,
                                   const char *mac)
 {
-    virInterfacePtr interface = NULL;
+    virInterfacePtr iface = NULL;
     remote_interface_lookup_by_mac_string_args args;
     remote_interface_lookup_by_mac_string_ret ret;
     struct private_data *priv = conn->interfacePrivateData;
@@ -3918,30 +3918,30 @@ remoteInterfaceLookupByMACString (virConnectPtr conn,
               (xdrproc_t) xdr_remote_interface_lookup_by_mac_string_ret, (char *) &ret) == -1)
         goto done;
 
-    interface = get_nonnull_interface (conn, ret.interface);
+    iface = get_nonnull_interface (conn, ret.iface);
     xdr_free ((xdrproc_t) &xdr_remote_interface_lookup_by_mac_string_ret, (char *) &ret);
 
 done:
     remoteDriverUnlock(priv);
-    return interface;
+    return iface;
 }
 
 static char *
-remoteInterfaceGetXMLDesc (virInterfacePtr interface,
+remoteInterfaceGetXMLDesc (virInterfacePtr iface,
                            unsigned int flags)
 {
     char *rv = NULL;
     remote_interface_get_xml_desc_args args;
     remote_interface_get_xml_desc_ret ret;
-    struct private_data *priv = interface->conn->interfacePrivateData;
+    struct private_data *priv = iface->conn->interfacePrivateData;
 
     remoteDriverLock(priv);
 
-    make_nonnull_interface (&args.interface, interface);
+    make_nonnull_interface (&args.iface, iface);
     args.flags = flags;
 
     memset (&ret, 0, sizeof ret);
-    if (call (interface->conn, priv, 0, REMOTE_PROC_INTERFACE_GET_XML_DESC,
+    if (call (iface->conn, priv, 0, REMOTE_PROC_INTERFACE_GET_XML_DESC,
               (xdrproc_t) xdr_remote_interface_get_xml_desc_args, (char *) &args,
               (xdrproc_t) xdr_remote_interface_get_xml_desc_ret, (char *) &ret) == -1)
         goto done;
@@ -3959,7 +3959,7 @@ remoteInterfaceDefineXML (virConnectPtr conn,
                           const char *xmlDesc,
                           unsigned int flags)
 {
-    virInterfacePtr interface = NULL;
+    virInterfacePtr iface = NULL;
     remote_interface_define_xml_args args;
     remote_interface_define_xml_ret ret;
     struct private_data *priv = conn->interfacePrivateData;
@@ -3975,26 +3975,26 @@ remoteInterfaceDefineXML (virConnectPtr conn,
               (xdrproc_t) xdr_remote_interface_define_xml_ret, (char *) &ret) == -1)
         goto done;
 
-    interface = get_nonnull_interface (conn, ret.interface);
+    iface = get_nonnull_interface (conn, ret.iface);
     xdr_free ((xdrproc_t) &xdr_remote_interface_define_xml_ret, (char *) &ret);
 
 done:
     remoteDriverUnlock(priv);
-    return interface;
+    return iface;
 }
 
 static int
-remoteInterfaceUndefine (virInterfacePtr interface)
+remoteInterfaceUndefine (virInterfacePtr iface)
 {
     int rv = -1;
     remote_interface_undefine_args args;
-    struct private_data *priv = interface->conn->interfacePrivateData;
+    struct private_data *priv = iface->conn->interfacePrivateData;
 
     remoteDriverLock(priv);
 
-    make_nonnull_interface (&args.interface, interface);
+    make_nonnull_interface (&args.iface, iface);
 
-    if (call (interface->conn, priv, 0, REMOTE_PROC_INTERFACE_UNDEFINE,
+    if (call (iface->conn, priv, 0, REMOTE_PROC_INTERFACE_UNDEFINE,
               (xdrproc_t) xdr_remote_interface_undefine_args, (char *) &args,
               (xdrproc_t) xdr_void, (char *) NULL) == -1)
         goto done;
@@ -4007,19 +4007,19 @@ done:
 }
 
 static int
-remoteInterfaceCreate (virInterfacePtr interface,
+remoteInterfaceCreate (virInterfacePtr iface,
                        unsigned int flags)
 {
     int rv = -1;
     remote_interface_create_args args;
-    struct private_data *priv = interface->conn->interfacePrivateData;
+    struct private_data *priv = iface->conn->interfacePrivateData;
 
     remoteDriverLock(priv);
 
-    make_nonnull_interface (&args.interface, interface);
+    make_nonnull_interface (&args.iface, iface);
     args.flags = flags;
 
-    if (call (interface->conn, priv, 0, REMOTE_PROC_INTERFACE_CREATE,
+    if (call (iface->conn, priv, 0, REMOTE_PROC_INTERFACE_CREATE,
               (xdrproc_t) xdr_remote_interface_create_args, (char *) &args,
               (xdrproc_t) xdr_void, (char *) NULL) == -1)
         goto done;
@@ -4032,19 +4032,19 @@ done:
 }
 
 static int
-remoteInterfaceDestroy (virInterfacePtr interface,
+remoteInterfaceDestroy (virInterfacePtr iface,
                         unsigned int flags)
 {
     int rv = -1;
     remote_interface_destroy_args args;
-    struct private_data *priv = interface->conn->interfacePrivateData;
+    struct private_data *priv = iface->conn->interfacePrivateData;
 
     remoteDriverLock(priv);
 
-    make_nonnull_interface (&args.interface, interface);
+    make_nonnull_interface (&args.iface, iface);
     args.flags = flags;
 
-    if (call (interface->conn, priv, 0, REMOTE_PROC_INTERFACE_DESTROY,
+    if (call (iface->conn, priv, 0, REMOTE_PROC_INTERFACE_DESTROY,
               (xdrproc_t) xdr_remote_interface_destroy_args, (char *) &args,
               (xdrproc_t) xdr_void, (char *) NULL) == -1)
         goto done;
@@ -7256,9 +7256,9 @@ get_nonnull_network (virConnectPtr conn, remote_nonnull_network network)
 }
 
 static virInterfacePtr
-get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface interface)
+get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface iface)
 {
-    return virGetInterface (conn, interface.name, interface.mac);
+    return virGetInterface (conn, iface.name, iface.mac);
 }
 
 static virStoragePoolPtr
diff --git a/tests/testutils.c b/tests/testutils.c
index 78df731d1d..2477fe256b 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -18,7 +18,9 @@
 #ifndef WIN32
 #include 
 #endif
+#ifdef HAVE_REGEX_H
 #include 
+#endif
 #include 
 #include 
 #include 
@@ -460,6 +462,7 @@ cleanup:
 }
 
 
+#ifdef HAVE_REGEX_H
 int virtTestClearLineRegex(const char *pattern,
                            char *str)
 {
@@ -503,3 +506,10 @@ int virtTestClearLineRegex(const char *pattern,
 
     return 0;
 }
+#else
+int virtTestClearLineRegex(const char *pattern ATTRIBUTE_UNUSED,
+                           char *str ATTRIBUTE_UNUSED)
+{
+    return 0;
+}
+#endif