1 | #ifndef INET6DEF_H 2 | #define INET6DEF_H 3 | 4 | /* on some machines the AF_INET6 definition is needed, on most systems not */ 5 | #include <sys/socket.h> 6 | #include <netinet/in.h> 7 | 8 | #ifndef INET_ADDRSTRLEN 9 | #define INET_ADDRSTRLEN 16 10 | #endif 11 | 12 | #ifndef INET6_ADDRSTRLEN 13 | #define INET6_ADDRSTRLEN 46 14 | #endif 15 | 16 | #ifndef AF_INET6 17 | #define AF_INET6 24 /* Internet Protocol version 6 */ 18 | #endif 19 | 20 | int inet_pton(int af, const char *src, void *dst); 21 | const char *inet_ntop(int af, const void *src, char *dst, size_t size); 22 | 23 | 24 | #endif /* INET6DEF_H */