mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Renamed virNetDevSetIPv4Address to virNetDevSetIPAddress
Renamed virNetDevSetIPv4Address as it also handles IPv6 addresses.
This commit is contained in:
parent
4dc04d3ab4
commit
2b0598c836
@ -1643,7 +1643,7 @@ virNetDevRxFilterFree;
|
||||
virNetDevRxFilterModeTypeFromString;
|
||||
virNetDevRxFilterModeTypeToString;
|
||||
virNetDevRxFilterNew;
|
||||
virNetDevSetIPv4Address;
|
||||
virNetDevSetIPAddress;
|
||||
virNetDevSetMAC;
|
||||
virNetDevSetMTU;
|
||||
virNetDevSetMTUFromDevice;
|
||||
|
@ -1899,8 +1899,8 @@ networkAddAddrToBridge(virNetworkObjPtr network,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virNetDevSetIPv4Address(network->def->bridge,
|
||||
&ipdef->address, prefix) < 0)
|
||||
if (virNetDevSetIPAddress(network->def->bridge,
|
||||
&ipdef->address, prefix) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -907,7 +907,7 @@ virNetDevCreateNetlinkAddressMessage(int messageType,
|
||||
}
|
||||
|
||||
/**
|
||||
* virNetDevSetIPv4Address:
|
||||
* virNetDevSetIPAddress:
|
||||
* @ifname: the interface name
|
||||
* @addr: the IP address (IPv4 or IPv6)
|
||||
* @prefix: number of 1 bits in the netmask
|
||||
@ -918,9 +918,9 @@ virNetDevCreateNetlinkAddressMessage(int messageType,
|
||||
*
|
||||
* Returns 0 in case of success or -1 in case of error.
|
||||
*/
|
||||
int virNetDevSetIPv4Address(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix)
|
||||
int virNetDevSetIPAddress(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix)
|
||||
{
|
||||
virSocketAddr *broadcast = NULL;
|
||||
int ret = -1;
|
||||
@ -965,9 +965,9 @@ int virNetDevSetIPv4Address(const char *ifname,
|
||||
|
||||
#else /* defined(__linux__) && defined(HAVE_LIBNL) */
|
||||
|
||||
int virNetDevSetIPv4Address(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix)
|
||||
int virNetDevSetIPAddress(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix)
|
||||
{
|
||||
virCommandPtr cmd = NULL;
|
||||
char *addrstr = NULL, *bcaststr = NULL;
|
||||
|
@ -87,9 +87,9 @@ int virNetDevIsOnline(const char *ifname,
|
||||
bool *online)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
int virNetDevSetIPv4Address(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix)
|
||||
int virNetDevSetIPAddress(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
int virNetDevAddRoute(const char *ifname,
|
||||
virSocketAddrPtr addr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user