Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
bde0cb51
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bde0cb51
编写于
10月 02, 2014
作者:
T
Taowei
提交者:
Michal Privoznik
10月 03, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vbox: Rewrite vboxNetworkGetXMLDesc
上级
3b12eca6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
248 addition
and
186 deletion
+248
-186
src/vbox/vbox_network.c
src/vbox/vbox_network.c
+191
-0
src/vbox/vbox_tmpl.c
src/vbox/vbox_tmpl.c
+49
-186
src/vbox/vbox_uniformed_api.h
src/vbox/vbox_uniformed_api.h
+8
-0
未找到文件。
src/vbox/vbox_network.c
浏览文件 @
bde0cb51
...
...
@@ -808,3 +808,194 @@ int vboxNetworkCreate(virNetworkPtr network)
VIR_FREE
(
networkNameUtf8
);
return
ret
;
}
static
int
vboxSocketParseAddrUtf16
(
vboxGlobalData
*
data
,
const
PRUnichar
*
utf16
,
virSocketAddrPtr
addr
)
{
int
result
=
-
1
;
char
*
utf8
=
NULL
;
VBOX_UTF16_TO_UTF8
(
utf16
,
&
utf8
);
if
(
virSocketAddrParse
(
addr
,
utf8
,
AF_UNSPEC
)
<
0
)
{
goto
cleanup
;
}
result
=
0
;
cleanup:
VBOX_UTF8_FREE
(
utf8
);
return
result
;
}
char
*
vboxNetworkGetXMLDesc
(
virNetworkPtr
network
,
unsigned
int
flags
)
{
vboxGlobalData
*
data
=
network
->
conn
->
privateData
;
virNetworkDefPtr
def
=
NULL
;
virNetworkIpDefPtr
ipdef
=
NULL
;
char
*
networkNameUtf8
=
NULL
;
PRUnichar
*
networkInterfaceNameUtf16
=
NULL
;
IHostNetworkInterface
*
networkInterface
=
NULL
;
PRUint32
interfaceType
=
0
;
PRUnichar
*
networkNameUtf16
=
NULL
;
IDHCPServer
*
dhcpServer
=
NULL
;
vboxIIDUnion
vboxnet0IID
;
IHost
*
host
=
NULL
;
char
*
ret
=
NULL
;
nsresult
rc
;
if
(
!
data
->
vboxObj
)
return
ret
;
gVBoxAPI
.
UIVirtualBox
.
GetHost
(
data
->
vboxObj
,
&
host
);
if
(
!
host
)
return
ret
;
VBOX_IID_INITIALIZE
(
&
vboxnet0IID
);
virCheckFlags
(
0
,
NULL
);
if
(
VIR_ALLOC
(
def
)
<
0
)
goto
cleanup
;
if
(
VIR_ALLOC
(
ipdef
)
<
0
)
goto
cleanup
;
def
->
ips
=
ipdef
;
def
->
nips
=
1
;
if
(
virAsprintf
(
&
networkNameUtf8
,
"HostInterfaceNetworking-%s"
,
network
->
name
)
<
0
)
goto
cleanup
;
VBOX_UTF8_TO_UTF16
(
network
->
name
,
&
networkInterfaceNameUtf16
);
gVBoxAPI
.
UIHost
.
FindHostNetworkInterfaceByName
(
host
,
networkInterfaceNameUtf16
,
&
networkInterface
);
if
(
!
networkInterface
)
goto
cleanup
;
gVBoxAPI
.
UIHNInterface
.
GetInterfaceType
(
networkInterface
,
&
interfaceType
);
if
(
interfaceType
!=
HostNetworkInterfaceType_HostOnly
)
goto
cleanup
;
if
(
VIR_STRDUP
(
def
->
name
,
network
->
name
)
<
0
)
goto
cleanup
;
rc
=
gVBoxAPI
.
UIHNInterface
.
GetId
(
networkInterface
,
&
vboxnet0IID
);
if
(
NS_FAILED
(
rc
))
goto
cleanup
;
vboxIIDToUUID
(
&
vboxnet0IID
,
def
->
uuid
);
VBOX_UTF8_TO_UTF16
(
networkNameUtf8
,
&
networkNameUtf16
);
def
->
forward
.
type
=
VIR_NETWORK_FORWARD_NONE
;
gVBoxAPI
.
UIVirtualBox
.
FindDHCPServerByNetworkName
(
data
->
vboxObj
,
networkNameUtf16
,
&
dhcpServer
);
if
(
dhcpServer
)
{
ipdef
->
nranges
=
1
;
if
(
VIR_ALLOC_N
(
ipdef
->
ranges
,
ipdef
->
nranges
)
>=
0
)
{
PRUnichar
*
ipAddressUtf16
=
NULL
;
PRUnichar
*
networkMaskUtf16
=
NULL
;
PRUnichar
*
fromIPAddressUtf16
=
NULL
;
PRUnichar
*
toIPAddressUtf16
=
NULL
;
bool
errorOccurred
=
false
;
gVBoxAPI
.
UIDHCPServer
.
GetIPAddress
(
dhcpServer
,
&
ipAddressUtf16
);
gVBoxAPI
.
UIDHCPServer
.
GetNetworkMask
(
dhcpServer
,
&
networkMaskUtf16
);
gVBoxAPI
.
UIDHCPServer
.
GetLowerIP
(
dhcpServer
,
&
fromIPAddressUtf16
);
gVBoxAPI
.
UIDHCPServer
.
GetUpperIP
(
dhcpServer
,
&
toIPAddressUtf16
);
/* Currently virtualbox supports only one dhcp server per network
* with contigious address space from start to end
*/
if
(
vboxSocketParseAddrUtf16
(
data
,
ipAddressUtf16
,
&
ipdef
->
address
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
networkMaskUtf16
,
&
ipdef
->
netmask
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
fromIPAddressUtf16
,
&
ipdef
->
ranges
[
0
].
start
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
toIPAddressUtf16
,
&
ipdef
->
ranges
[
0
].
end
)
<
0
)
{
errorOccurred
=
true
;
}
VBOX_UTF16_FREE
(
ipAddressUtf16
);
VBOX_UTF16_FREE
(
networkMaskUtf16
);
VBOX_UTF16_FREE
(
fromIPAddressUtf16
);
VBOX_UTF16_FREE
(
toIPAddressUtf16
);
if
(
errorOccurred
)
{
goto
cleanup
;
}
}
else
{
ipdef
->
nranges
=
0
;
}
ipdef
->
nhosts
=
1
;
if
(
VIR_ALLOC_N
(
ipdef
->
hosts
,
ipdef
->
nhosts
)
>=
0
)
{
if
(
VIR_STRDUP
(
ipdef
->
hosts
[
0
].
name
,
network
->
name
)
<
0
)
{
VIR_FREE
(
ipdef
->
hosts
);
ipdef
->
nhosts
=
0
;
}
else
{
PRUnichar
*
macAddressUtf16
=
NULL
;
PRUnichar
*
ipAddressUtf16
=
NULL
;
bool
errorOccurred
=
false
;
gVBoxAPI
.
UIHNInterface
.
GetHardwareAddress
(
networkInterface
,
&
macAddressUtf16
);
gVBoxAPI
.
UIHNInterface
.
GetIPAddress
(
networkInterface
,
&
ipAddressUtf16
);
VBOX_UTF16_TO_UTF8
(
macAddressUtf16
,
&
ipdef
->
hosts
[
0
].
mac
);
if
(
vboxSocketParseAddrUtf16
(
data
,
ipAddressUtf16
,
&
ipdef
->
hosts
[
0
].
ip
)
<
0
)
{
errorOccurred
=
true
;
}
VBOX_UTF16_FREE
(
macAddressUtf16
);
VBOX_UTF16_FREE
(
ipAddressUtf16
);
if
(
errorOccurred
)
{
goto
cleanup
;
}
}
}
else
{
ipdef
->
nhosts
=
0
;
}
}
else
{
PRUnichar
*
networkMaskUtf16
=
NULL
;
PRUnichar
*
ipAddressUtf16
=
NULL
;
bool
errorOccurred
=
false
;
gVBoxAPI
.
UIHNInterface
.
GetNetworkMask
(
networkInterface
,
&
networkMaskUtf16
);
gVBoxAPI
.
UIHNInterface
.
GetIPAddress
(
networkInterface
,
&
ipAddressUtf16
);
if
(
vboxSocketParseAddrUtf16
(
data
,
networkMaskUtf16
,
&
ipdef
->
netmask
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
ipAddressUtf16
,
&
ipdef
->
address
)
<
0
)
{
errorOccurred
=
true
;
}
VBOX_UTF16_FREE
(
networkMaskUtf16
);
VBOX_UTF16_FREE
(
ipAddressUtf16
);
if
(
errorOccurred
)
{
goto
cleanup
;
}
}
DEBUGIID
(
"Network UUID"
,
&
vboxnet0IID
);
ret
=
virNetworkDefFormat
(
def
,
0
);
cleanup:
vboxIIDUnalloc
(
&
vboxnet0IID
);
VBOX_UTF16_FREE
(
networkNameUtf16
);
VBOX_RELEASE
(
networkInterface
);
VBOX_UTF16_FREE
(
networkInterfaceNameUtf16
);
VBOX_RELEASE
(
host
);
virNetworkDefFree
(
def
);
VIR_FREE
(
networkNameUtf8
);
VBOX_RELEASE
(
dhcpServer
);
return
ret
;
}
src/vbox/vbox_tmpl.c
浏览文件 @
bde0cb51
...
...
@@ -838,27 +838,6 @@ static PRUnichar *PRUnicharFromInt(int n) {
#endif
/* VBOX_API_VERSION >= 3001000 */
static
int
vboxSocketParseAddrUtf16
(
vboxGlobalData
*
data
,
const
PRUnichar
*
utf16
,
virSocketAddrPtr
addr
)
{
int
result
=
-
1
;
char
*
utf8
=
NULL
;
VBOX_UTF16_TO_UTF8
(
utf16
,
&
utf8
);
if
(
virSocketAddrParse
(
addr
,
utf8
,
AF_UNSPEC
)
<
0
)
{
goto
cleanup
;
}
result
=
0
;
cleanup:
VBOX_UTF8_FREE
(
utf8
);
return
result
;
}
static
virDomainState
_vboxConvertState
(
PRUint32
state
)
{
switch
(
state
)
{
...
...
@@ -2038,171 +2017,6 @@ _registerDomainEvent(virDriverPtr driver)
#endif
/* !(VBOX_API_VERSION == 2002000 || VBOX_API_VERSION >= 4000000) */
/**
* The Network Functions here on
*/
static
char
*
vboxNetworkGetXMLDesc
(
virNetworkPtr
network
,
unsigned
int
flags
)
{
VBOX_OBJECT_HOST_CHECK
(
network
->
conn
,
char
*
,
NULL
);
virNetworkDefPtr
def
=
NULL
;
virNetworkIpDefPtr
ipdef
=
NULL
;
char
*
networkNameUtf8
=
NULL
;
PRUnichar
*
networkInterfaceNameUtf16
=
NULL
;
IHostNetworkInterface
*
networkInterface
=
NULL
;
virCheckFlags
(
0
,
NULL
);
if
(
VIR_ALLOC
(
def
)
<
0
)
goto
cleanup
;
if
(
VIR_ALLOC
(
ipdef
)
<
0
)
goto
cleanup
;
def
->
ips
=
ipdef
;
def
->
nips
=
1
;
if
(
virAsprintf
(
&
networkNameUtf8
,
"HostInterfaceNetworking-%s"
,
network
->
name
)
<
0
)
goto
cleanup
;
VBOX_UTF8_TO_UTF16
(
network
->
name
,
&
networkInterfaceNameUtf16
);
host
->
vtbl
->
FindHostNetworkInterfaceByName
(
host
,
networkInterfaceNameUtf16
,
&
networkInterface
);
if
(
networkInterface
)
{
PRUint32
interfaceType
=
0
;
networkInterface
->
vtbl
->
GetInterfaceType
(
networkInterface
,
&
interfaceType
);
if
(
interfaceType
==
HostNetworkInterfaceType_HostOnly
)
{
if
(
VIR_STRDUP
(
def
->
name
,
network
->
name
)
>=
0
)
{
PRUnichar
*
networkNameUtf16
=
NULL
;
IDHCPServer
*
dhcpServer
=
NULL
;
vboxIID
vboxnet0IID
=
VBOX_IID_INITIALIZER
;
networkInterface
->
vtbl
->
GetId
(
networkInterface
,
&
vboxnet0IID
.
value
);
vboxIIDToUUID
(
&
vboxnet0IID
,
def
->
uuid
);
VBOX_UTF8_TO_UTF16
(
networkNameUtf8
,
&
networkNameUtf16
);
def
->
forward
.
type
=
VIR_NETWORK_FORWARD_NONE
;
data
->
vboxObj
->
vtbl
->
FindDHCPServerByNetworkName
(
data
->
vboxObj
,
networkNameUtf16
,
&
dhcpServer
);
if
(
dhcpServer
)
{
ipdef
->
nranges
=
1
;
if
(
VIR_ALLOC_N
(
ipdef
->
ranges
,
ipdef
->
nranges
)
>=
0
)
{
PRUnichar
*
ipAddressUtf16
=
NULL
;
PRUnichar
*
networkMaskUtf16
=
NULL
;
PRUnichar
*
fromIPAddressUtf16
=
NULL
;
PRUnichar
*
toIPAddressUtf16
=
NULL
;
bool
errorOccurred
=
false
;
dhcpServer
->
vtbl
->
GetIPAddress
(
dhcpServer
,
&
ipAddressUtf16
);
dhcpServer
->
vtbl
->
GetNetworkMask
(
dhcpServer
,
&
networkMaskUtf16
);
dhcpServer
->
vtbl
->
GetLowerIP
(
dhcpServer
,
&
fromIPAddressUtf16
);
dhcpServer
->
vtbl
->
GetUpperIP
(
dhcpServer
,
&
toIPAddressUtf16
);
/* Currently virtualbox supports only one dhcp server per network
* with contigious address space from start to end
*/
if
(
vboxSocketParseAddrUtf16
(
data
,
ipAddressUtf16
,
&
ipdef
->
address
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
networkMaskUtf16
,
&
ipdef
->
netmask
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
fromIPAddressUtf16
,
&
ipdef
->
ranges
[
0
].
start
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
toIPAddressUtf16
,
&
ipdef
->
ranges
[
0
].
end
)
<
0
)
{
errorOccurred
=
true
;
}
VBOX_UTF16_FREE
(
ipAddressUtf16
);
VBOX_UTF16_FREE
(
networkMaskUtf16
);
VBOX_UTF16_FREE
(
fromIPAddressUtf16
);
VBOX_UTF16_FREE
(
toIPAddressUtf16
);
if
(
errorOccurred
)
{
goto
cleanup
;
}
}
else
{
ipdef
->
nranges
=
0
;
}
ipdef
->
nhosts
=
1
;
if
(
VIR_ALLOC_N
(
ipdef
->
hosts
,
ipdef
->
nhosts
)
>=
0
)
{
if
(
VIR_STRDUP
(
ipdef
->
hosts
[
0
].
name
,
network
->
name
)
<
0
)
{
VIR_FREE
(
ipdef
->
hosts
);
ipdef
->
nhosts
=
0
;
}
else
{
PRUnichar
*
macAddressUtf16
=
NULL
;
PRUnichar
*
ipAddressUtf16
=
NULL
;
bool
errorOccurred
=
false
;
networkInterface
->
vtbl
->
GetHardwareAddress
(
networkInterface
,
&
macAddressUtf16
);
networkInterface
->
vtbl
->
GetIPAddress
(
networkInterface
,
&
ipAddressUtf16
);
VBOX_UTF16_TO_UTF8
(
macAddressUtf16
,
&
ipdef
->
hosts
[
0
].
mac
);
if
(
vboxSocketParseAddrUtf16
(
data
,
ipAddressUtf16
,
&
ipdef
->
hosts
[
0
].
ip
)
<
0
)
{
errorOccurred
=
true
;
}
VBOX_UTF16_FREE
(
macAddressUtf16
);
VBOX_UTF16_FREE
(
ipAddressUtf16
);
if
(
errorOccurred
)
{
goto
cleanup
;
}
}
}
else
{
ipdef
->
nhosts
=
0
;
}
VBOX_RELEASE
(
dhcpServer
);
}
else
{
PRUnichar
*
networkMaskUtf16
=
NULL
;
PRUnichar
*
ipAddressUtf16
=
NULL
;
bool
errorOccurred
=
false
;
networkInterface
->
vtbl
->
GetNetworkMask
(
networkInterface
,
&
networkMaskUtf16
);
networkInterface
->
vtbl
->
GetIPAddress
(
networkInterface
,
&
ipAddressUtf16
);
if
(
vboxSocketParseAddrUtf16
(
data
,
networkMaskUtf16
,
&
ipdef
->
netmask
)
<
0
||
vboxSocketParseAddrUtf16
(
data
,
ipAddressUtf16
,
&
ipdef
->
address
)
<
0
)
{
errorOccurred
=
true
;
}
VBOX_UTF16_FREE
(
networkMaskUtf16
);
VBOX_UTF16_FREE
(
ipAddressUtf16
);
if
(
errorOccurred
)
{
goto
cleanup
;
}
}
DEBUGIID
(
"Network UUID"
,
vboxnet0IID
.
value
);
vboxIIDUnalloc
(
&
vboxnet0IID
);
VBOX_UTF16_FREE
(
networkNameUtf16
);
}
}
VBOX_RELEASE
(
networkInterface
);
}
VBOX_UTF16_FREE
(
networkInterfaceNameUtf16
);
VBOX_RELEASE
(
host
);
ret
=
virNetworkDefFormat
(
def
,
0
);
cleanup:
virNetworkDefFree
(
def
);
VIR_FREE
(
networkNameUtf8
);
return
ret
;
}
/**
* The Storage Functions here on
*/
...
...
@@ -5526,6 +5340,24 @@ _hnInterfaceGetId(IHostNetworkInterface *hni, vboxIIDUnion *iidu)
return
hni
->
vtbl
->
GetId
(
hni
,
&
IID_MEMBER
(
value
));
}
static
nsresult
_hnInterfaceGetHardwareAddress
(
IHostNetworkInterface
*
hni
,
PRUnichar
**
hardwareAddress
)
{
return
hni
->
vtbl
->
GetHardwareAddress
(
hni
,
hardwareAddress
);
}
static
nsresult
_hnInterfaceGetIPAddress
(
IHostNetworkInterface
*
hni
,
PRUnichar
**
IPAddress
)
{
return
hni
->
vtbl
->
GetIPAddress
(
hni
,
IPAddress
);
}
static
nsresult
_hnInterfaceGetNetworkMask
(
IHostNetworkInterface
*
hni
,
PRUnichar
**
networkMask
)
{
return
hni
->
vtbl
->
GetNetworkMask
(
hni
,
networkMask
);
}
static
nsresult
_hnInterfaceEnableStaticIPConfig
(
IHostNetworkInterface
*
hni
,
PRUnichar
*
IPAddress
,
PRUnichar
*
networkMask
)
...
...
@@ -5557,6 +5389,30 @@ _hnInterfaceDHCPRediscover(IHostNetworkInterface *hni)
#endif
}
static
nsresult
_dhcpServerGetIPAddress
(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
IPAddress
)
{
return
dhcpServer
->
vtbl
->
GetIPAddress
(
dhcpServer
,
IPAddress
);
}
static
nsresult
_dhcpServerGetNetworkMask
(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
networkMask
)
{
return
dhcpServer
->
vtbl
->
GetNetworkMask
(
dhcpServer
,
networkMask
);
}
static
nsresult
_dhcpServerGetLowerIP
(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
lowerIP
)
{
return
dhcpServer
->
vtbl
->
GetLowerIP
(
dhcpServer
,
lowerIP
);
}
static
nsresult
_dhcpServerGetUpperIP
(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
upperIP
)
{
return
dhcpServer
->
vtbl
->
GetUpperIP
(
dhcpServer
,
upperIP
);
}
static
nsresult
_dhcpServerSetEnabled
(
IDHCPServer
*
dhcpServer
,
PRBool
enabled
)
{
...
...
@@ -5905,12 +5761,19 @@ static vboxUniformedIHNInterface _UIHNInterface = {
.
GetStatus
=
_hnInterfaceGetStatus
,
.
GetName
=
_hnInterfaceGetName
,
.
GetId
=
_hnInterfaceGetId
,
.
GetHardwareAddress
=
_hnInterfaceGetHardwareAddress
,
.
GetIPAddress
=
_hnInterfaceGetIPAddress
,
.
GetNetworkMask
=
_hnInterfaceGetNetworkMask
,
.
EnableStaticIPConfig
=
_hnInterfaceEnableStaticIPConfig
,
.
EnableDynamicIPConfig
=
_hnInterfaceEnableDynamicIPConfig
,
.
DHCPRediscover
=
_hnInterfaceDHCPRediscover
,
};
static
vboxUniformedIDHCPServer
_UIDHCPServer
=
{
.
GetIPAddress
=
_dhcpServerGetIPAddress
,
.
GetNetworkMask
=
_dhcpServerGetNetworkMask
,
.
GetLowerIP
=
_dhcpServerGetLowerIP
,
.
GetUpperIP
=
_dhcpServerGetUpperIP
,
.
SetEnabled
=
_dhcpServerSetEnabled
,
.
SetConfiguration
=
_dhcpServerSetConfiguration
,
.
Start
=
_dhcpServerStart
,
...
...
src/vbox/vbox_uniformed_api.h
浏览文件 @
bde0cb51
...
...
@@ -488,6 +488,9 @@ typedef struct {
nsresult
(
*
GetStatus
)(
IHostNetworkInterface
*
hni
,
PRUint32
*
status
);
nsresult
(
*
GetName
)(
IHostNetworkInterface
*
hni
,
PRUnichar
**
name
);
nsresult
(
*
GetId
)(
IHostNetworkInterface
*
hni
,
vboxIIDUnion
*
iidu
);
nsresult
(
*
GetHardwareAddress
)(
IHostNetworkInterface
*
hni
,
PRUnichar
**
hardwareAddress
);
nsresult
(
*
GetIPAddress
)(
IHostNetworkInterface
*
hni
,
PRUnichar
**
IPAddress
);
nsresult
(
*
GetNetworkMask
)(
IHostNetworkInterface
*
hni
,
PRUnichar
**
networkMask
);
nsresult
(
*
EnableStaticIPConfig
)(
IHostNetworkInterface
*
hni
,
PRUnichar
*
IPAddress
,
PRUnichar
*
networkMask
);
nsresult
(
*
EnableDynamicIPConfig
)(
IHostNetworkInterface
*
hni
);
...
...
@@ -496,6 +499,10 @@ typedef struct {
/* Functions for IDHCPServer */
typedef
struct
{
nsresult
(
*
GetIPAddress
)(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
IPAddress
);
nsresult
(
*
GetNetworkMask
)(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
networkMask
);
nsresult
(
*
GetLowerIP
)(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
lowerIP
);
nsresult
(
*
GetUpperIP
)(
IDHCPServer
*
dhcpServer
,
PRUnichar
**
upperIP
);
nsresult
(
*
SetEnabled
)(
IDHCPServer
*
dhcpServer
,
PRBool
enabled
);
nsresult
(
*
SetConfiguration
)(
IDHCPServer
*
dhcpServer
,
PRUnichar
*
IPAddress
,
PRUnichar
*
networkMask
,
PRUnichar
*
FromIPAddress
,
...
...
@@ -594,6 +601,7 @@ virNetworkPtr vboxNetworkDefineXML(virConnectPtr conn, const char *xml);
int
vboxNetworkUndefine
(
virNetworkPtr
network
);
int
vboxNetworkDestroy
(
virNetworkPtr
network
);
int
vboxNetworkCreate
(
virNetworkPtr
network
);
char
*
vboxNetworkGetXMLDesc
(
virNetworkPtr
network
,
unsigned
int
flags
);
/* Version specified functions for installing uniformed API */
void
vbox22InstallUniformedAPI
(
vboxUniformedAPI
*
pVBoxAPI
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录