3 /* Copyright (C) 2005 by Dominick Meglio
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for any purpose and without
7 * fee is hereby granted, provided that the above copyright
8 * notice appear in all copies and that both that copyright
9 * notice and this permission notice appear in supporting
10 * documentation, and that the name of M.I.T. not be used in
11 * advertising or publicity pertaining to distribution of the
12 * software without specific, written prior permission.
13 * M.I.T. makes no representations about the suitability of
14 * this software for any purpose. It is provided "as is"
15 * without express or implied warranty.
22 #define PF_INET6 AF_INET6
25 #if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr)
28 unsigned char _S6_u8[16];
31 #define s6_addr _S6_un._S6_u8
34 #ifndef HAVE_STRUCT_SOCKADDR_IN6
37 unsigned short sin6_family;
38 unsigned short sin6_port;
39 unsigned long sin6_flowinfo;
40 struct in6_addr sin6_addr;
41 unsigned int sin6_scope_id;
45 #ifndef HAVE_STRUCT_ADDRINFO
52 socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */
54 struct sockaddr *ai_addr;
55 struct addrinfo *ai_next;
60 #if SIZEOF_STRUCT_IN6_ADDR == 0
61 /* We cannot have it set to zero, so we pick a fixed value here */
62 #define NS_IN6ADDRSZ 16
64 #define NS_IN6ADDRSZ SIZEOF_STRUCT_IN6_ADDR
69 #define NS_INADDRSZ SIZEOF_STRUCT_IN_ADDR
78 #define IF_NAMESIZE IFNAMSIZ
80 #define IF_NAMESIZE 256
84 #endif /* ARES_IPV6_H */