-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdns_8h.html
1957 lines (1841 loc) · 129 KB
/
dns_8h.html
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
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libevent: event2/dns.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libevent
 <span id="projectnumber">2.2.1</span>
</div>
<div id="projectbrief">Event notification library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_db160b4728e6067cf5f9cc14ec42c79d.html">event2</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">dns.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Provides a few APIs to use for resolving DNS names, and a facility for implementing simple DNS servers.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include <event2/visibility.h></code><br />
<code>#include <<a class="el" href="util_8h_source.html">event2/util.h</a>></code><br />
</div>
<p><a href="dns_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a96219ffdbc2c3e2805ccbb024e442d50"><td class="memItemLeft" align="right" valign="top"><a id="a96219ffdbc2c3e2805ccbb024e442d50"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_CNAME</b>   4</td></tr>
<tr class="separator:a96219ffdbc2c3e2805ccbb024e442d50"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae6bc56fee95d5e87a19e8660738b81d2"><td class="memItemLeft" align="right" valign="top"><a id="ae6bc56fee95d5e87a19e8660738b81d2"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ae6bc56fee95d5e87a19e8660738b81d2">DNS_CNAME_CALLBACK</a>   0x80</td></tr>
<tr class="memdesc:ae6bc56fee95d5e87a19e8660738b81d2"><td class="mdescLeft"> </td><td class="mdescRight">Make a separate callback for CNAME in answer. <br /></td></tr>
<tr class="separator:ae6bc56fee95d5e87a19e8660738b81d2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa213c5179d5439b1ceb6b356cfa6670a"><td class="memItemLeft" align="right" valign="top"><a id="aa213c5179d5439b1ceb6b356cfa6670a"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#aa213c5179d5439b1ceb6b356cfa6670a">DNS_ERR_CANCEL</a>   69</td></tr>
<tr class="memdesc:aa213c5179d5439b1ceb6b356cfa6670a"><td class="mdescLeft"> </td><td class="mdescRight">The request was canceled via a call to evdns_cancel_request. <br /></td></tr>
<tr class="separator:aa213c5179d5439b1ceb6b356cfa6670a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af83b8dba06d732f95c5134a26189bf07"><td class="memItemLeft" align="right" valign="top"><a id="af83b8dba06d732f95c5134a26189bf07"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#af83b8dba06d732f95c5134a26189bf07">DNS_ERR_FORMAT</a>   1</td></tr>
<tr class="memdesc:af83b8dba06d732f95c5134a26189bf07"><td class="mdescLeft"> </td><td class="mdescRight">The name server was unable to interpret the query. <br /></td></tr>
<tr class="separator:af83b8dba06d732f95c5134a26189bf07"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a339623396788ff9271b5cc345b83a2e8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a339623396788ff9271b5cc345b83a2e8">DNS_ERR_NODATA</a>   70</td></tr>
<tr class="memdesc:a339623396788ff9271b5cc345b83a2e8"><td class="mdescLeft"> </td><td class="mdescRight">There were no answers and no error condition in the DNS packet. <a href="dns_8h.html#a339623396788ff9271b5cc345b83a2e8">More...</a><br /></td></tr>
<tr class="separator:a339623396788ff9271b5cc345b83a2e8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ab3095d5fc6b9b476753f1dc43ca062"><td class="memItemLeft" align="right" valign="top"><a id="a9ab3095d5fc6b9b476753f1dc43ca062"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a9ab3095d5fc6b9b476753f1dc43ca062">DNS_ERR_NONE</a>   0</td></tr>
<tr class="memdesc:a9ab3095d5fc6b9b476753f1dc43ca062"><td class="mdescLeft"> </td><td class="mdescRight">Error codes 0-5 are as described in RFC 1035. <br /></td></tr>
<tr class="separator:a9ab3095d5fc6b9b476753f1dc43ca062"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a69a1417da1abb3ec925bac4bdc9dda00"><td class="memItemLeft" align="right" valign="top"><a id="a69a1417da1abb3ec925bac4bdc9dda00"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a69a1417da1abb3ec925bac4bdc9dda00">DNS_ERR_NOTEXIST</a>   3</td></tr>
<tr class="memdesc:a69a1417da1abb3ec925bac4bdc9dda00"><td class="mdescLeft"> </td><td class="mdescRight">The domain name does not exist. <br /></td></tr>
<tr class="separator:a69a1417da1abb3ec925bac4bdc9dda00"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad4c885f89aab5bba9636bcab0b2bb46f"><td class="memItemLeft" align="right" valign="top"><a id="ad4c885f89aab5bba9636bcab0b2bb46f"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ad4c885f89aab5bba9636bcab0b2bb46f">DNS_ERR_NOTIMPL</a>   4</td></tr>
<tr class="memdesc:ad4c885f89aab5bba9636bcab0b2bb46f"><td class="mdescLeft"> </td><td class="mdescRight">The name server does not support the requested kind of query. <br /></td></tr>
<tr class="separator:ad4c885f89aab5bba9636bcab0b2bb46f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2612a0b4f473b2e0d8353968cf958c8"><td class="memItemLeft" align="right" valign="top"><a id="ac2612a0b4f473b2e0d8353968cf958c8"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ac2612a0b4f473b2e0d8353968cf958c8">DNS_ERR_REFUSED</a>   5</td></tr>
<tr class="memdesc:ac2612a0b4f473b2e0d8353968cf958c8"><td class="mdescLeft"> </td><td class="mdescRight">The name server refuses to reform the specified operation for policy reasons. <br /></td></tr>
<tr class="separator:ac2612a0b4f473b2e0d8353968cf958c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a288664d29454d839d3337c9f1a16287b"><td class="memItemLeft" align="right" valign="top"><a id="a288664d29454d839d3337c9f1a16287b"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a288664d29454d839d3337c9f1a16287b">DNS_ERR_SERVERFAILED</a>   2</td></tr>
<tr class="memdesc:a288664d29454d839d3337c9f1a16287b"><td class="mdescLeft"> </td><td class="mdescRight">The name server was unable to process this query due to a problem with the name server. <br /></td></tr>
<tr class="separator:a288664d29454d839d3337c9f1a16287b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad64cc74ddb454b815d42e23b4d24bf16"><td class="memItemLeft" align="right" valign="top"><a id="ad64cc74ddb454b815d42e23b4d24bf16"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ad64cc74ddb454b815d42e23b4d24bf16">DNS_ERR_SHUTDOWN</a>   68</td></tr>
<tr class="memdesc:ad64cc74ddb454b815d42e23b4d24bf16"><td class="mdescLeft"> </td><td class="mdescRight">The request was canceled because the DNS subsystem was shut down. <br /></td></tr>
<tr class="separator:ad64cc74ddb454b815d42e23b4d24bf16"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acb501430c13d4432314859d36b21c59c"><td class="memItemLeft" align="right" valign="top"><a id="acb501430c13d4432314859d36b21c59c"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#acb501430c13d4432314859d36b21c59c">DNS_ERR_TIMEOUT</a>   67</td></tr>
<tr class="memdesc:acb501430c13d4432314859d36b21c59c"><td class="mdescLeft"> </td><td class="mdescRight">Communication with the server timed out. <br /></td></tr>
<tr class="separator:acb501430c13d4432314859d36b21c59c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab133c94928a9ebe3d37ad5a5d3722fb8"><td class="memItemLeft" align="right" valign="top"><a id="ab133c94928a9ebe3d37ad5a5d3722fb8"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ab133c94928a9ebe3d37ad5a5d3722fb8">DNS_ERR_TRUNCATED</a>   65</td></tr>
<tr class="memdesc:ab133c94928a9ebe3d37ad5a5d3722fb8"><td class="mdescLeft"> </td><td class="mdescRight">The reply was truncated or ill-formatted. <br /></td></tr>
<tr class="separator:ab133c94928a9ebe3d37ad5a5d3722fb8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a09a9900444d399cb6d516e40a1629f79"><td class="memItemLeft" align="right" valign="top"><a id="a09a9900444d399cb6d516e40a1629f79"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a09a9900444d399cb6d516e40a1629f79">DNS_ERR_UNKNOWN</a>   66</td></tr>
<tr class="memdesc:a09a9900444d399cb6d516e40a1629f79"><td class="mdescLeft"> </td><td class="mdescRight">An unknown error occurred. <br /></td></tr>
<tr class="separator:a09a9900444d399cb6d516e40a1629f79"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a17bdba92fba6851649178796a61e6e48"><td class="memItemLeft" align="right" valign="top"><a id="a17bdba92fba6851649178796a61e6e48"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_IPv4_A</b>   1</td></tr>
<tr class="separator:a17bdba92fba6851649178796a61e6e48"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acb8f109c67c35edaf2fa5628a39e8591"><td class="memItemLeft" align="right" valign="top"><a id="acb8f109c67c35edaf2fa5628a39e8591"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_IPv6_AAAA</b>   3</td></tr>
<tr class="separator:acb8f109c67c35edaf2fa5628a39e8591"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a347dc763a4e66bed0e1b340f53aa1b6d"><td class="memItemLeft" align="right" valign="top"><a id="a347dc763a4e66bed0e1b340f53aa1b6d"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_NO_SEARCH</b>   <a class="el" href="dns_8h.html#af82856a398b08ac3a1bb2d540fa9c742">DNS_QUERY_NO_SEARCH</a></td></tr>
<tr class="separator:a347dc763a4e66bed0e1b340f53aa1b6d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad1354f68d965a9b454f4f1e710b5decc"><td class="memItemLeft" align="right" valign="top"><a id="ad1354f68d965a9b454f4f1e710b5decc"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_OPTION_HOSTSFILE</b>   8</td></tr>
<tr class="separator:ad1354f68d965a9b454f4f1e710b5decc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae96b65439eb5d0f839e20eb52ce59612"><td class="memItemLeft" align="right" valign="top"><a id="ae96b65439eb5d0f839e20eb52ce59612"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_OPTION_MISC</b>   4</td></tr>
<tr class="separator:ae96b65439eb5d0f839e20eb52ce59612"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4837b11510c062456bbc86f12ccbd932"><td class="memItemLeft" align="right" valign="top"><a id="a4837b11510c062456bbc86f12ccbd932"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_OPTION_NAMESERVERS</b>   2</td></tr>
<tr class="separator:a4837b11510c062456bbc86f12ccbd932"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4599d1ceda8b32615f8682d5f7abc356"><td class="memItemLeft" align="right" valign="top"><a id="a4599d1ceda8b32615f8682d5f7abc356"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_OPTION_NAMESERVERS_NO_DEFAULT</b>   16</td></tr>
<tr class="separator:a4599d1ceda8b32615f8682d5f7abc356"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49145d945a502797f174804ff60fc075"><td class="memItemLeft" align="right" valign="top"><a id="a49145d945a502797f174804ff60fc075"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_OPTION_SEARCH</b>   1</td></tr>
<tr class="separator:a49145d945a502797f174804ff60fc075"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a417f74bbbbd887a84d911ed9dc7ce3ae"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a417f74bbbbd887a84d911ed9dc7ce3ae">DNS_OPTIONS_ALL</a></td></tr>
<tr class="memdesc:a417f74bbbbd887a84d911ed9dc7ce3ae"><td class="mdescLeft"> </td><td class="mdescRight">All above: <a href="dns_8h.html#a417f74bbbbd887a84d911ed9dc7ce3ae">More...</a><br /></td></tr>
<tr class="separator:a417f74bbbbd887a84d911ed9dc7ce3ae"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af69594a709159a6607376597d6fcfc86"><td class="memItemLeft" align="right" valign="top"><a id="af69594a709159a6607376597d6fcfc86"></a>
#define </td><td class="memItemRight" valign="bottom"><b>DNS_PTR</b>   2</td></tr>
<tr class="separator:af69594a709159a6607376597d6fcfc86"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9c15b7447c0ed1c0966ecce97317266c"><td class="memItemLeft" align="right" valign="top"><a id="a9c15b7447c0ed1c0966ecce97317266c"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a9c15b7447c0ed1c0966ecce97317266c">DNS_QUERY_IGNTC</a>   0x04</td></tr>
<tr class="memdesc:a9c15b7447c0ed1c0966ecce97317266c"><td class="mdescLeft"> </td><td class="mdescRight">Ignore truncation flag in responses (don't fallback to TCP connections). <br /></td></tr>
<tr class="separator:a9c15b7447c0ed1c0966ecce97317266c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af82856a398b08ac3a1bb2d540fa9c742"><td class="memItemLeft" align="right" valign="top"><a id="af82856a398b08ac3a1bb2d540fa9c742"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#af82856a398b08ac3a1bb2d540fa9c742">DNS_QUERY_NO_SEARCH</a>   0x01</td></tr>
<tr class="memdesc:af82856a398b08ac3a1bb2d540fa9c742"><td class="mdescLeft"> </td><td class="mdescRight">Disable searching for the query. <br /></td></tr>
<tr class="separator:af82856a398b08ac3a1bb2d540fa9c742"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a14fa571999c82d15277b253806d2fbdc"><td class="memItemLeft" align="right" valign="top"><a id="a14fa571999c82d15277b253806d2fbdc"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a14fa571999c82d15277b253806d2fbdc">DNS_QUERY_USEVC</a>   0x02</td></tr>
<tr class="memdesc:a14fa571999c82d15277b253806d2fbdc"><td class="mdescLeft"> </td><td class="mdescRight">Use TCP connections ("virtual circuits") for queries rather than UDP datagrams. <br /></td></tr>
<tr class="separator:a14fa571999c82d15277b253806d2fbdc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afaa98a0d41eb8da13399fb9716d2a5b3"><td class="memItemLeft" align="right" valign="top"><a id="afaa98a0d41eb8da13399fb9716d2a5b3"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ADDITIONAL_SECTION</b>   2</td></tr>
<tr class="separator:afaa98a0d41eb8da13399fb9716d2a5b3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abfe36ef3f24e398558b7e6b2f5c82df0"><td class="memItemLeft" align="right" valign="top"><a id="abfe36ef3f24e398558b7e6b2f5c82df0"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ANSWER_SECTION</b>   0</td></tr>
<tr class="separator:abfe36ef3f24e398558b7e6b2f5c82df0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5931aa57d8552e0c94f4a8638e6db2ce"><td class="memItemLeft" align="right" valign="top"><a id="a5931aa57d8552e0c94f4a8638e6db2ce"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_AUTHORITY_SECTION</b>   1</td></tr>
<tr class="separator:a5931aa57d8552e0c94f4a8638e6db2ce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0be862f798b16642b5d911e05386a072"><td class="memItemLeft" align="right" valign="top"><a id="a0be862f798b16642b5d911e05386a072"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_BASE_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED</b></td></tr>
<tr class="separator:a0be862f798b16642b5d911e05386a072"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad676c79dfd2107701961fe2b269dcfd8"><td class="memItemLeft" align="right" valign="top"><a id="ad676c79dfd2107701961fe2b269dcfd8"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ad676c79dfd2107701961fe2b269dcfd8">EVDNS_BASE_DISABLE_WHEN_INACTIVE</a>   0x8000</td></tr>
<tr class="memdesc:ad676c79dfd2107701961fe2b269dcfd8"><td class="mdescLeft"> </td><td class="mdescRight">Flag for evdns_base_new: Do not prevent the libevent event loop from exiting when we have no active dns requests. <br /></td></tr>
<tr class="separator:ad676c79dfd2107701961fe2b269dcfd8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1cbcfe6baf59913c34aa04e57637da3d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a1cbcfe6baf59913c34aa04e57637da3d">EVDNS_BASE_INITIALIZE_NAMESERVERS</a>   1</td></tr>
<tr class="memdesc:a1cbcfe6baf59913c34aa04e57637da3d"><td class="mdescLeft"> </td><td class="mdescRight">Flag for evdns_base_new: process resolv.conf. <a href="dns_8h.html#a1cbcfe6baf59913c34aa04e57637da3d">More...</a><br /></td></tr>
<tr class="separator:a1cbcfe6baf59913c34aa04e57637da3d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a548a0e3529efb572b991408f7581a09b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a548a0e3529efb572b991408f7581a09b">EVDNS_BASE_NAMESERVERS_NO_DEFAULT</a>   0x10000</td></tr>
<tr class="memdesc:a548a0e3529efb572b991408f7581a09b"><td class="mdescLeft"> </td><td class="mdescRight">Flag for evdns_base_new: If EVDNS_BASE_INITIALIZE_NAMESERVERS isset, do not add default nameserver if there are no nameservers in resolv.conf. <a href="dns_8h.html#a548a0e3529efb572b991408f7581a09b">More...</a><br /></td></tr>
<tr class="separator:a548a0e3529efb572b991408f7581a09b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a865ae03fdd5198a182e6c4c322f56f8d"><td class="memItemLeft" align="right" valign="top"><a id="a865ae03fdd5198a182e6c4c322f56f8d"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a865ae03fdd5198a182e6c4c322f56f8d">EVDNS_BASE_NO_CACHE</a>   0x10</td></tr>
<tr class="memdesc:a865ae03fdd5198a182e6c4c322f56f8d"><td class="mdescLeft"> </td><td class="mdescRight">Flag for evdns_base_new: disable caching of DNS responses by default for async resolver. <br /></td></tr>
<tr class="separator:a865ae03fdd5198a182e6c4c322f56f8d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa3cbeaca3ff13f05c94a4308489bbcf6"><td class="memItemLeft" align="right" valign="top"><a id="aa3cbeaca3ff13f05c94a4308489bbcf6"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_CLASS_INET</b>   1</td></tr>
<tr class="separator:aa3cbeaca3ff13f05c94a4308489bbcf6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab2baffcebfd3049c7009f1ab68ed4317"><td class="memItemLeft" align="right" valign="top"><a id="ab2baffcebfd3049c7009f1ab68ed4317"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_FAILED_TO_OPEN_FILE</b>   1</td></tr>
<tr class="separator:ab2baffcebfd3049c7009f1ab68ed4317"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a24161c5bdc686cc859e6aac121183b3c"><td class="memItemLeft" align="right" valign="top"><a id="a24161c5bdc686cc859e6aac121183b3c"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_FAILED_TO_STAT_FILE</b>   2</td></tr>
<tr class="separator:a24161c5bdc686cc859e6aac121183b3c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad975460a94d52bc56401114dc7536205"><td class="memItemLeft" align="right" valign="top"><a id="ad975460a94d52bc56401114dc7536205"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_FILE_TOO_LARGE</b>   3</td></tr>
<tr class="separator:ad975460a94d52bc56401114dc7536205"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a28d3838b7a26a3bea886ff86ec8c2809"><td class="memItemLeft" align="right" valign="top"><a id="a28d3838b7a26a3bea886ff86ec8c2809"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_NO_NAMESERVERS_CONFIGURED</b>   6</td></tr>
<tr class="separator:a28d3838b7a26a3bea886ff86ec8c2809"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6c9a4d438dcceee9d797eafba4ebea85"><td class="memItemLeft" align="right" valign="top"><a id="a6c9a4d438dcceee9d797eafba4ebea85"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_NONE</b>   0</td></tr>
<tr class="separator:a6c9a4d438dcceee9d797eafba4ebea85"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa7af6522f854632642901e0a5b5e6667"><td class="memItemLeft" align="right" valign="top"><a id="aa7af6522f854632642901e0a5b5e6667"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_OUT_OF_MEMORY</b>   4</td></tr>
<tr class="separator:aa7af6522f854632642901e0a5b5e6667"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae63f12f87e7844108804658e4747423a"><td class="memItemLeft" align="right" valign="top"><a id="ae63f12f87e7844108804658e4747423a"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_ERROR_SHORT_READ_FROM_FILE</b>   5</td></tr>
<tr class="separator:ae63f12f87e7844108804658e4747423a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4955faa41f42dd3d5392de0f510b2d5b"><td class="memItemLeft" align="right" valign="top"><a id="a4955faa41f42dd3d5392de0f510b2d5b"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_FLAGS_AA</b>   0x400</td></tr>
<tr class="separator:a4955faa41f42dd3d5392de0f510b2d5b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa6512e054966c28adc1d160509a03f54"><td class="memItemLeft" align="right" valign="top"><a id="aa6512e054966c28adc1d160509a03f54"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_FLAGS_RD</b>   0x080</td></tr>
<tr class="separator:aa6512e054966c28adc1d160509a03f54"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4910befc342a418494f91c1e68a263b0"><td class="memItemLeft" align="right" valign="top"><a id="a4910befc342a418494f91c1e68a263b0"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_QTYPE_ALL</b>   255</td></tr>
<tr class="separator:a4910befc342a418494f91c1e68a263b0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:accca6e7eb2768c8b190c66c9db70d54d"><td class="memItemLeft" align="right" valign="top"><a id="accca6e7eb2768c8b190c66c9db70d54d"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_QTYPE_AXFR</b>   252</td></tr>
<tr class="separator:accca6e7eb2768c8b190c66c9db70d54d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4e8d8b1d5dade064329458e64f66fea0"><td class="memItemLeft" align="right" valign="top"><a id="a4e8d8b1d5dade064329458e64f66fea0"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_A</b>   1</td></tr>
<tr class="separator:a4e8d8b1d5dade064329458e64f66fea0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9c31c8794d88ca0415d3a082655098d0"><td class="memItemLeft" align="right" valign="top"><a id="a9c31c8794d88ca0415d3a082655098d0"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_AAAA</b>   28</td></tr>
<tr class="separator:a9c31c8794d88ca0415d3a082655098d0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abb31989f56eae67bc02c23be47b1383b"><td class="memItemLeft" align="right" valign="top"><a id="abb31989f56eae67bc02c23be47b1383b"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_CNAME</b>   5</td></tr>
<tr class="separator:abb31989f56eae67bc02c23be47b1383b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aea8abe47a00707401291a9a6c37a5e6b"><td class="memItemLeft" align="right" valign="top"><a id="aea8abe47a00707401291a9a6c37a5e6b"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_MX</b>   15</td></tr>
<tr class="separator:aea8abe47a00707401291a9a6c37a5e6b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa5f887413ecc76162da14b6680f9fb46"><td class="memItemLeft" align="right" valign="top"><a id="aa5f887413ecc76162da14b6680f9fb46"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_NS</b>   2</td></tr>
<tr class="separator:aa5f887413ecc76162da14b6680f9fb46"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6343c162297e966a7b4f93f3ef64e433"><td class="memItemLeft" align="right" valign="top"><a id="a6343c162297e966a7b4f93f3ef64e433"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_PTR</b>   12</td></tr>
<tr class="separator:a6343c162297e966a7b4f93f3ef64e433"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8a20816cd4a40625a73217371592497f"><td class="memItemLeft" align="right" valign="top"><a id="a8a20816cd4a40625a73217371592497f"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_SOA</b>   6</td></tr>
<tr class="separator:a8a20816cd4a40625a73217371592497f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abb4fb68c7c44ff643cdd83d95f366f27"><td class="memItemLeft" align="right" valign="top"><a id="abb4fb68c7c44ff643cdd83d95f366f27"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVDNS_TYPE_TXT</b>   16</td></tr>
<tr class="separator:abb4fb68c7c44ff643cdd83d95f366f27"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a43018959c4be1a9b16e4143c5e3ff556"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a43018959c4be1a9b16e4143c5e3ff556">evdns_callback_type</a>) (int result, char type, int count, int ttl, void *addresses, void *arg)</td></tr>
<tr class="memdesc:a43018959c4be1a9b16e4143c5e3ff556"><td class="mdescLeft"> </td><td class="mdescRight">The callback that contains the results from a lookup. <a href="dns_8h.html#a43018959c4be1a9b16e4143c5e3ff556">More...</a><br /></td></tr>
<tr class="separator:a43018959c4be1a9b16e4143c5e3ff556"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a850904a1dbd8c8a087dc2be7617e21c8"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a850904a1dbd8c8a087dc2be7617e21c8">evdns_debug_log_fn_type</a>) (int is_warning, const char *msg)</td></tr>
<tr class="memdesc:a850904a1dbd8c8a087dc2be7617e21c8"><td class="mdescLeft"> </td><td class="mdescRight">A callback that is invoked when a log message is generated. <a href="dns_8h.html#a850904a1dbd8c8a087dc2be7617e21c8">More...</a><br /></td></tr>
<tr class="separator:a850904a1dbd8c8a087dc2be7617e21c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0d1464f191ef7678be0d4caf3644a8f4"><td class="memItemLeft" align="right" valign="top"><a id="a0d1464f191ef7678be0d4caf3644a8f4"></a>
typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a0d1464f191ef7678be0d4caf3644a8f4">evdns_getaddrinfo_cb</a>) (int result, struct <a class="el" href="structevutil__addrinfo.html">evutil_addrinfo</a> *res, void *arg)</td></tr>
<tr class="memdesc:a0d1464f191ef7678be0d4caf3644a8f4"><td class="mdescLeft"> </td><td class="mdescRight">Callback for evdns_getaddrinfo. <br /></td></tr>
<tr class="separator:a0d1464f191ef7678be0d4caf3644a8f4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a052802966f4c9d482279a05197dff005"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a052802966f4c9d482279a05197dff005">evdns_request_callback_fn_type</a>) (struct evdns_server_request *, void *)</td></tr>
<tr class="memdesc:a052802966f4c9d482279a05197dff005"><td class="mdescLeft"> </td><td class="mdescRight">A callback to implement a DNS server. <a href="dns_8h.html#a052802966f4c9d482279a05197dff005">More...</a><br /></td></tr>
<tr class="separator:a052802966f4c9d482279a05197dff005"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a626139345ff6cb6c871e2950872e8473"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a626139345ff6cb6c871e2950872e8473">evdns_server_option</a> { <a class="el" href="dns_8h.html#a626139345ff6cb6c871e2950872e8473a8943e341547a0479f14a9c4de889217d">EVDNS_SOPT_TCP_MAX_CLIENTS</a>,
<a class="el" href="dns_8h.html#a626139345ff6cb6c871e2950872e8473a6363f0c18c4efaff4d00b27ced12e92b">EVDNS_SOPT_TCP_IDLE_TIMEOUT</a>
}</td></tr>
<tr class="memdesc:a626139345ff6cb6c871e2950872e8473"><td class="mdescLeft"> </td><td class="mdescRight">List of configurable evdns_server_port options. <a href="dns_8h.html#a626139345ff6cb6c871e2950872e8473">More...</a><br /></td></tr>
<tr class="separator:a626139345ff6cb6c871e2950872e8473"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad6a51e72173fcb3df380a49e8589635b"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_server_port * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ad6a51e72173fcb3df380a49e8589635b">evdns_add_server_port_with_base</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> socket, int flags, <a class="el" href="dns_8h.html#a052802966f4c9d482279a05197dff005">evdns_request_callback_fn_type</a> callback, void *user_data)</td></tr>
<tr class="memdesc:ad6a51e72173fcb3df380a49e8589635b"><td class="mdescLeft"> </td><td class="mdescRight">Create a new UDP DNS server port. <a href="dns_8h.html#ad6a51e72173fcb3df380a49e8589635b">More...</a><br /></td></tr>
<tr class="separator:ad6a51e72173fcb3df380a49e8589635b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac44ddac0711712a5e3f7ec041c8d2478"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_server_port * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ac44ddac0711712a5e3f7ec041c8d2478">evdns_add_server_port_with_listener</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, struct evconnlistener *listener, int flags, <a class="el" href="dns_8h.html#a052802966f4c9d482279a05197dff005">evdns_request_callback_fn_type</a> callback, void *user_data)</td></tr>
<tr class="memdesc:ac44ddac0711712a5e3f7ec041c8d2478"><td class="mdescLeft"> </td><td class="mdescRight">Create a new TCP DNS server port. <a href="dns_8h.html#ac44ddac0711712a5e3f7ec041c8d2478">More...</a><br /></td></tr>
<tr class="separator:ac44ddac0711712a5e3f7ec041c8d2478"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1875001046dd6cbff5f2139590221ddf"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a1875001046dd6cbff5f2139590221ddf">evdns_base_clear_host_addresses</a> (struct evdns_base *base)</td></tr>
<tr class="memdesc:a1875001046dd6cbff5f2139590221ddf"><td class="mdescLeft"> </td><td class="mdescRight">Remove all hosts entries that have been loaded into the <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> via evdns_base_load_hosts or via event_base_resolv_conf_parse. <a href="dns_8h.html#a1875001046dd6cbff5f2139590221ddf">More...</a><br /></td></tr>
<tr class="separator:a1875001046dd6cbff5f2139590221ddf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af942ce8b6a65052f4b6def91a3390a61"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#af942ce8b6a65052f4b6def91a3390a61">evdns_base_clear_nameservers_and_suspend</a> (struct evdns_base *base)</td></tr>
<tr class="memdesc:af942ce8b6a65052f4b6def91a3390a61"><td class="mdescLeft"> </td><td class="mdescRight">Remove all configured nameservers, and suspend all pending resolves. <a href="dns_8h.html#af942ce8b6a65052f4b6def91a3390a61">More...</a><br /></td></tr>
<tr class="separator:af942ce8b6a65052f4b6def91a3390a61"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac287c8b638a248719a00b0324579b728"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ac287c8b638a248719a00b0324579b728">evdns_base_config_windows_nameservers</a> (struct evdns_base *)</td></tr>
<tr class="memdesc:ac287c8b638a248719a00b0324579b728"><td class="mdescLeft"> </td><td class="mdescRight">Obtain nameserver information using the Windows API. <a href="dns_8h.html#ac287c8b638a248719a00b0324579b728">More...</a><br /></td></tr>
<tr class="separator:ac287c8b638a248719a00b0324579b728"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6811354521b4fe8df4c724d6cb9fb102"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a6811354521b4fe8df4c724d6cb9fb102">evdns_base_count_nameservers</a> (struct evdns_base *base)</td></tr>
<tr class="memdesc:a6811354521b4fe8df4c724d6cb9fb102"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of configured nameservers. <a href="dns_8h.html#a6811354521b4fe8df4c724d6cb9fb102">More...</a><br /></td></tr>
<tr class="separator:a6811354521b4fe8df4c724d6cb9fb102"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab221bbadb18451c9007e8dc98bc97786"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ab221bbadb18451c9007e8dc98bc97786">evdns_base_free</a> (struct evdns_base *base, int fail_requests)</td></tr>
<tr class="memdesc:ab221bbadb18451c9007e8dc98bc97786"><td class="mdescLeft"> </td><td class="mdescRight">Shut down the asynchronous DNS resolver and terminate all active requests. <a href="dns_8h.html#ab221bbadb18451c9007e8dc98bc97786">More...</a><br /></td></tr>
<tr class="separator:ab221bbadb18451c9007e8dc98bc97786"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1545f7930f228018a06476a7236bfe0e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a1545f7930f228018a06476a7236bfe0e">evdns_base_get_nameserver_addr</a> (struct evdns_base *base, int idx, struct sockaddr *sa, ev_socklen_t len)</td></tr>
<tr class="memdesc:a1545f7930f228018a06476a7236bfe0e"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the address of the 'idx'th configured nameserver. <a href="dns_8h.html#a1545f7930f228018a06476a7236bfe0e">More...</a><br /></td></tr>
<tr class="separator:a1545f7930f228018a06476a7236bfe0e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a954ffdf37038dba334543f6013d6a87f"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a954ffdf37038dba334543f6013d6a87f">evdns_base_get_nameserver_fd</a> (struct evdns_base *base, int idx)</td></tr>
<tr class="memdesc:a954ffdf37038dba334543f6013d6a87f"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the fd of the 'idx'th configured nameserver. <a href="dns_8h.html#a954ffdf37038dba334543f6013d6a87f">More...</a><br /></td></tr>
<tr class="separator:a954ffdf37038dba334543f6013d6a87f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5092d38082851904e37d6b80c3475714"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a5092d38082851904e37d6b80c3475714">evdns_base_load_hosts</a> (struct evdns_base *base, const char *hosts_fname)</td></tr>
<tr class="memdesc:a5092d38082851904e37d6b80c3475714"><td class="mdescLeft"> </td><td class="mdescRight">Load an /etc/hosts-style file from 'hosts_fname' into 'base'. <a href="dns_8h.html#a5092d38082851904e37d6b80c3475714">More...</a><br /></td></tr>
<tr class="separator:a5092d38082851904e37d6b80c3475714"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a53a242ec2ab15eef9e49e4286153d55a"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a53a242ec2ab15eef9e49e4286153d55a">evdns_base_nameserver_add</a> (struct evdns_base *base, unsigned long int address)</td></tr>
<tr class="memdesc:a53a242ec2ab15eef9e49e4286153d55a"><td class="mdescLeft"> </td><td class="mdescRight">Add a nameserver. <a href="dns_8h.html#a53a242ec2ab15eef9e49e4286153d55a">More...</a><br /></td></tr>
<tr class="separator:a53a242ec2ab15eef9e49e4286153d55a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a5f8e71a80a41d10e386f8cac816238"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a0a5f8e71a80a41d10e386f8cac816238">evdns_base_nameserver_ip_add</a> (struct evdns_base *base, const char *ip_as_string)</td></tr>
<tr class="memdesc:a0a5f8e71a80a41d10e386f8cac816238"><td class="mdescLeft"> </td><td class="mdescRight">Add a nameserver by string address. <a href="dns_8h.html#a0a5f8e71a80a41d10e386f8cac816238">More...</a><br /></td></tr>
<tr class="separator:a0a5f8e71a80a41d10e386f8cac816238"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac8feac209d81aea2654809727ee7ada7"><td class="memItemLeft" align="right" valign="top"><a id="ac8feac209d81aea2654809727ee7ada7"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ac8feac209d81aea2654809727ee7ada7">evdns_base_nameserver_sockaddr_add</a> (struct evdns_base *base, const struct sockaddr *sa, ev_socklen_t len, unsigned flags)</td></tr>
<tr class="memdesc:ac8feac209d81aea2654809727ee7ada7"><td class="mdescLeft"> </td><td class="mdescRight">Add a nameserver by sockaddr. <br /></td></tr>
<tr class="separator:ac8feac209d81aea2654809727ee7ada7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdcc359c412591d174f4d965afd18513"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_base * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#afdcc359c412591d174f4d965afd18513">evdns_base_new</a> (struct <a class="el" href="structevent__base.html">event_base</a> *<a class="el" href="structevent__base.html">event_base</a>, int flags)</td></tr>
<tr class="memdesc:afdcc359c412591d174f4d965afd18513"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the asynchronous DNS library. <a href="dns_8h.html#afdcc359c412591d174f4d965afd18513">More...</a><br /></td></tr>
<tr class="separator:afdcc359c412591d174f4d965afd18513"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7e3a053e25ae7c045944a5db0947babb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a7e3a053e25ae7c045944a5db0947babb">evdns_base_resolv_conf_parse</a> (struct evdns_base *base, int flags, const char *const filename)</td></tr>
<tr class="memdesc:a7e3a053e25ae7c045944a5db0947babb"><td class="mdescLeft"> </td><td class="mdescRight">Parse a resolv.conf file. <a href="dns_8h.html#a7e3a053e25ae7c045944a5db0947babb">More...</a><br /></td></tr>
<tr class="separator:a7e3a053e25ae7c045944a5db0947babb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f8b11705fa285dffa661c7f55f86693"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_request * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a4f8b11705fa285dffa661c7f55f86693">evdns_base_resolve_ipv4</a> (struct evdns_base *base, const char *name, int flags, <a class="el" href="dns_8h.html#a43018959c4be1a9b16e4143c5e3ff556">evdns_callback_type</a> callback, void *ptr)</td></tr>
<tr class="memdesc:a4f8b11705fa285dffa661c7f55f86693"><td class="mdescLeft"> </td><td class="mdescRight">Lookup an A record for a given name. <a href="dns_8h.html#a4f8b11705fa285dffa661c7f55f86693">More...</a><br /></td></tr>
<tr class="separator:a4f8b11705fa285dffa661c7f55f86693"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a646ca1414b09b9fec7763bf8aca05e74"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_request * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a646ca1414b09b9fec7763bf8aca05e74">evdns_base_resolve_ipv6</a> (struct evdns_base *base, const char *name, int flags, <a class="el" href="dns_8h.html#a43018959c4be1a9b16e4143c5e3ff556">evdns_callback_type</a> callback, void *ptr)</td></tr>
<tr class="memdesc:a646ca1414b09b9fec7763bf8aca05e74"><td class="mdescLeft"> </td><td class="mdescRight">Lookup an AAAA record for a given name. <a href="dns_8h.html#a646ca1414b09b9fec7763bf8aca05e74">More...</a><br /></td></tr>
<tr class="separator:a646ca1414b09b9fec7763bf8aca05e74"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f9cbcd4c017180e7d302056b3d5bbd4"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_request * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a1f9cbcd4c017180e7d302056b3d5bbd4">evdns_base_resolve_reverse</a> (struct evdns_base *base, const struct in_addr *in, int flags, <a class="el" href="dns_8h.html#a43018959c4be1a9b16e4143c5e3ff556">evdns_callback_type</a> callback, void *ptr)</td></tr>
<tr class="memdesc:a1f9cbcd4c017180e7d302056b3d5bbd4"><td class="mdescLeft"> </td><td class="mdescRight">Lookup a PTR record for a given IP address. <a href="dns_8h.html#a1f9cbcd4c017180e7d302056b3d5bbd4">More...</a><br /></td></tr>
<tr class="separator:a1f9cbcd4c017180e7d302056b3d5bbd4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a55843d1e90512bfbe8499d52642240cd"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_request * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a55843d1e90512bfbe8499d52642240cd">evdns_base_resolve_reverse_ipv6</a> (struct evdns_base *base, const struct in6_addr *in, int flags, <a class="el" href="dns_8h.html#a43018959c4be1a9b16e4143c5e3ff556">evdns_callback_type</a> callback, void *ptr)</td></tr>
<tr class="memdesc:a55843d1e90512bfbe8499d52642240cd"><td class="mdescLeft"> </td><td class="mdescRight">Lookup a PTR record for a given IPv6 address. <a href="dns_8h.html#a55843d1e90512bfbe8499d52642240cd">More...</a><br /></td></tr>
<tr class="separator:a55843d1e90512bfbe8499d52642240cd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ef3a20dd645e02d6dd5d3766ced9ce7"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a3ef3a20dd645e02d6dd5d3766ced9ce7">evdns_base_resume</a> (struct evdns_base *base)</td></tr>
<tr class="memdesc:a3ef3a20dd645e02d6dd5d3766ced9ce7"><td class="mdescLeft"> </td><td class="mdescRight">Resume normal operation and continue any suspended resolve requests. <a href="dns_8h.html#a3ef3a20dd645e02d6dd5d3766ced9ce7">More...</a><br /></td></tr>
<tr class="separator:a3ef3a20dd645e02d6dd5d3766ced9ce7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8044de93700190d5ca6a6a0becdc4f6e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a8044de93700190d5ca6a6a0becdc4f6e">evdns_base_search_add</a> (struct evdns_base *base, const char *domain)</td></tr>
<tr class="memdesc:a8044de93700190d5ca6a6a0becdc4f6e"><td class="mdescLeft"> </td><td class="mdescRight">Add a domain to the list of search domains. <a href="dns_8h.html#a8044de93700190d5ca6a6a0becdc4f6e">More...</a><br /></td></tr>
<tr class="separator:a8044de93700190d5ca6a6a0becdc4f6e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9211bdca966e8f4ce3270b29c1d72122"><td class="memItemLeft" align="right" valign="top"><a id="a9211bdca966e8f4ce3270b29c1d72122"></a>
EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a9211bdca966e8f4ce3270b29c1d72122">evdns_base_search_clear</a> (struct evdns_base *base)</td></tr>
<tr class="memdesc:a9211bdca966e8f4ce3270b29c1d72122"><td class="mdescLeft"> </td><td class="mdescRight">Clear the list of search domains. <br /></td></tr>
<tr class="separator:a9211bdca966e8f4ce3270b29c1d72122"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae858583b1c9fdd1f7c99330bcdd68ba6"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ae858583b1c9fdd1f7c99330bcdd68ba6">evdns_base_search_ndots_set</a> (struct evdns_base *base, const int ndots)</td></tr>
<tr class="memdesc:ae858583b1c9fdd1f7c99330bcdd68ba6"><td class="mdescLeft"> </td><td class="mdescRight">Set the 'ndots' parameter for searches. <a href="dns_8h.html#ae858583b1c9fdd1f7c99330bcdd68ba6">More...</a><br /></td></tr>
<tr class="separator:ae858583b1c9fdd1f7c99330bcdd68ba6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a791b6fdc9f41bd62414574d85ae18cc8"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a791b6fdc9f41bd62414574d85ae18cc8">evdns_base_set_option</a> (struct evdns_base *base, const char *option, const char *val)</td></tr>
<tr class="memdesc:a791b6fdc9f41bd62414574d85ae18cc8"><td class="mdescLeft"> </td><td class="mdescRight">Set the value of a configuration option. <a href="dns_8h.html#a791b6fdc9f41bd62414574d85ae18cc8">More...</a><br /></td></tr>
<tr class="separator:a791b6fdc9f41bd62414574d85ae18cc8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abdb3c829da1d539ecdf92ae47f8f1c03"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#abdb3c829da1d539ecdf92ae47f8f1c03">evdns_cache_lookup</a> (struct evdns_base *base, const char *nodename, struct <a class="el" href="structevutil__addrinfo.html">evutil_addrinfo</a> *hints, ev_uint16_t port, struct <a class="el" href="structevutil__addrinfo.html">evutil_addrinfo</a> **res)</td></tr>
<tr class="memdesc:abdb3c829da1d539ecdf92ae47f8f1c03"><td class="mdescLeft"> </td><td class="mdescRight">Lookup an entry from the evdns cache. <a href="dns_8h.html#abdb3c829da1d539ecdf92ae47f8f1c03">More...</a><br /></td></tr>
<tr class="separator:abdb3c829da1d539ecdf92ae47f8f1c03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac969fd31d17e59ad072be79a591d5224"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#ac969fd31d17e59ad072be79a591d5224">evdns_cache_write</a> (struct evdns_base *dns_base, char *nodename, struct <a class="el" href="structevutil__addrinfo.html">evutil_addrinfo</a> *res, int ttl)</td></tr>
<tr class="memdesc:ac969fd31d17e59ad072be79a591d5224"><td class="mdescLeft"> </td><td class="mdescRight">Write an entry to the evdns cache. <a href="dns_8h.html#ac969fd31d17e59ad072be79a591d5224">More...</a><br /></td></tr>
<tr class="separator:ac969fd31d17e59ad072be79a591d5224"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a062bdd01f7243b3c8509d93c45a802ef"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a062bdd01f7243b3c8509d93c45a802ef">evdns_cancel_request</a> (struct evdns_base *base, struct evdns_request *req)</td></tr>
<tr class="memdesc:a062bdd01f7243b3c8509d93c45a802ef"><td class="mdescLeft"> </td><td class="mdescRight">Cancels a pending DNS resolution request. <a href="dns_8h.html#a062bdd01f7243b3c8509d93c45a802ef">More...</a><br /></td></tr>
<tr class="separator:a062bdd01f7243b3c8509d93c45a802ef"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abbd56ab78c400f46498515330343c66a"><td class="memItemLeft" align="right" valign="top"><a id="abbd56ab78c400f46498515330343c66a"></a>
EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#abbd56ab78c400f46498515330343c66a">evdns_close_server_port</a> (struct evdns_server_port *port)</td></tr>
<tr class="memdesc:abbd56ab78c400f46498515330343c66a"><td class="mdescLeft"> </td><td class="mdescRight">Close down a DNS server port, and free associated structures. <br /></td></tr>
<tr class="separator:abbd56ab78c400f46498515330343c66a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a24bb4cf48915f73e4e9c6d4b6216466b"><td class="memItemLeft" align="right" valign="top">const EVENT2_EXPORT_SYMBOL char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a24bb4cf48915f73e4e9c6d4b6216466b">evdns_err_to_string</a> (int err)</td></tr>
<tr class="memdesc:a24bb4cf48915f73e4e9c6d4b6216466b"><td class="mdescLeft"> </td><td class="mdescRight">Convert a DNS error code to a string. <a href="dns_8h.html#a24bb4cf48915f73e4e9c6d4b6216466b">More...</a><br /></td></tr>
<tr class="separator:a24bb4cf48915f73e4e9c6d4b6216466b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a28a4c5e6e22bcf92f8c229461023f914"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evdns_getaddrinfo_request * </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a28a4c5e6e22bcf92f8c229461023f914">evdns_getaddrinfo</a> (struct evdns_base *dns_base, const char *nodename, const char *servname, const struct <a class="el" href="structevutil__addrinfo.html">evutil_addrinfo</a> *hints_in, <a class="el" href="dns_8h.html#a0d1464f191ef7678be0d4caf3644a8f4">evdns_getaddrinfo_cb</a> cb, void *arg)</td></tr>
<tr class="memdesc:a28a4c5e6e22bcf92f8c229461023f914"><td class="mdescLeft"> </td><td class="mdescRight">Make a non-blocking getaddrinfo request using the dns_base in 'dns_base'. <a href="dns_8h.html#a28a4c5e6e22bcf92f8c229461023f914">More...</a><br /></td></tr>
<tr class="separator:a28a4c5e6e22bcf92f8c229461023f914"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a80a30ea7d80d7f9e02bfaf534560bc30"><td class="memItemLeft" align="right" valign="top"><a id="a80a30ea7d80d7f9e02bfaf534560bc30"></a>
EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><b>evdns_getaddrinfo_cancel</b> (struct evdns_getaddrinfo_request *req)</td></tr>
<tr class="separator:a80a30ea7d80d7f9e02bfaf534560bc30"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdb5e0e7000a17810e762d40ecb8eda2"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#afdb5e0e7000a17810e762d40ecb8eda2">evdns_server_port_set_option</a> (struct evdns_server_port *port, enum <a class="el" href="dns_8h.html#a626139345ff6cb6c871e2950872e8473">evdns_server_option</a> option, size_t value)</td></tr>
<tr class="memdesc:afdb5e0e7000a17810e762d40ecb8eda2"><td class="mdescLeft"> </td><td class="mdescRight">Configure DNS server. <a href="dns_8h.html#afdb5e0e7000a17810e762d40ecb8eda2">More...</a><br /></td></tr>
<tr class="separator:afdb5e0e7000a17810e762d40ecb8eda2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adb9c5685cd3ffd146734f05d2350b8ba"><td class="memItemLeft" align="right" valign="top"><a id="adb9c5685cd3ffd146734f05d2350b8ba"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>evdns_server_request_add_a_reply</b> (struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)</td></tr>
<tr class="separator:adb9c5685cd3ffd146734f05d2350b8ba"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aff43d2e0a60d3dd2b35c9740954285d2"><td class="memItemLeft" align="right" valign="top"><a id="aff43d2e0a60d3dd2b35c9740954285d2"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>evdns_server_request_add_aaaa_reply</b> (struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)</td></tr>
<tr class="separator:aff43d2e0a60d3dd2b35c9740954285d2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa24109b95a904944693bad032607475f"><td class="memItemLeft" align="right" valign="top"><a id="aa24109b95a904944693bad032607475f"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>evdns_server_request_add_cname_reply</b> (struct evdns_server_request *req, const char *name, const char *cname, int ttl)</td></tr>
<tr class="separator:aa24109b95a904944693bad032607475f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a45308ef807d89c6591e198bbdb5087be"><td class="memItemLeft" align="right" valign="top"><a id="a45308ef807d89c6591e198bbdb5087be"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>evdns_server_request_add_ptr_reply</b> (struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl)</td></tr>
<tr class="separator:a45308ef807d89c6591e198bbdb5087be"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a05883ad8db1350f14af3f9285c3962fa"><td class="memItemLeft" align="right" valign="top"><a id="a05883ad8db1350f14af3f9285c3962fa"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>evdns_server_request_add_reply</b> (struct evdns_server_request *req, int section, const char *name, int type, int dns_class, int ttl, int datalen, int is_name, const char *data)</td></tr>
<tr class="separator:a05883ad8db1350f14af3f9285c3962fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1291ec11bf79809c4ae1b113bb0160e9"><td class="memItemLeft" align="right" valign="top"><a id="a1291ec11bf79809c4ae1b113bb0160e9"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a1291ec11bf79809c4ae1b113bb0160e9">evdns_server_request_drop</a> (struct evdns_server_request *req)</td></tr>
<tr class="memdesc:a1291ec11bf79809c4ae1b113bb0160e9"><td class="mdescLeft"> </td><td class="mdescRight">Free a DNS request without sending back a reply. <br /></td></tr>
<tr class="separator:a1291ec11bf79809c4ae1b113bb0160e9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a078ce45f71d886514ece8688e19ead19"><td class="memItemLeft" align="right" valign="top"><a id="a078ce45f71d886514ece8688e19ead19"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a078ce45f71d886514ece8688e19ead19">evdns_server_request_get_requesting_addr</a> (struct evdns_server_request *req, struct sockaddr *sa, int addr_len)</td></tr>
<tr class="memdesc:a078ce45f71d886514ece8688e19ead19"><td class="mdescLeft"> </td><td class="mdescRight">Get the address that made a DNS request. <br /></td></tr>
<tr class="separator:a078ce45f71d886514ece8688e19ead19"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a606b067e5cd3fee40b527b3cb4ec2d72"><td class="memItemLeft" align="right" valign="top"><a id="a606b067e5cd3fee40b527b3cb4ec2d72"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a606b067e5cd3fee40b527b3cb4ec2d72">evdns_server_request_respond</a> (struct evdns_server_request *req, int err)</td></tr>
<tr class="memdesc:a606b067e5cd3fee40b527b3cb4ec2d72"><td class="mdescLeft"> </td><td class="mdescRight">Send back a response to a DNS request, and free the request structure. <br /></td></tr>
<tr class="separator:a606b067e5cd3fee40b527b3cb4ec2d72"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a849622fc8fee97302a6a0a34e7e6feb8"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#a849622fc8fee97302a6a0a34e7e6feb8">evdns_server_request_set_flags</a> (struct evdns_server_request *req, int flags)</td></tr>
<tr class="memdesc:a849622fc8fee97302a6a0a34e7e6feb8"><td class="mdescLeft"> </td><td class="mdescRight">Sets some flags in a reply we're building. <a href="dns_8h.html#a849622fc8fee97302a6a0a34e7e6feb8">More...</a><br /></td></tr>
<tr class="separator:a849622fc8fee97302a6a0a34e7e6feb8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af2ba90756cecdc246711879462a20b51"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="dns_8h.html#af2ba90756cecdc246711879462a20b51">evdns_set_log_fn</a> (<a class="el" href="dns_8h.html#a850904a1dbd8c8a087dc2be7617e21c8">evdns_debug_log_fn_type</a> fn)</td></tr>
<tr class="memdesc:af2ba90756cecdc246711879462a20b51"><td class="mdescLeft"> </td><td class="mdescRight">Set the callback function to handle DNS log messages. <a href="dns_8h.html#af2ba90756cecdc246711879462a20b51">More...</a><br /></td></tr>
<tr class="separator:af2ba90756cecdc246711879462a20b51"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides a few APIs to use for resolving DNS names, and a facility for implementing simple DNS servers. </p>
<p>Welcome, gentle reader</p>
<p>Async DNS lookups are really a whole lot harder than they should be, mostly stemming from the fact that the libc resolver has never been very good at them. Before you use this library you should see if libc can do the job for you with the modern async call getaddrinfo_a (see <a href="http://www.imperialviolet.org/page25.html#e498">http://www.imperialviolet.org/page25.html#e498</a>). Otherwise, please continue.</p>
<p>The library keeps track of the state of nameservers and will avoid them when they go down. Otherwise it will round robin between them.</p>
<p>Quick start guide: </p><div class="fragment"><div class="line"><span class="preprocessor">#include "evdns.h"</span></div>
<div class="line"><span class="keywordtype">void</span> callback(<span class="keywordtype">int</span> result, <span class="keywordtype">char</span> type, <span class="keywordtype">int</span> count, <span class="keywordtype">int</span> ttl,</div>
<div class="line"> <span class="keywordtype">void</span> *addresses, <span class="keywordtype">void</span> *arg);</div>
<div class="line"><a class="code" href="dns__compat_8h.html#a4dd30bf34468410eb96757007523eb34">evdns_resolv_conf_parse</a>(<a class="code" href="dns_8h.html#a417f74bbbbd887a84d911ed9dc7ce3ae">DNS_OPTIONS_ALL</a>, <span class="stringliteral">"/etc/resolv.conf"</span>);</div>
<div class="line">evdns_resolve(<span class="stringliteral">"www.hostname.com"</span>, 0, callback, NULL);</div>
</div><!-- fragment --><p> When the lookup is complete the callback function is called. The first argument will be one of the DNS_ERR_* defines in evdns.h. Hopefully it will be DNS_ERR_NONE, in which case type will be DNS_IPv4_A, count will be the number of IP addresses, ttl is the time which the data can be cached for (in seconds), addresses will point to an array of uint32_t's and arg will be whatever you passed to evdns_resolve.</p>
<p>Searching:</p>
<p>In order for this library to be a good replacement for glibc's resolver it supports searching. This involves setting a list of default domains, in which names will be queried for. The number of dots in the query name determines the order in which this list is used.</p>
<p>Searching appears to be a single lookup from the point of view of the API, although many DNS queries may be generated from a single call to evdns_resolve. Searching can also drastically slow down the resolution of names.</p>
<p>To disable searching:</p><ol type="1">
<li>Never set it up. If you never call evdns_resolv_conf_parse or evdns_search_add then no searching will occur.</li>
<li>If you do call evdns_resolv_conf_parse then don't pass DNS_OPTION_SEARCH (or DNS_OPTIONS_ALL, which implies it).</li>
<li>When calling evdns_resolve, pass the DNS_QUERY_NO_SEARCH flag.</li>
</ol>
<p>The order of searches depends on the number of dots in the name. If the number is greater than the ndots setting then the names is first tried globally. Otherwise each search domain is appended in turn.</p>
<p>The ndots setting can either be set from a resolv.conf, or by calling evdns_search_ndots_set.</p>
<p>For example, with ndots set to 1 (the default) and a search domain list of ["myhome.net"]:</p>
<pre>
Query: www
Order: www.myhome.net, www.</pre><pre> Query: www.abc
Order: www.abc., www.abc.myhome.net
</pre><p> Internals:</p>
<p>Requests are kept in two queues. The first is the inflight queue. In this queue requests have an allocated transaction id and nameserver. They will soon be transmitted if they haven't already been.</p>
<p>The second is the waiting queue. The size of the inflight ring is limited and all other requests wait in waiting queue for space. This bounds the number of concurrent requests so that we don't flood the nameserver. Several algorithms require a full walk of the inflight queue and so bounding its size keeps thing going nicely under huge (many thousands of requests) loads.</p>
<p>If a nameserver loses too many requests it is considered down and we try not to use it. After a while we send a probe to that nameserver (a lookup for google.com) and, if it replies, we consider it working again. If the nameserver fails a probe we wait longer to try again with the next probe. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a339623396788ff9271b5cc345b83a2e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a339623396788ff9271b5cc345b83a2e8">◆ </a></span>DNS_ERR_NODATA</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DNS_ERR_NODATA   70</td>
</tr>
</table>
</div><div class="memdoc">
<p>There were no answers and no error condition in the DNS packet. </p>
<p>This can happen when you ask for an address that exists, but a record type that doesn't. </p>
</div>
</div>
<a id="a417f74bbbbd887a84d911ed9dc7ce3ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a417f74bbbbd887a84d911ed9dc7ce3ae">◆ </a></span>DNS_OPTIONS_ALL</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DNS_OPTIONS_ALL</td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"> ( \</div>
<div class="line"> DNS_OPTION_SEARCH | \</div>
<div class="line"> DNS_OPTION_NAMESERVERS | \</div>
<div class="line"> DNS_OPTION_MISC | \</div>
<div class="line"> DNS_OPTION_HOSTSFILE | \</div>
<div class="line"> 0 \</div>
<div class="line">)</div>
</div><!-- fragment -->
<p>All above: </p>
<ul>
<li>DNS_OPTION_SEARCH</li>
<li>DNS_OPTION_NAMESERVERS</li>
<li>DNS_OPTION_MISC</li>
<li>DNS_OPTION_HOSTSFILE </li>
</ul>
</div>
</div>
<a id="a1cbcfe6baf59913c34aa04e57637da3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cbcfe6baf59913c34aa04e57637da3d">◆ </a></span>EVDNS_BASE_INITIALIZE_NAMESERVERS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EVDNS_BASE_INITIALIZE_NAMESERVERS   1</td>
</tr>
</table>
</div><div class="memdoc">
<p>Flag for evdns_base_new: process resolv.conf. </p>
<p><br />
</p>
</div>
</div>
<a id="a548a0e3529efb572b991408f7581a09b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a548a0e3529efb572b991408f7581a09b">◆ </a></span>EVDNS_BASE_NAMESERVERS_NO_DEFAULT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EVDNS_BASE_NAMESERVERS_NO_DEFAULT   0x10000</td>
</tr>
</table>
</div><div class="memdoc">
<p>Flag for evdns_base_new: If EVDNS_BASE_INITIALIZE_NAMESERVERS isset, do not add default nameserver if there are no nameservers in resolv.conf. </p>
<dl class="section see"><dt>See also</dt><dd>DNS_OPTION_NAMESERVERS_NO_DEFAULT </dd></dl>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a43018959c4be1a9b16e4143c5e3ff556"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43018959c4be1a9b16e4143c5e3ff556">◆ </a></span>evdns_callback_type</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* evdns_callback_type) (int result, char type, int count, int ttl, void *addresses, void *arg)</td>
</tr>
</table>
</div><div class="memdoc">
<p>The callback that contains the results from a lookup. </p>
<ul>
<li>result is one of the DNS_ERR_* values (DNS_ERR_NONE for success)</li>
<li>type is either DNS_IPv4_A or DNS_PTR or DNS_IPv6_AAAA</li>
<li>count contains the number of addresses of form type</li>
<li>ttl is the number of seconds the resolution may be cached for.</li>
<li>addresses needs to be cast according to type. It will be an array of 4-byte sequences for ipv4, or an array of 16-byte sequences for ipv6, or a nul-terminated string for PTR. </li>
</ul>
</div>
</div>
<a id="a850904a1dbd8c8a087dc2be7617e21c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a850904a1dbd8c8a087dc2be7617e21c8">◆ </a></span>evdns_debug_log_fn_type</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* evdns_debug_log_fn_type) (int is_warning, const char *msg)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A callback that is invoked when a log message is generated. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">is_warning</td><td>indicates if the log message is a 'warning' </td></tr>
<tr><td class="paramname">msg</td><td>the content of the log message </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a052802966f4c9d482279a05197dff005"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a052802966f4c9d482279a05197dff005">◆ </a></span>evdns_request_callback_fn_type</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* evdns_request_callback_fn_type) (struct evdns_server_request *, void *)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A callback to implement a DNS server. </p>
<p>The callback function receives a DNS request. It should then optionally add a number of answers to the reply using the evdns_server_request_add_*_reply functions, before calling either evdns_server_request_respond to send the reply back, or evdns_server_request_drop to decline to answer the request.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">req</td><td>A newly received request </td></tr>
<tr><td class="paramname">user_data</td><td>A pointer that was passed to <a class="el" href="dns_8h.html#ad6a51e72173fcb3df380a49e8589635b" title="Create a new UDP DNS server port.">evdns_add_server_port_with_base()</a>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a626139345ff6cb6c871e2950872e8473"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a626139345ff6cb6c871e2950872e8473">◆ </a></span>evdns_server_option</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="dns_8h.html#a626139345ff6cb6c871e2950872e8473">evdns_server_option</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>List of configurable evdns_server_port options. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="dns_8h.html#afdb5e0e7000a17810e762d40ecb8eda2" title="Configure DNS server.">evdns_server_port_set_option()</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a626139345ff6cb6c871e2950872e8473a8943e341547a0479f14a9c4de889217d"></a>EVDNS_SOPT_TCP_MAX_CLIENTS </td><td class="fielddoc"><p>Maximum number of simultaneous tcp connections (clients) that server can hold. </p>
<p>Can be set only for TCP DNS servers. </p>
</td></tr>
<tr><td class="fieldname"><a id="a626139345ff6cb6c871e2950872e8473a6363f0c18c4efaff4d00b27ced12e92b"></a>EVDNS_SOPT_TCP_IDLE_TIMEOUT </td><td class="fielddoc"><p>Idle timeout (in seconds) of incoming TCP connections. </p>
<p>If client doesn't send any requests via the connection during this period connection is closed by the server. Can be set only for TCP DNS servers. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ad6a51e72173fcb3df380a49e8589635b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6a51e72173fcb3df380a49e8589635b">◆ </a></span>evdns_add_server_port_with_base()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct evdns_server_port* evdns_add_server_port_with_base </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent__base.html">event_base</a> * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> </td>
<td class="paramname"><em>socket</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>flags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="dns_8h.html#a052802966f4c9d482279a05197dff005">evdns_request_callback_fn_type</a> </td>
<td class="paramname"><em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>user_data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new UDP DNS server port. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>The event base to handle events for the server port. </td></tr>
<tr><td class="paramname">socket</td><td>A UDP socket to accept DNS requests. </td></tr>
<tr><td class="paramname">flags</td><td>Always 0 for now. </td></tr>
<tr><td class="paramname">callback</td><td>A function to invoke whenever we get a DNS request on the socket. </td></tr>
<tr><td class="paramname">user_data</td><td>Data to pass to the callback. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an evdns_server_port structure for this server port or NULL if an error occurred. </dd></dl>
</div>
</div>
<a id="ac44ddac0711712a5e3f7ec041c8d2478"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac44ddac0711712a5e3f7ec041c8d2478">◆ </a></span>evdns_add_server_port_with_listener()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct evdns_server_port* evdns_add_server_port_with_listener </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent__base.html">event_base</a> * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct evconnlistener * </td>
<td class="paramname"><em>listener</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>flags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="dns_8h.html#a052802966f4c9d482279a05197dff005">evdns_request_callback_fn_type</a> </td>
<td class="paramname"><em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>user_data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new TCP DNS server port. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>The event base to handle events for the server port. </td></tr>
<tr><td class="paramname">listener</td><td>A TCP listener to accept DNS requests. </td></tr>
<tr><td class="paramname">flags</td><td>Always 0 for now. </td></tr>
<tr><td class="paramname">callback</td><td>A function to invoke whenever we get a DNS request on the socket. </td></tr>
<tr><td class="paramname">user_data</td><td>Data to pass to the callback. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an evdns_server_port structure for this server port or NULL if an error occurred. </dd></dl>
</div>
</div>
<a id="a1875001046dd6cbff5f2139590221ddf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1875001046dd6cbff5f2139590221ddf">◆ </a></span>evdns_base_clear_host_addresses()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void evdns_base_clear_host_addresses </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"><em>base</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove all hosts entries that have been loaded into the <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> via evdns_base_load_hosts or via event_base_resolv_conf_parse. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>the evdns base to remove outdated host addresses from </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af942ce8b6a65052f4b6def91a3390a61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af942ce8b6a65052f4b6def91a3390a61">◆ </a></span>evdns_base_clear_nameservers_and_suspend()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int evdns_base_clear_nameservers_and_suspend </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"><em>base</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove all configured nameservers, and suspend all pending resolves. </p>
<p>Resolves will not necessarily be re-attempted until <a class="el" href="dns_8h.html#a3ef3a20dd645e02d6dd5d3766ced9ce7" title="Resume normal operation and continue any suspended resolve requests.">evdns_base_resume()</a> is called.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>the evdns_base to which to apply this operation </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 if an error occurred </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="dns_8h.html#a3ef3a20dd645e02d6dd5d3766ced9ce7" title="Resume normal operation and continue any suspended resolve requests.">evdns_base_resume()</a> </dd></dl>
</div>
</div>
<a id="ac287c8b638a248719a00b0324579b728"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac287c8b638a248719a00b0324579b728">◆ </a></span>evdns_base_config_windows_nameservers()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int evdns_base_config_windows_nameservers </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Obtain nameserver information using the Windows API. </p>
<p>Attempt to configure a set of nameservers based on platform settings on a win32 host. Preferentially tries to use GetNetworkParams; if that fails, looks in the registry.</p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 if an error occurred </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="dns__compat_8h.html#a4dd30bf34468410eb96757007523eb34" title="Parse a resolv.conf file.">evdns_resolv_conf_parse()</a> </dd></dl>
</div>
</div>
<a id="a6811354521b4fe8df4c724d6cb9fb102"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6811354521b4fe8df4c724d6cb9fb102">◆ </a></span>evdns_base_count_nameservers()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int evdns_base_count_nameservers </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"><em>base</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of configured nameservers. </p>
<p>This returns the number of configured nameservers (not necessarily the number of running nameservers). This is useful for double-checking whether our calls to the various nameserver configuration functions have been successful.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>the evdns_base to which to apply this operation </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of configured nameservers </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="dns_8h.html#a53a242ec2ab15eef9e49e4286153d55a" title="Add a nameserver.">evdns_base_nameserver_add()</a> </dd></dl>
</div>
</div>
<a id="ab221bbadb18451c9007e8dc98bc97786"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab221bbadb18451c9007e8dc98bc97786">◆ </a></span>evdns_base_free()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void evdns_base_free </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>fail_requests</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shut down the asynchronous DNS resolver and terminate all active requests. </p>
<p>If the 'fail_requests' option is enabled, all active requests will return an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise, the requests will be silently discarded.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>the evdns base to free </td></tr>
<tr><td class="paramname">fail_requests</td><td>if zero, active requests will be aborted; if non-zero, active requests will return DNS_ERR_SHUTDOWN. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="dns_8h.html#afdcc359c412591d174f4d965afd18513" title="Initialize the asynchronous DNS library.">evdns_base_new()</a> </dd></dl>
</div>
</div>
<a id="a1545f7930f228018a06476a7236bfe0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1545f7930f228018a06476a7236bfe0e">◆ </a></span>evdns_base_get_nameserver_addr()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int evdns_base_get_nameserver_addr </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct sockaddr * </td>
<td class="paramname"><em>sa</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ev_socklen_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the address of the 'idx'th configured nameserver. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>The evdns_base to examine. </td></tr>
<tr><td class="paramname">idx</td><td>The index of the nameserver to get the address of. </td></tr>
<tr><td class="paramname">sa</td><td>A location to receive the server's address. </td></tr>
<tr><td class="paramname">len</td><td>The number of bytes available at sa.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes written into sa on success. On failure, returns -1 if idx is greater than the number of configured nameservers, or a value greater than 'len' if len was not high enough. </dd></dl>
</div>
</div>
<a id="a954ffdf37038dba334543f6013d6a87f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a954ffdf37038dba334543f6013d6a87f">◆ </a></span>evdns_base_get_nameserver_fd()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int evdns_base_get_nameserver_fd </td>
<td>(</td>
<td class="paramtype">struct evdns_base * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>idx</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the fd of the 'idx'th configured nameserver. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>The evdns_base to examine. </td></tr>
<tr><td class="paramname">idx</td><td>The index of the nameserver to get the address of.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the fd value. On failure, returns -1 if idx is greater than the number of configured nameservers </dd></dl>
</div>
</div>
<a id="a5092d38082851904e37d6b80c3475714"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5092d38082851904e37d6b80c3475714">◆ </a></span>evdns_base_load_hosts()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">