summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-09-24 11:44:30 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-25 13:55:19 (GMT)
commit37f818606d6fc7defaa98fb5a611bcdbc798368a (patch)
treee5dc871ead1bdd12927c01924fcd0bd6ebc91abd /src/inet.c
parentd2da5cb4ba0f91e6e4cf7814c7ffaa420bef2675 (diff)
downloadconnman-37f818606d6fc7defaa98fb5a611bcdbc798368a.zip
connman-37f818606d6fc7defaa98fb5a611bcdbc798368a.tar.gz
connman-37f818606d6fc7defaa98fb5a611bcdbc798368a.tar.bz2
inet: Add function to check if IPv6 is supported by kernel
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c12
1 files changed, 12 insertions, 0 deletions
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;
+}