This function is not used so can be removed.
---
vpn/vpn-ipconfig.c | 23 -----------------------
vpn/vpn.h | 1 -
2 files changed, 24 deletions(-)
diff --git a/vpn/vpn-ipconfig.c b/vpn/vpn-ipconfig.c
index c3e6145..5a4ebc8 100644
--- a/vpn/vpn-ipconfig.c
+++ b/vpn/vpn-ipconfig.c
@@ -69,29 +69,6 @@ struct vpn_ipdevice {
static GHashTable *ipdevice_hash = NULL;
-unsigned char __vpn_ipconfig_netmask_prefix_len(const char *netmask)
-{
- unsigned char bits;
- in_addr_t mask;
- in_addr_t host;
-
- if (!netmask)
- return 32;
-
- mask = inet_network(netmask);
- host = ~mask;
-
- /* a valid netmask must be 2^n - 1 */
- if ((host & (host + 1)) != 0)
- return -1;
-
- bits = 0;
- for (; mask; mask <<= 1)
- ++bits;
-
- return bits;
-}
-
const char *__vpn_ipconfig_get_peer(struct vpn_ipconfig *ipconfig)
{
if (!ipconfig->address)
diff --git a/vpn/vpn.h b/vpn/vpn.h
index 3fca03c..b75550e 100644
--- a/vpn/vpn.h
+++ b/vpn/vpn.h
@@ -32,7 +32,6 @@ void __vpn_manager_cleanup(void);
struct vpn_ipconfig;
-unsigned char __vpn_ipconfig_netmask_prefix_len(const char *netmask);
unsigned short __vpn_ipconfig_get_type_from_index(int index);
unsigned int __vpn_ipconfig_get_flags_from_index(int index);
void __vpn_ipconfig_foreach(void (*function) (int index,
--
1.8.3.1
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman