You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ntkresolv_8h_source.html 78KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.6"/>
  7. <title>The Netsukuku Project: src/ntkresolv.h Source File</title>
  8. <link href="../../tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="../../jquery.js"></script>
  10. <script type="text/javascript" src="../../dynsections.js"></script>
  11. <link href="../../navtree.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="../../resize.js"></script>
  13. <script type="text/javascript" src="../../navtree.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(initResizable);
  16. $(window).load(resizeHeight);
  17. </script>
  18. <link href="../../search/search.css" rel="stylesheet" type="text/css"/>
  19. <script type="text/javascript" src="../../search/search.js"></script>
  20. <script type="text/javascript">
  21. $(document).ready(function() { searchBox.OnSelectItem(0); });
  22. </script>
  23. <link href="../../doxygen.css" rel="stylesheet" type="text/css" />
  24. </head>
  25. <body>
  26. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  27. <div id="titlearea">
  28. <table cellspacing="0" cellpadding="0">
  29. <tbody>
  30. <tr style="height: 56px;">
  31. <td id="projectlogo"><img alt="Logo" src="../../Logo_netsukuku.jpg"/></td>
  32. <td style="padding-left: 0.5em;">
  33. <div id="projectname">The Netsukuku Project
  34. &#160;<span id="projectnumber">0.0.9</span>
  35. </div>
  36. <div id="projectbrief">An Alternative routing method</div>
  37. </td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. <!-- end header part -->
  43. <!-- Generated by Doxygen 1.8.6 -->
  44. <script type="text/javascript">
  45. var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
  46. </script>
  47. <div id="navrow1" class="tabs">
  48. <ul class="tablist">
  49. <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
  50. <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
  51. <li class="current"><a href="../../files.html"><span>Files</span></a></li>
  52. <li>
  53. <div id="MSearchBox" class="MSearchBoxInactive">
  54. <span class="left">
  55. <img id="MSearchSelect" src="../../search/mag_sel.png"
  56. onmouseover="return searchBox.OnSearchSelectShow()"
  57. onmouseout="return searchBox.OnSearchSelectHide()"
  58. alt=""/>
  59. <input type="text" id="MSearchField" value="Search" accesskey="S"
  60. onfocus="searchBox.OnSearchFieldFocus(true)"
  61. onblur="searchBox.OnSearchFieldFocus(false)"
  62. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  63. </span><span class="right">
  64. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
  65. </span>
  66. </div>
  67. </li>
  68. </ul>
  69. </div>
  70. <div id="navrow2" class="tabs2">
  71. <ul class="tablist">
  72. <li><a href="../../files.html"><span>File&#160;List</span></a></li>
  73. <li><a href="../../globals.html"><span>Globals</span></a></li>
  74. </ul>
  75. </div>
  76. </div><!-- top -->
  77. <div id="side-nav" class="ui-resizable side-nav-resizable">
  78. <div id="nav-tree">
  79. <div id="nav-tree-contents">
  80. <div id="nav-sync" class="sync"></div>
  81. </div>
  82. </div>
  83. <div id="splitbar" style="-moz-user-select:none;"
  84. class="ui-resizable-handle">
  85. </div>
  86. </div>
  87. <script type="text/javascript">
  88. $(document).ready(function(){initNavTree('d9/d88/ntkresolv_8h_source.html','../../');});
  89. </script>
  90. <div id="doc-content">
  91. <!-- window showing the filter options -->
  92. <div id="MSearchSelectWindow"
  93. onmouseover="return searchBox.OnSearchSelectShow()"
  94. onmouseout="return searchBox.OnSearchSelectHide()"
  95. onkeydown="return searchBox.OnSearchSelectKey(event)">
  96. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>
  97. <!-- iframe showing the search results (closed by default) -->
  98. <div id="MSearchResultsWindow">
  99. <iframe src="javascript:void(0)" frameborder="0"
  100. name="MSearchResults" id="MSearchResults">
  101. </iframe>
  102. </div>
  103. <div class="header">
  104. <div class="headertitle">
  105. <div class="title">ntkresolv.h</div> </div>
  106. </div><!--header-->
  107. <div class="contents">
  108. <a href="../../d9/d88/ntkresolv_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef NTK_RESOLV_H</span></div>
  109. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define NTK_RESOLV_H</span></div>
  110. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div>
  111. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;errno.h&gt;</span></div>
  112. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;netdb.h&gt;</span></div>
  113. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;strings.h&gt;</span></div>
  114. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;arpa/inet.h&gt;</span></div>
  115. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div>
  116. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;</div>
  117. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../da/d94/andns__lib_8h.html">andns_lib.h</a>&quot;</span></div>
  118. <div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;</div>
  119. <div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a1c6d5de492ac61ad29aec7aa9a436bbf"> 12</a></span>&#160;<span class="preprocessor">#define VERSION &quot;0.3.3&quot;</span></div>
  120. <div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a5886ad2c31397e9240e0717323241e89"> 13</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_MAIL_BUGS &quot;https://github.com/Netsukuku/netsukuku/issues&quot;</span></div>
  121. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div>
  122. <div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a20d9a2fe19436a1c9a85c2a7ad060a8b"> 15</a></span>&#160;<span class="preprocessor">#define NTKRESOLV_PORT 53</span></div>
  123. <div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ad217a78e12f234cb8b7c1c7547f1e07c"> 16</a></span>&#160;<span class="preprocessor">#define NTKRESOLV_PORT_STR &quot;53&quot;</span></div>
  124. <div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a67f1edc0014c2569b2a1e7e423aaa825"> 17</a></span>&#160;<span class="preprocessor">#define MAX_NS 3</span></div>
  125. <div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#acfc12278a87672861e438f8841a7a713"> 18</a></span>&#160;<span class="preprocessor">#define LOCALHOST &quot;localhost&quot;</span></div>
  126. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;</div>
  127. <div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a9be2e43ceeb2b8546e32192c9f3e538e"> 20</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_TIMEOUT 15</span></div>
  128. <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
  129. <div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#abf2afc2380f0ce3399d8af4b1f12897c"> 22</a></span>&#160;<span class="preprocessor">#define MAX_HOSTNAME_LEN 512</span></div>
  130. <div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a52da5cb73b4c3959f202a4336d0ab5f7"> 23</a></span>&#160;<span class="preprocessor">#define NTKRESOLV_MAX_OBJ_LEN 512</span></div>
  131. <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
  132. <div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div>
  133. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment">//#define ANDNS_MAX_SZ 1024</span></div>
  134. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
  135. <div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#abb702d8b501669a23aa0ab3b281b9384"> 28</a></span>&#160;<span class="preprocessor">#define min(x,y) (x)&lt;(y)?(x):(y)</span></div>
  136. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
  137. <div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ad41f7dd9c619944e55a7340b252bdac5"> 30</a></span>&#160;<span class="preprocessor">#define REALM_NTK 0+1</span></div>
  138. <div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a2b93ad5b32ecef381c9099bbfe432be0"> 31</a></span>&#160;<span class="preprocessor">#define REALM_INT 1+1</span></div>
  139. <div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a7b4fa296dafdfc175e6341051eb65a3d"> 32</a></span>&#160;<span class="preprocessor">#define REALM_NTK_STR &quot;ntk&quot;</span></div>
  140. <div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a018f24d7966c5c73444b4b0770ee0e62"> 33</a></span>&#160;<span class="preprocessor">#define REALM_INT_STR &quot;inet&quot;</span></div>
  141. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
  142. <div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#af2c396d095344cd7d0bee1734963f684"> 35</a></span>&#160;<span class="preprocessor">#define QTYPE_A AT_A</span></div>
  143. <div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a32a04223e6d00b7e93f5842402b7aafd"> 36</a></span>&#160;<span class="preprocessor">#define QTYPE_PTR AT_PTR</span></div>
  144. <div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a6d3161a004cfa38e99c49b9518380de3"> 37</a></span>&#160;<span class="preprocessor">#define QTYPE_G AT_G</span></div>
  145. <div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a4f84a498ef8ddf59c1b814925c84380d"> 38</a></span>&#160;<span class="preprocessor">#define QTYPE_MX 3</span></div>
  146. <div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a81093d199d124a6350b1e5177d55ca81"> 39</a></span>&#160;<span class="preprocessor">#define QTYPE_A_STR &quot;snsd&quot;</span></div>
  147. <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a4ee713923b53397155295947705d3db3"> 40</a></span>&#160;<span class="preprocessor">#define QTYPE_PTR_STR &quot;ptr&quot;</span></div>
  148. <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a258ce4a900804b62bf1e20c48813528a"> 41</a></span>&#160;<span class="preprocessor">#define QTYPE_G_STR &quot;global&quot;</span></div>
  149. <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a05eca7682455c9a56f940307679e0bd4"> 42</a></span>&#160;<span class="preprocessor">#define QTYPE_MX_STR &quot;mx&quot;</span></div>
  150. <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
  151. <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a14c6562406341ffaed43e397b450fbc0"> 44</a></span>&#160;<span class="preprocessor">#define SNSD_PROTO_TCP 0</span></div>
  152. <div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a99ed4de53803acf3f17756b8107f646f"> 45</a></span>&#160;<span class="preprocessor">#define SNSD_PROTO_UDP 1</span></div>
  153. <div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a53dd5e12a84afd46224ecc5d8e1d754a"> 46</a></span>&#160;<span class="preprocessor">#define SNSD_PROTO_TCP_STR &quot;tcp&quot;</span></div>
  154. <div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#afb527f6e7ebc215fb69d979707fc478d"> 47</a></span>&#160;<span class="preprocessor">#define SNSD_PROTO_UDP_STR &quot;udp&quot;</span></div>
  155. <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div>
  156. <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a288d4f1a0a7f03c4082dcf3c55d1f7d5"> 49</a></span>&#160;<span class="preprocessor">#define SNSD_PROTO_DEFAULT SNSD_PROTO_TCP</span></div>
  157. <div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#adb1f393a0caf558d612d2a83d7637f42"> 50</a></span>&#160;<span class="preprocessor">#define SNSD_SERVICE_DEFAULT 0</span></div>
  158. <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div>
  159. <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="comment">/* NK BIT */</span></div>
  160. <div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a2886d25d5d94720331b4cf39cb81c37e"> 53</a></span>&#160;<span class="preprocessor">#define NK_DNS 0</span></div>
  161. <div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a1551800f2e195346f530995a7effd624"> 54</a></span>&#160;<span class="preprocessor">#define NK_NTK 1</span></div>
  162. <div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ad3fbec33ed22683ae6ae968e62debe0b"> 55</a></span>&#160;<span class="preprocessor">#define NK_INET 2</span></div>
  163. <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div>
  164. <div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a3104e6ab77c71296e6879fc57af26e8e"> 57</a></span>&#160;<span class="preprocessor">#define TIME_SCALE 1000000.0</span></div>
  165. <div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a564a94e97ac7ed8acc0c96afcf952d1f"> 58</a></span>&#160;<span class="preprocessor">#define HELP_STR &quot;help&quot;</span></div>
  166. <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div>
  167. <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div>
  168. <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div>
  169. <div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a42c357180e5545cd19e4a233245e97f5"> 62</a></span>&#160;<span class="keywordtype">char</span> *<a class="code" href="../../d9/d88/ntkresolv_8h.html#a42c357180e5545cd19e4a233245e97f5">QTYPE_STR_LIST</a>[]={<a class="code" href="../../d9/d88/ntkresolv_8h.html#a81093d199d124a6350b1e5177d55ca81">QTYPE_A_STR</a>,<a class="code" href="../../d9/d88/ntkresolv_8h.html#a4ee713923b53397155295947705d3db3">QTYPE_PTR_STR</a>,<a class="code" href="../../d9/d88/ntkresolv_8h.html#a258ce4a900804b62bf1e20c48813528a">QTYPE_G_STR</a>,<a class="code" href="../../d9/d88/ntkresolv_8h.html#a05eca7682455c9a56f940307679e0bd4">QTYPE_MX_STR</a>};</div>
  170. <div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#aebaff2c5e182f385ff36a100acf6eda9"> 63</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#aebaff2c5e182f385ff36a100acf6eda9">QT_LEN</a>=4;</div>
  171. <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
  172. <div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ac65a4ac9bb5378da7462a64bd495dade"> 65</a></span>&#160;<span class="preprocessor">#define QTFROMPREF(s) \</span></div>
  173. <div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="preprocessor">({ \</span></div>
  174. <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor"> int __n,__res=-1; \</span></div>
  175. <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="preprocessor"> for (__n=0;__n&lt;QT_LEN;__n++) \</span></div>
  176. <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor"> if (!strncasecmp(s,QTYPE_STR_LIST[__n],strlen(s))) \</span></div>
  177. <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor"> {__res=__n;break;} \</span></div>
  178. <div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="preprocessor"> __res; })</span></div>
  179. <div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ae56a3e2aadab2b37eaf10bddd08d5fad"> 72</a></span>&#160;<span class="preprocessor">#define REALMFROMPREF(s) \</span></div>
  180. <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor">({ \</span></div>
  181. <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor"> uint8_t __res=0; \</span></div>
  182. <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor"> if (!strncasecmp(REALM_NTK_STR,s,strlen(s))) \</span></div>
  183. <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="preprocessor"> __res=REALM_NTK; \</span></div>
  184. <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="preprocessor"> else if (!strncasecmp(REALM_INT_STR,s,strlen(s))) \</span></div>
  185. <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="preprocessor"> __res=REALM_INT; \</span></div>
  186. <div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="preprocessor"> __res; })</span></div>
  187. <div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a1596642d6f5588acb4d57532546a306e"> 80</a></span>&#160;<span class="preprocessor">#define PROTOFROMPREF(s) \</span></div>
  188. <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="preprocessor">({ \</span></div>
  189. <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="preprocessor"> uint8_t __res=-1; \</span></div>
  190. <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="preprocessor"> if (!strncasecmp(SNSD_PROTO_UDP_STR,s,strlen(s))) \</span></div>
  191. <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="preprocessor"> __res=SNSD_PROTO_UDP; \</span></div>
  192. <div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="preprocessor"> else if (!strncasecmp(SNSD_PROTO_TCP_STR,s,strlen(s))) \</span></div>
  193. <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;<span class="preprocessor"> __res=SNSD_PROTO_TCP; \</span></div>
  194. <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="preprocessor"> __res; })</span></div>
  195. <div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
  196. <div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div>
  197. <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div>
  198. <div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html"> 91</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../de/d7d/structntkresolv__opts.html">ntkresolv_opts</a> {</div>
  199. <div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#ae10f4a975f73350d442b327fdde8b6f5"> 92</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="../../de/d7d/structntkresolv__opts.html#ae10f4a975f73350d442b327fdde8b6f5">nsserver</a>[<a class="code" href="../../d9/d88/ntkresolv_8h.html#abf2afc2380f0ce3399d8af4b1f12897c">MAX_HOSTNAME_LEN</a>];</div>
  200. <div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#a6ba28a7a993fdf6deb20fdd0d40687ac"> 93</a></span>&#160; int16_t <a class="code" href="../../de/d7d/structntkresolv__opts.html#a6ba28a7a993fdf6deb20fdd0d40687ac">port</a>;</div>
  201. <div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#ae8a58bc7ba884600280aa00796451ce7"> 94</a></span>&#160; int8_t <a class="code" href="../../de/d7d/structntkresolv__opts.html#ae8a58bc7ba884600280aa00796451ce7">silent</a>;</div>
  202. <div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#a2c5b392c9a75a1fe4692b7d7fb16dd4b"> 95</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="../../de/d7d/structntkresolv__opts.html#a2c5b392c9a75a1fe4692b7d7fb16dd4b">obj</a>[<a class="code" href="../../d9/d88/ntkresolv_8h.html#a52da5cb73b4c3959f202a4336d0ab5f7">NTKRESOLV_MAX_OBJ_LEN</a>];</div>
  203. <div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#a4071f2610390b66df6365e7f24082d2b"> 96</a></span>&#160; uint16_t <a class="code" href="../../de/d7d/structntkresolv__opts.html#a4071f2610390b66df6365e7f24082d2b">id</a>;</div>
  204. <div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#a2c7d7326e748de0d3cca9fec4cc47b36"> 97</a></span>&#160; uint8_t <a class="code" href="../../de/d7d/structntkresolv__opts.html#a2c7d7326e748de0d3cca9fec4cc47b36">hash</a>;</div>
  205. <div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="../../de/d7d/structntkresolv__opts.html#a3e9fdbfc2b7ec692e5227e5b221b759c"> 98</a></span>&#160; <a class="code" href="../../d9/d5a/structandns__pkt.html">andns_pkt</a> *<a class="code" href="../../de/d7d/structntkresolv__opts.html#a3e9fdbfc2b7ec692e5227e5b221b759c">q</a>;</div>
  206. <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;} <a class="code" href="../../d9/d88/ntkresolv_8h.html#a23622b67fd9bfe79c8807334f9cc28a4">ntkresolv_opts</a>;</div>
  207. <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div>
  208. <div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a7cd71d013792e06ea44a6b2520c8f96f"> 101</a></span>&#160;<span class="preprocessor">#define NTKRESOLV_OPTS_SZ sizeof(ntkresolv_opts)</span></div>
  209. <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div>
  210. <div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a25b2507fa991dd2f751868ee7abd1119"> 103</a></span>&#160;<span class="preprocessor">#define QR_STR(ap) ((ap)-&gt;qr==0)?&quot;QUERY&quot;:&quot;ANSWER&quot;</span></div>
  211. <div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a4cef513f4261f6e140c095c87bb11ec6"> 104</a></span>&#160;<span class="preprocessor">#define QTYPE_STR(ap) \</span></div>
  212. <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="preprocessor">({ \</span></div>
  213. <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="preprocessor"> char *__c; \</span></div>
  214. <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="preprocessor"> switch((ap)-&gt;qtype) { \</span></div>
  215. <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="preprocessor"> case AT_A: \</span></div>
  216. <div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="preprocessor"> __c=&quot;Host2Ip&quot;; \</span></div>
  217. <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="preprocessor"> break; \</span></div>
  218. <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="preprocessor"> case AT_PTR: \</span></div>
  219. <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="preprocessor"> __c=&quot;Ip2Host&quot;; \</span></div>
  220. <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="preprocessor"> break; \</span></div>
  221. <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="preprocessor"> case AT_G: \</span></div>
  222. <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<span class="preprocessor"> __c=&quot; Global&quot;; \</span></div>
  223. <div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;<span class="preprocessor"> break; \</span></div>
  224. <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="preprocessor"> default: \</span></div>
  225. <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="preprocessor"> __c=&quot;Unknow&quot;; \</span></div>
  226. <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="preprocessor"> break; \</span></div>
  227. <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="preprocessor"> } \</span></div>
  228. <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="preprocessor"> __c;})</span></div>
  229. <div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a100a3a96395929a18eaaf268ab82e581"> 122</a></span>&#160;<span class="preprocessor">#define NK_STR(ap) \</span></div>
  230. <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="preprocessor">({ \</span></div>
  231. <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="preprocessor"> char *__d; \</span></div>
  232. <div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="preprocessor"> switch((ap)-&gt;nk) { \</span></div>
  233. <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="preprocessor"> case NK_DNS: \</span></div>
  234. <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="preprocessor"> __d=&quot;DNS&quot;; \</span></div>
  235. <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="preprocessor"> break; \</span></div>
  236. <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor"> case NK_NTK: \</span></div>
  237. <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="preprocessor"> __d=&quot;Ntk&quot;; \</span></div>
  238. <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor"> break; \</span></div>
  239. <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="preprocessor"> case NK_INET: \</span></div>
  240. <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="preprocessor"> __d=&quot;Inet&quot;; \</span></div>
  241. <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor"> break; \</span></div>
  242. <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="preprocessor"> default: \</span></div>
  243. <div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="preprocessor"> __d=&quot;UNKNOW&quot;; \</span></div>
  244. <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="preprocessor"> break; \</span></div>
  245. <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="preprocessor"> } \</span></div>
  246. <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="preprocessor"> __d;})</span></div>
  247. <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
  248. <div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a1a863555b318d1c6997c49d8de55da80"> 141</a></span>&#160;<span class="preprocessor">#define RCODE_STR(ap) \</span></div>
  249. <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="preprocessor">({ \</span></div>
  250. <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="preprocessor"> char *__e; \</span></div>
  251. <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor"> switch((ap)-&gt;rcode) { \</span></div>
  252. <div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="preprocessor"> case ANDNS_RCODE_NOERR: \</span></div>
  253. <div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="preprocessor"> __e=&quot;NoError&quot;; \</span></div>
  254. <div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="preprocessor"> break; \</span></div>
  255. <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;<span class="preprocessor"> case ANDNS_RCODE_EINTRPRT: \</span></div>
  256. <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;<span class="preprocessor"> __e=&quot;InError&quot;; \</span></div>
  257. <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;<span class="preprocessor"> break; \</span></div>
  258. <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="preprocessor"> case ANDNS_RCODE_ESRVFAIL: \</span></div>
  259. <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="preprocessor"> __e=&quot;SrvFail&quot;; \</span></div>
  260. <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="preprocessor"> break; \</span></div>
  261. <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<span class="preprocessor"> case ANDNS_RCODE_ENSDMN: \</span></div>
  262. <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;<span class="preprocessor"> __e=&quot;NoXHost&quot;; \</span></div>
  263. <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;<span class="preprocessor"> break; \</span></div>
  264. <div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor"> case ANDNS_RCODE_ENIMPL: \</span></div>
  265. <div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="preprocessor"> __e=&quot;NotImpl&quot;; \</span></div>
  266. <div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;<span class="preprocessor"> break; \</span></div>
  267. <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="preprocessor"> case ANDNS_RCODE_ERFSD: \</span></div>
  268. <div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;<span class="preprocessor"> __e=&quot;Refused&quot;; \</span></div>
  269. <div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;<span class="preprocessor"> break; \</span></div>
  270. <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<span class="preprocessor"> default: \</span></div>
  271. <div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;<span class="preprocessor"> __e=&quot;UNKNOW&quot;; \</span></div>
  272. <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;<span class="preprocessor"> break; \</span></div>
  273. <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;<span class="preprocessor"> } \</span></div>
  274. <div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;<span class="preprocessor"> __e;})</span></div>
  275. <div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a6b4f787254a1f87583baa2ab78f34563"> 168</a></span>&#160;<span class="preprocessor">#define IPV_STR(ap) \</span></div>
  276. <div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;<span class="preprocessor">({ \</span></div>
  277. <div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;<span class="preprocessor"> char *__f; \</span></div>
  278. <div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;<span class="preprocessor"> switch((ap)-&gt;ipv) { \</span></div>
  279. <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;<span class="preprocessor"> case ANDNS_IPV4: \</span></div>
  280. <div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;<span class="preprocessor"> __f=&quot;IPv4&quot;; \</span></div>
  281. <div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="preprocessor"> break; \</span></div>
  282. <div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<span class="preprocessor"> case ANDNS_IPV6: \</span></div>
  283. <div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;<span class="preprocessor"> __f=&quot;IPv6&quot;; \</span></div>
  284. <div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<span class="preprocessor"> break; \</span></div>
  285. <div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;<span class="preprocessor"> default: \</span></div>
  286. <div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;<span class="preprocessor"> __f=&quot;UNKNOW&quot;; \</span></div>
  287. <div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;<span class="preprocessor"> break; \</span></div>
  288. <div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;<span class="preprocessor"> } \</span></div>
  289. <div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="preprocessor"> __f;})</span></div>
  290. <div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a5721cfe42e8db215901012095e6b6567"> 183</a></span>&#160;<span class="preprocessor">#define MAX_INT_STR 10</span></div>
  291. <div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a77840316740c63151f2850afa4162970"> 184</a></span>&#160;<span class="preprocessor">#define SERVICE_STR(ap) \</span></div>
  292. <div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<span class="preprocessor">({ \</span></div>
  293. <div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;<span class="preprocessor"> char *__g; \</span></div>
  294. <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;<span class="preprocessor"> char __t[MAX_INT_STR]; \</span></div>
  295. <div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;<span class="preprocessor"> switch((ap)-&gt;qtype) { \</span></div>
  296. <div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;<span class="preprocessor"> case AT_G: \</span></div>
  297. <div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="preprocessor"> __g=&quot;*&quot;; \</span></div>
  298. <div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;<span class="preprocessor"> break; \</span></div>
  299. <div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;<span class="preprocessor"> case AT_PTR: \</span></div>
  300. <div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;<span class="preprocessor"> __g=&quot;None&quot;; \</span></div>
  301. <div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;<span class="preprocessor"> break; \</span></div>
  302. <div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;<span class="preprocessor"> case AT_A: \</span></div>
  303. <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;<span class="preprocessor"> snprintf(__t,MAX_INT_STR,&quot;%d&quot;, \</span></div>
  304. <div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;<span class="preprocessor"> ap-&gt;service); \</span></div>
  305. <div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="preprocessor"> __g=__t; \</span></div>
  306. <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;<span class="preprocessor"> break; \</span></div>
  307. <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;<span class="preprocessor"> default: \</span></div>
  308. <div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;<span class="preprocessor"> __g=&quot;UNKNOW&quot;; \</span></div>
  309. <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="preprocessor"> break; \</span></div>
  310. <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;<span class="preprocessor"> } \</span></div>
  311. <div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="preprocessor"> __g;})</span></div>
  312. <div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a78594d579da50a437bec5ba358e6326b"> 205</a></span>&#160;<span class="preprocessor">#define PROTO_STR(ap) \</span></div>
  313. <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="preprocessor">({ \</span></div>
  314. <div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;<span class="preprocessor"> char *__h; \</span></div>
  315. <div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;<span class="preprocessor"> switch((ap)-&gt;qtype) { \</span></div>
  316. <div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;<span class="preprocessor"> case AT_G: \</span></div>
  317. <div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;<span class="preprocessor"> __h=&quot;*&quot;; \</span></div>
  318. <div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;<span class="preprocessor"> break; \</span></div>
  319. <div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;<span class="preprocessor"> case AT_PTR: \</span></div>
  320. <div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;<span class="preprocessor"> __h=&quot;None&quot;; \</span></div>
  321. <div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;<span class="preprocessor"> break; \</span></div>
  322. <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;<span class="preprocessor"> case AT_A: \</span></div>
  323. <div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;<span class="preprocessor"> if (!ap-&gt;service) \</span></div>
  324. <div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;<span class="preprocessor"> __h=&quot;None&quot;; \</span></div>
  325. <div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="preprocessor"> else \</span></div>
  326. <div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;<span class="preprocessor"> __h=ap-&gt;p==SNSD_PROTO_TCP? \</span></div>
  327. <div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="preprocessor"> SNSD_PROTO_TCP_STR: \</span></div>
  328. <div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;<span class="preprocessor"> SNSD_PROTO_UDP_STR; \</span></div>
  329. <div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;<span class="preprocessor"> break; \</span></div>
  330. <div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;<span class="preprocessor"> default: \</span></div>
  331. <div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;<span class="preprocessor"> __h=&quot;UNKNOW&quot;; \</span></div>
  332. <div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="preprocessor"> break; \</span></div>
  333. <div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<span class="preprocessor"> } \</span></div>
  334. <div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;<span class="preprocessor"> __h;})</span></div>
  335. <div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;</div>
  336. <div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;</div>
  337. <div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ab5ffd0c915f63d129bd296d815bfb433"> 230</a></span>&#160;<span class="preprocessor">#define GET_OPT_REALM (globopts.realm==REALM_NTK)?&quot;NTK&quot;:&quot;INET&quot;</span></div>
  338. <div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;</div>
  339. <div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="comment">/* CODE UTILS */</span></div>
  340. <div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#af46d5710eb9c0f7d78b167192f5044df"> 233</a></span>&#160;<span class="preprocessor">#define GOP (globopts)</span></div>
  341. <div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ae6d2373d5d0aaa43b5c9ebae403c191e"> 234</a></span>&#160;<span class="preprocessor">#define AMISILENT (GOP.silent)</span></div>
  342. <div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ab81c3f0d00c74341ab6bd77579e32b7e"> 235</a></span>&#160;<span class="preprocessor">#define GQT (GOP.q)</span></div>
  343. <div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;</div>
  344. <div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#aece649721e18f44f19d280d746e4be4d"> 237</a></span>&#160;<span class="preprocessor">#define say printf</span></div>
  345. <div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a882d865ce3d6bc56310f857e70a7c8bb"> 238</a></span>&#160;<span class="preprocessor">#define bye if (!AMISILENT) say(&quot;\tBye!\n&quot;);</span></div>
  346. <div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;</div>
  347. <div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a93f93b62359c21679d07f81352fee880"> 240</a></span>&#160;<span class="preprocessor">#define COMPUTE_TIME diff_time(time_start,time_stop)</span></div>
  348. <div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a7bc282695bdcbc4fd6b105b85efa355c"> 241</a></span>&#160;<span class="preprocessor">#define time_report if (!AMISILENT){gettimeofday(&amp;time_stop,NULL); \</span></div>
  349. <div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;<span class="preprocessor"> say(&quot;Query time: %f seconds.\n&quot; \</span></div>
  350. <div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;<span class="preprocessor"> ,COMPUTE_TIME);}</span></div>
  351. <div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;</div>
  352. <div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#aa6334aac61cbbf4f8473e31892e83847"> 245</a></span>&#160;<span class="preprocessor">#define G_ALIGN(len) GQT-&gt;qstlength=len;GQT-&gt;qstdata=(char*) \</span></div>
  353. <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;<span class="preprocessor"> xmalloc(len+1); \</span></div>
  354. <div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;<span class="preprocessor"> if (!GQT-&gt;qstdata){say(&quot;Fatal malloc!\n&quot;); \</span></div>
  355. <div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;<span class="preprocessor"> exit(1);}</span></div>
  356. <div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a52d82770f67d1dfbb4129bdd21f60988"> 249</a></span>&#160;<span class="preprocessor">#define G_SETQST_A(s) G_ALIGN(strlen(s)+1);strcpy(GQT-&gt;qstdata,s); \</span></div>
  357. <div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;<span class="preprocessor"> GQT-&gt;qstlength=strlen(s);</span></div>
  358. <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;</div>
  359. <div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#ae8009720010d3e8c1956a6966edf1bbd"> 252</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_HASH_STR(s,d) \</span></div>
  360. <div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;<span class="preprocessor">({ \</span></div>
  361. <div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;<span class="preprocessor"> int __i; \</span></div>
  362. <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;<span class="preprocessor"> for (__i=0;__i&lt;ANDNS_HASH_H;__i++) \</span></div>
  363. <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;<span class="preprocessor"> sprintf(d+2*__i,&quot;%02x&quot;,((unsigned char*)(s))[__i]); \</span></div>
  364. <div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;<span class="preprocessor"> d[2*ANDNS_HASH_H]=0;})</span></div>
  365. <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;</div>
  366. <div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a4a4b13935f7abb542c63e852a9a7907a"> 259</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_STR_HASH(s,d) \</span></div>
  367. <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;<span class="preprocessor">({ \</span></div>
  368. <div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;<span class="preprocessor"> int __i,__t; \</span></div>
  369. <div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;<span class="preprocessor"> for (__i=0;__i&lt;ANDNS_HASH_H;__i++) { \</span></div>
  370. <div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;<span class="preprocessor"> sscanf(s+2*__i,&quot;%02x&quot;,&amp;__t); \</span></div>
  371. <div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;<span class="preprocessor"> d[__i]=(unsigned char)(__t);}})</span></div>
  372. <div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;</div>
  373. <div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a8ba3243859d8f914d3b876ff6808a153"> 266</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_IP_SYMBOL &quot;~&quot;</span></div>
  374. <div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#adde79566ae721241ba116761bd5d5923"> 267</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_HNAME_SYMBOL &quot;-&quot;</span></div>
  375. <div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="../../d9/d88/ntkresolv_8h.html#a5cab6f144e98dcccba0f96930368acbc"> 268</a></span>&#160;<span class="preprocessor">#define NTK_RESOLV_SYMBOL(apd) (apd)-&gt;m&amp;APD_IP?NTK_RESOLV_IP_SYMBOL: \</span></div>
  376. <div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="preprocessor"> NTK_RESOLV_HNAME_SYMBOL</span></div>
  377. <div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;</div>
  378. <div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;<span class="comment">/* FUNCTIONS */</span></div>
  379. <div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;</div>
  380. <div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#af986bd0575ec9b913dfab4b8422509ae">version</a>(<span class="keywordtype">void</span>);</div>
  381. <div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#ae8605e2b78cd4a81b6c6b5c30cb7366a">usage</a>(<span class="keywordtype">void</span>);</div>
  382. <div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a878d850445a499c5a529a50309f704fa">qt_usage</a>(<span class="keywordtype">char</span> *arg);</div>
  383. <div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#ae226936b7b54e18fd0142cec3fb75891">realm_usage</a>(<span class="keywordtype">char</span> *arg);</div>
  384. <div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a618d6dfb1e757d0b6cc7e14e85961d3d">proto_usage</a>(<span class="keywordtype">char</span> *arg);</div>
  385. <div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#aa31287dfedcfeb069e2c19e9d85cfd11">service_and_proto_usage</a>(<span class="keywordtype">char</span> *arg);</div>
  386. <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;<span class="keywordtype">double</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a0747e971997561796c198513dc8975b8">diff_time</a>(<span class="keyword">struct</span> timeval a,<span class="keyword">struct</span> timeval b);</div>
  387. <div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a58a3474ad5ffa3046c2a6247fa4b780a">opts_init</a>(<span class="keywordtype">void</span>);</div>
  388. <div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#afcf190ef5b605c4de3d3e23554c840d1">opts_set_silent</a>(<span class="keywordtype">void</span>);</div>
  389. <div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a55b7bc0916e754d54b95471def57e94f">opts_set_port</a>(<span class="keywordtype">char</span> *arg);</div>
  390. <div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a4fe23240617e7ebb55aca663b64e95ad">opts_set_ns</a>(<span class="keywordtype">char</span> *arg);</div>
  391. <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a63d87b859b08cbb60c867d78293adc54">opts_set_qt</a>(<span class="keywordtype">char</span> *arg);</div>
  392. <div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a33446b4052c109032876b7423849f082">opts_set_realm</a>(<span class="keywordtype">char</span> *arg);</div>
  393. <div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a5a81581501fa29b9a28b34addd0a8ab9">opts_set_service_and_proto</a>(<span class="keywordtype">char</span> *arg);</div>
  394. <div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a53dc39e8aa18066a1fd3a0c5e991fd96">opts_set_proto</a>(<span class="keywordtype">char</span> *arg) ;</div>
  395. <div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a841b458a4dc72d824a01473834268395">opts_set_recursion</a>(<span class="keywordtype">void</span>);</div>
  396. <div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a5a3cc876c2ff1c7fb7b3dbac59fada84">opts_set_hash</a>(<span class="keywordtype">void</span>) ;</div>
  397. <div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a48277393ef68e08f4ca797702b93317b">opts_set_compute_hash</a>(<span class="keywordtype">void</span>);</div>
  398. <div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#ae8882435d15ed8800aaa7b5e8f476a57">opts_set_parsable_output</a>(<span class="keywordtype">void</span>);</div>
  399. <div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a4aa3684915c89eb76081f2e5e6c6f336">opts_set_question</a>(<span class="keywordtype">char</span> *arg);</div>
  400. <div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#af8db000da6d4c6009e8af4b927f818a5">opts_finish</a>(<span class="keywordtype">char</span> *arg);</div>
  401. <div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#adf498292ef00b9985c9e3a7bd6a48d80">print_headers</a>();</div>
  402. <div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a63f0bee2b9d27323f626496a5213c8e2">print_question</a>();</div>
  403. <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a06ffe4a1e6ae3edcadaa101f26796965">ip_bin_to_str</a>(<span class="keywordtype">void</span> *data,<span class="keywordtype">char</span> *dst);</div>
  404. <div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a16ab30be9cce526b45a80e549e3e815b">answer_data_to_str</a>(<a class="code" href="../../d0/d50/structandns__pkt__data.html">andns_pkt_data</a> *apd,<span class="keywordtype">char</span> *dst);</div>
  405. <div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a4b38d66e3a7bdcea18a221170b455f86">print_answers</a>();</div>
  406. <div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a1e9dbfcdf317a29cc3a93947945f8762">print_parsable_answers</a>(<span class="keywordtype">void</span>);</div>
  407. <div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#acbd6fc90c9321ec2a13e43c26c32131d">print_results</a>(<span class="keywordtype">void</span>);</div>
  408. <div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#aa95ce7a8d4506ae83dd9b76933d7c6ba">do_command</a>(<span class="keywordtype">void</span>);</div>
  409. <div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#ad9097259eb78c35bf7252b9e8156f52e">ntkresolv_exit</a>(<span class="keywordtype">int</span> i);</div>
  410. <div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a525d73873ebf5621cb96d199b41454df">ntkresolv_safe_exit</a>(<span class="keywordtype">int</span> i);</div>
  411. <div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d9/d88/ntkresolv_8h.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv);</div>
  412. <div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;</div>
  413. <div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* NTK_RESOLV_H */</span><span class="preprocessor"></span></div>
  414. <div class="ttc" id="ntkresolv_8h_html_a258ce4a900804b62bf1e20c48813528a"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a258ce4a900804b62bf1e20c48813528a">QTYPE_G_STR</a></div><div class="ttdeci">#define QTYPE_G_STR</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:41</div></div>
  415. <div class="ttc" id="ntkresolv_8h_html_a23622b67fd9bfe79c8807334f9cc28a4"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a23622b67fd9bfe79c8807334f9cc28a4">ntkresolv_opts</a></div><div class="ttdeci">struct ntkresolv_opts ntkresolv_opts</div></div>
  416. <div class="ttc" id="ntkresolv_8h_html_a42c357180e5545cd19e4a233245e97f5"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a42c357180e5545cd19e4a233245e97f5">QTYPE_STR_LIST</a></div><div class="ttdeci">char * QTYPE_STR_LIST[]</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:62</div></div>
  417. <div class="ttc" id="ntkresolv_8h_html_a16ab30be9cce526b45a80e549e3e815b"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a16ab30be9cce526b45a80e549e3e815b">answer_data_to_str</a></div><div class="ttdeci">void answer_data_to_str(andns_pkt_data *apd, char *dst)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:394</div></div>
  418. <div class="ttc" id="ntkresolv_8h_html_a618d6dfb1e757d0b6cc7e14e85961d3d"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a618d6dfb1e757d0b6cc7e14e85961d3d">proto_usage</a></div><div class="ttdeci">void proto_usage(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:79</div></div>
  419. <div class="ttc" id="ntkresolv_8h_html_abf2afc2380f0ce3399d8af4b1f12897c"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#abf2afc2380f0ce3399d8af4b1f12897c">MAX_HOSTNAME_LEN</a></div><div class="ttdeci">#define MAX_HOSTNAME_LEN</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:22</div></div>
  420. <div class="ttc" id="ntkresolv_8h_html_a878d850445a499c5a529a50309f704fa"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a878d850445a499c5a529a50309f704fa">qt_usage</a></div><div class="ttdeci">void qt_usage(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:49</div></div>
  421. <div class="ttc" id="ntkresolv_8h_html_a4aa3684915c89eb76081f2e5e6c6f336"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a4aa3684915c89eb76081f2e5e6c6f336">opts_set_question</a></div><div class="ttdeci">void opts_set_question(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:255</div></div>
  422. <div class="ttc" id="ntkresolv_8h_html_aa31287dfedcfeb069e2c19e9d85cfd11"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#aa31287dfedcfeb069e2c19e9d85cfd11">service_and_proto_usage</a></div><div class="ttdeci">void service_and_proto_usage(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:95</div></div>
  423. <div class="ttc" id="structntkresolv__opts_html"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html">ntkresolv_opts</a></div><div class="ttdef"><b>Definition:</b> ntkresolv.h:91</div></div>
  424. <div class="ttc" id="ntkresolv_8h_html_a5a81581501fa29b9a28b34addd0a8ab9"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a5a81581501fa29b9a28b34addd0a8ab9">opts_set_service_and_proto</a></div><div class="ttdeci">void opts_set_service_and_proto(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:211</div></div>
  425. <div class="ttc" id="structntkresolv__opts_html_a3e9fdbfc2b7ec692e5227e5b221b759c"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#a3e9fdbfc2b7ec692e5227e5b221b759c">ntkresolv_opts::q</a></div><div class="ttdeci">andns_pkt * q</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:98</div></div>
  426. <div class="ttc" id="ntkresolv_8h_html_a05eca7682455c9a56f940307679e0bd4"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a05eca7682455c9a56f940307679e0bd4">QTYPE_MX_STR</a></div><div class="ttdeci">#define QTYPE_MX_STR</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:42</div></div>
  427. <div class="ttc" id="ntkresolv_8h_html_acbd6fc90c9321ec2a13e43c26c32131d"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#acbd6fc90c9321ec2a13e43c26c32131d">print_results</a></div><div class="ttdeci">void print_results(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:472</div></div>
  428. <div class="ttc" id="ntkresolv_8h_html_a5a3cc876c2ff1c7fb7b3dbac59fada84"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a5a3cc876c2ff1c7fb7b3dbac59fada84">opts_set_hash</a></div><div class="ttdeci">void opts_set_hash(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:242</div></div>
  429. <div class="ttc" id="ntkresolv_8h_html_a525d73873ebf5621cb96d199b41454df"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a525d73873ebf5621cb96d199b41454df">ntkresolv_safe_exit</a></div><div class="ttdeci">void ntkresolv_safe_exit(int i)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:527</div></div>
  430. <div class="ttc" id="ntkresolv_8h_html_ae8605e2b78cd4a81b6c6b5c30cb7366a"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#ae8605e2b78cd4a81b6c6b5c30cb7366a">usage</a></div><div class="ttdeci">void usage(void)</div><div class="ttdef"><b>Definition:</b> netsukuku.c:155</div></div>
  431. <div class="ttc" id="ntkresolv_8h_html_afcf190ef5b605c4de3d3e23554c840d1"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#afcf190ef5b605c4de3d3e23554c840d1">opts_set_silent</a></div><div class="ttdeci">void opts_set_silent(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:149</div></div>
  432. <div class="ttc" id="ntkresolv_8h_html_a53dc39e8aa18066a1fd3a0c5e991fd96"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a53dc39e8aa18066a1fd3a0c5e991fd96">opts_set_proto</a></div><div class="ttdeci">void opts_set_proto(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:226</div></div>
  433. <div class="ttc" id="ntkresolv_8h_html_aebaff2c5e182f385ff36a100acf6eda9"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#aebaff2c5e182f385ff36a100acf6eda9">QT_LEN</a></div><div class="ttdeci">int QT_LEN</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:63</div></div>
  434. <div class="ttc" id="ntkresolv_8h_html_a52da5cb73b4c3959f202a4336d0ab5f7"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a52da5cb73b4c3959f202a4336d0ab5f7">NTKRESOLV_MAX_OBJ_LEN</a></div><div class="ttdeci">#define NTKRESOLV_MAX_OBJ_LEN</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:23</div></div>
  435. <div class="ttc" id="ntkresolv_8h_html_a81093d199d124a6350b1e5177d55ca81"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a81093d199d124a6350b1e5177d55ca81">QTYPE_A_STR</a></div><div class="ttdeci">#define QTYPE_A_STR</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:39</div></div>
  436. <div class="ttc" id="ntkresolv_8h_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdef"><b>Definition:</b> netsukuku.c:699</div></div>
  437. <div class="ttc" id="structntkresolv__opts_html_ae8a58bc7ba884600280aa00796451ce7"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#ae8a58bc7ba884600280aa00796451ce7">ntkresolv_opts::silent</a></div><div class="ttdeci">int8_t silent</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:94</div></div>
  438. <div class="ttc" id="ntkresolv_8h_html_a63f0bee2b9d27323f626496a5213c8e2"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a63f0bee2b9d27323f626496a5213c8e2">print_question</a></div><div class="ttdeci">void print_question()</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:360</div></div>
  439. <div class="ttc" id="ntkresolv_8h_html_a4ee713923b53397155295947705d3db3"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a4ee713923b53397155295947705d3db3">QTYPE_PTR_STR</a></div><div class="ttdeci">#define QTYPE_PTR_STR</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:40</div></div>
  440. <div class="ttc" id="structntkresolv__opts_html_a4071f2610390b66df6365e7f24082d2b"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#a4071f2610390b66df6365e7f24082d2b">ntkresolv_opts::id</a></div><div class="ttdeci">uint16_t id</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:96</div></div>
  441. <div class="ttc" id="ntkresolv_8h_html_a58a3474ad5ffa3046c2a6247fa4b780a"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a58a3474ad5ffa3046c2a6247fa4b780a">opts_init</a></div><div class="ttdeci">void opts_init(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:136</div></div>
  442. <div class="ttc" id="ntkresolv_8h_html_adf498292ef00b9985c9e3a7bd6a48d80"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#adf498292ef00b9985c9e3a7bd6a48d80">print_headers</a></div><div class="ttdeci">void print_headers()</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:347</div></div>
  443. <div class="ttc" id="ntkresolv_8h_html_a1e9dbfcdf317a29cc3a93947945f8762"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a1e9dbfcdf317a29cc3a93947945f8762">print_parsable_answers</a></div><div class="ttdeci">void print_parsable_answers(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:442</div></div>
  444. <div class="ttc" id="structntkresolv__opts_html_ae10f4a975f73350d442b327fdde8b6f5"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#ae10f4a975f73350d442b327fdde8b6f5">ntkresolv_opts::nsserver</a></div><div class="ttdeci">char nsserver[512]</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:92</div></div>
  445. <div class="ttc" id="structntkresolv__opts_html_a2c7d7326e748de0d3cca9fec4cc47b36"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#a2c7d7326e748de0d3cca9fec4cc47b36">ntkresolv_opts::hash</a></div><div class="ttdeci">uint8_t hash</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:97</div></div>
  446. <div class="ttc" id="ntkresolv_8h_html_a48277393ef68e08f4ca797702b93317b"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a48277393ef68e08f4ca797702b93317b">opts_set_compute_hash</a></div><div class="ttdeci">void opts_set_compute_hash(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:246</div></div>
  447. <div class="ttc" id="ntkresolv_8h_html_a4fe23240617e7ebb55aca663b64e95ad"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a4fe23240617e7ebb55aca663b64e95ad">opts_set_ns</a></div><div class="ttdeci">void opts_set_ns(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:169</div></div>
  448. <div class="ttc" id="ntkresolv_8h_html_a55b7bc0916e754d54b95471def57e94f"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a55b7bc0916e754d54b95471def57e94f">opts_set_port</a></div><div class="ttdeci">void opts_set_port(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:154</div></div>
  449. <div class="ttc" id="ntkresolv_8h_html_a4b38d66e3a7bdcea18a221170b455f86"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a4b38d66e3a7bdcea18a221170b455f86">print_answers</a></div><div class="ttdeci">void print_answers()</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:407</div></div>
  450. <div class="ttc" id="andns__lib_8h_html"><div class="ttname"><a href="../../da/d94/andns__lib_8h.html">andns_lib.h</a></div></div>
  451. <div class="ttc" id="ntkresolv_8h_html_a841b458a4dc72d824a01473834268395"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a841b458a4dc72d824a01473834268395">opts_set_recursion</a></div><div class="ttdeci">void opts_set_recursion(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:238</div></div>
  452. <div class="ttc" id="structandns__pkt__data_html"><div class="ttname"><a href="../../d0/d50/structandns__pkt__data.html">andns_pkt_data</a></div><div class="ttdef"><b>Definition:</b> andns_lib.h:45</div></div>
  453. <div class="ttc" id="ntkresolv_8h_html_af986bd0575ec9b913dfab4b8422509ae"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#af986bd0575ec9b913dfab4b8422509ae">version</a></div><div class="ttdeci">void version(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:16</div></div>
  454. <div class="ttc" id="ntkresolv_8h_html_ad9097259eb78c35bf7252b9e8156f52e"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#ad9097259eb78c35bf7252b9e8156f52e">ntkresolv_exit</a></div><div class="ttdeci">void ntkresolv_exit(int i)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:523</div></div>
  455. <div class="ttc" id="ntkresolv_8h_html_a0747e971997561796c198513dc8975b8"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a0747e971997561796c198513dc8975b8">diff_time</a></div><div class="ttdeci">double diff_time(struct timeval a, struct timeval b)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:122</div></div>
  456. <div class="ttc" id="ntkresolv_8h_html_ae226936b7b54e18fd0142cec3fb75891"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#ae226936b7b54e18fd0142cec3fb75891">realm_usage</a></div><div class="ttdeci">void realm_usage(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:66</div></div>
  457. <div class="ttc" id="structntkresolv__opts_html_a6ba28a7a993fdf6deb20fdd0d40687ac"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#a6ba28a7a993fdf6deb20fdd0d40687ac">ntkresolv_opts::port</a></div><div class="ttdeci">int16_t port</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:93</div></div>
  458. <div class="ttc" id="ntkresolv_8h_html_a06ffe4a1e6ae3edcadaa101f26796965"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a06ffe4a1e6ae3edcadaa101f26796965">ip_bin_to_str</a></div><div class="ttdeci">void ip_bin_to_str(void *data, char *dst)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:366</div></div>
  459. <div class="ttc" id="structntkresolv__opts_html_a2c5b392c9a75a1fe4692b7d7fb16dd4b"><div class="ttname"><a href="../../de/d7d/structntkresolv__opts.html#a2c5b392c9a75a1fe4692b7d7fb16dd4b">ntkresolv_opts::obj</a></div><div class="ttdeci">char obj[512]</div><div class="ttdef"><b>Definition:</b> ntkresolv.h:95</div></div>
  460. <div class="ttc" id="ntkresolv_8h_html_a63d87b859b08cbb60c867d78293adc54"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a63d87b859b08cbb60c867d78293adc54">opts_set_qt</a></div><div class="ttdeci">void opts_set_qt(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:182</div></div>
  461. <div class="ttc" id="ntkresolv_8h_html_a33446b4052c109032876b7423849f082"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#a33446b4052c109032876b7423849f082">opts_set_realm</a></div><div class="ttdeci">void opts_set_realm(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:199</div></div>
  462. <div class="ttc" id="ntkresolv_8h_html_af8db000da6d4c6009e8af4b927f818a5"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#af8db000da6d4c6009e8af4b927f818a5">opts_finish</a></div><div class="ttdeci">void opts_finish(char *arg)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:320</div></div>
  463. <div class="ttc" id="ntkresolv_8h_html_ae8882435d15ed8800aaa7b5e8f476a57"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#ae8882435d15ed8800aaa7b5e8f476a57">opts_set_parsable_output</a></div><div class="ttdeci">void opts_set_parsable_output(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:250</div></div>
  464. <div class="ttc" id="ntkresolv_8h_html_aa95ce7a8d4506ae83dd9b76933d7c6ba"><div class="ttname"><a href="../../d9/d88/ntkresolv_8h.html#aa95ce7a8d4506ae83dd9b76933d7c6ba">do_command</a></div><div class="ttdeci">void do_command(void)</div><div class="ttdef"><b>Definition:</b> ntkresolv.c:484</div></div>
  465. <div class="ttc" id="structandns__pkt_html"><div class="ttname"><a href="../../d9/d5a/structandns__pkt.html">andns_pkt</a></div><div class="ttdef"><b>Definition:</b> andns_lib.h:64</div></div>
  466. </div><!-- fragment --></div><!-- contents -->
  467. </div><!-- doc-content -->
  468. <!-- start footer part -->
  469. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  470. <ul>
  471. <li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../d9/d88/ntkresolv_8h.html">ntkresolv.h</a></li>
  472. <li class="footer">Generated on Wed Feb 19 2014 16:28:40 for The Netsukuku Project by
  473. <a href="http://www.doxygen.org/index.html">
  474. <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  475. </ul>
  476. </div>
  477. </body>
  478. </html>