---
 include/inet.h |  1 +
 src/inet.c     | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/include/inet.h b/include/inet.h
index 8b9b390..6bdcc91 100644
--- a/include/inet.h
+++ b/include/inet.h
@@ -82,6 +82,7 @@ int connman_inet_get_dest_addr(int index, char **dest);
 int connman_inet_ipv6_get_dest_addr(int index, char **dest);
 int connman_inet_check_ipaddress(const char *host);
 connman_bool_t connman_inet_check_hostname(const char *ptr, size_t len);
+connman_bool_t connman_inet_is_ipv6_supported();
 
 #ifdef __cplusplus
 }
diff --git a/src/inet.c b/src/inet.c
index 226e505..2dcb63c 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -2473,3 +2473,15 @@ error:
        free(ifr);
        return NULL;
 }
+
+connman_bool_t connman_inet_is_ipv6_supported()
+{
+       int sk;
+
+       sk = socket(PF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+       if (sk < 0)
+               return FALSE;
+
+       close(sk);
+       return TRUE;
+}
-- 
1.7.11.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to