about summary refs log tree commit diff
path: root/src/NetworkManagerUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/NetworkManagerUtils.c')
-rw-r--r--src/NetworkManagerUtils.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
index f2d72bd1..2f369d68 100644
--- a/src/NetworkManagerUtils.c
+++ b/src/NetworkManagerUtils.c
@@ -99,60 +99,6 @@ nm_spawn_process (const char *args)
 	return status;
 }
 
-/*
- * nm_utils_ip4_netmask_to_prefix
- *
- * Figure out the network prefix from a netmask.  Netmask
- * MUST be in network byte order.
- *
- */
-guint32
-nm_utils_ip4_netmask_to_prefix (guint32 netmask)
-{
-	guchar *p, *end;
-	guint32 prefix = 0;
-
-	p = (guchar *) &netmask;
-	end = p + sizeof (guint32);
-
-	while ((*p == 0xFF) && p < end) {
-		prefix += 8;
-		p++;
-	}
-
-	if (p < end) {
-		guchar v = *p;
-
-		while (v) {
-			prefix++;
-			v <<= 1;
-		}
-	}
-
-	return prefix;
-}
-
-/*
- * nm_utils_ip4_prefix_to_netmask
- *
- * Figure out the netmask from a prefix.
- *
- */
-guint32
-nm_utils_ip4_prefix_to_netmask (guint32 prefix)
-{
-	guint32 msk = 0x80000000;
-	guint32 netmask = 0;
-
-	while (prefix > 0) {
-		netmask |= msk;
-		msk >>= 1;
-		prefix--;
-	}
-
-	return (guint32) htonl (netmask);
-}
-
 void
 nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting)
 {