1 #include <stdio.h>
2 #include <stdint.h>
3 #include <inttypes.h>
4 #include <stdlib.h>
5 #include <string.h>
6 #include <getdns_libevent.h>
7
8 #define UNUSED_PARAM(x) ((void)(x))
9
10 /* The return values */
11 getdns_return_t retregular;
12 char * retcharstar;
13
14 /* The args */
15 int boolarg;
16 char * charstararg;
17 char ** charstarptrarg;
18 getdns_callback_t callbackarg;
19 uint16_t regulararg;
20 uint16_t *regularptrarg;
21 getdns_transaction_t txidarg;
22 getdns_transaction_t * txidptrarg;
23 getdns_namespace_t *namespaceptrarg;
24 getdns_resolution_t resolutionarg;
25 getdns_redirects_t redirectsarg;
26 getdns_transport_t transportarg;
27 getdns_append_name_t appendnamearg;
28
29 getdns_data_type * datatypeptrarg;
30 getdns_bindata ** bindataptrarg;
31 getdns_dict * dictarg;
32 getdns_bindata * bindataarg;
33 getdns_list * listarg;
34 getdns_dict ** dictptrarg;
35 getdns_list ** listptrarg;
36
37 size_t sizetarg;
38 size_t * sizetptrarg;
39 getdns_context *contextarg = NULL;
40 uint8_t uint8arg;
41 uint16_t uint16arg;
42 uint32_t uint32arg;
43 uint8_t * uint8ptrarg;
44 uint16_t * uint16ptrarg;
45 uint32_t * uint32ptrarg;
46 void * arrayarg;
47 void * userarg;
allocfunctionarg(size_t foo)48 void * allocfunctionarg(size_t foo) {UNUSED_PARAM(foo); return NULL; }
reallocfunctionarg(void * foo,size_t bar)49 void * reallocfunctionarg(void* foo, size_t bar)
50 {UNUSED_PARAM(foo); UNUSED_PARAM(bar); return NULL; }
deallocfunctionarg(void * foo)51 void deallocfunctionarg(void* foo) {UNUSED_PARAM(foo);}
extendedallocfunctionarg(void * userarg,size_t foo)52 void * extendedallocfunctionarg(void* userarg, size_t foo)
53 {UNUSED_PARAM(userarg); UNUSED_PARAM(foo); return NULL; }
extendedreallocfunctionarg(void * userarg,void * foo,size_t bar)54 void * extendedreallocfunctionarg(void* userarg, void* foo, size_t bar)
55 {UNUSED_PARAM(userarg); UNUSED_PARAM(foo); UNUSED_PARAM(bar); return NULL; }
extendeddeallocfunctionarg(void * userarg,void * foo)56 void extendeddeallocfunctionarg(void* userarg, void* foo)
57 {UNUSED_PARAM(userarg); UNUSED_PARAM(foo);}
setcallbackfunctionarg(getdns_context * foo1,getdns_context_code_t foo2)58 void setcallbackfunctionarg(getdns_context *foo1, getdns_context_code_t foo2)
59 {UNUSED_PARAM(foo1);UNUSED_PARAM(foo2);}
60
main()61 int main()
62 {
63
64 retregular = getdns_general(
65 contextarg,
66 charstararg,
67 uint16arg,
68 dictarg,
69 arrayarg,
70 txidptrarg,
71 callbackarg
72 );
73
74 retregular = getdns_address(
75 contextarg,
76 charstararg,
77 dictarg,
78 arrayarg,
79 txidptrarg,
80 callbackarg
81 );
82
83 retregular = getdns_hostname(
84 contextarg,
85 dictarg,
86 dictarg,
87 arrayarg,
88 txidptrarg,
89 callbackarg
90 );
91
92 retregular = getdns_service(
93 contextarg,
94 charstararg,
95 dictarg,
96 arrayarg,
97 txidptrarg,
98 callbackarg
99 );
100
101 retregular = getdns_context_create(
102 &contextarg,
103 boolarg
104 );
105
106 retregular = getdns_context_create_with_memory_functions(
107 &contextarg,
108 boolarg,
109 allocfunctionarg,
110 reallocfunctionarg,
111 deallocfunctionarg
112 );
113
114 retregular = getdns_context_create_with_extended_memory_functions(
115 &contextarg,
116 boolarg,
117 userarg,
118 extendedallocfunctionarg,
119 extendedreallocfunctionarg,
120 extendeddeallocfunctionarg
121 );
122
123 getdns_context_destroy(
124 contextarg
125 );
126
127 retregular = getdns_cancel_callback(
128 contextarg,
129 txidarg
130 );
131
132 retregular = getdns_general_sync(
133 contextarg,
134 charstararg,
135 uint16arg,
136 dictarg,
137 &dictarg
138 );
139
140 retregular = getdns_address_sync(
141 contextarg,
142 charstararg,
143 dictarg,
144 &dictarg
145 );
146
147 retregular = getdns_hostname_sync(
148 contextarg,
149 dictarg,
150 dictarg,
151 &dictarg
152 );
153
154 retregular = getdns_service_sync(
155 contextarg,
156 charstararg,
157 dictarg,
158 &dictarg
159 );
160
161 retregular = getdns_list_get_length(listarg, sizetptrarg);
162 retregular = getdns_list_get_data_type(listarg, sizetarg, datatypeptrarg);
163 retregular = getdns_list_get_dict(listarg, sizetarg, dictptrarg);
164 retregular = getdns_list_get_list(listarg, sizetarg, listptrarg);
165 retregular = getdns_list_get_bindata(listarg, sizetarg, bindataptrarg);
166 retregular = getdns_list_get_int(listarg, sizetarg, uint32ptrarg);
167
168 retregular = getdns_dict_get_names(dictarg, listptrarg);
169 retregular = getdns_dict_get_data_type(dictarg, charstararg, datatypeptrarg);
170 retregular = getdns_dict_get_dict(dictarg, charstararg, dictptrarg);
171 retregular = getdns_dict_get_list(dictarg, charstararg, listptrarg);
172 retregular = getdns_dict_get_bindata(dictarg, charstararg, bindataptrarg);
173 retregular = getdns_dict_get_int(dictarg, charstararg, uint32ptrarg);
174
175 listarg = getdns_list_create();
176 listarg = getdns_list_create_with_context(contextarg);
177 listarg = getdns_list_create_with_memory_functions(
178 allocfunctionarg,
179 reallocfunctionarg,
180 deallocfunctionarg
181 );
182 listarg = getdns_list_create_with_extended_memory_functions(
183 userarg,
184 extendedallocfunctionarg,
185 extendedreallocfunctionarg,
186 extendeddeallocfunctionarg
187 );
188 getdns_list_destroy(listarg);
189 retregular = getdns_list_set_dict(listarg, sizetarg, dictarg);
190 retregular = getdns_list_set_list(listarg, sizetarg, listarg);
191 retregular = getdns_list_set_bindata(listarg, sizetarg, bindataarg);
192 retregular = getdns_list_set_int(listarg, sizetarg, uint32arg);
193
194 dictarg = getdns_dict_create();
195 dictarg = getdns_dict_create_with_context(contextarg);
196 dictarg = getdns_dict_create_with_memory_functions(
197 allocfunctionarg,
198 reallocfunctionarg,
199 deallocfunctionarg
200 );
201 dictarg = getdns_dict_create_with_extended_memory_functions(
202 userarg,
203 extendedallocfunctionarg,
204 extendedreallocfunctionarg,
205 extendeddeallocfunctionarg
206 );
207 getdns_dict_destroy(dictarg);
208 retregular = getdns_dict_set_dict(dictarg, charstararg, dictarg);
209 retregular = getdns_dict_set_list(dictarg, charstararg, listarg);
210 retregular = getdns_dict_set_bindata(dictarg, charstararg, bindataarg);
211 retregular = getdns_dict_set_int(dictarg, charstararg, uint32arg);
212 retregular = getdns_dict_remove_name(dictarg, charstararg);
213
214 retregular = getdns_convert_fqdn_to_dns_name(
215 charstararg,
216 bindataptrarg
217 );
218
219 retregular = getdns_convert_dns_name_to_fqdn(
220 bindataarg,
221 charstarptrarg
222 );
223
224 retcharstar = getdns_convert_ulabel_to_alabel(
225 charstararg
226 );
227
228 retcharstar = getdns_convert_alabel_to_ulabel(
229 charstararg
230 );
231
232 retregular = getdns_validate_dnssec(
233 listarg,
234 listarg,
235 listarg
236 );
237
238 retcharstar = getdns_pretty_print_dict(
239 dictarg
240 );
241
242 retcharstar = getdns_display_ip_address(
243 bindataarg
244 );
245
246 retregular = getdns_context_set_context_update_callback(
247 contextarg,
248 setcallbackfunctionarg
249 );
250
251 retregular = getdns_context_set_resolution_type(
252 contextarg,
253 resolutionarg
254 );
255
256 retregular = getdns_context_set_namespaces(
257 contextarg,
258 sizetarg,
259 namespaceptrarg
260 );
261
262 retregular = getdns_context_set_dns_transport(
263 contextarg,
264 transportarg
265 );
266
267 retregular = getdns_context_set_limit_outstanding_queries(
268 contextarg,
269 uint16arg
270 );
271
272 retregular = getdns_context_set_timeout(
273 contextarg,
274 uint16arg
275 );
276
277 retregular = getdns_context_set_follow_redirects(
278 contextarg,
279 redirectsarg
280 );
281
282 retregular = getdns_context_set_dns_root_servers(
283 contextarg,
284 listarg
285 );
286
287 retregular = getdns_context_set_append_name(
288 contextarg,
289 appendnamearg
290 );
291
292 retregular = getdns_context_set_suffix(
293 contextarg,
294 listarg
295 );
296
297 retregular = getdns_context_set_dnssec_trust_anchors(
298 contextarg,
299 listarg
300 );
301
302 retregular = getdns_context_set_dnssec_allowed_skew(
303 contextarg,
304 uint16arg
305 );
306
307 retregular = getdns_context_set_upstream_recursive_servers(
308 contextarg,
309 listarg
310 );
311
312 retregular = getdns_context_set_edns_maximum_udp_payload_size(
313 contextarg,
314 uint16arg
315 );
316
317 retregular = getdns_context_set_edns_extended_rcode(
318 contextarg,
319 uint8arg
320 );
321
322 retregular = getdns_context_set_edns_version(
323 contextarg,
324 uint8arg
325 );
326
327 retregular = getdns_context_set_edns_do_bit(
328 contextarg,
329 uint8arg
330 );
331
332 retregular = getdns_context_set_memory_functions(
333 contextarg,
334 allocfunctionarg,
335 reallocfunctionarg,
336 deallocfunctionarg
337 );
338
339 retregular = getdns_context_set_extended_memory_functions(
340 contextarg,
341 userarg,
342 extendedallocfunctionarg,
343 extendedreallocfunctionarg,
344 extendeddeallocfunctionarg
345 );
346
347 return(0); } /* End of main() */
348