Repository navigation
Expand file tree
/
Copy pathgetdns_core_only.c
More file actions
471 lines (393 loc) · 15.8 KB
/
Copy pathgetdns_core_only.c
File metadata and controls
471 lines (393 loc) · 15.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
#include <getdns_libevent.h>
/* stuff to make it compile pedantically */
#define UNUSED_PARAM(x) ((void)(x))
int main(){ return(0); }
/* Function definitions */
getdns_return_t
getdns_general(
getdns_context *context,
const char *name,
uint16_t request_type,
getdns_dict *extensions,
void *userarg,
getdns_transaction_t *transaction_id,
getdns_callback_t callback
)
{ UNUSED_PARAM(context); UNUSED_PARAM(name); UNUSED_PARAM(request_type); UNUSED_PARAM(extensions); UNUSED_PARAM(userarg);
UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_address(
getdns_context *context,
const char *name,
getdns_dict *extensions,
void *userarg,
getdns_transaction_t *transaction_id,
getdns_callback_t callback
)
{ UNUSED_PARAM(context); UNUSED_PARAM(name); UNUSED_PARAM(extensions); UNUSED_PARAM(userarg);
UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_hostname(
getdns_context *context,
getdns_dict *address,
getdns_dict *extensions,
void *userarg,
getdns_transaction_t *transaction_id,
getdns_callback_t callback
)
{ UNUSED_PARAM(context); UNUSED_PARAM(address); UNUSED_PARAM(extensions); UNUSED_PARAM(userarg);
UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_service(
getdns_context *context,
const char *name,
getdns_dict *extensions,
void *userarg,
getdns_transaction_t *transaction_id,
getdns_callback_t callback
)
{ UNUSED_PARAM(context); UNUSED_PARAM(name); UNUSED_PARAM(extensions); UNUSED_PARAM(userarg);
UNUSED_PARAM(transaction_id); UNUSED_PARAM(callback); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_create(
getdns_context **context,
int set_from_os
)
{ UNUSED_PARAM(context); UNUSED_PARAM(set_from_os); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_create_with_memory_functions(
getdns_context **context,
int set_from_os,
void *(*malloc)(size_t),
void *(*realloc)(void *, size_t),
void (*free)(void *)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(set_from_os);
UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_create_with_extended_memory_functions(
getdns_context **context,
int set_from_os,
void *userarg,
void *(*malloc)(void *userarg, size_t),
void *(*realloc)(void *userarg, void *, size_t),
void (*free)(void *userarg, void *)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(set_from_os); UNUSED_PARAM(userarg);
UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return GETDNS_RETURN_GOOD; }
void
getdns_context_destroy(
getdns_context *context
)
{ UNUSED_PARAM(context); }
getdns_return_t
getdns_cancel_callback(
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 *context,
const char *name,
uint16_t request_type,
getdns_dict *extensions,
getdns_dict **response
)
{ UNUSED_PARAM(context); UNUSED_PARAM(name); UNUSED_PARAM(request_type); UNUSED_PARAM(extensions);
UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_address_sync(
getdns_context *context,
const char *name,
getdns_dict *extensions,
getdns_dict **response
)
{ UNUSED_PARAM(context); UNUSED_PARAM(name); UNUSED_PARAM(extensions);
UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_hostname_sync(
getdns_context *context,
getdns_dict *address,
getdns_dict *extensions,
getdns_dict **response
)
{ UNUSED_PARAM(context); UNUSED_PARAM(address); UNUSED_PARAM(extensions);
UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_service_sync(
getdns_context *context,
const char *name,
getdns_dict *extensions,
getdns_dict **response
)
{ UNUSED_PARAM(context); UNUSED_PARAM(name); UNUSED_PARAM(extensions);
UNUSED_PARAM(response); return GETDNS_RETURN_GOOD; }
void
getdns_free_sync_request_memory(
getdns_dict *response
)
{ UNUSED_PARAM(response); }
getdns_return_t getdns_list_get_length(const getdns_list *this_list, size_t *answer)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_get_data_type(const getdns_list *this_list, size_t index, getdns_data_type *answer)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_get_dict(const getdns_list *this_list, size_t index, getdns_dict **answer)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_get_list(const getdns_list *this_list, size_t index, getdns_list **answer)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_get_bindata(const getdns_list *this_list, size_t index, getdns_bindata **answer)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_get_int(const getdns_list *this_list, size_t index, uint32_t *answer)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_get_names(const getdns_dict *this_dict, getdns_list **answer)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_get_data_type(const getdns_dict *this_dict, const char *name, getdns_data_type *answer)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_get_dict(const getdns_dict *this_dict, const char *name, getdns_dict **answer)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_get_list(const getdns_dict *this_dict, const char *name, getdns_list **answer)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_get_bindata(const getdns_dict *this_dict, const char *name, getdns_bindata **answer)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_get_int(const getdns_dict *this_dict, const char *name, uint32_t *answer)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
getdns_list * getdns_list_create()
{ return NULL; }
getdns_list * getdns_list_create_with_context(
getdns_context *context
)
{ UNUSED_PARAM(context); return NULL; }
getdns_list * getdns_list_create_with_memory_functions(
void *(*malloc)(size_t),
void *(*realloc)(void *, size_t),
void (*free)(void *)
)
{ UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return NULL; }
getdns_list * getdns_list_create_with_extended_memory_functions(
void *userarg,
void *(*malloc)(void *userarg, size_t),
void *(*realloc)(void *userarg, void *, size_t),
void (*free)(void *userarg, void *)
)
{ UNUSED_PARAM(userarg);
UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return NULL; }
void getdns_list_destroy(getdns_list *this_list)
{ UNUSED_PARAM(this_list); }
getdns_return_t getdns_list_set_dict(getdns_list *this_list, size_t index, const getdns_dict *child_dict)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_dict); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_set_list(getdns_list *this_list, size_t index, const getdns_list *child_list)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_list); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_set_bindata(getdns_list *this_list, size_t index, const getdns_bindata *child_bindata)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_bindata); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_list_set_int(getdns_list *this_list, size_t index, uint32_t child_uint32)
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_uint32); return GETDNS_RETURN_GOOD; }
getdns_dict * getdns_dict_create()
{ return NULL; }
getdns_dict * getdns_dict_create_with_context(
getdns_context *context
)
{ UNUSED_PARAM(context); return NULL; }
getdns_dict * getdns_dict_create_with_memory_functions(
void *(*malloc)(size_t),
void *(*realloc)(void *, size_t),
void (*free)(void *)
)
{ UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return NULL; }
getdns_dict * getdns_dict_create_with_extended_memory_functions(
void *userarg,
void *(*malloc)(void *userarg, size_t),
void *(*realloc)(void *userarg, void *, size_t),
void (*free)(void *userarg, void *)
)
{ UNUSED_PARAM(userarg);
UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return NULL; }
void getdns_dict_destroy(getdns_dict *this_dict)
{ UNUSED_PARAM(this_dict); }
getdns_return_t getdns_dict_set_dict(getdns_dict *this_dict, const char *name, const getdns_dict *child_dict)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_dict); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_set_list(getdns_dict *this_dict, const char *name, const getdns_list *child_list)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_list); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_set_bindata(getdns_dict *this_dict, const char *name, const getdns_bindata *child_bindata)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_bindata); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_set_int(getdns_dict *this_dict, const char *name, uint32_t child_uint32)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_uint32); return GETDNS_RETURN_GOOD; }
getdns_return_t getdns_dict_remove_name(getdns_dict *this_dict, const char *name)
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_convert_dns_name_to_fqdn(
const getdns_bindata *dns_name_wire_fmt,
char **fqdn_as_string
)
{ UNUSED_PARAM(dns_name_wire_fmt); UNUSED_PARAM(fqdn_as_string); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_convert_fqdn_to_dns_name(
const char *fqdn_as_string,
getdns_bindata **dns_name_wire_fmt
)
{ UNUSED_PARAM(fqdn_as_string); UNUSED_PARAM(dns_name_wire_fmt); return GETDNS_RETURN_GOOD; }
char *
getdns_convert_ulabel_to_alabel(
const char *ulabel
)
{ UNUSED_PARAM(ulabel); return NULL; }
char *
getdns_convert_alabel_to_ulabel(
const char *alabel
)
{ UNUSED_PARAM(alabel); return NULL; }
getdns_return_t
getdns_validate_dnssec(
getdns_list *record_to_validate,
getdns_list *bundle_of_support_records,
getdns_list *trust_anchor_rdatas
)
{ UNUSED_PARAM(record_to_validate); UNUSED_PARAM(bundle_of_support_records); UNUSED_PARAM(trust_anchor_rdatas);
return GETDNS_RETURN_GOOD; }
char *
getdns_pretty_print_dict(
const getdns_dict *some_dict
)
{ UNUSED_PARAM(some_dict); return NULL; }
char *
getdns_display_ip_address(
const getdns_bindata *bindata_of_ipv4_or_ipv6_address
)
{ UNUSED_PARAM(bindata_of_ipv4_or_ipv6_address); return NULL; }
getdns_return_t
getdns_context_set_context_update_callback(
getdns_context *context,
void (*value)(getdns_context *context, getdns_context_code_t changed_item)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_resolution_type(
getdns_context *context,
getdns_resolution_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_namespaces(
getdns_context *context,
size_t namespace_count,
getdns_namespace_t *namespaces
)
{ UNUSED_PARAM(context); UNUSED_PARAM(namespace_count); UNUSED_PARAM(namespaces);
return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dns_transport(
getdns_context *context,
getdns_transport_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_limit_outstanding_queries(
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 *context,
uint64_t timeout
)
{ UNUSED_PARAM(context); UNUSED_PARAM(timeout); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_follow_redirects(
getdns_context *context,
getdns_redirects_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dns_root_servers(
getdns_context *context,
getdns_list *addresses
)
{ UNUSED_PARAM(context); UNUSED_PARAM(addresses); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_append_name(
getdns_context *context,
getdns_append_name_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_suffix(
getdns_context *context,
getdns_list *value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dnssec_trust_anchors(
getdns_context *context,
getdns_list *value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_dnssec_allowed_skew(
getdns_context *context,
unsigned int value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_upstream_recursive_servers(
getdns_context *context,
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 *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 *context,
uint8_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_edns_version(
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 *context,
uint8_t value
)
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_memory_functions(
getdns_context *context,
void *(*malloc) (size_t),
void *(*realloc) (void *, size_t),
void (*free) (void *)
)
{ UNUSED_PARAM(context);
UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_context_set_extended_memory_functions(
getdns_context *context,
void *userarg,
void *(*malloc)(void *userarg, size_t sz),
void *(*realloc)(void *userarg, void *ptr, size_t sz),
void (*free)(void *userarg, void *ptr)
)
{ UNUSED_PARAM(context); UNUSED_PARAM(userarg);
UNUSED_PARAM(malloc); UNUSED_PARAM(realloc); UNUSED_PARAM(free);
return GETDNS_RETURN_GOOD; }
getdns_return_t
getdns_extension_set_libevent_base(
getdns_context *context,
struct event_base *this_event_base
)
{ UNUSED_PARAM(context); UNUSED_PARAM(this_event_base); return GETDNS_RETURN_GOOD; }