ares_data.h
Go to the documentation of this file.
1 
2 /* Copyright (C) 2009-2013 by Daniel Stenberg
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 typedef enum {
18  ARES_DATATYPE_UNKNOWN = 1, /* unknown data type - introduced in 1.7.0 */
19  ARES_DATATYPE_SRV_REPLY, /* struct ares_srv_reply - introduced in 1.7.0 */
20  ARES_DATATYPE_TXT_REPLY, /* struct ares_txt_reply - introduced in 1.7.0 */
21  ARES_DATATYPE_TXT_EXT, /* struct ares_txt_ext - introduced in 1.11.0 */
22  ARES_DATATYPE_ADDR_NODE, /* struct ares_addr_node - introduced in 1.7.1 */
23  ARES_DATATYPE_MX_REPLY, /* struct ares_mx_reply - introduced in 1.7.2 */
24  ARES_DATATYPE_NAPTR_REPLY,/* struct ares_naptr_reply - introduced in 1.7.6 */
25  ARES_DATATYPE_SOA_REPLY, /* struct ares_soa_reply - introduced in 1.9.0 */
26 #if 0
27  ARES_DATATYPE_ADDR6TTL, /* struct ares_addrttl */
28  ARES_DATATYPE_ADDRTTL, /* struct ares_addr6ttl */
29  ARES_DATATYPE_HOSTENT, /* struct hostent */
30  ARES_DATATYPE_OPTIONS, /* struct ares_options */
31 #endif
32  ARES_DATATYPE_ADDR_PORT_NODE, /* struct ares_addr_port_node - introduced in 1.11.0 */
33  ARES_DATATYPE_CAA_REPLY, /* struct ares_caa_reply - introduced in 1.17 */
34  ARES_DATATYPE_LAST /* not used - introduced in 1.7.0 */
36 
37 #define ARES_DATATYPE_MARK 0xbead
38 
39 /*
40  * ares_data struct definition is internal to c-ares and shall not
41  * be exposed by the public API in order to allow future changes
42  * and extensions to it without breaking ABI. This will be used
43  * internally by c-ares as the container of multiple types of data
44  * dynamically allocated for which a reference will be returned
45  * to the calling application.
46  *
47  * c-ares API functions returning a pointer to c-ares internally
48  * allocated data will actually be returning an interior pointer
49  * into this ares_data struct.
50  *
51  * All this is 'invisible' to the calling application, the only
52  * requirement is that this kind of data must be free'ed by the
53  * calling application using ares_free_data() with the pointer
54  * it has received from a previous c-ares function call.
55  */
56 
57 struct ares_data {
58  ares_datatype type; /* Actual data type identifier. */
59  unsigned int mark; /* Private ares_data signature. */
60  union {
70  } data;
71 };
72 
74 
ares_data::addr_port_node
struct ares_addr_port_node addr_port_node
Definition: ares_data.h:65
ARES_DATATYPE_LAST
@ ARES_DATATYPE_LAST
Definition: ares_data.h:34
ARES_DATATYPE_UNKNOWN
@ ARES_DATATYPE_UNKNOWN
Definition: ares_data.h:18
ARES_DATATYPE_CAA_REPLY
@ ARES_DATATYPE_CAA_REPLY
Definition: ares_data.h:33
ares_data::srv_reply
struct ares_srv_reply srv_reply
Definition: ares_data.h:63
ares_addr_port_node
Definition: ares.h:704
ares_addr_node
Definition: ares.h:695
ares_caa_reply
Definition: ares.h:530
ares_srv_reply
Definition: ares.h:539
ARES_DATATYPE_TXT_REPLY
@ ARES_DATATYPE_TXT_REPLY
Definition: ares_data.h:20
ares_data::addr_node
struct ares_addr_node addr_node
Definition: ares_data.h:64
ares_txt_ext
Definition: ares.h:561
ares_txt_reply
Definition: ares.h:553
ares_soa_reply
Definition: ares.h:580
ARES_DATATYPE_NAPTR_REPLY
@ ARES_DATATYPE_NAPTR_REPLY
Definition: ares_data.h:24
ares_data::data
union ares_data::@384 data
ares_naptr_reply
Definition: ares.h:570
ares_data
Definition: ares_data.h:57
ARES_DATATYPE_MX_REPLY
@ ARES_DATATYPE_MX_REPLY
Definition: ares_data.h:23
ares_datatype
ares_datatype
Definition: ares_data.h:17
ares_data::txt_reply
struct ares_txt_reply txt_reply
Definition: ares_data.h:61
ARES_DATATYPE_ADDR_PORT_NODE
@ ARES_DATATYPE_ADDR_PORT_NODE
Definition: ares_data.h:32
ares_malloc_data
void * ares_malloc_data(ares_datatype type)
Definition: ares_data.c:153
ares_data::txt_ext
struct ares_txt_ext txt_ext
Definition: ares_data.h:62
ARES_DATATYPE_TXT_EXT
@ ARES_DATATYPE_TXT_EXT
Definition: ares_data.h:21
ares_mx_reply
Definition: ares.h:547
ares_data::type
ares_datatype type
Definition: ares_data.h:58
ares_data::soa_reply
struct ares_soa_reply soa_reply
Definition: ares_data.h:68
ares_data::naptr_reply
struct ares_naptr_reply naptr_reply
Definition: ares_data.h:67
ARES_DATATYPE_ADDR_NODE
@ ARES_DATATYPE_ADDR_NODE
Definition: ares_data.h:22
ares_data::caa_reply
struct ares_caa_reply caa_reply
Definition: ares_data.h:69
ares_data::mark
unsigned int mark
Definition: ares_data.h:59
ARES_DATATYPE_SRV_REPLY
@ ARES_DATATYPE_SRV_REPLY
Definition: ares_data.h:19
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
ares_data::mx_reply
struct ares_mx_reply mx_reply
Definition: ares_data.h:66
ARES_DATATYPE_SOA_REPLY
@ ARES_DATATYPE_SOA_REPLY
Definition: ares_data.h:25


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:32