getdns_extra.h File Reference

Public interface to getdns that is ADDITIONAL to the official getdns API, include in your application to use additional functionality offered by this implementation. More...

#include <getdns/getdns.h>
#include <sys/time.h>
#include <stdio.h>
#include <time.h>
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  getdns_eventloop_event
 
struct  getdns_eventloop
 
struct  getdns_eventloop_vmt
 

Macros

#define GETDNS_RETURN_IO_ERROR   ((getdns_return_t) 397 )
 
#define GETDNS_RETURN_IO_ERROR_TEXT   "An input/output error occurred. Inspect errno for details."
 
#define GETDNS_RETURN_NO_UPSTREAM_AVAILABLE   ((getdns_return_t) 398 )
 
#define GETDNS_RETURN_NO_UPSTREAM_AVAILABLE_TEXT   "None of the configured upstreams could be used to send queries on the specified transports"
 
#define GETDNS_RETURN_NEED_MORE_SPACE   ((getdns_return_t) 399 )
 
#define GETDNS_RETURN_NEED_MORE_SPACE_TEXT   "The buffer was too small"
 
#define GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION   618
 
#define GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION_TEXT   "Change related to getdns_context_set_tls_authentication"
 
#define GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE   619
 
#define GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE_TEXT   "Change related to getdns_context_set_edns_client_subnet_private"
 
#define GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE   620
 
#define GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE_TEXT   "Change related to getdns_context_set_tls_query_padding_blocksize"
 
#define GETDNS_CONTEXT_CODE_PUBKEY_PINSET   621
 
#define GETDNS_CONTEXT_CODE_PUBKEY_PINSET_TEXT   "Change related to getdns_context_set_pubkey_pinset"
 
#define GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS   622
 
#define GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS_TEXT   "Change related to getdns_context_set_round_robin_upstreams"
 
#define GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME   623
 
#define GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME_TEXT   "Change related to getdns_context_set_tls_backoff_time"
 
#define GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES   624
 
#define GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES_TEXT   "Change related to getdns_context_set_tls_connection_retries"
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL   625
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL_TEXT   "Change related to getdns_context_set_trust_anchors_url"
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA   626
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA_TEXT   "Change related to getdns_context_set_trust_anchors_verify_ca"
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL   627
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL_TEXT   "Change related to getdns_context_set_trust_anchors_verify_email"
 
#define GETDNS_CONTEXT_CODE_APPDATA_DIR   628
 
#define GETDNS_CONTEXT_CODE_APPDATA_DIR_TEXT   "Change related to getdns_context_set_appdata_dir"
 
#define GETDNS_CONTEXT_CODE_RESOLVCONF   629
 
#define GETDNS_CONTEXT_CODE_RESOLVCONF_TEXT   "Change related to getdns_context_set_resolvconf"
 
#define GETDNS_CONTEXT_CODE_HOSTS   630
 
#define GETDNS_CONTEXT_CODE_HOSTS_TEXT   "Change related to getdns_context_set_hosts"
 
#define GETDNS_CONTEXT_CODE_TLS_CA_PATH   631
 
#define GETDNS_CONTEXT_CODE_TLS_CA_PATH_TEXT   "Change related to getdns_context_set_tls_ca_path"
 
#define GETDNS_CONTEXT_CODE_TLS_CA_FILE   632
 
#define GETDNS_CONTEXT_CODE_TLS_CA_FILE_TEXT   "Change related to getdns_context_set_tls_ca_file"
 
#define GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST   633
 
#define GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST_TEXT   "Change related to getdns_context_set_tls_cipher_list"
 
#define GETDNS_CONTEXT_CODE_TLS_CURVES_LIST   634
 
#define GETDNS_CONTEXT_CODE_TLS_CURVES_LIST_TEXT   "Change related to getdns_context_set_tls_curves_list"
 
#define GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES   635
 
#define GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES_TEXT   "Change related to getdns_context_set_tls_ciphersuites"
 
#define GETDNS_CONTEXT_CODE_TLS_MIN_VERSION   636
 
#define GETDNS_CONTEXT_CODE_TLS_MIN_VERSION_TEXT   "Change related to getdns_context_set_tls_min_version"
 
#define GETDNS_CONTEXT_CODE_TLS_MAX_VERSION   637
 
#define GETDNS_CONTEXT_CODE_TLS_MAX_VERSION_TEXT   "Change related to getdns_context_set_tls_max_version"
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME   638
 
#define GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME_TEXT   "Change related to getdns_context_set_trust_anchors_backoff_time"
 
#define GETDNS_VERSION   "1.5.0-rc1"
 
#define GETDNS_NUMERIC_VERSION   0x0104ffc1
 
#define GETDNS_API_VERSION   "December 2015"
 
#define GETDNS_API_NUMERIC_VERSION   0x07df0c00
 
#define GETDNS_AUTHENTICATION_HOSTNAME   GETDNS_AUTHENTICATION_REQUIRED
 
#define GETDNS_AUTHENTICATION_NONE_TEXT   "See getdns_context_set_tls_authentication()"
 
#define GETDNS_AUTHENTICATION_REQUIRED_TEXT   "See getdns_context_set_tls_authentication()"
 
#define GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST   ((getdns_append_name_t) 554 )
 
#define GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST_TEXT   "See getdns_context_set_append_name()"
 
#define GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN   544
 
#define GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN_TEXT   "See getdns_context_set_dns_transport()"
 
#define GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN   545
 
#define GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT   "See getdns_context_set_dns_transport()"
 
#define GETDNS_LOG_EMERG_TEXT   "System is unusable"
 
#define GETDNS_LOG_ALERT_TEXT   "Action must be taken immediately"
 
#define GETDNS_LOG_CRIT_TEXT   "Critical conditions"
 
#define GETDNS_LOG_ERR_TEXT   "Error conditions"
 
#define GETDNS_LOG_WARNING_TEXT   "Warning conditions"
 
#define GETDNS_LOG_NOTICE_TEXT   "Normal, but significant, condition"
 
#define GETDNS_LOG_INFO_TEXT   "Informational message"
 
#define GETDNS_LOG_DEBUG_TEXT   "Debug-level message"
 
#define GETDNS_LOG_UPSTREAM_STATS   0x3000
 
#define GETDNS_LOG_UPSTREAM_STATS_TEXT   "Log messages about upstream statistics"
 
#define GETDNS_LOG_SYS_STUB   0x2000
 
#define GETDNS_LOG_SYS_STUB_TEXT   "Log messages about stub resolving"
 
#define GETDNS_LOG_SYS_RECURSING   0x4000
 
#define GETDNS_LOG_SYS_RECURSING_TEXT   "Log messages about recursive resolving"
 
#define GETDNS_LOG_SYS_RESOLVING   0x6000
 
#define GETDNS_LOG_SYS_RESOLVING_TEXT   "Log messages about resolving"
 
#define GETDNS_LOG_SYS_ANCHOR   0x8000
 
#define GETDNS_LOG_SYS_ANCHOR_TEXT   "Log messages about fetching trust anchors"
 
#define GETDNS_SSL3_TEXT   "See getdns_context_(set|get)_tls_(min|max)_version()"
 
#define GETDNS_TLS1_TEXT   "See getdns_context_(set|get)_tls_(min|max)_version()"
 
#define GETDNS_TLS1_1_TEXT   "See getdns_context_(set|get)_tls_(min|max)_version()"
 
#define GETDNS_TLS1_2_TEXT   "See getdns_context_(set|get)_tls_(min|max)_version()"
 
#define GETDNS_TLS1_3_TEXT   "See getdns_context_(set|get)_tls_(min|max)_version()"
 

Typedefs

typedef enum getdns_tls_authentication_t getdns_tls_authentication_t
 
typedef void(* getdns_eventloop_callback) (void *userarg)
 
typedef struct getdns_eventloop_event getdns_eventloop_event
 
typedef struct getdns_eventloop_vmt getdns_eventloop_vmt
 
typedef struct getdns_eventloop getdns_eventloop
 
typedef void(* getdns_eventloop_noargs) (getdns_eventloop *loop)
 
typedef getdns_return_t(* getdns_eventloop_schedule) (getdns_eventloop *loop, int fd, uint64_t timeout, getdns_eventloop_event *ev)
 
typedef getdns_return_t(* getdns_eventloop_clear) (getdns_eventloop *loop, getdns_eventloop_event *ev)
 
typedef void(* getdns_eventloop_run_once) (getdns_eventloop *loop, int blocking)
 
typedef enum getdns_loglevel_type getdns_loglevel_type
 
typedef void(* getdns_logfunc_type) (void *userarg, uint64_t log_systems, getdns_loglevel_type, const char *, va_list ap)
 
typedef enum getdns_tls_version_t getdns_tls_version_t
 
typedef void(* getdns_request_handler_t) (getdns_context *context, getdns_callback_type_t callback_type, getdns_dict *request, void *userarg, getdns_transaction_t request_id)
 

Enumerations

enum  getdns_tls_authentication_t { GETDNS_AUTHENTICATION_NONE = 1300, GETDNS_AUTHENTICATION_REQUIRED = 1301 }
 
enum  getdns_loglevel_type {
  GETDNS_LOG_EMERG = 0, GETDNS_LOG_ALERT = 1, GETDNS_LOG_CRIT = 2, GETDNS_LOG_ERR = 3,
  GETDNS_LOG_WARNING = 4, GETDNS_LOG_NOTICE = 5, GETDNS_LOG_INFO = 6, GETDNS_LOG_DEBUG = 7
}
 
enum  getdns_tls_version_t {
  GETDNS_SSL3 = 1400, GETDNS_TLS1 = 1401, GETDNS_TLS1_1 = 1402, GETDNS_TLS1_2 = 1403,
  GETDNS_TLS1_3 = 1404
}
 

Functions

getdns_return_t getdns_context_set_eventloop (getdns_context *context, getdns_eventloop *eventloop)
 
getdns_return_t getdns_context_get_eventloop (const getdns_context *context, getdns_eventloop **eventloop)
 
void getdns_context_run (getdns_context *context)
 
getdns_return_t getdns_context_set_update_callback (getdns_context *context, void *userarg, void(*value)(getdns_context *, getdns_context_code_t, void *))
 
getdns_return_t getdns_context_set_return_dnssec_status (getdns_context *context, int enabled)
 
getdns_return_t getdns_context_set_tls_authentication (getdns_context *context, getdns_tls_authentication_t value)
 
getdns_return_t getdns_context_set_round_robin_upstreams (getdns_context *context, uint8_t value)
 
getdns_return_t getdns_context_set_tls_backoff_time (getdns_context *context, uint16_t value)
 
getdns_return_t getdns_context_set_tls_connection_retries (getdns_context *context, uint16_t value)
 
getdns_return_t getdns_context_set_edns_client_subnet_private (getdns_context *context, uint8_t value)
 
getdns_return_t getdns_context_set_tls_query_padding_blocksize (getdns_context *context, uint16_t value)
 
getdns_return_t getdns_context_unset_edns_maximum_udp_payload_size (getdns_context *context)
 
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_set_appdata_dir (getdns_context *context, const char *appdata_dir)
 
getdns_return_t getdns_context_set_trust_anchors_url (getdns_context *context, const char *url)
 
getdns_return_t getdns_context_set_trust_anchors_verify_CA (getdns_context *context, const char *verify_CA)
 
getdns_return_t getdns_context_set_trust_anchors_verify_email (getdns_context *context, const char *verify_email)
 
getdns_return_t getdns_context_set_trust_anchors_backoff_time (getdns_context *context, uint64_t value)
 
getdns_return_t getdns_context_set_resolvconf (getdns_context *context, const char *resolvconf)
 
getdns_return_t getdns_context_set_hosts (getdns_context *context, const char *hosts)
 
getdns_return_t getdns_context_set_tls_ca_path (getdns_context *context, const char *tls_ca_path)
 
getdns_return_t getdns_context_set_tls_ca_file (getdns_context *context, const char *tls_ca_file)
 
getdns_return_t getdns_context_set_tls_cipher_list (getdns_context *context, const char *cipher_list)
 
getdns_return_t getdns_context_set_tls_ciphersuites (getdns_context *context, const char *ciphersuites)
 
getdns_return_t getdns_context_set_tls_curves_list (getdns_context *context, const char *curves_list)
 
getdns_return_t getdns_context_set_tls_min_version (getdns_context *context, getdns_tls_version_t min_version)
 
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_tls_max_version (getdns_context *context, getdns_tls_version_t max_version)
 
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_resolution_type (const getdns_context *context, getdns_resolution_t *value)
 
getdns_return_t getdns_context_get_namespaces (const getdns_context *context, size_t *namespace_count, getdns_namespace_t **namespaces)
 
getdns_return_t getdns_context_get_dns_transport (const getdns_context *context, getdns_transport_t *value)
 
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_get_limit_outstanding_queries (const getdns_context *context, uint16_t *limit)
 
getdns_return_t getdns_context_get_timeout (const getdns_context *context, uint64_t *timeout)
 
getdns_return_t getdns_context_get_idle_timeout (const getdns_context *context, uint64_t *timeout)
 
getdns_return_t getdns_context_get_follow_redirects (const getdns_context *context, getdns_redirects_t *value)
 
getdns_return_t getdns_context_get_dns_root_servers (const getdns_context *context, getdns_list **addresses)
 
getdns_return_t getdns_context_get_append_name (const getdns_context *context, getdns_append_name_t *value)
 
getdns_return_t getdns_context_get_suffix (const getdns_context *context, getdns_list **value)
 
getdns_return_t getdns_context_get_dnssec_trust_anchors (const getdns_context *context, getdns_list **value)
 
getdns_return_t getdns_context_get_dnssec_allowed_skew (const getdns_context *context, uint32_t *value)
 
getdns_return_t getdns_context_get_upstream_recursive_servers (const getdns_context *context, getdns_list **upstream_list)
 
getdns_return_t getdns_context_get_edns_maximum_udp_payload_size (const getdns_context *context, uint16_t *value)
 
getdns_return_t getdns_context_get_edns_extended_rcode (const getdns_context *context, uint8_t *value)
 
getdns_return_t getdns_context_get_edns_version (const getdns_context *context, uint8_t *value)
 
getdns_return_t getdns_context_get_edns_do_bit (const getdns_context *context, uint8_t *value)
 
getdns_return_t getdns_context_get_edns_client_subnet_private (const getdns_context *context, uint8_t *value)
 
getdns_return_t getdns_context_get_tls_query_padding_blocksize (const getdns_context *context, uint16_t *value)
 
getdns_return_t getdns_context_get_tls_authentication (const getdns_context *context, getdns_tls_authentication_t *value)
 
getdns_return_t getdns_context_get_round_robin_upstreams (const getdns_context *context, uint8_t *value)
 
getdns_return_t getdns_context_get_tls_backoff_time (const getdns_context *context, uint16_t *value)
 
getdns_return_t getdns_context_get_tls_connection_retries (const getdns_context *context, uint16_t *value)
 
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_trust_anchors_url (const getdns_context *context, const char **url)
 
getdns_return_t getdns_context_get_trust_anchors_verify_CA (const getdns_context *context, const char **verify_CA)
 
getdns_return_t getdns_context_get_trust_anchors_verify_email (const getdns_context *context, const char **verify_email)
 
getdns_return_t getdns_context_get_trust_anchors_backoff_time (const getdns_context *context, uint64_t *value)
 
getdns_return_t getdns_context_get_resolvconf (const getdns_context *context, const char **resolvconf)
 
getdns_return_t getdns_context_get_hosts (const getdns_context *context, const char **hosts)
 
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_ca_file (const getdns_context *context, const char **tls_ca_file)
 
getdns_return_t getdns_context_get_tls_cipher_list (const getdns_context *context, const char **cipher_list)
 
getdns_return_t getdns_context_get_tls_ciphersuites (const getdns_context *context, const char **ciphersuites)
 
getdns_return_t getdns_context_get_tls_curves_list (const getdns_context *context, const char **curves_list)
 
const char * getdns_get_version (void)
 
uint32_t getdns_get_version_number (void)
 
const char * getdns_get_api_version (void)
 
uint32_t getdns_get_api_version_number (void)
 
const char * getdns_get_errorstr_by_id (uint16_t err)
 
getdns_return_t getdns_dict_util_set_string (getdns_dict *dict, const char *name, const char *value)
 
getdns_return_t getdns_dict_util_get_string (const getdns_dict *dict, const char *name, char **result)
 
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_dictgetdns_pubkey_pin_create_from_string (const getdns_context *context, const char *str)
 
getdns_return_t getdns_pubkey_pinset_sanity_check (const getdns_list *pinset, getdns_list *errorlist)
 
getdns_return_t getdns_context_config (getdns_context *context, const getdns_dict *config_dict)
 
int getdns_pretty_snprint_dict (char *str, size_t size, const getdns_dict *dict)
 
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)
 
char * getdns_pretty_print_list (const getdns_list *some_list)
 
int getdns_pretty_snprint_list (char *str, size_t size, const getdns_list *list)
 
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)
 
getdns_return_t getdns_rr_dict2wire (const getdns_dict *rr_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_scan (const getdns_dict *rr_dict, uint8_t **wire, int *wire_sz)
 
getdns_return_t getdns_wire2rr_dict (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_wire2rr_dict_scan (const uint8_t **wire, size_t *wire_sz, getdns_dict **rr_dict)
 
getdns_return_t getdns_rr_dict2str (const getdns_dict *rr_dict, char **str)
 
getdns_return_t getdns_rr_dict2str_buf (const getdns_dict *rr_dict, char *str, size_t *str_len)
 
getdns_return_t getdns_rr_dict2str_scan (const getdns_dict *rr_dict, char **str, int *str_len)
 
getdns_return_t getdns_str2rr_dict (const char *str, getdns_dict **rr_dict, const char *origin, uint32_t default_ttl)
 
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 (const getdns_dict *msg_dict, uint8_t **wire, size_t *wire_sz)
 
getdns_return_t getdns_msg_dict2wire_buf (const getdns_dict *msg_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_wire2msg_dict (const uint8_t *wire, size_t wire_sz, getdns_dict **msg_dict)
 
getdns_return_t getdns_wire2msg_dict_buf (const uint8_t *wire, size_t *wire_sz, getdns_dict **msg_dict)
 
getdns_return_t getdns_wire2msg_dict_scan (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_msg_dict2str_buf (const getdns_dict *msg_dict, char *str, size_t *str_len)
 
getdns_return_t getdns_msg_dict2str_scan (const getdns_dict *msg_dict, char **str, int *str_len)
 
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_str2bindata (const char *str, getdns_bindata **bindata)
 
getdns_return_t getdns_str2int (const char *str, uint32_t *value)
 
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_reply (getdns_context *context, const getdns_dict *reply, getdns_transaction_t request_id)
 
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_return_t getdns_context_detach_eventloop (getdns_context *context)
 
getdns_return_t getdns_context_set_use_threads (getdns_context *context, int use_threads)
 

Detailed Description

Public interface to getdns that is ADDITIONAL to the official getdns API, include in your application to use additional functionality offered by this implementation.

Definition in file getdns_extra.h.