]> git.ipfire.org Git - thirdparty/libvirt.git/commit
New virNetworkDef utility functions
authorLaine Stump <laine@laine.org>
Fri, 26 Nov 2010 22:20:37 +0000 (17:20 -0500)
committerLaine Stump <laine@laine.org>
Thu, 23 Dec 2010 20:52:20 +0000 (15:52 -0500)
commit8322863fd59b8d5a6d13d9bfef0538d05e3f919f
treeca7f60e02dbf9e4fd6634199993f1acaafa9c0d4
parent1ab80f32dd38462ef596c2af6b6d128a263ab0e5
New virNetworkDef utility functions

Later patches will add the possibility to define a network's netmask
as a prefix (0-32, or 0-128 in the case of IPv6). To make it easier to
deal with definition of both kinds (prefix or netmask), add two new
functions:

virNetworkDefNetmask: return a copy of the netmask into a
virSocketAddr. If no netmask was specified in the XML, create a
default netmask based on the network class of the virNetworkDef's IP
address.

virNetworkDefPrefix: return the netmask as numeric prefix (or the
default prefix for the network class of the virNetworkDef's IP
address, if no netmask was specified in the XML)
src/conf/network_conf.c
src/conf/network_conf.h
src/libvirt_private.syms