On Tue, Jun 24, 2014 at 02:31:49AM +0530, Nehal J Wani wrote: > Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC > and virNetworkDHCPLeaseFree. > > * virNetworkGetDHCPLeases: returns the dhcp leases information for a given > virtual network. > > For DHCPv4, the information returned: > - Network Interface Name > - Expiry Time > - MAC address > - IAID (NULL) > - IPv4 address (with type and prefix) > - Hostname (can be NULL) > - Client ID (can be NULL) > > For DHCPv6, the information returned: > - Network Interface Name > - Expiry Time > - MAC address > - IAID (can be NULL, only in rare cases) > - IPv6 address (with type and prefix) > - Hostname (can be NULL) > - Client DUID > > Note: @mac, @iaid, @ipaddr, @clientid are in ASCII form, not raw bytes. > Note: @expirytime can 0, in case the lease is for infinite time. > > * virNetworkGetDHCPLeasesForMAC: returns the dhcp leases information for a > given virtual network and specified MAC Address. > > * virNetworkDHCPLeaseFree: allows the upper layer application to free the > network interface object conveniently. > > There is no support for flags, so user is expected to pass 0 for > both the APIs. > > include/libvirt/libvirt.h.in: > * Define virNetworkGetDHCPLeases > * Define virNetworkGetDHCPLeasesForMAC > * Define virNetworkDHCPLeaseFree > > src/driver.h: > * Define networkGetDHCPLeases > * Define networkGetDHCPLeasesForMAC > > src/libvirt.c: > * Implement virNetworkGetDHCPLeases > * Implement virNetworkGetDHCPLeasesForMAC > * Implement virNetworkDHCPLeaseFree > > src/libvirt_public.syms: > * Export the new symbols > > --- > include/libvirt/libvirt.h.in | 34 ++++++++ > src/driver.h | 13 ++++ > src/libvirt.c | 179 +++++++++++++++++++++++++++++++++++++++++++ > src/libvirt_public.syms | 3 + > 4 files changed, 229 insertions(+) ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list