Make clear that virNetDevClearIPv4Address can also handle IPv6
addresses by changing the name
---
src/libvirt_private.syms | 2 +-
src/util/virnetdev.c | 14 +++++++-------
src/util/virnetdev.h | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 72f84e4..238ab7c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1598,7 +1598,7 @@ virMacAddrSetRaw;
# util/virnetdev.h
virNetDevAddRoute;
-virNetDevClearIPv4Address;
+virNetDevClearIPAddress;
virNetDevExists;
virNetDevGetIndex;
virNetDevGetIPv4Address;
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 0cc7fdd..553e8fc 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -1016,7 +1016,7 @@ virNetDevAddRoute(const char *ifname,
}
/**
- * virNetDevClearIPv4Address:
+ * virNetDevClearIPAddress:
* @ifname: the interface name
* @addr: the IP address (IPv4 or IPv6)
* @prefix: number of 1 bits in the netmask
@@ -1025,9 +1025,9 @@ virNetDevAddRoute(const char *ifname,
*
* Returns 0 in case of success or -1 in case of error.
*/
-int virNetDevClearIPv4Address(const char *ifname,
- virSocketAddr *addr,
- unsigned int prefix)
+int virNetDevClearIPAddress(const char *ifname,
+ virSocketAddr *addr,
+ unsigned int prefix)
{
int ret = -1;
struct nl_msg *nlmsg = NULL;
@@ -1139,9 +1139,9 @@ virNetDevAddRoute(const char *ifname,
return ret;
}
-int virNetDevClearIPv4Address(const char *ifname,
- virSocketAddr *addr,
- unsigned int prefix)
+int virNetDevClearIPAddress(const char *ifname,
+ virSocketAddr *addr,
+ unsigned int prefix)
{
virCommandPtr cmd = NULL;
char *addrstr;
diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index e1087a4..4dd7b79 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -98,9 +98,9 @@ int virNetDevAddRoute(const char *ifname,
unsigned int metric)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_RETURN_CHECK;
-int virNetDevClearIPv4Address(const char *ifname,
- virSocketAddr *addr,
- unsigned int prefix)
+int virNetDevClearIPAddress(const char *ifname,
+ virSocketAddr *addr,
+ unsigned int prefix)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
int virNetDevGetIPv4Address(const char *ifname, virSocketAddrPtr addr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
--
1.8.4.5