提交 162e4779 编写于 作者: R Roman Bogorodskiy 提交者: Michal Privoznik

bridge driver: s/network_driver/virNetworkDriverState/

This is another cleanup before extracting platform-specific
parts from bridge_driver.

Rename struct network_driver to _virNetworkDriverState and
add appropriate typedefs: virNetworkDriverState and
virNetworkDriverStatePtr.

This will help us to avoid potential problems when moving
this struct to the .h file.
上级 0d7f45ae
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#define VIR_FROM_THIS VIR_FROM_NETWORK #define VIR_FROM_THIS VIR_FROM_NETWORK
/* Main driver state */ /* Main driver state */
struct network_driver { struct _virNetworkDriverState {
virMutex lock; virMutex lock;
virNetworkObjList networks; virNetworkObjList networks;
...@@ -84,45 +84,47 @@ struct network_driver { ...@@ -84,45 +84,47 @@ struct network_driver {
dnsmasqCapsPtr dnsmasqCaps; dnsmasqCapsPtr dnsmasqCaps;
}; };
typedef struct _virNetworkDriverState virNetworkDriverState;
typedef virNetworkDriverState *virNetworkDriverStatePtr;
static void networkDriverLock(struct network_driver *driver) static void networkDriverLock(virNetworkDriverStatePtr driver)
{ {
virMutexLock(&driver->lock); virMutexLock(&driver->lock);
} }
static void networkDriverUnlock(struct network_driver *driver) static void networkDriverUnlock(virNetworkDriverStatePtr driver)
{ {
virMutexUnlock(&driver->lock); virMutexUnlock(&driver->lock);
} }
static int networkStateCleanup(void); static int networkStateCleanup(void);
static int networkStartNetwork(struct network_driver *driver, static int networkStartNetwork(virNetworkDriverStatePtr driver,
virNetworkObjPtr network); virNetworkObjPtr network);
static int networkShutdownNetwork(struct network_driver *driver, static int networkShutdownNetwork(virNetworkDriverStatePtr driver,
virNetworkObjPtr network); virNetworkObjPtr network);
static int networkStartNetworkVirtual(struct network_driver *driver, static int networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
virNetworkObjPtr network); virNetworkObjPtr network);
static int networkShutdownNetworkVirtual(struct network_driver *driver, static int networkShutdownNetworkVirtual(virNetworkDriverStatePtr driver,
virNetworkObjPtr network); virNetworkObjPtr network);
static int networkStartNetworkExternal(struct network_driver *driver, static int networkStartNetworkExternal(virNetworkDriverStatePtr driver,
virNetworkObjPtr network); virNetworkObjPtr network);
static int networkShutdownNetworkExternal(struct network_driver *driver, static int networkShutdownNetworkExternal(virNetworkDriverStatePtr driver,
virNetworkObjPtr network); virNetworkObjPtr network);
static void networkReloadIptablesRules(struct network_driver *driver); static void networkReloadIptablesRules(virNetworkDriverStatePtr driver);
static void networkRefreshDaemons(struct network_driver *driver); static void networkRefreshDaemons(virNetworkDriverStatePtr driver);
static int networkPlugBandwidth(virNetworkObjPtr net, static int networkPlugBandwidth(virNetworkObjPtr net,
virDomainNetDefPtr iface); virDomainNetDefPtr iface);
static int networkUnplugBandwidth(virNetworkObjPtr net, static int networkUnplugBandwidth(virNetworkObjPtr net,
virDomainNetDefPtr iface); virDomainNetDefPtr iface);
static struct network_driver *driverState = NULL; static virNetworkDriverStatePtr driverState = NULL;
static char * static char *
networkDnsmasqLeaseFileNameDefault(const char *netname) networkDnsmasqLeaseFileNameDefault(const char *netname)
...@@ -169,7 +171,7 @@ networkRadvdConfigFileName(const char *netname) ...@@ -169,7 +171,7 @@ networkRadvdConfigFileName(const char *netname)
/* do needed cleanup steps and remove the network from the list */ /* do needed cleanup steps and remove the network from the list */
static int static int
networkRemoveInactive(struct network_driver *driver, networkRemoveInactive(virNetworkDriverStatePtr driver,
virNetworkObjPtr net) virNetworkObjPtr net)
{ {
char *leasefile = NULL; char *leasefile = NULL;
...@@ -256,7 +258,7 @@ networkBridgeDummyNicName(const char *brname) ...@@ -256,7 +258,7 @@ networkBridgeDummyNicName(const char *brname)
} }
static void static void
networkFindActiveConfigs(struct network_driver *driver) networkFindActiveConfigs(virNetworkDriverStatePtr driver)
{ {
size_t i; size_t i;
...@@ -308,7 +310,7 @@ networkFindActiveConfigs(struct network_driver *driver) ...@@ -308,7 +310,7 @@ networkFindActiveConfigs(struct network_driver *driver)
static void static void
networkAutostartConfigs(struct network_driver *driver) { networkAutostartConfigs(virNetworkDriverStatePtr driver) {
size_t i; size_t i;
for (i = 0; i < driver->networks.count; i++) { for (i = 0; i < driver->networks.count; i++) {
...@@ -327,7 +329,7 @@ networkAutostartConfigs(struct network_driver *driver) { ...@@ -327,7 +329,7 @@ networkAutostartConfigs(struct network_driver *driver) {
static DBusHandlerResult static DBusHandlerResult
firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED, firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
DBusMessage *message, void *user_data) { DBusMessage *message, void *user_data) {
struct network_driver *_driverState = user_data; virNetworkDriverStatePtr _driverState = user_data;
if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS,
"NameOwnerChanged") || "NameOwnerChanged") ||
...@@ -1025,7 +1027,7 @@ cleanup: ...@@ -1025,7 +1027,7 @@ cleanup:
} }
static int static int
networkStartDhcpDaemon(struct network_driver *driver, networkStartDhcpDaemon(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
virCommandPtr cmd = NULL; virCommandPtr cmd = NULL;
...@@ -1112,7 +1114,7 @@ cleanup: ...@@ -1112,7 +1114,7 @@ cleanup:
* Returns 0 on success, -1 on failure. * Returns 0 on success, -1 on failure.
*/ */
static int static int
networkRefreshDhcpDaemon(struct network_driver *driver, networkRefreshDhcpDaemon(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
int ret = -1; int ret = -1;
...@@ -1180,7 +1182,7 @@ cleanup: ...@@ -1180,7 +1182,7 @@ cleanup:
* Returns 0 on success, -1 on failure. * Returns 0 on success, -1 on failure.
*/ */
static int static int
networkRestartDhcpDaemon(struct network_driver *driver, networkRestartDhcpDaemon(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
/* if there is a running dnsmasq, kill it */ /* if there is a running dnsmasq, kill it */
...@@ -1324,7 +1326,7 @@ cleanup: ...@@ -1324,7 +1326,7 @@ cleanup:
} }
static int static int
networkStartRadvd(struct network_driver *driver ATTRIBUTE_UNUSED, networkStartRadvd(virNetworkDriverStatePtr driver ATTRIBUTE_UNUSED,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
char *pidfile = NULL; char *pidfile = NULL;
...@@ -1410,7 +1412,7 @@ cleanup: ...@@ -1410,7 +1412,7 @@ cleanup:
} }
static int static int
networkRefreshRadvd(struct network_driver *driver ATTRIBUTE_UNUSED, networkRefreshRadvd(virNetworkDriverStatePtr driver ATTRIBUTE_UNUSED,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
char *radvdpidbase; char *radvdpidbase;
...@@ -1449,7 +1451,7 @@ networkRefreshRadvd(struct network_driver *driver ATTRIBUTE_UNUSED, ...@@ -1449,7 +1451,7 @@ networkRefreshRadvd(struct network_driver *driver ATTRIBUTE_UNUSED,
#if 0 #if 0
/* currently unused, so it causes a build error unless we #if it out */ /* currently unused, so it causes a build error unless we #if it out */
static int static int
networkRestartRadvd(struct network_driver *driver, networkRestartRadvd(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
char *radvdpidbase; char *radvdpidbase;
...@@ -1478,7 +1480,7 @@ networkRestartRadvd(struct network_driver *driver, ...@@ -1478,7 +1480,7 @@ networkRestartRadvd(struct network_driver *driver,
* This should be called when libvirtd is restarted. * This should be called when libvirtd is restarted.
*/ */
static void static void
networkRefreshDaemons(struct network_driver *driver) networkRefreshDaemons(virNetworkDriverStatePtr driver)
{ {
size_t i; size_t i;
...@@ -2097,7 +2099,7 @@ networkRemoveIptablesRules(virNetworkObjPtr network) ...@@ -2097,7 +2099,7 @@ networkRemoveIptablesRules(virNetworkObjPtr network)
} }
static void static void
networkReloadIptablesRules(struct network_driver *driver) networkReloadIptablesRules(virNetworkDriverStatePtr driver)
{ {
size_t i; size_t i;
...@@ -2373,7 +2375,7 @@ networkAddRouteToBridge(virNetworkObjPtr network, ...@@ -2373,7 +2375,7 @@ networkAddRouteToBridge(virNetworkObjPtr network,
} }
static int static int
networkStartNetworkVirtual(struct network_driver *driver, networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
size_t i; size_t i;
...@@ -2552,7 +2554,7 @@ networkStartNetworkVirtual(struct network_driver *driver, ...@@ -2552,7 +2554,7 @@ networkStartNetworkVirtual(struct network_driver *driver,
return -1; return -1;
} }
static int networkShutdownNetworkVirtual(struct network_driver *driver ATTRIBUTE_UNUSED, static int networkShutdownNetworkVirtual(virNetworkDriverStatePtr driver ATTRIBUTE_UNUSED,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
virNetDevBandwidthClear(network->def->bridge); virNetDevBandwidthClear(network->def->bridge);
...@@ -2600,7 +2602,7 @@ static int networkShutdownNetworkVirtual(struct network_driver *driver ATTRIBUTE ...@@ -2600,7 +2602,7 @@ static int networkShutdownNetworkVirtual(struct network_driver *driver ATTRIBUTE
} }
static int static int
networkStartNetworkExternal(struct network_driver *driver ATTRIBUTE_UNUSED, networkStartNetworkExternal(virNetworkDriverStatePtr driver ATTRIBUTE_UNUSED,
virNetworkObjPtr network ATTRIBUTE_UNUSED) virNetworkObjPtr network ATTRIBUTE_UNUSED)
{ {
/* put anything here that needs to be done each time a network of /* put anything here that needs to be done each time a network of
...@@ -2611,7 +2613,7 @@ networkStartNetworkExternal(struct network_driver *driver ATTRIBUTE_UNUSED, ...@@ -2611,7 +2613,7 @@ networkStartNetworkExternal(struct network_driver *driver ATTRIBUTE_UNUSED,
return 0; return 0;
} }
static int networkShutdownNetworkExternal(struct network_driver *driver ATTRIBUTE_UNUSED, static int networkShutdownNetworkExternal(virNetworkDriverStatePtr driver ATTRIBUTE_UNUSED,
virNetworkObjPtr network ATTRIBUTE_UNUSED) virNetworkObjPtr network ATTRIBUTE_UNUSED)
{ {
/* put anything here that needs to be done each time a network of /* put anything here that needs to be done each time a network of
...@@ -2623,7 +2625,7 @@ static int networkShutdownNetworkExternal(struct network_driver *driver ATTRIBUT ...@@ -2623,7 +2625,7 @@ static int networkShutdownNetworkExternal(struct network_driver *driver ATTRIBUT
} }
static int static int
networkStartNetwork(struct network_driver *driver, networkStartNetwork(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
int ret = 0; int ret = 0;
...@@ -2682,7 +2684,7 @@ error: ...@@ -2682,7 +2684,7 @@ error:
return ret; return ret;
} }
static int networkShutdownNetwork(struct network_driver *driver, static int networkShutdownNetwork(virNetworkDriverStatePtr driver,
virNetworkObjPtr network) virNetworkObjPtr network)
{ {
int ret = 0; int ret = 0;
...@@ -2726,7 +2728,7 @@ static int networkShutdownNetwork(struct network_driver *driver, ...@@ -2726,7 +2728,7 @@ static int networkShutdownNetwork(struct network_driver *driver,
static virNetworkPtr networkLookupByUUID(virConnectPtr conn, static virNetworkPtr networkLookupByUUID(virConnectPtr conn,
const unsigned char *uuid) { const unsigned char *uuid) {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
virNetworkPtr ret = NULL; virNetworkPtr ret = NULL;
...@@ -2752,7 +2754,7 @@ cleanup: ...@@ -2752,7 +2754,7 @@ cleanup:
static virNetworkPtr networkLookupByName(virConnectPtr conn, static virNetworkPtr networkLookupByName(virConnectPtr conn,
const char *name) { const char *name) {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
virNetworkPtr ret = NULL; virNetworkPtr ret = NULL;
...@@ -2797,7 +2799,7 @@ static int networkClose(virConnectPtr conn) { ...@@ -2797,7 +2799,7 @@ static int networkClose(virConnectPtr conn) {
static int networkConnectNumOfNetworks(virConnectPtr conn) { static int networkConnectNumOfNetworks(virConnectPtr conn) {
int nactive = 0; int nactive = 0;
size_t i; size_t i;
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
if (virConnectNumOfNetworksEnsureACL(conn) < 0) if (virConnectNumOfNetworksEnsureACL(conn) < 0)
return -1; return -1;
...@@ -2817,7 +2819,7 @@ static int networkConnectNumOfNetworks(virConnectPtr conn) { ...@@ -2817,7 +2819,7 @@ static int networkConnectNumOfNetworks(virConnectPtr conn) {
} }
static int networkConnectListNetworks(virConnectPtr conn, char **const names, int nnames) { static int networkConnectListNetworks(virConnectPtr conn, char **const names, int nnames) {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
int got = 0; int got = 0;
size_t i; size_t i;
...@@ -2852,7 +2854,7 @@ static int networkConnectListNetworks(virConnectPtr conn, char **const names, in ...@@ -2852,7 +2854,7 @@ static int networkConnectListNetworks(virConnectPtr conn, char **const names, in
static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) { static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) {
int ninactive = 0; int ninactive = 0;
size_t i; size_t i;
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
if (virConnectNumOfDefinedNetworksEnsureACL(conn) < 0) if (virConnectNumOfDefinedNetworksEnsureACL(conn) < 0)
return -1; return -1;
...@@ -2872,7 +2874,7 @@ static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) { ...@@ -2872,7 +2874,7 @@ static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) {
} }
static int networkConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) { static int networkConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
int got = 0; int got = 0;
size_t i; size_t i;
...@@ -2908,7 +2910,7 @@ networkConnectListAllNetworks(virConnectPtr conn, ...@@ -2908,7 +2910,7 @@ networkConnectListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets, virNetworkPtr **nets,
unsigned int flags) unsigned int flags)
{ {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
int ret = -1; int ret = -1;
virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1); virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1);
...@@ -2928,7 +2930,7 @@ cleanup: ...@@ -2928,7 +2930,7 @@ cleanup:
static int networkIsActive(virNetworkPtr net) static int networkIsActive(virNetworkPtr net)
{ {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr obj; virNetworkObjPtr obj;
int ret = -1; int ret = -1;
...@@ -2953,7 +2955,7 @@ cleanup: ...@@ -2953,7 +2955,7 @@ cleanup:
static int networkIsPersistent(virNetworkPtr net) static int networkIsPersistent(virNetworkPtr net)
{ {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr obj; virNetworkObjPtr obj;
int ret = -1; int ret = -1;
...@@ -2978,7 +2980,7 @@ cleanup: ...@@ -2978,7 +2980,7 @@ cleanup:
static int static int
networkValidate(struct network_driver *driver, networkValidate(virNetworkDriverStatePtr driver,
virNetworkDefPtr def, virNetworkDefPtr def,
bool check_active) bool check_active)
{ {
...@@ -3127,7 +3129,7 @@ networkValidate(struct network_driver *driver, ...@@ -3127,7 +3129,7 @@ networkValidate(struct network_driver *driver,
} }
static virNetworkPtr networkCreateXML(virConnectPtr conn, const char *xml) { static virNetworkPtr networkCreateXML(virConnectPtr conn, const char *xml) {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
virNetworkDefPtr def; virNetworkDefPtr def;
virNetworkObjPtr network = NULL; virNetworkObjPtr network = NULL;
virNetworkPtr ret = NULL; virNetworkPtr ret = NULL;
...@@ -3169,7 +3171,7 @@ cleanup: ...@@ -3169,7 +3171,7 @@ cleanup:
} }
static virNetworkPtr networkDefineXML(virConnectPtr conn, const char *xml) { static virNetworkPtr networkDefineXML(virConnectPtr conn, const char *xml) {
struct network_driver *driver = conn->networkPrivateData; virNetworkDriverStatePtr driver = conn->networkPrivateData;
virNetworkDefPtr def = NULL; virNetworkDefPtr def = NULL;
bool freeDef = true; bool freeDef = true;
virNetworkObjPtr network = NULL; virNetworkObjPtr network = NULL;
...@@ -3227,7 +3229,7 @@ cleanup: ...@@ -3227,7 +3229,7 @@ cleanup:
static int static int
networkUndefine(virNetworkPtr net) { networkUndefine(virNetworkPtr net) {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
int ret = -1; int ret = -1;
bool active = false; bool active = false;
...@@ -3284,7 +3286,7 @@ networkUpdate(virNetworkPtr net, ...@@ -3284,7 +3286,7 @@ networkUpdate(virNetworkPtr net,
const char *xml, const char *xml,
unsigned int flags) unsigned int flags)
{ {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network = NULL; virNetworkObjPtr network = NULL;
int isActive, ret = -1; int isActive, ret = -1;
size_t i; size_t i;
...@@ -3430,7 +3432,7 @@ cleanup: ...@@ -3430,7 +3432,7 @@ cleanup:
} }
static int networkCreate(virNetworkPtr net) { static int networkCreate(virNetworkPtr net) {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
int ret = -1; int ret = -1;
...@@ -3456,7 +3458,7 @@ cleanup: ...@@ -3456,7 +3458,7 @@ cleanup:
} }
static int networkDestroy(virNetworkPtr net) { static int networkDestroy(virNetworkPtr net) {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
int ret = -1; int ret = -1;
...@@ -3500,7 +3502,7 @@ cleanup: ...@@ -3500,7 +3502,7 @@ cleanup:
static char *networkGetXMLDesc(virNetworkPtr net, static char *networkGetXMLDesc(virNetworkPtr net,
unsigned int flags) unsigned int flags)
{ {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
virNetworkDefPtr def; virNetworkDefPtr def;
char *ret = NULL; char *ret = NULL;
...@@ -3534,7 +3536,7 @@ cleanup: ...@@ -3534,7 +3536,7 @@ cleanup:
} }
static char *networkGetBridgeName(virNetworkPtr net) { static char *networkGetBridgeName(virNetworkPtr net) {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
char *bridge = NULL; char *bridge = NULL;
...@@ -3568,7 +3570,7 @@ cleanup: ...@@ -3568,7 +3570,7 @@ cleanup:
static int networkGetAutostart(virNetworkPtr net, static int networkGetAutostart(virNetworkPtr net,
int *autostart) { int *autostart) {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
int ret = -1; int ret = -1;
...@@ -3595,7 +3597,7 @@ cleanup: ...@@ -3595,7 +3597,7 @@ cleanup:
static int networkSetAutostart(virNetworkPtr net, static int networkSetAutostart(virNetworkPtr net,
int autostart) { int autostart) {
struct network_driver *driver = net->conn->networkPrivateData; virNetworkDriverStatePtr driver = net->conn->networkPrivateData;
virNetworkObjPtr network; virNetworkObjPtr network;
char *configFile = NULL, *autostartLink = NULL; char *configFile = NULL, *autostartLink = NULL;
int ret = -1; int ret = -1;
...@@ -3794,7 +3796,7 @@ finish: ...@@ -3794,7 +3796,7 @@ finish:
int int
networkAllocateActualDevice(virDomainNetDefPtr iface) networkAllocateActualDevice(virDomainNetDefPtr iface)
{ {
struct network_driver *driver = driverState; virNetworkDriverStatePtr driver = driverState;
enum virDomainNetType actualType = iface->type; enum virDomainNetType actualType = iface->type;
virNetworkObjPtr network = NULL; virNetworkObjPtr network = NULL;
virNetworkDefPtr netdef = NULL; virNetworkDefPtr netdef = NULL;
...@@ -4192,7 +4194,7 @@ error: ...@@ -4192,7 +4194,7 @@ error:
int int
networkNotifyActualDevice(virDomainNetDefPtr iface) networkNotifyActualDevice(virDomainNetDefPtr iface)
{ {
struct network_driver *driver = driverState; virNetworkDriverStatePtr driver = driverState;
enum virDomainNetType actualType = virDomainNetGetActualType(iface); enum virDomainNetType actualType = virDomainNetGetActualType(iface);
virNetworkObjPtr network; virNetworkObjPtr network;
virNetworkDefPtr netdef; virNetworkDefPtr netdef;
...@@ -4370,7 +4372,7 @@ error: ...@@ -4370,7 +4372,7 @@ error:
int int
networkReleaseActualDevice(virDomainNetDefPtr iface) networkReleaseActualDevice(virDomainNetDefPtr iface)
{ {
struct network_driver *driver = driverState; virNetworkDriverStatePtr driver = driverState;
enum virDomainNetType actualType = virDomainNetGetActualType(iface); enum virDomainNetType actualType = virDomainNetGetActualType(iface);
virNetworkObjPtr network; virNetworkObjPtr network;
virNetworkDefPtr netdef; virNetworkDefPtr netdef;
...@@ -4525,7 +4527,7 @@ int ...@@ -4525,7 +4527,7 @@ int
networkGetNetworkAddress(const char *netname, char **netaddr) networkGetNetworkAddress(const char *netname, char **netaddr)
{ {
int ret = -1; int ret = -1;
struct network_driver *driver = driverState; virNetworkDriverStatePtr driver = driverState;
virNetworkObjPtr network; virNetworkObjPtr network;
virNetworkDefPtr netdef; virNetworkDefPtr netdef;
virNetworkIpDefPtr ipdef; virNetworkIpDefPtr ipdef;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册