[PATCHv5 03/18] Renamed virNetDevSetIPv4Address to virNetDevSetIPAddress

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Renamed virNetDevSetIPv4Address as it also handles IPv6 addresses.
---
 src/libvirt_private.syms    |  2 +-
 src/network/bridge_driver.c |  4 ++--
 src/util/virnetdev.c        | 14 +++++++-------
 src/util/virnetdev.h        |  6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 65862ec..98f773d 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1643,7 +1643,7 @@ virNetDevRxFilterFree;
 virNetDevRxFilterModeTypeFromString;
 virNetDevRxFilterModeTypeToString;
 virNetDevRxFilterNew;
-virNetDevSetIPv4Address;
+virNetDevSetIPAddress;
 virNetDevSetMAC;
 virNetDevSetMTU;
 virNetDevSetMTUFromDevice;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 29222d0..6055c71 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -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;
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 9dfaadc..26e5fa4 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -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;
diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index 2791b0d..14d6a79 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -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,
-- 
2.1.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]