ares_ipv6.h
Go to the documentation of this file.
1 
2 /* Copyright (C) 2005 by Dominick Meglio
3  *
4  * Permission to use, copy, modify, and distribute this
5  * software and its documentation for any purpose and without
6  * fee is hereby granted, provided that the above copyright
7  * notice appear in all copies and that both that copyright
8  * notice and this permission notice appear in supporting
9  * documentation, and that the name of M.I.T. not be used in
10  * advertising or publicity pertaining to distribution of the
11  * software without specific, written prior permission.
12  * M.I.T. makes no representations about the suitability of
13  * this software for any purpose. It is provided "as is"
14  * without express or implied warranty.
15  */
16 
17 #ifndef ARES_IPV6_H
18 #define ARES_IPV6_H
19 
20 #ifndef HAVE_PF_INET6
21 #define PF_INET6 AF_INET6
22 #endif
23 
24 #ifndef HAVE_STRUCT_SOCKADDR_IN6
26 {
27  unsigned short sin6_family;
28  unsigned short sin6_port;
29  unsigned long sin6_flowinfo;
31  unsigned int sin6_scope_id;
32 };
33 #endif
34 
35 typedef union
36 {
37  struct sockaddr sa;
38  struct sockaddr_in sa4;
39  struct sockaddr_in6 sa6;
41 
42 #ifndef HAVE_STRUCT_ADDRINFO
43 struct addrinfo
44 {
45  int ai_flags;
46  int ai_family;
49  ares_socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */
50  char *ai_canonname;
51  struct sockaddr *ai_addr;
52  struct addrinfo *ai_next;
53 };
54 #endif
55 
56 #ifndef NS_IN6ADDRSZ
57 #ifndef HAVE_STRUCT_IN6_ADDR
58 /* We cannot have it set to zero, so we pick a fixed value here */
59 #define NS_IN6ADDRSZ 16
60 #else
61 #define NS_IN6ADDRSZ sizeof(struct in6_addr)
62 #endif
63 #endif
64 
65 #ifndef NS_INADDRSZ
66 #define NS_INADDRSZ sizeof(struct in_addr)
67 #endif
68 
69 #ifndef NS_INT16SZ
70 #define NS_INT16SZ 2
71 #endif
72 
73 #ifndef IF_NAMESIZE
74 #ifdef IFNAMSIZ
75 #define IF_NAMESIZE IFNAMSIZ
76 #else
77 #define IF_NAMESIZE 256
78 #endif
79 #endif
80 
81 /* Defined in inet_net_pton.c for no particular reason. */
82 extern const struct ares_in6_addr ares_in6addr_any; /* :: */
83 
84 
85 #endif /* ARES_IPV6_H */
addrinfo::ai_addrlen
ares_socklen_t ai_addrlen
Definition: ares_ipv6.h:49
sockaddr_in6::sin6_flowinfo
unsigned long sin6_flowinfo
Definition: ares_ipv6.h:29
sockaddr_in6
Definition: ares_ipv6.h:25
sockaddr_in6::sin6_port
unsigned short sin6_port
Definition: ares_ipv6.h:28
addrinfo::ai_canonname
char * ai_canonname
Definition: ares_ipv6.h:50
ares_in6addr_any
const struct ares_in6_addr ares_in6addr_any
Definition: inet_net_pton.c:36
ares_sockaddr
Definition: ares_ipv6.h:35
addrinfo::ai_addr
struct sockaddr * ai_addr
Definition: ares_ipv6.h:51
sockaddr_in6::sin6_family
unsigned short sin6_family
Definition: ares_ipv6.h:27
addrinfo::ai_family
int ai_family
Definition: ares_ipv6.h:46
addrinfo::ai_protocol
int ai_protocol
Definition: ares_ipv6.h:48
addrinfo::ai_next
struct addrinfo * ai_next
Definition: ares_ipv6.h:52
ares_in6_addr
Definition: ares.h:514
addrinfo::ai_socktype
int ai_socktype
Definition: ares_ipv6.h:47
addrinfo::ai_flags
int ai_flags
Definition: ares_ipv6.h:45
sockaddr_in6::sin6_addr
struct ares_in6_addr sin6_addr
Definition: ares_ipv6.h:30
addrinfo
Definition: ares_ipv6.h:43
sockaddr_in6::sin6_scope_id
unsigned int sin6_scope_id
Definition: ares_ipv6.h:31


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:43