1 #ifndef ACL_SANE_INET_INCLUDE_H 2 #define ACL_SANE_INET_INCLUDE_H 8 #include "../stdlib/acl_define.h" 11 #include <netinet/in.h> 16 struct sockaddr_storage ss;
18 struct sockaddr_in6 in6;
20 struct sockaddr_in in;
22 struct sockaddr_un un;
36 ACL_API
size_t acl_inet_ntop(
const struct sockaddr *sa,
char *buf,
size_t size);
47 ACL_API
size_t acl_inet_pton(
int af,
const char *src,
struct sockaddr *dst);
58 ACL_API
size_t acl_sane_pton(
const char *src,
struct sockaddr *dst);
67 ACL_API
const char *
acl_inet_ntop4(
const unsigned char *src,
char *dst,
size_t size);
76 ACL_API
const char *
acl_inet_ntoa(
const struct in_addr in,
char *dst,
size_t size);
79 ACL_API
const char *acl_inet6_ntoa(
const struct in6_addr in6,
char *buf,
size_t size);
ACL_API int acl_is_ip(const char *ip)
ACL_API int acl_is_ipv6(const char *ip)
ACL_API int acl_ipv4_addr_valid(const char *addr)
ACL_API const char * acl_inet_ntoa(const struct in_addr in, char *dst, size_t size)
ACL_API int acl_is_ipv4(const char *ip)
ACL_API size_t acl_inet_pton(int af, const char *src, struct sockaddr *dst)
ACL_API size_t acl_sane_pton(const char *src, struct sockaddr *dst)
ACL_API size_t acl_inet_ntop(const struct sockaddr *sa, char *buf, size_t size)
ACL_API const char * acl_inet_ntop4(const unsigned char *src, char *dst, size_t size)