From b93f2462a3dc6cc00810ed28b87a5c05516c0921 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Mon, 4 Jun 2012 13:45:02 +0300 Subject: inet: Create helper function for IP address checking Create a helper function that checks if a given hostname is an IPv4 or IPv6 address. If it is, AF_INET or AF_INET6 is returned. On error the negative error value from getaddrinfo is returned. --- include/inet.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/inet.h b/include/inet.h index aa675737..8b9b390a 100644 --- a/include/inet.h +++ b/include/inet.h @@ -80,6 +80,7 @@ int connman_inet_setup_tunnel(char *tunnel, int mtu); int connman_inet_create_tunnel(char **iface); 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); #ifdef __cplusplus -- cgit v1.2.3