[libvirt-users] [API reference] Are there XML-handling API to retrieve info directly from xml configure file

Zhihua Che zhihua.che at gmail.com
Fri Apr 6 07:24:25 UTC 2012


Hi, everyone

    I'm writing a application using libvirt and need to query guest
os's virtual network interface usage, like bytes read or written
through a given interface. I know int
virDomainInterfaceStats(virDomainPtr dom, const char * path,
		virDomainInterfaceStatsPtr stats,  size_t size) is designed for my
purpose but I 'm not sure how I determine the second parameter path.
I'm now think of determining the virtual interface by parsing the
domain's xml configure file.
But I don't find that libvirt  supply such functions, that means, I
have to resort to other library lik libxml?

thanks




More information about the libvirt-users mailing list