getdns_extra.h
Go to the documentation of this file.
1 
8 /*
9  * Copyright (c) 2013, NLNet Labs, Verisign, Inc.
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are met:
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * * Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in the
18  * documentation and/or other materials provided with the distribution.
19  * * Neither the names of the copyright holders nor the
20  * names of its contributors may be used to endorse or promote products
21  * derived from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
27  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 #ifndef _GETDNS_EXTRA_H_
36 #define _GETDNS_EXTRA_H_
37 
38 #include <getdns/getdns.h>
39 #include <stdarg.h>
40 #include <stdio.h>
41 #if defined(_WIN32)
42 /* For struct timeval, see getdns_context_get_num_pending_requests */
43 #include <winsock2.h>
44 #else
45 #include <sys/time.h>
46 #endif
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
60 #define GETDNS_RETURN_IO_ERROR ((getdns_return_t) 397 )
61 #define GETDNS_RETURN_IO_ERROR_TEXT "An input/output error occurred. Inspect errno for details."
62 #define GETDNS_RETURN_NO_UPSTREAM_AVAILABLE ((getdns_return_t) 398 )
63 #define GETDNS_RETURN_NO_UPSTREAM_AVAILABLE_TEXT "None of the configured upstreams could be used to send queries on the specified transports"
64 #define GETDNS_RETURN_NEED_MORE_SPACE ((getdns_return_t) 399 )
65 #define GETDNS_RETURN_NEED_MORE_SPACE_TEXT "The buffer was too small"
74 #define GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION 618
75 #define GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION_TEXT "Change related to getdns_context_set_tls_authentication"
76 #define GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE 619
77 #define GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE_TEXT "Change related to getdns_context_set_edns_client_subnet_private"
78 #define GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE 620
79 #define GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE_TEXT "Change related to getdns_context_set_tls_query_padding_blocksize"
80 #define GETDNS_CONTEXT_CODE_PUBKEY_PINSET 621
81 #define GETDNS_CONTEXT_CODE_PUBKEY_PINSET_TEXT "Change related to getdns_context_set_pubkey_pinset"
82 #define GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS 622
83 #define GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS_TEXT "Change related to getdns_context_set_round_robin_upstreams"
84 #define GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME 623
85 #define GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME_TEXT "Change related to getdns_context_set_tls_backoff_time"
86 #define GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES 624
87 #define GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES_TEXT "Change related to getdns_context_set_tls_connection_retries"
88 
89 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL 625
90 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL_TEXT "Change related to getdns_context_set_trust_anchors_url"
91 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA 626
92 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA_TEXT "Change related to getdns_context_set_trust_anchors_verify_ca"
93 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL 627
94 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL_TEXT "Change related to getdns_context_set_trust_anchors_verify_email"
95 #define GETDNS_CONTEXT_CODE_APPDATA_DIR 628
96 #define GETDNS_CONTEXT_CODE_APPDATA_DIR_TEXT "Change related to getdns_context_set_appdata_dir"
97 #define GETDNS_CONTEXT_CODE_RESOLVCONF 629
98 #define GETDNS_CONTEXT_CODE_RESOLVCONF_TEXT "Change related to getdns_context_set_resolvconf"
99 #define GETDNS_CONTEXT_CODE_HOSTS 630
100 #define GETDNS_CONTEXT_CODE_HOSTS_TEXT "Change related to getdns_context_set_hosts"
101 #define GETDNS_CONTEXT_CODE_TLS_CA_PATH 631
102 #define GETDNS_CONTEXT_CODE_TLS_CA_PATH_TEXT "Change related to getdns_context_set_tls_ca_path"
103 #define GETDNS_CONTEXT_CODE_TLS_CA_FILE 632
104 #define GETDNS_CONTEXT_CODE_TLS_CA_FILE_TEXT "Change related to getdns_context_set_tls_ca_file"
105 #define GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST 633
106 #define GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST_TEXT "Change related to getdns_context_set_tls_cipher_list"
107 #define GETDNS_CONTEXT_CODE_TLS_CURVES_LIST 634
108 #define GETDNS_CONTEXT_CODE_TLS_CURVES_LIST_TEXT "Change related to getdns_context_set_tls_curves_list"
109 #define GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES 635
110 #define GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES_TEXT "Change related to getdns_context_set_tls_ciphersuites"
111 #define GETDNS_CONTEXT_CODE_TLS_MIN_VERSION 636
112 #define GETDNS_CONTEXT_CODE_TLS_MIN_VERSION_TEXT "Change related to getdns_context_set_tls_min_version"
113 #define GETDNS_CONTEXT_CODE_TLS_MAX_VERSION 637
114 #define GETDNS_CONTEXT_CODE_TLS_MAX_VERSION_TEXT "Change related to getdns_context_set_tls_max_version"
115 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME 638
116 #define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME_TEXT "Change related to getdns_context_set_trust_anchors_backoff_time"
117 
118 
127 #define GETDNS_VERSION "1.7.0-rc.1"
128 #define GETDNS_NUMERIC_VERSION 0x010600C1
129 #define GETDNS_API_VERSION "December 2015"
130 #define GETDNS_API_NUMERIC_VERSION 0x07df0c00
135 /* an alias for REQUIRED */
136 #define GETDNS_AUTHENTICATION_HOSTNAME GETDNS_AUTHENTICATION_REQUIRED
137 
142 /* Authentication options used when doing TLS */
147 
148 #define GETDNS_AUTHENTICATION_NONE_TEXT "See getdns_context_set_tls_authentication()"
149 #define GETDNS_AUTHENTICATION_REQUIRED_TEXT "See getdns_context_set_tls_authentication()"
158 #define GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST ((getdns_append_name_t) 554 )
159 #define GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST_TEXT "See getdns_context_set_append_name()"
174 #define GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN 544
175 #define GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN_TEXT "See getdns_context_set_dns_transport()"
176 #define GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN 545
177 #define GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT "See getdns_context_set_dns_transport()"
178 
202 typedef void (*getdns_eventloop_callback)(void *userarg);
203 
204 
220  void *userarg;
221 
227 
233 
239 
244  void *ev;
245 };
246 
248 
256 typedef struct getdns_eventloop {
263 
271 
290  int fd, uint64_t timeout, getdns_eventloop_event *ev);
291 
306 
319 typedef void (*getdns_eventloop_run_once)(getdns_eventloop *loop,int blocking);
320 
331 
336 
341 
347 
353 };
354 
369  getdns_eventloop *eventloop);
370 
385  getdns_eventloop **eventloop);
386 
396 void
423  void (*value) (getdns_context *, getdns_context_code_t, void *));
424 
433  getdns_context *context, int enabled);
434 
453 
466 
481 
495 
509 
526 
542 
554 
555 
556 typedef enum getdns_loglevel_type {
564  GETDNS_LOG_DEBUG = 7
566 
567 #define GETDNS_LOG_EMERG_TEXT "System is unusable"
568 #define GETDNS_LOG_ALERT_TEXT "Action must be taken immediately"
569 #define GETDNS_LOG_CRIT_TEXT "Critical conditions"
570 #define GETDNS_LOG_ERR_TEXT "Error conditions"
571 #define GETDNS_LOG_WARNING_TEXT "Warning conditions"
572 #define GETDNS_LOG_NOTICE_TEXT "Normal, but significant, condition"
573 #define GETDNS_LOG_INFO_TEXT "Informational message"
574 #define GETDNS_LOG_DEBUG_TEXT "Debug-level message"
575 
576 #define GETDNS_LOG_UPSTREAM_STATS 0x3000
577 #define GETDNS_LOG_UPSTREAM_STATS_TEXT "Log messages about upstream statistics"
578 #define GETDNS_LOG_SYS_STUB 0x2000
579 #define GETDNS_LOG_SYS_STUB_TEXT "Log messages about stub resolving"
580 #define GETDNS_LOG_SYS_RECURSING 0x4000
581 #define GETDNS_LOG_SYS_RECURSING_TEXT "Log messages about recursive resolving"
582 #define GETDNS_LOG_SYS_RESOLVING 0x6000
583 #define GETDNS_LOG_SYS_RESOLVING_TEXT "Log messages about resolving"
584 #define GETDNS_LOG_SYS_ANCHOR 0x8000
585 #define GETDNS_LOG_SYS_ANCHOR_TEXT "Log messages about fetching trust anchors"
586 
587 
588 
589 typedef void (*getdns_logfunc_type) (void *userarg, uint64_t log_systems,
590  getdns_loglevel_type, const char *, va_list ap);
591 
616  uint64_t system, getdns_loglevel_type level, getdns_logfunc_type func);
617 
635  getdns_context *context, const char *appdata_dir);
636 
689 
710  getdns_context *context, const char *verify_CA);
711 
730  getdns_context *context, const char *verify_email);
731 
746  getdns_context *context, uint64_t value);
747 
758 getdns_context_set_resolvconf(getdns_context *context, const char *resolvconf);
759 
770 getdns_context_set_hosts(getdns_context *context, const char *hosts);
771 
783 getdns_context_set_tls_ca_path(getdns_context *context, const char *tls_ca_path);
784 
795 getdns_context_set_tls_ca_file(getdns_context *context, const char *tls_ca_file);
796 
807  getdns_context *context, const char *cipher_list);
808 
819  getdns_context *context, const char *ciphersuites);
820 
832  getdns_context *context, const char *curves_list);
833 
834 typedef enum getdns_tls_version_t {
835  GETDNS_SSL3 = 1400,
836  GETDNS_TLS1 = 1401,
839  GETDNS_TLS1_3 = 1404
841 
842 #define GETDNS_SSL3_TEXT "See getdns_context_(set|get)_tls_(min|max)_version()"
843 #define GETDNS_TLS1_TEXT "See getdns_context_(set|get)_tls_(min|max)_version()"
844 #define GETDNS_TLS1_1_TEXT "See getdns_context_(set|get)_tls_(min|max)_version()"
845 #define GETDNS_TLS1_2_TEXT "See getdns_context_(set|get)_tls_(min|max)_version()"
846 #define GETDNS_TLS1_3_TEXT "See getdns_context_(set|get)_tls_(min|max)_version()"
847 
861  getdns_context *context, getdns_tls_version_t min_version);
862 
876  const getdns_context *context, getdns_tls_version_t *min_version);
877 
891  getdns_context *context, getdns_tls_version_t max_version);
892 
906  const getdns_context *context, getdns_tls_version_t *max_version);
907 
920  getdns_resolution_t *value);
921 
935  size_t *namespace_count, getdns_namespace_t **namespaces);
936 
949  getdns_transport_t *value);
950 
965  size_t *transport_count, getdns_transport_list_t **transports);
966 
977  uint16_t *limit);
978 
990 getdns_context_get_timeout(const getdns_context *context, uint64_t *timeout);
991 
1005  const getdns_context *context, uint64_t *timeout);
1006 
1021  uint32_t *value);
1022 
1034  getdns_redirects_t *value);
1035 
1052  getdns_list **addresses);
1053 
1070  getdns_append_name_t *value);
1071 
1087 
1102  getdns_list **value);
1103 
1116  uint32_t *value);
1117 
1133  getdns_list **upstream_list);
1134 
1148  uint16_t *value);
1149 
1160  uint8_t *value);
1161 
1171 getdns_context_get_edns_version(const getdns_context *context, uint8_t *value);
1172 
1183 getdns_context_get_edns_do_bit(const getdns_context *context, uint8_t *value);
1184 
1197  uint8_t *value);
1198 
1210  const getdns_context *context, uint16_t *value);
1211 
1230 
1242  uint8_t *value);
1243 
1257  uint16_t *value);
1258 
1272  uint16_t *value);
1273 
1290  void **userarg,
1291  void (**value) (getdns_context *, getdns_context_code_t, void *));
1292 
1293 
1344  const getdns_context *context, const char **url);
1345 
1363  const getdns_context *context, const char **verify_CA);
1364 
1380  const getdns_context *context, const char **verify_email);
1381 
1394  const getdns_context *context, uint64_t *value);
1395 
1408  const getdns_context *context, const char **resolvconf);
1409 
1422  const getdns_context *context, const char **hosts);
1423 
1437  const getdns_context *context, const char **tls_ca_path);
1438 
1451  const getdns_context *context, const char **tls_ca_file);
1452 
1463  const getdns_context *context, const char **cipher_list);
1464 
1476  const getdns_context *context, const char **ciphersuites);
1477 
1491  const getdns_context *context, const char **curves_list);
1492 
1507 const char *getdns_get_version(void);
1508 
1518 
1525 const char *getdns_get_api_version(void);
1526 
1537 
1553 const char *getdns_get_errorstr_by_id(uint16_t err);
1554 
1580  getdns_dict *dict, const char *name, const char *value);
1581 
1594  const getdns_dict * dict, const char *name, char **result);
1595 
1636  const getdns_list *support_records,
1637  const getdns_list *trust_anchors,
1638  time_t validation_time, uint32_t skew);
1639 
1640 
1681  const getdns_context *context,
1682  const char *str);
1683 
1684 
1699  const getdns_list *pinset,
1700  getdns_list *errorlist);
1701 
1745 getdns_context_config(getdns_context *context, const getdns_dict *config_dict);
1746 
1747 
1748 
1767 int
1768 getdns_pretty_snprint_dict(char *str, size_t size, const getdns_dict *dict);
1769 
1779 char *
1780 getdns_print_json_dict(const getdns_dict *some_dict, int pretty);
1781 
1796 int
1798  char *str, size_t size, const getdns_dict *dict, int pretty);
1799 
1813 char *
1815 
1826 int
1827 getdns_pretty_snprint_list(char *str, size_t size, const getdns_list *list);
1828 
1838 char *
1839 getdns_print_json_list(const getdns_list *some_list, int pretty);
1840 
1855 int
1857  char *str, size_t size, const getdns_list *list, int pretty);
1858 
1859 
1878  const getdns_dict *rr_dict, uint8_t **wire, size_t *wire_sz);
1879 
1895  const getdns_dict *rr_dict, uint8_t *wire, size_t *wire_sz);
1896 
1916  const getdns_dict *rr_dict, uint8_t **wire, int *wire_sz);
1917 
1918 
1929  const uint8_t *wire, size_t wire_sz, getdns_dict **rr_dict);
1930 
1942  const uint8_t *wire, size_t *wire_sz, getdns_dict **rr_dict);
1943 
1958  const uint8_t **wire, size_t *wire_sz, getdns_dict **rr_dict);
1959 
1960 
1970  const getdns_dict *rr_dict, char **str);
1971 
1987  const getdns_dict *rr_dict, char *str, size_t *str_len);
1988 
2008  const getdns_dict *rr_dict, char **str, int *str_len);
2009 
2010 
2022  const char *str, getdns_dict **rr_dict,
2023  const char *origin, uint32_t default_ttl);
2024 
2036  FILE *in, getdns_list **rr_list,
2037  const char *origin, uint32_t default_ttl);
2038 
2049  const getdns_dict *msg_dict, uint8_t **wire, size_t *wire_sz);
2050 
2066  const getdns_dict *msg_dict, uint8_t *wire, size_t *wire_sz);
2067 
2087  const getdns_dict *msg_dict, uint8_t **wire, int *wire_sz);
2088 
2089 
2100  const uint8_t *wire, size_t wire_sz, getdns_dict **msg_dict);
2101 
2113  const uint8_t *wire, size_t *wire_sz, getdns_dict **msg_dict);
2114 
2129  const uint8_t **wire, size_t *wire_sz, getdns_dict **msg_dict);
2130 
2131 
2141  const getdns_dict *msg_dict, char **str);
2142 
2158  const getdns_dict *msg_dict, char *str, size_t *str_len);
2159 
2179  const getdns_dict *msg_dict, char **str, int *str_len);
2180 
2212 getdns_str2dict(const char *str, getdns_dict **dict);
2213 
2223 getdns_str2list(const char *str, getdns_list **list);
2224 
2262 getdns_str2bindata(const char *str, getdns_bindata **bindata);
2263 
2276 getdns_str2int(const char *str, uint32_t *value);
2277 
2278 
2291  getdns_context *context,
2292  getdns_callback_type_t callback_type,
2293  getdns_dict *request,
2294  void *userarg,
2295  getdns_transaction_t request_id
2296 );
2297 
2327  getdns_context *context, const getdns_list *listen_addresses,
2328  void *userarg, getdns_request_handler_t handler);
2329 
2348  const getdns_dict *reply, getdns_transaction_t request_id);
2349 
2350 
2365 getdns_return_t getdns_strerror(getdns_return_t err, char *buf, size_t buflen);
2366 
2373 
2381  struct timeval *next_timeout);
2382 
2393 
2407  int use_threads);
2408 
2413 #ifdef __cplusplus
2414 }
2415 #endif
2416 
2417 #endif
2418 
Public interfaces to getdns, include in your application to use getdns API.
getdns_return_t getdns_msg_dict2str_buf(const getdns_dict *msg_dict, char *str, size_t *str_len)
getdns_return_t getdns_wire2msg_dict_buf(const uint8_t *wire, size_t *wire_sz, getdns_dict **msg_dict)
getdns_return_t getdns_msg_dict2str_scan(const getdns_dict *msg_dict, char **str, int *str_len)
getdns_return_t getdns_wire2rr_dict_scan(const uint8_t **wire, size_t *wire_sz, getdns_dict **rr_dict)
getdns_return_t getdns_wire2rr_dict_buf(const uint8_t *wire, size_t *wire_sz, getdns_dict **rr_dict)
getdns_return_t getdns_rr_dict2str_buf(const getdns_dict *rr_dict, char *str, size_t *str_len)
getdns_return_t getdns_wire2msg_dict(const uint8_t *wire, size_t wire_sz, getdns_dict **msg_dict)
getdns_return_t getdns_msg_dict2str(const getdns_dict *msg_dict, char **str)
getdns_return_t getdns_wire2rr_dict(const uint8_t *wire, size_t wire_sz, getdns_dict **rr_dict)
getdns_return_t getdns_msg_dict2wire(const getdns_dict *msg_dict, uint8_t **wire, size_t *wire_sz)
getdns_return_t getdns_wire2msg_dict_scan(const uint8_t **wire, size_t *wire_sz, getdns_dict **msg_dict)
getdns_return_t getdns_fp2rr_list(FILE *in, getdns_list **rr_list, const char *origin, uint32_t default_ttl)
getdns_return_t getdns_msg_dict2wire_buf(const getdns_dict *msg_dict, uint8_t *wire, size_t *wire_sz)
getdns_return_t getdns_rr_dict2wire_buf(const getdns_dict *rr_dict, uint8_t *wire, size_t *wire_sz)
getdns_return_t getdns_rr_dict2wire(const getdns_dict *rr_dict, uint8_t **wire, size_t *wire_sz)
getdns_return_t getdns_msg_dict2wire_scan(const getdns_dict *msg_dict, uint8_t **wire, int *wire_sz)
getdns_return_t getdns_str2rr_dict(const char *str, getdns_dict **rr_dict, const char *origin, uint32_t default_ttl)
getdns_return_t getdns_rr_dict2str_scan(const getdns_dict *rr_dict, char **str, int *str_len)
getdns_return_t getdns_rr_dict2str(const getdns_dict *rr_dict, char **str)
getdns_return_t getdns_rr_dict2wire_scan(const getdns_dict *rr_dict, uint8_t **wire, int *wire_sz)
void(* getdns_request_handler_t)(getdns_context *context, getdns_callback_type_t callback_type, getdns_dict *request, void *userarg, getdns_transaction_t request_id)
getdns_return_t getdns_reply(getdns_context *context, const getdns_dict *reply, getdns_transaction_t request_id)
getdns_return_t getdns_context_set_listen_addresses(getdns_context *context, const getdns_list *listen_addresses, void *userarg, getdns_request_handler_t handler)
getdns_return_t getdns_str2bindata(const char *str, getdns_bindata **bindata)
getdns_return_t getdns_str2int(const char *str, uint32_t *value)
getdns_return_t getdns_str2dict(const char *str, getdns_dict **dict)
getdns_return_t getdns_str2list(const char *str, getdns_list **list)
getdns_return_t getdns_context_set_use_threads(getdns_context *context, int use_threads)
getdns_return_t getdns_context_detach_eventloop(getdns_context *context)
getdns_return_t getdns_strerror(getdns_return_t err, char *buf, size_t buflen)
getdns_return_t getdns_context_process_async(getdns_context *context)
uint32_t getdns_context_get_num_pending_requests(const getdns_context *context, struct timeval *next_timeout)
getdns_tls_authentication_t
Definition: getdns_extra.h:143
@ GETDNS_AUTHENTICATION_NONE
Definition: getdns_extra.h:144
@ GETDNS_AUTHENTICATION_REQUIRED
Definition: getdns_extra.h:145
getdns_callback_type_t
Definition: getdns.h:285
getdns_context_code_t
Definition: getdns.h:237
getdns_return_t getdns_validate_dnssec2(const getdns_list *to_validate, const getdns_list *support_records, const getdns_list *trust_anchors, time_t validation_time, uint32_t skew)
getdns_return_t(* getdns_eventloop_clear)(getdns_eventloop *loop, getdns_eventloop_event *ev)
Definition: getdns_extra.h:305
void getdns_context_run(getdns_context *context)
void(* getdns_eventloop_noargs)(getdns_eventloop *loop)
Definition: getdns_extra.h:270
struct getdns_eventloop getdns_eventloop
void(* getdns_eventloop_run_once)(getdns_eventloop *loop, int blocking)
Definition: getdns_extra.h:319
getdns_return_t getdns_context_get_eventloop(const getdns_context *context, getdns_eventloop **eventloop)
getdns_return_t(* getdns_eventloop_schedule)(getdns_eventloop *loop, int fd, uint64_t timeout, getdns_eventloop_event *ev)
Definition: getdns_extra.h:289
getdns_return_t getdns_context_set_eventloop(getdns_context *context, getdns_eventloop *eventloop)
void(* getdns_eventloop_callback)(void *userarg)
Definition: getdns_extra.h:202
getdns_return_t getdns_context_get_round_robin_upstreams(const getdns_context *context, uint8_t *value)
getdns_return_t getdns_context_get_dns_root_servers(const getdns_context *context, getdns_list **addresses)
getdns_return_t getdns_context_get_suffix(const getdns_context *context, getdns_list **value)
getdns_return_t getdns_context_set_edns_client_subnet_private(getdns_context *context, uint8_t value)
getdns_return_t getdns_context_get_trust_anchors_backoff_time(const getdns_context *context, uint64_t *value)
getdns_return_t getdns_context_get_dnssec_allowed_skew(const getdns_context *context, uint32_t *value)
getdns_return_t getdns_context_set_tls_connection_retries(getdns_context *context, uint16_t value)
getdns_return_t getdns_context_set_tls_backoff_time(getdns_context *context, uint16_t value)
getdns_return_t getdns_context_set_trust_anchors_verify_email(getdns_context *context, const char *verify_email)
getdns_return_t getdns_context_unset_tcp_send_timeout(getdns_context *context)
getdns_return_t getdns_context_get_tcp_send_timeout(const getdns_context *context, uint32_t *value)
getdns_return_t getdns_context_get_tls_min_version(const getdns_context *context, getdns_tls_version_t *min_version)
getdns_return_t getdns_context_set_trust_anchors_backoff_time(getdns_context *context, uint64_t value)
getdns_return_t getdns_context_set_tls_ca_path(getdns_context *context, const char *tls_ca_path)
getdns_return_t getdns_context_get_trust_anchors_verify_CA(const getdns_context *context, const char **verify_CA)
getdns_return_t getdns_context_get_timeout(const getdns_context *context, uint64_t *timeout)
getdns_return_t getdns_context_set_tls_query_padding_blocksize(getdns_context *context, uint16_t value)
getdns_return_t getdns_context_get_idle_timeout(const getdns_context *context, uint64_t *timeout)
getdns_return_t getdns_context_set_update_callback(getdns_context *context, void *userarg, void(*value)(getdns_context *, getdns_context_code_t, void *))
getdns_tls_version_t
Definition: getdns_extra.h:834
getdns_return_t getdns_context_get_edns_client_subnet_private(const getdns_context *context, uint8_t *value)
getdns_return_t getdns_context_get_tls_authentication(const getdns_context *context, getdns_tls_authentication_t *value)
getdns_return_t getdns_context_set_appdata_dir(getdns_context *context, const char *appdata_dir)
getdns_return_t getdns_context_get_dnssec_trust_anchors(const getdns_context *context, getdns_list **value)
getdns_return_t getdns_context_get_edns_extended_rcode(const getdns_context *context, uint8_t *value)
getdns_return_t getdns_context_set_tls_ciphersuites(getdns_context *context, const char *ciphersuites)
getdns_return_t getdns_context_get_resolvconf(const getdns_context *context, const char **resolvconf)
getdns_return_t getdns_context_get_follow_redirects(const getdns_context *context, getdns_redirects_t *value)
getdns_loglevel_type
Definition: getdns_extra.h:556
getdns_return_t getdns_context_get_update_callback(const getdns_context *context, void **userarg, void(**value)(getdns_context *, getdns_context_code_t, void *))
getdns_return_t getdns_context_get_resolution_type(const getdns_context *context, getdns_resolution_t *value)
getdns_return_t getdns_context_get_tls_ciphersuites(const getdns_context *context, const char **ciphersuites)
getdns_return_t getdns_context_get_edns_do_bit(const getdns_context *context, uint8_t *value)
getdns_return_t getdns_context_get_hosts(const getdns_context *context, const char **hosts)
getdns_return_t getdns_context_set_return_dnssec_status(getdns_context *context, int enabled)
getdns_return_t getdns_context_get_edns_version(const getdns_context *context, uint8_t *value)
getdns_return_t getdns_context_set_tls_curves_list(getdns_context *context, const char *curves_list)
getdns_return_t getdns_context_config(getdns_context *context, const getdns_dict *config_dict)
getdns_return_t getdns_context_set_trust_anchors_url(getdns_context *context, const char *url)
void(* getdns_logfunc_type)(void *userarg, uint64_t log_systems, getdns_loglevel_type, const char *, va_list ap)
Definition: getdns_extra.h:589
getdns_return_t getdns_context_get_tls_cipher_list(const getdns_context *context, const char **cipher_list)
getdns_return_t getdns_context_get_tls_query_padding_blocksize(const getdns_context *context, uint16_t *value)
getdns_return_t getdns_context_get_trust_anchors_verify_email(const getdns_context *context, const char **verify_email)
getdns_return_t getdns_context_set_trust_anchors_verify_CA(getdns_context *context, const char *verify_CA)
getdns_return_t getdns_context_get_tls_backoff_time(const getdns_context *context, uint16_t *value)
getdns_return_t getdns_context_get_upstream_recursive_servers(const getdns_context *context, getdns_list **upstream_list)
getdns_return_t getdns_context_set_tls_cipher_list(getdns_context *context, const char *cipher_list)
getdns_return_t getdns_context_get_dns_transport(const getdns_context *context, getdns_transport_t *value)
getdns_return_t getdns_context_get_edns_maximum_udp_payload_size(const getdns_context *context, uint16_t *value)
getdns_return_t getdns_context_get_trust_anchors_url(const getdns_context *context, const char **url)
getdns_return_t getdns_context_set_hosts(getdns_context *context, const char *hosts)
getdns_return_t getdns_context_get_namespaces(const getdns_context *context, size_t *namespace_count, getdns_namespace_t **namespaces)
getdns_return_t getdns_context_set_tls_min_version(getdns_context *context, getdns_tls_version_t min_version)
getdns_return_t getdns_context_set_resolvconf(getdns_context *context, const char *resolvconf)
getdns_return_t getdns_context_get_dns_transport_list(const getdns_context *context, size_t *transport_count, getdns_transport_list_t **transports)
getdns_return_t getdns_context_unset_edns_maximum_udp_payload_size(getdns_context *context)
getdns_return_t getdns_context_get_limit_outstanding_queries(const getdns_context *context, uint16_t *limit)
getdns_return_t getdns_context_get_tls_ca_path(const getdns_context *context, const char **tls_ca_path)
getdns_return_t getdns_context_get_tls_curves_list(const getdns_context *context, const char **curves_list)
getdns_return_t getdns_context_get_tls_connection_retries(const getdns_context *context, uint16_t *value)
getdns_return_t getdns_context_set_tls_ca_file(getdns_context *context, const char *tls_ca_file)
getdns_return_t getdns_context_set_round_robin_upstreams(getdns_context *context, uint8_t value)
getdns_return_t getdns_context_set_tls_max_version(getdns_context *context, getdns_tls_version_t max_version)
getdns_return_t getdns_context_set_logfunc(getdns_context *context, void *userarg, uint64_t system, getdns_loglevel_type level, getdns_logfunc_type func)
getdns_return_t getdns_context_get_tls_ca_file(const getdns_context *context, const char **tls_ca_file)
getdns_return_t getdns_context_set_tls_authentication(getdns_context *context, getdns_tls_authentication_t value)
getdns_return_t getdns_context_get_tls_max_version(const getdns_context *context, getdns_tls_version_t *max_version)
getdns_return_t getdns_context_get_append_name(const getdns_context *context, getdns_append_name_t *value)
@ GETDNS_SSL3
Definition: getdns_extra.h:835
@ GETDNS_TLS1_3
Definition: getdns_extra.h:839
@ GETDNS_TLS1_2
Definition: getdns_extra.h:838
@ GETDNS_TLS1
Definition: getdns_extra.h:836
@ GETDNS_TLS1_1
Definition: getdns_extra.h:837
@ GETDNS_LOG_INFO
Definition: getdns_extra.h:563
@ GETDNS_LOG_CRIT
Definition: getdns_extra.h:559
@ GETDNS_LOG_NOTICE
Definition: getdns_extra.h:562
@ GETDNS_LOG_ERR
Definition: getdns_extra.h:560
@ GETDNS_LOG_EMERG
Definition: getdns_extra.h:557
@ GETDNS_LOG_DEBUG
Definition: getdns_extra.h:564
@ GETDNS_LOG_WARNING
Definition: getdns_extra.h:561
@ GETDNS_LOG_ALERT
Definition: getdns_extra.h:558
char * getdns_print_json_dict(const getdns_dict *some_dict, int pretty)
int getdns_snprint_json_dict(char *str, size_t size, const getdns_dict *dict, int pretty)
getdns_return_t getdns_dict_util_get_string(const getdns_dict *dict, const char *name, char **result)
int getdns_pretty_snprint_dict(char *str, size_t size, const getdns_dict *dict)
getdns_return_t getdns_dict_util_set_string(getdns_dict *dict, const char *name, const char *value)
char * getdns_print_json_list(const getdns_list *some_list, int pretty)
int getdns_snprint_json_list(char *str, size_t size, const getdns_list *list, int pretty)
int getdns_pretty_snprint_list(char *str, size_t size, const getdns_list *list)
char * getdns_pretty_print_list(const getdns_list *some_list)
getdns_namespace_t
Definition: getdns.h:124
getdns_redirects_t
Definition: getdns.h:162
getdns_resolution_t
Definition: getdns.h:146
getdns_return_t
Definition: getdns.h:63
getdns_append_name_t
Definition: getdns.h:216
getdns_transport_list_t
Definition: getdns.h:198
getdns_transport_t
Definition: getdns.h:178
getdns_return_t getdns_pubkey_pinset_sanity_check(const getdns_list *pinset, getdns_list *errorlist)
getdns_dict * getdns_pubkey_pin_create_from_string(const getdns_context *context, const char *str)
const char * getdns_get_errorstr_by_id(uint16_t err)
struct getdns_list getdns_list
Definition: getdns.h:553
struct getdns_context getdns_context
Definition: getdns.h:512
struct getdns_dict getdns_dict
Definition: getdns.h:546
uint64_t getdns_transaction_t
Definition: getdns.h:520
const char * getdns_get_version(void)
uint32_t getdns_get_api_version_number(void)
const char * getdns_get_api_version(void)
uint32_t getdns_get_version_number(void)
getdns_eventloop_callback read_cb
Definition: getdns_extra.h:226
getdns_eventloop_callback timeout_cb
Definition: getdns_extra.h:238
getdns_eventloop_callback write_cb
Definition: getdns_extra.h:232
getdns_eventloop_noargs cleanup
Definition: getdns_extra.h:330
getdns_eventloop_schedule schedule
Definition: getdns_extra.h:335
getdns_eventloop_noargs run
Definition: getdns_extra.h:346
getdns_eventloop_clear clear
Definition: getdns_extra.h:340
getdns_eventloop_run_once run_once
Definition: getdns_extra.h:352
getdns_eventloop_vmt * vmt
Definition: getdns_extra.h:261