diff --git a/spec/index.html b/spec/index.html index 2f04d6ea..52d908d3 100644 --- a/spec/index.html +++ b/spec/index.html @@ -94,7 +94,7 @@ tr.code { font-family: monospace }

Originally edited by Paul Hoffman

Currently maintained by the getdns team

-

Document version: "getdns October 2015 - release candidate 1"

+

Document version: "getdns October 2015"

This document describes a modern asynchronous DNS API. This new API is intended to be useful to application developers and operating system distributors as a way of making @@ -2426,7 +2426,7 @@ getdns_pretty_print_dict() for debugging.

9. The Generated Files

-

There is a tarball that includes the .h files, +

There is a tarball that includes the .h files, the examples, and so on. The examples all make, even though there is no API implementation, based on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine on the Macintosh and Ubuntu; help is definitely appreciated on making the build process diff --git a/src/context.c b/src/context.c index defe18e6..8f0669e1 100644 --- a/src/context.c +++ b/src/context.c @@ -1358,7 +1358,7 @@ getdns_context_set_dns_transport( context->dns_transport_count = count; context->dns_transports = new_transports; - switch (value) { + switch ((int)value) { case GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP: context->dns_transports[0] = GETDNS_TRANSPORT_UDP; context->dns_transports[1] = GETDNS_TRANSPORT_TCP; diff --git a/src/getdns/getdns.h.in b/src/getdns/getdns.h.in index 40539c06..2812f0d9 100644 --- a/src/getdns/getdns.h.in +++ b/src/getdns/getdns.h.in @@ -61,7 +61,8 @@ typedef enum getdns_return_t { GETDNS_RETURN_EXTENSION_MISFORMAT = 308, GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED = 309, GETDNS_RETURN_MEMORY_ERROR = 310, - GETDNS_RETURN_INVALID_PARAMETER = 311 + GETDNS_RETURN_INVALID_PARAMETER = 311, + GETDNS_RETURN_NOT_IMPLEMENTED = 312 } getdns_return_t; /** @@ -82,6 +83,7 @@ typedef enum getdns_return_t { #define GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED_TEXT "A query was made with a context that is using stub resolution and a DNSSEC extension specified." #define GETDNS_RETURN_MEMORY_ERROR_TEXT "Unable to allocate the memory required." #define GETDNS_RETURN_INVALID_PARAMETER_TEXT "A required parameter had an invalid value." +#define GETDNS_RETURN_NOT_IMPLEMENTED_TEXT "The library did not have the requested API feature implemented." /** @} */ @@ -163,12 +165,7 @@ typedef enum getdns_transport_t { GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP = 540, GETDNS_TRANSPORT_UDP_ONLY = 541, GETDNS_TRANSPORT_TCP_ONLY = 542, - GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN = 543, - /* */ - GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN = 544, - GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN = 545, - GETDNS_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN = 546 - /* */ + GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN = 543 } getdns_transport_t; /** @@ -179,11 +176,6 @@ typedef enum getdns_transport_t { #define GETDNS_TRANSPORT_UDP_ONLY_TEXT "See getdns_context_set_dns_transport()" #define GETDNS_TRANSPORT_TCP_ONLY_TEXT "See getdns_context_set_dns_transport()" #define GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN_TEXT "See getdns_context_set_dns_transport()" -/* */ -#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_TEXT "See getdns_context_set_dns_transport()" -#define GETDNS_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT "See getdns_context_set_dns_transport()" -/* */ /** @} */ diff --git a/src/getdns/getdns_extra.h.in b/src/getdns/getdns_extra.h.in index 6d335bd4..bd46a4c2 100644 --- a/src/getdns/getdns_extra.h.in +++ b/src/getdns/getdns_extra.h.in @@ -371,6 +371,19 @@ getdns_return_t getdns_context_set_tls_authentication( getdns_context *context, getdns_tls_authentication_t value); + +/* WARNING! Do not use the constants below. They will be removed from future + * releases. Please use the getdns_context_set_dns_transport_list with the + * GETDNS_TRANSPORT_UDP, GETDNS_TRANSPORT_TCP and GETDNS_TRANSPORT_TLS + * constants instead. + */ +#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_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN 546 +#define GETDNS_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT "See getdns_context_set_dns_transport()" + #ifdef __cplusplus } #endif diff --git a/src/test/tests_stub_sync.c b/src/test/tests_stub_sync.c index 496fb7ab..863625b7 100644 --- a/src/test/tests_stub_sync.c +++ b/src/test/tests_stub_sync.c @@ -37,6 +37,7 @@ #include #include "testmessages.h" #include "getdns/getdns.h" +#include "getdns/getdns_extra.h" #define TRANSPORT_UDP "udp" #define TRANSPORT_TCP "tcp"