From f7f35e3a9d964bef1d2779cdc05dddf2095dc4f9 Mon Sep 17 00:00:00 2001
From: Willem Toorop
Date: Wed, 4 Dec 2013 16:46:42 +0100
Subject: [PATCH] [API 0.366] Get rid of typedefs for structs.
---
spec/example-all-functions.c | 4 +-
spec/example-simple-answers.c | 4 +-
spec/example-synchronous.c | 2 +-
spec/example-tree.c | 4 +-
spec/getdns_core_only.c | 68 +++++++++++++--------------
spec/getdns_core_only.h | 78 +++++++++++++++----------------
spec/getdns_libevent.h | 2 +-
spec/index.html | 88 +++++++++++++++++------------------
8 files changed, 125 insertions(+), 125 deletions(-)
diff --git a/spec/example-all-functions.c b/spec/example-all-functions.c
index f9dab153..30afc829 100644
--- a/spec/example-all-functions.c
+++ b/spec/example-all-functions.c
@@ -30,7 +30,7 @@ struct getdns_list ** listptrarg;
size_t sizetarg;
size_t * sizetptrarg;
-getdns_context_t contextarg = NULL;
+struct getdns_context *contextarg = NULL;
uint8_t uint8arg;
uint16_t uint16arg;
uint32_t uint32arg;
@@ -40,7 +40,7 @@ uint32_t * uint32ptrarg;
void * arrayarg;
void allocfunctionarg(size_t foo) {UNUSED_PARAM(foo);}
void deallocfunctionarg(void* foo) {UNUSED_PARAM(foo);}
-void setcallbackfunctionarg(struct getdns_context_t *foo1, uint16_t foo2)
+void setcallbackfunctionarg(struct getdns_context *foo1, uint16_t foo2)
{UNUSED_PARAM(foo1);UNUSED_PARAM(foo2);}
int main()
diff --git a/spec/example-simple-answers.c b/spec/example-simple-answers.c
index 12148007..4a4c2b2b 100644
--- a/spec/example-simple-answers.c
+++ b/spec/example-simple-answers.c
@@ -8,7 +8,7 @@
#define UNUSED_PARAM(x) ((void)(x))
/* Set up the callback function, which will also do the processing of the results */
-void this_callbackfn(struct getdns_context_t *this_context,
+void this_callbackfn(struct getdns_context *this_context,
uint16_t this_callback_type,
struct getdns_dict *this_response,
void *this_userarg,
@@ -56,7 +56,7 @@ void this_callbackfn(struct getdns_context_t *this_context,
int main()
{
/* Create the DNS context for this call */
- struct getdns_context_t *this_context = NULL;
+ struct getdns_context *this_context = NULL;
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
diff --git a/spec/example-synchronous.c b/spec/example-synchronous.c
index df4a6f27..df987bbc 100644
--- a/spec/example-synchronous.c
+++ b/spec/example-synchronous.c
@@ -9,7 +9,7 @@ int main()
{
getdns_return_t this_ret; /* Holder for all function returns */
/* Create the DNS context for this call */
- struct getdns_context_t *this_context = NULL;
+ struct getdns_context *this_context = NULL;
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
diff --git a/spec/example-tree.c b/spec/example-tree.c
index 73c8d205..d4960967 100644
--- a/spec/example-tree.c
+++ b/spec/example-tree.c
@@ -8,7 +8,7 @@
#define UNUSED_PARAM(x) ((void)(x))
/* Set up the callback function, which will also do the processing of the results */
-void this_callbackfn(struct getdns_context_t *this_context,
+void this_callbackfn(struct getdns_context *this_context,
getdns_return_t this_callback_type,
struct getdns_dict *this_response,
void *this_userarg,
@@ -95,7 +95,7 @@ void this_callbackfn(struct getdns_context_t *this_context,
int main()
{
/* Create the DNS context for this call */
- struct getdns_context_t *this_context = NULL;
+ struct getdns_context *this_context = NULL;
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
diff --git a/spec/getdns_core_only.c b/spec/getdns_core_only.c
index 68087842..69b474e2 100644
--- a/spec/getdns_core_only.c
+++ b/spec/getdns_core_only.c
@@ -9,7 +9,7 @@ int main(){ return(0); }
getdns_return_t
getdns_general(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
uint16_t request_type,
struct getdns_dict *extensions,
@@ -22,7 +22,7 @@ UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD;
getdns_return_t
getdns_address(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
void *userarg,
@@ -34,7 +34,7 @@ UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD;
getdns_return_t
getdns_hostname(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_dict *address,
struct getdns_dict *extensions,
void *userarg,
@@ -46,7 +46,7 @@ UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD;
getdns_return_t
getdns_service(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
void *userarg,
@@ -58,27 +58,27 @@ UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD;
getdns_return_t
getdns_context_create(
- getdns_context_t *context,
+ struct getdns_context **context,
int set_from_os
)
{ UNUSED_PARAM(context); UNUSED_PARAM(set_from_os); return GETDNS_RETURN_GOOD; }
void
getdns_context_destroy(
- getdns_context_t context
+ struct getdns_context *context
)
{ UNUSED_PARAM(context); }
getdns_return_t
getdns_cancel_callback(
- getdns_context_t context,
+ struct getdns_context *context,
getdns_transaction_t transaction_id
)
{ UNUSED_PARAM(context); UNUSED_PARAM(transaction_id); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_general_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
uint16_t request_type,
struct getdns_dict *extensions,
@@ -89,7 +89,7 @@ UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_address_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -99,7 +99,7 @@ UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_hostname_sync(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_dict *address,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -109,7 +109,7 @@ UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_service_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -243,28 +243,28 @@ getdns_display_ip_address(
getdns_return_t
getdns_context_set_context_update_callback(
- getdns_context_t context,
- void (*value)(getdns_context_t context, uint16_t changed_item)
+ struct getdns_context *context,
+ void (*value)(struct getdns_context *context, uint16_t changed_item)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_context_update(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_resolution_type(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_namespaces(
- getdns_context_t context,
+ struct getdns_context *context,
size_t namespace_count,
uint16_t *namespaces
)
@@ -273,126 +273,126 @@ return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dns_transport(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_limit_outstanding_queries(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t limit
)
{ UNUSED_PARAM(context); UNUSED_PARAM(limit); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_timeout(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t timeout
)
{ UNUSED_PARAM(context); UNUSED_PARAM(timeout); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_follow_redirects(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dns_root_servers(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *addresses
)
{ UNUSED_PARAM(context); UNUSED_PARAM(addresses); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_append_name(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_suffix(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dnssec_trust_anchors(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dnssec_allowed_skew(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_stub_resolution(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *upstream_list
)
{ UNUSED_PARAM(context); UNUSED_PARAM(upstream_list); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_edns_maximum_udp_payload_size(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_edns_extended_rcode(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_edns_version(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_edns_do_bit(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_memory_allocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(size_t somesize)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_memory_deallocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(void*)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_memory_reallocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(void*)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_extension_set_libevent_base(
- getdns_context_t context,
+ struct getdns_context *context,
struct event_base *this_event_base
)
{ UNUSED_PARAM(context); UNUSED_PARAM(this_event_base); return GETDNS_RETURN_GOOD; }
diff --git a/spec/getdns_core_only.h b/spec/getdns_core_only.h
index ede18239..7ed80e46 100644
--- a/spec/getdns_core_only.h
+++ b/spec/getdns_core_only.h
@@ -1,4 +1,4 @@
-/* Created at 2013-12-04-16-45-05*/
+/* Created at 2013-12-04-16-46-17*/
#ifndef GETDNS_H
#define GETDNS_H
@@ -243,18 +243,18 @@
#define GETDNS_RRTYPE_DLV 32769
/* Various typedefs */
-typedef struct getdns_context_t *getdns_context_t;
+struct getdns_context;
typedef uint16_t getdns_return_t;
typedef uint64_t getdns_transaction_t;
typedef enum getdns_data_type {
t_dict, t_list, t_int, t_bindata
} getdns_data_type;
-typedef struct getdns_bindata {
+struct getdns_bindata {
size_t size;
uint8_t *data;
-} getdns_bindata;
-typedef struct getdns_dict getdns_dict;
-typedef struct getdns_list getdns_list;
+};
+struct getdns_dict;
+struct getdns_list;
/* Helper functions for data structures */
@@ -295,7 +295,7 @@ getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, char *name, u
/* Callback arguments */
typedef void (*getdns_callback_t)(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t callback_type,
struct getdns_dict *response,
void *userarg,
@@ -305,7 +305,7 @@ typedef void (*getdns_callback_t)(
getdns_return_t
getdns_general(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
uint16_t request_type,
struct getdns_dict *extensions,
@@ -315,7 +315,7 @@ getdns_general(
);
getdns_return_t
getdns_address(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
void *userarg,
@@ -324,7 +324,7 @@ getdns_address(
);
getdns_return_t
getdns_hostname(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_dict *address,
struct getdns_dict *extensions,
void *userarg,
@@ -333,7 +333,7 @@ getdns_hostname(
);
getdns_return_t
getdns_service(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
void *userarg,
@@ -343,24 +343,24 @@ getdns_service(
getdns_return_t
getdns_context_create(
- getdns_context_t *context,
+ struct getdns_context **context,
int set_from_os
);
void
getdns_context_destroy(
- getdns_context_t context
+ struct getdns_context *context
);
getdns_return_t
getdns_cancel_callback(
- getdns_context_t context,
+ struct getdns_context *context,
getdns_transaction_t transaction_id
);
getdns_return_t
getdns_general_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
uint16_t request_type,
struct getdns_dict *extensions,
@@ -369,7 +369,7 @@ getdns_general_sync(
getdns_return_t
getdns_address_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -377,7 +377,7 @@ getdns_address_sync(
getdns_return_t
getdns_hostname_sync(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_dict *address,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -385,7 +385,7 @@ getdns_hostname_sync(
getdns_return_t
getdns_service_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -430,122 +430,122 @@ getdns_display_ip_address(
getdns_return_t
getdns_context_set_context_update_callback(
- getdns_context_t context,
- void (*value)(getdns_context_t context, uint16_t changed_item)
+ struct getdns_context *context,
+ void (*value)(struct getdns_context *context, uint16_t changed_item)
);
getdns_return_t
getdns_context_set_resolution_type(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
getdns_return_t
getdns_context_set_namespaces(
- getdns_context_t context,
+ struct getdns_context *context,
size_t namespace_count,
uint16_t *namespaces
);
getdns_return_t
getdns_context_set_dns_transport(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
getdns_return_t
getdns_context_set_limit_outstanding_queries(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t limit
);
getdns_return_t
getdns_context_set_timeout(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t timeout
);
getdns_return_t
getdns_context_set_follow_redirects(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
getdns_return_t
getdns_context_set_dns_root_servers(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *addresses
);
getdns_return_t
getdns_context_set_append_name(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
getdns_return_t
getdns_context_set_suffix(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *value
);
getdns_return_t
getdns_context_set_dnssec_trust_anchors(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *value
);
getdns_return_t
getdns_context_set_dnssec_allowed_skew(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
getdns_return_t
getdns_context_set_stub_resolution(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *upstream_list
);
getdns_return_t
getdns_context_set_edns_maximum_udp_payload_size(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
getdns_return_t
getdns_context_set_edns_extended_rcode(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
);
getdns_return_t
getdns_context_set_edns_version(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
);
getdns_return_t
getdns_context_set_edns_do_bit(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
);
getdns_return_t
getdns_context_set_memory_allocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(size_t somesize)
);
getdns_return_t
getdns_context_set_memory_deallocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(void*)
);
getdns_return_t
getdns_context_set_memory_reallocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(void*)
);
diff --git a/spec/getdns_libevent.h b/spec/getdns_libevent.h
index fd9effce..1baa4395 100644
--- a/spec/getdns_libevent.h
+++ b/spec/getdns_libevent.h
@@ -4,6 +4,6 @@
/* For libevent, which we are using for these examples */
getdns_return_t
getdns_extension_set_libevent_base(
- getdns_context_t context,
+ struct getdns_context *context,
struct event_base *this_event_base
);
diff --git a/spec/index.html b/spec/index.html
index e8191cf2..e224949c 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -140,7 +140,7 @@ href="mailto:paul.hoffman@vpnc.org">paul.hoffman@vpnc.org.)
getdns_return_t
getdns_general(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
uint16_t request_type,
struct getdns_dict *extensions,
@@ -208,7 +208,7 @@ href="#ReturnCodes">later in this document.
getdns_return_t
getdns_address(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
void *userarg,
@@ -236,7 +236,7 @@ getdns_address(
getdns_return_t
getdns_hostname(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_dict *address,
struct getdns_dict *extensions,
void *userarg,
@@ -253,7 +253,7 @@ or "IPv6" (which are case-sensitive)) and
address_data
(whose value
getdns_return_t
getdns_service(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
void *userarg,
@@ -277,7 +277,7 @@ returned an error, in which case the callback function is never called.
as follows:
typedef void (*getdns_callback_t)(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t callback_type,
struct getdns_dict *response,
void *userarg,
@@ -323,7 +323,7 @@ that affect how DNS calls are made. For most applications, a default context is
getdns_return_t
getdns_context_create(
- getdns_context_t *context,
+ struct getdns_context **context,
int set_from_os
);
@@ -337,7 +337,7 @@ using this context, use the function:
void
getdns_context_destroy(
- getdns_context_t context
+ struct getdns_context *context
);
@@ -354,7 +354,7 @@ all of the needed cleanup is done and callbacks are made.
getdns_return_t
getdns_cancel_callback(
- getdns_context_t context,
+ struct getdns_context *context,
getdns_transaction_t transaction_id
);
@@ -435,7 +435,7 @@ same as the response returned in the callback if you had used the async version
getdns_return_t
getdns_general_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
uint16_t request_type,
struct getdns_dict *extensions,
@@ -445,7 +445,7 @@ getdns_general_sync(
getdns_return_t
getdns_address_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -454,7 +454,7 @@ getdns_address_sync(
getdns_return_t
getdns_hostname_sync(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_dict *address,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -463,7 +463,7 @@ getdns_hostname_sync(
getdns_return_t
getdns_service_sync(
- getdns_context_t context,
+ struct getdns_context *context,
const char *name,
struct getdns_dict *extensions,
struct getdns_dict **response
@@ -1001,18 +1001,18 @@ getdns_convert_fqdn_to_dns_name(
5.1 A Few Needed Definitions
-
typedef struct getdns_context_t *getdns_context_t;
+
struct getdns_context;
typedef uint16_t getdns_return_t;
typedef uint64_t getdns_transaction_t;
typedef enum getdns_data_type {
t_dict, t_list, t_int, t_bindata
} getdns_data_type;
-typedef struct getdns_bindata {
+struct getdns_bindata {
size_t size;
uint8_t *data;
-} getdns_bindata;
-typedef struct getdns_dict getdns_dict;
-typedef struct getdns_list getdns_list;
+};
+struct getdns_dict;
+struct getdns_list;
@@ -1339,7 +1339,7 @@ function.
#define UNUSED_PARAM(x) ((void)(x))
/* Set up the callback function, which will also do the processing of the results */
-
void this_callbackfn(struct getdns_context_t *this_context,
+
void this_callbackfn(struct getdns_context *this_context,
uint16_t this_callback_type,
struct getdns_dict *this_response,
void *this_userarg,
@@ -1387,7 +1387,7 @@ function.
int main()
{
/* Create the DNS context for this call */
-
struct getdns_context_t *this_context = NULL;
+
struct getdns_context *this_context = NULL;
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
@@ -1448,7 +1448,7 @@ their TTLs.
#define UNUSED_PARAM(x) ((void)(x))
/* Set up the callback function, which will also do the processing of the results */
-
void this_callbackfn(struct getdns_context_t *this_context,
+
void this_callbackfn(struct getdns_context *this_context,
getdns_return_t this_callback_type,
struct getdns_dict *this_response,
void *this_userarg,
@@ -1535,7 +1535,7 @@ their TTLs.
int main()
{
/* Create the DNS context for this call */
-
struct getdns_context_t *this_context = NULL;
+
struct getdns_context *this_context = NULL;
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
@@ -1628,7 +1628,7 @@ as it is for the synchronous example, it is just done in
main()
.{
getdns_return_t this_ret; /* Holder for all function returns */
/* Create the DNS context for this call */
-
struct getdns_context_t *this_context = NULL;
+
struct getdns_context *this_context = NULL;
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
@@ -1809,8 +1809,8 @@ is not allowed, or
GETDNS_RETURN_CONTEXT_UPDATE_FAIL
for a failure
getdns_return_t
getdns_context_set_context_update_callback(
- getdns_context_t context,
- void (*value)(getdns_context_t context, uint16_t changed_item)
+ struct getdns_context *context,
+ void (*value)(struct getdns_context *context, uint16_t changed_item)
);
The value is a pointer to the callback function that will be
called when any context is changed. Such changes might be from automatic
@@ -1824,7 +1824,7 @@ specifies which of the context changed; the context codes are listed
getdns_return_t
getdns_context_set_resolution_type(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
Specifies whether DNS queries are performed with nonrecurive lookups or
@@ -1842,7 +1842,7 @@ return GETDNS_RETURN_CONTEXT_UPDATE_FAIL
.
getdns_return_t
getdns_context_set_namespaces(
- getdns_context_t context,
+ struct getdns_context *context,
size_t namespace_count,
uint16_t *namespaces
);
@@ -1867,7 +1867,7 @@ default is
determined by the OS.
getdns_return_t
getdns_context_set_dns_transport(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
Specifies what transport is used for DNS lookups.
@@ -1880,7 +1880,7 @@ The value is
getdns_return_t
getdns_context_set_limit_outstanding_queries(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t limit
);
Specifies limit the number of outstanding DNS queries.
@@ -1892,7 +1892,7 @@ the number of outstanding DNS queries is unlimited.
getdns_return_t
getdns_context_set_timeout(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t timeout
);
Specifies number of seconds the API will wait for request to return.
@@ -1903,7 +1903,7 @@ The default is not specified.
getdns_return_t
getdns_context_set_follow_redirects(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
Specifies whether or not DNS queries follow redirects.
@@ -1915,7 +1915,7 @@ through CNAME and DNAME to return the CNAME or DNAME, not the eventual target.
getdns_return_t
getdns_context_set_dns_root_servers(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *addresses
);
The list contains dicts that are addresses to be used for looking up top-level
@@ -1928,7 +1928,7 @@ either "IPv4" or "IPv6") and address_data
(whose value is a bindata
getdns_return_t
getdns_context_set_append_name(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
Specifies whether to append a suffix to the query string
@@ -1943,7 +1943,7 @@ whether or not to append the suffix given by getdns_context_set_suffix
getdns_return_t
getdns_context_set_suffix(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *value
);
The value is a list of bindatas that are strings that are
@@ -1959,7 +1959,7 @@ to allow non-ASCII octets and special characters in labels.
getdns_return_t
getdns_context_set_dnssec_trust_anchors(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *value
);
The value is a list of bindatas that are the DNSSEC trust anchors. The default
@@ -1970,7 +1970,7 @@ are expressed as RDATAs from DNSKEY resource records.
getdns_return_t
getdns_context_set_dnssec_allowed_skew(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
The value is the number of seconds of skew that is allowed in either direction when
@@ -1990,7 +1990,7 @@ must do its own DNSSEC processing, possibly with the getdns_validate_dnsse
getdns_return_t
getdns_context_set_stub_resolution(
- getdns_context_t context,
+ struct getdns_context *context,
struct getdns_list *upstream_list
);
The list of dicts define where a stub resolver will send queries. Each dict contains
@@ -2009,7 +2009,7 @@ These come from RFC 2671.
getdns_return_t
getdns_context_set_edns_maximum_udp_payload_size(
- getdns_context_t context,
+ struct getdns_context *context,
uint16_t value
);
The value is between 512 and 65535; the default
@@ -2018,7 +2018,7 @@ is 512.
getdns_return_t
getdns_context_set_edns_extended_rcode(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
);
The value is between 0 and 255; the default
@@ -2027,7 +2027,7 @@ is 0.
getdns_return_t
getdns_context_set_edns_version(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
);
The value is between 0 and 255; the default
@@ -2036,7 +2036,7 @@ is 0.
getdns_return_t
getdns_context_set_edns_do_bit(
- getdns_context_t context,
+ struct getdns_context *context,
uint8_t value
);
The value is between 0 and 1; the default
@@ -2047,7 +2047,7 @@ is 0.
getdns_return_t
getdns_context_set_memory_allocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(size_t somesize)
);
The value is a function pointer to the memory allocator; the
@@ -2056,7 +2056,7 @@ default is the malloc function.
getdns_return_t
getdns_context_set_memory_deallocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(void*)
);
The value is a function pointer to the memory deallocator; the
@@ -2065,7 +2065,7 @@ default is the free function.
getdns_return_t
getdns_context_set_memory_reallocator(
- getdns_context_t context,
+ struct getdns_context *context,
void (*value)(void*)
);
The value is a function pointer to the memory reallocator; the
@@ -2115,7 +2115,7 @@ default is the realloc function.
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