]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
vz: implementation of attach/detach network devices
authorMikhail Feoktistov <mfeoktistov@virtuozzo.com>
Mon, 22 Jun 2015 16:57:00 +0000 (19:57 +0300)
committerDmitry Guryanov <dguryanov@parallels.com>
Wed, 24 Jun 2015 15:39:01 +0000 (18:39 +0300)
commit6de12b026b73d2f6d8e5de7d58a0476685f6ce9b
treee0b93ceafa93526a3df492b2322ae676b2033c75
parent366e31a6ef1757f5c9d6b21ebba28b9c371301b3
vz: implementation of attach/detach network devices

In this patch we add VIR_DOMAIN_DEVICE_NET handlers implementation
for domainAttachDevice and domainDetachDevice callbacks.

As soon as we don't support this operation for hypervisor type domains,
we implement this functionality for containers only.

In detach procedure we find network device by MAC address.
Because PrlVmDevNet_GetMacAddress() returns MAC as a UTF-8 encoded
null-terminated string, we use memcmp() to compare it.
Also we remove corresponding virtual network by prlsdkDelNetAdapter call.
src/vz/vz_driver.c
src/vz/vz_sdk.c
src/vz/vz_sdk.h