summary refs log tree commit diff
path: root/src/NetworkManagerUtils.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2014-04-26 20:55:09 +0200
committerSjoerd Simons <sjoerd@luon.net>2014-04-26 20:55:09 +0200
commit59c3714a494c3b3765657c0551ad82842d98a7d2 (patch)
treee4dcdf9791fc40581f02bfaf870c30b102b3133a /src/NetworkManagerUtils.c
parenta4256940da049f91bbbea5e53e469a59ea9c10f7 (diff)
Imported Upstream version 0.9.8.10 upstream/0.9.8.10
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)
 {