diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-04 13:45:02 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-14 15:05:55 +0300 |
commit | b93f2462a3dc6cc00810ed28b87a5c05516c0921 (patch) | |
tree | 4c79fa22d5976691536906976272f6e948162d65 /include | |
parent | 23da213b31cac162597b73438885ca756d11bafd (diff) | |
download | connman-b93f2462a3dc6cc00810ed28b87a5c05516c0921.tar.gz connman-b93f2462a3dc6cc00810ed28b87a5c05516c0921.tar.bz2 connman-b93f2462a3dc6cc00810ed28b87a5c05516c0921.zip |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/inet.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 |