netsukuku/df/d92/dnslib_8h_source.html

378 lines
72 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.6"/>
<title>The Netsukuku Project: src/dnslib.h Source File</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="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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 style="padding-left: 0.5em;">
<div id="projectname">The Netsukuku Project
&#160;<span id="projectnumber">0.0.9</span>
</div>
<div id="projectbrief">An Alternative routing method</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
<li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="../../search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="../../files.html"><span>File&#160;List</span></a></li>
<li><a href="../../globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('df/d92/dnslib_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<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>
<!-- 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 class="header">
<div class="headertitle">
<div class="title">dnslib.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="../../df/d92/dnslib_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="comment">/**************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * AUTHOR: Federico Tomassini *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * Copyright (C) Federico Tomassini *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Contact effetom@gmail.com *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> ***********************************************</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> ******* BEGIN 3/2006 ********</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">*************************************************************************</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">* *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">* This program is free software; you can redistribute it and/or modify *</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">* it under the terms of the GNU General Public License as published by *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">* the Free Software Foundation; either version 2 of the License, or *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">* (at your option) any later version. *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">* *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">* This program is distributed in the hope that it will be useful, *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">* but WITHOUT ANY WARRANTY; without even the implied warranty of *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">* GNU General Public License for more details. *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">* *</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">************************************************************************/</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#ifndef DNSLIB_H</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#define DNSLIB_H</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;arpa/inet.h&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ab0f4ac01b5a52cb6044f4983e2b7bd8e"> 28</a></span>&#160;<span class="preprocessor">#define LBL_PTR_MASK 0xC0 </span><span class="comment">/* Network byte order */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a7cd42bd4eec651e06702cb392452e02e"> 29</a></span>&#160;<span class="preprocessor">#define LBL_PTR_OFF_MASK 0x3f </span><span class="comment">/* N.b. order */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#adcdb1b0d52dac1b1ceab71437d59f7b5"> 30</a></span>&#160;<span class="preprocessor">#define LBL_PTR(c) ((c)&amp;LBL_PTR_MASK) </span><span class="comment">/* AND whith 0xC000 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a3250a0b96b1adcc707ddf432010ac640"> 32</a></span>&#160;<span class="preprocessor">#define MAX_RECURSION_PTR 20</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment">/* PREFIXES FOR PTR QUERY */</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ac19c479bdf8529cbb6d1e76ab18c532a"> 35</a></span>&#160;<span class="preprocessor">#define DNS_INV_PREFIX &quot;.IN-ADDR.ARPA&quot;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aa0ff05c773c4608c74c59ce93be9ba51"> 36</a></span>&#160;<span class="preprocessor">#define DNS_INV_PREFIX6 &quot;.IP6.ARPA&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a656b5f72c4d9c8d21d22714e3606af9d"> 37</a></span>&#160;<span class="preprocessor">#define OLD_DNS_INV_PREFIX6 &quot;.IP6.INT&quot; </span><span class="comment">/* For backward compatibility */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">/* DNS QUERY-TYPE: others type will be discarded */</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a9988cc1cc24b640d7fc9d8f602104405"> 41</a></span>&#160;<span class="preprocessor">#define T_AAAA 28 </span><span class="comment">/* h-&gt;ip IPV6 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a11241ed27971fdd50a08f46de115cc89"> 42</a></span>&#160;<span class="preprocessor">#define T_A 1 </span><span class="comment">/* h-&gt;ip IPV4 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a26e251e7a38ee37f65a6895d49ccf17f"> 43</a></span>&#160;<span class="preprocessor">#define T_PTR 12 </span><span class="comment">/* ip-&gt;h */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a379fb519f8a88b3f63f69e519d801cee"> 44</a></span>&#160;<span class="preprocessor">#define T_MX 15 </span><span class="comment">/* h-&gt;mx */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="comment">/* RCODES */</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aab596237ae7679518324bfd241e48eaa"> 46</a></span>&#160;<span class="preprocessor">#define DNS_RCODE_NOERR 0 </span><span class="comment">/* No error */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a200354dea6563c797ce8b31eb02d1bd7"> 47</a></span>&#160;<span class="preprocessor">#define DNS_RCODE_EINTRPRT 1 </span><span class="comment">/* Intepret error */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aaef960323f5a413b9caf3eaf41cf8777"> 48</a></span>&#160;<span class="preprocessor">#define DNS_RCODE_ESRVFAIL 2 </span><span class="comment">/* Server failure */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a4de460148184654f6ed1a88e1a6421ae"> 49</a></span>&#160;<span class="preprocessor">#define DNS_RCODE_ENSDMN 3 </span><span class="comment">/* No such domain */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a71e79fdb16e7974a28951341937768a9"> 50</a></span>&#160;<span class="preprocessor">#define DNS_RCODE_ENIMPL 4 </span><span class="comment">/* Not implemented */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a9c91e5eac94c274dd71f9fecc212c7ca"> 51</a></span>&#160;<span class="preprocessor">#define DNS_RCODE_ERFSD 5 </span><span class="comment">/* Refused */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment">/* INET CLASS */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a35948d7e3f6c9b1e187879d6fb1db4d8"> 54</a></span>&#160;<span class="preprocessor">#define C_IN 1</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment">/* RFC */</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#acf619dc46b9e52edda53c980c62daf05"> 57</a></span>&#160;<span class="preprocessor">#define DNS_MAX_SZ 512</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a59bc8f5548bf87a04afe541593c866b4"> 58</a></span>&#160;<span class="preprocessor">#define DNS_HDR_SZ 12</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aac6c3811d0ada6eb370bb070591e9350"> 59</a></span>&#160;<span class="preprocessor">#define DNS_MAX_LABELS 63</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a7f7084664d4dc6199006433f56d8a10e"> 60</a></span>&#160;<span class="preprocessor">#define DNS_MAX_HNAME_LEN 255</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a7251e502f1f2edaf72d532893bb50d56"> 61</a></span>&#160;<span class="preprocessor">#define DNS_TTL 86400;</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#abb702d8b501669a23aa0ab3b281b9384"> 63</a></span>&#160;<span class="preprocessor">#define min(x,y) ((x)&lt;(y))?(x):(y)</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html"> 65</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d4/d99/structdns__pkt__hdr.html">dns_pkt_hdr</a> {</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#a8b97d2e3a66a884651db4b19a7f430a6"> 66</a></span>&#160; uint16_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#a8b97d2e3a66a884651db4b19a7f430a6">id</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#aa28c63b47268dc046ec2b7640f12d034"> 67</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#aa28c63b47268dc046ec2b7640f12d034">qr</a>;</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#ab210fb7ac1997505a0deb5f04ac2a469"> 68</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#ab210fb7ac1997505a0deb5f04ac2a469">opcode</a>;</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#a62d58876bda5b2f575f8bcd4ff5827f7"> 69</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#a62d58876bda5b2f575f8bcd4ff5827f7">aa</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#ab12dc47a535f0e6b604586447049cc03"> 70</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#ab12dc47a535f0e6b604586447049cc03">tc</a>;</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#af803011ce6d8ce8c35ab821414f1c433"> 71</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#af803011ce6d8ce8c35ab821414f1c433">rd</a>;</div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#a3c492bfbf0a2e579694e2507b7fdfd0f"> 72</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#a3c492bfbf0a2e579694e2507b7fdfd0f">ra</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#aef4dc4de481b664cd1bbec203aa65475"> 73</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#aef4dc4de481b664cd1bbec203aa65475">z</a>;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#accbb3e587eb8e850f3d5cd2370e01e18"> 74</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#accbb3e587eb8e850f3d5cd2370e01e18">rcode</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#a6cad31e5e81716dfd1a57a28099e10af"> 75</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#a6cad31e5e81716dfd1a57a28099e10af">qdcount</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#a86d450b6bb8f9610944f444f33d6cac4"> 76</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#a86d450b6bb8f9610944f444f33d6cac4">ancount</a>;</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#aab57ae77259f2809fd368a02d5fd71c9"> 77</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#aab57ae77259f2809fd368a02d5fd71c9">nscount</a>;</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="../../d4/d99/structdns__pkt__hdr.html#a5e6964bee973a215425bc866d2b30529"> 78</a></span>&#160; uint8_t <a class="code" href="../../d4/d99/structdns__pkt__hdr.html#a5e6964bee973a215425bc866d2b30529">arcount</a>;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;} <a class="code" href="../../df/d92/dnslib_8h.html#ad7b6cf84024d892b81e017eed0c68544">dns_pkt_hdr</a>;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ac25084a796c22ebbe555e5df1fe35eb1"> 80</a></span>&#160;<span class="preprocessor">#define DNS_PKT_HDR_SZ sizeof(dns_pkt_hdr)</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="comment">/* DNS_PKT_HDR MACROS */</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a8b6966678a6df3a1f4a83d3830e6994a"> 83</a></span>&#160;<span class="preprocessor">#define DP_QDCOUNT(dp) ((dp)-&gt;pkt_hdr).qdcount</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a1954d4513744e0f358608c6e26eb7f08"> 84</a></span>&#160;<span class="preprocessor">#define DP_ANCOUNT(dp) ((dp)-&gt;pkt_hdr).ancount</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a1e7d4052e250fa7cb3798a40b17dfb20"> 85</a></span>&#160;<span class="preprocessor">#define DP_NSCOUNT(dp) ((dp)-&gt;pkt_hdr).nscount</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ad89782a76a7ae9c8958dbdcda4a5ca70"> 86</a></span>&#160;<span class="preprocessor">#define DP_ARCOUNT(dp) ((dp)-&gt;pkt_hdr).arcount</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="../../d6/d40/structdns__pkt__qst.html"> 89</a></span>&#160;<span class="keyword">struct </span><a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a> {</div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="../../d6/d40/structdns__pkt__qst.html#ab20045094ed67e899ccd7fe34885b8c4"> 90</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="../../d6/d40/structdns__pkt__qst.html#ab20045094ed67e899ccd7fe34885b8c4">qname</a>[<a class="code" href="../../df/d92/dnslib_8h.html#a7f7084664d4dc6199006433f56d8a10e">DNS_MAX_HNAME_LEN</a>];</div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="../../d6/d40/structdns__pkt__qst.html#a8ef59f3015e9457a5f8f61fd40a4318c"> 91</a></span>&#160; uint16_t <a class="code" href="../../d6/d40/structdns__pkt__qst.html#a8ef59f3015e9457a5f8f61fd40a4318c">qtype</a>;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="../../d6/d40/structdns__pkt__qst.html#a4e29bf2681c979e15000b704f471942e"> 92</a></span>&#160; uint16_t <a class="code" href="../../d6/d40/structdns__pkt__qst.html#a4e29bf2681c979e15000b704f471942e">qclass</a>;</div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="../../d6/d40/structdns__pkt__qst.html#af04aa17988638e82095456369e6d3203"> 93</a></span>&#160; <span class="keyword">struct </span><a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a> *<a class="code" href="../../d6/d40/structdns__pkt__qst.html#af04aa17988638e82095456369e6d3203">next</a>;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;};</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a3e8b1c3b29d2c9a3af8a0dbbf1bf0d68"> 95</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a> <a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a>;</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a17fcc32813e07327aa8caee43c739cfb"> 96</a></span>&#160;<span class="preprocessor">#define DNS_PKT_QST_SZ sizeof(dns_pkt_qst)</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html"> 98</a></span>&#160;<span class="keyword">struct </span><a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;{</div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#a572d54d845848245f17e603506eb2215"> 100</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="../../d1/dc9/structdns__pkt__a.html#a572d54d845848245f17e603506eb2215">name</a>[<a class="code" href="../../df/d92/dnslib_8h.html#a7f7084664d4dc6199006433f56d8a10e">DNS_MAX_HNAME_LEN</a>];</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#a38f8bf6728b4694d3f00cbab5e00b4d5"> 101</a></span>&#160; uint16_t <a class="code" href="../../d1/dc9/structdns__pkt__a.html#a38f8bf6728b4694d3f00cbab5e00b4d5">type</a>;</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#a14a48aa898dd169c856e32eb17319216"> 102</a></span>&#160; uint16_t <a class="code" href="../../d1/dc9/structdns__pkt__a.html#a14a48aa898dd169c856e32eb17319216">cl</a>;</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#a920a64084a59c76559e60e8bf3be5765"> 103</a></span>&#160; uint32_t <a class="code" href="../../d1/dc9/structdns__pkt__a.html#a920a64084a59c76559e60e8bf3be5765">ttl</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#a6fd99eec23f1e20ceda4a304cbdece63"> 104</a></span>&#160; uint16_t <a class="code" href="../../d1/dc9/structdns__pkt__a.html#a6fd99eec23f1e20ceda4a304cbdece63">rdlength</a>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#a6f5ba10c10abedb4233d5fff9a583abb"> 105</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="../../d1/dc9/structdns__pkt__a.html#a6f5ba10c10abedb4233d5fff9a583abb">rdata</a>[<a class="code" href="../../df/d92/dnslib_8h.html#a7f7084664d4dc6199006433f56d8a10e">DNS_MAX_HNAME_LEN</a>];</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="../../d1/dc9/structdns__pkt__a.html#af68ec31dcf0f6187ed0116a7aa5b6739"> 106</a></span>&#160; <span class="keyword">struct </span><a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *<a class="code" href="../../d1/dc9/structdns__pkt__a.html#af68ec31dcf0f6187ed0116a7aa5b6739">next</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;};</div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aefaa2c0362f571296a2a5aec6ae5ebb9"> 108</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> <a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a>;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ac4706761095b9c36003f885503add900"> 109</a></span>&#160;<span class="preprocessor">#define DNS_PKT_A_SZ sizeof(dns_pkt_a)</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="../../dd/d18/structdns__pkt.html"> 111</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a></div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;{</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="../../dd/d18/structdns__pkt.html#a8307743c21c9f4aacbd9de8440b19e79"> 113</a></span>&#160; <a class="code" href="../../d4/d99/structdns__pkt__hdr.html">dns_pkt_hdr</a> <a class="code" href="../../dd/d18/structdns__pkt.html#a8307743c21c9f4aacbd9de8440b19e79">pkt_hdr</a>;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="../../dd/d18/structdns__pkt.html#a25139771903d80074f21a36502de4411"> 114</a></span>&#160; <a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a> *<a class="code" href="../../dd/d18/structdns__pkt.html#a25139771903d80074f21a36502de4411">pkt_qst</a>;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="../../dd/d18/structdns__pkt.html#a320fa7737ae7d377c5bc01eeb1b0dd14"> 115</a></span>&#160; <a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *<a class="code" href="../../dd/d18/structdns__pkt.html#a320fa7737ae7d377c5bc01eeb1b0dd14">pkt_answ</a>;</div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="../../dd/d18/structdns__pkt.html#a46136950f22790ee2b729f8439ebc562"> 116</a></span>&#160; <a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *<a class="code" href="../../dd/d18/structdns__pkt.html#a46136950f22790ee2b729f8439ebc562">pkt_auth</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="../../dd/d18/structdns__pkt.html#ac1b76e6791d1b13674e465367e39089b"> 117</a></span>&#160; <a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *<a class="code" href="../../dd/d18/structdns__pkt.html#ac1b76e6791d1b13674e465367e39089b">pkt_add</a>;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;} <a class="code" href="../../df/d92/dnslib_8h.html#a60e196daacf355726e3fd6af7b6d1087">dns_pkt</a>;</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a769d8d347fa62f3ed9b66cffe16fa81e"> 119</a></span>&#160;<span class="preprocessor">#define DNS_PKT_SZ sizeof(dns_pkt)</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="comment">/* USER MACRO */</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#abb9d3b2b8af7af68a3ffeb2691482c49"> 122</a></span>&#160;<span class="preprocessor">#define DNS_GET_ID(dp) (dp)-&gt;pkt_hdr.id</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a89b9593c2e3e385fb6debadc5350ce70"> 123</a></span>&#160;<span class="preprocessor">#define DNS_GET_QR(dp) (dp)-&gt;pkt_hdr.qr</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a8142adf57af124c976635db2868896f5"> 124</a></span>&#160;<span class="preprocessor">#define DNS_GET_OPCODE(dp) (dp)-&gt;pkt_hdr.opcode</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a74a073196320b9b3f48d66480fbc1a54"> 125</a></span>&#160;<span class="preprocessor">#define DNS_GET_AA(dp) (dp)-&gt;pkt_hdr.aa</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ae3bd071f8a373717b44c7b53da673aa1"> 126</a></span>&#160;<span class="preprocessor">#define DNS_GET_TC(dp) (dp)-&gt;pkt_hdr.tc</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aa0c2bccefbee91a40de6c97f8610f934"> 127</a></span>&#160;<span class="preprocessor">#define DNS_GET_RD(dp) (dp)-&gt;pkt_hdr.rd</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#add0801c9b6edb5e814d414533c1a2dcc"> 128</a></span>&#160;<span class="preprocessor">#define DNS_GET_RA(dp) (dp)-&gt;pkt_hdr.ra</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a51bb61497d3d3a02841b3ae1a4b637ce"> 129</a></span>&#160;<span class="preprocessor">#define DNS_GET_Z(dp) (dp)-&gt;pkt_hdr.z</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ab55078b4d41860a43fcdb6d8b32e95e7"> 130</a></span>&#160;<span class="preprocessor">#define DNS_GET_RCODE(dp) (dp)-&gt;pkt_hdr.rcode</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ae942346216bfedaf2173f180d5cef242"> 131</a></span>&#160;<span class="preprocessor">#define DNS_GET_QDCOUNT(dp) (dp)-&gt;pkt_hdr.qdcount</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a1db612cc40192e85c6ac9bebcf8e80c3"> 132</a></span>&#160;<span class="preprocessor">#define DNS_GET_ANCOUNT(dp) (dp)-&gt;pkt_hdr.ancount</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a46d160db5779e5078e09adf4ccf12fd1"> 133</a></span>&#160;<span class="preprocessor">#define DNS_GET_NSCOUNT(dp) (dp)-&gt;pkt_hdr.nscount</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a3c259429687c21543444ebda86408497"> 134</a></span>&#160;<span class="preprocessor">#define DNS_GET_ARCOUNT(dp) (dp)-&gt;pkt_hdr.arcount</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a133f7f61b17fc343be7fff3e4a6f4a0f"> 136</a></span>&#160;<span class="preprocessor">#define DNS_SET_ID(dp,x) (dp)-&gt;pkt_hdr.id=x</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a9d1e1c0d79b2f6d140920186b20ddcd7"> 137</a></span>&#160;<span class="preprocessor">#define DNS_SET_QR(dp,x) (dp)-&gt;pkt_hdr.qr=x</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a20df97b038c1abe593efde0f3be12271"> 138</a></span>&#160;<span class="preprocessor">#define DNS_SET_OPCODE(dp,x) (dp)-&gt;pkt_hdr.opcode=x</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ae9cb6fa9aaf96d74c7c0d57135c5f453"> 139</a></span>&#160;<span class="preprocessor">#define DNS_SET_AA(dp,x) (dp)-&gt;pkt_hdr.aa=x</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a3d9cde0ae70053f76425b030ce252b50"> 140</a></span>&#160;<span class="preprocessor">#define DNS_SET_TC(dp,x) (dp)-&gt;pkt_hdr.tc=x</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#aff83c2e983d856da3e4ed595b3d4657c"> 141</a></span>&#160;<span class="preprocessor">#define DNS_SET_RD(dp,x) (dp)-&gt;pkt_hdr.rd=x</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a8321c681a329aa2d1db7164181047c83"> 142</a></span>&#160;<span class="preprocessor">#define DNS_SET_RA(dp,x) (dp)-&gt;pkt_hdr.ra=x</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ae1d969adff3e17e77253d435cca9ff9b"> 143</a></span>&#160;<span class="preprocessor">#define DNS_SET_Z(dp,x) (dp)-&gt;pkt_hdr.z=x</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a18a6060bd166f611c252c870dcd562bc"> 144</a></span>&#160;<span class="preprocessor">#define DNS_SET_RCODE(dp,x) (dp)-&gt;pkt_hdr.rcode=x</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a7d4d42cfb2d6a534e397c5d62de4d902"> 145</a></span>&#160;<span class="preprocessor">#define DNS_SET_QDCOUNT(dp,x) (dp)-&gt;pkt_hdr.qdcount=x</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ab4aa3d747c047f75464a383bd774ce82"> 146</a></span>&#160;<span class="preprocessor">#define DNS_SET_ANCOUNT(dp,x) (dp)-&gt;pkt_hdr.ancount=x</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#ab220e8623e1cd2c8709fa4690224ac29"> 147</a></span>&#160;<span class="preprocessor">#define DNS_SET_NSCOUNT(dp,x) (dp)-&gt;pkt_hdr.nscount=x</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a03fedeac5c6eedc42bdd55405ed9add9"> 148</a></span>&#160;<span class="preprocessor">#define DNS_SET_ARCOUNT(dp,x) (dp)-&gt;pkt_hdr.arcount=x</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a034350f33b586e0b5afbcf7da356ea03"> 150</a></span>&#160;<span class="preprocessor">#define DP_ADD_ANSWER(dp) dns_add_a(&amp;((dp)-&gt;pkt_answ));DP_ANCOUNT(dp)+=1; </span></div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#a54228da50fdf402642140ca4a494eb4d"> 151</a></span>&#160;<span class="preprocessor">#define DP_ADD_AUTH(dp) dns_add_a(&amp;((dp)-&gt;pkt_auth));DP_NSCOUNT(dp)+=1; </span></div>
<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="../../df/d92/dnslib_8h.html#afab87822d6da042bc61d66347cbbbd00"> 152</a></span>&#160;<span class="preprocessor">#define DP_ADD_ADD(dp) dns_add_a(&amp;((dp)-&gt;pkt_add));DP_ARCOUNT(dp)+=1; </span></div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="comment">/* Functions */</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#ad2b243b66c4278a6c632f3f05fee99d9">getlblptr</a>(<span class="keywordtype">char</span> *buf);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a86d0df2c58502d9825661c8b742c1429">read_label_octet</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *src,<span class="keywordtype">char</span> *dst,<span class="keywordtype">int</span> limit);</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#ad469028422c9e87fc86604ead98e6bb1">lbltoname</a>(<span class="keywordtype">char</span> *buf,<span class="keywordtype">char</span> *start_pkt,<span class="keywordtype">char</span> *dst,<span class="keywordtype">int</span> limit);</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a5851130212850068567ef1e5c2e09fb2">swap_straddr</a>(<span class="keywordtype">char</span> *src,<span class="keywordtype">char</span> *dst);</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#ac9cbd243ea2b7e352d34b9057f9e383e">swap_straddr6</a>(<span class="keywordtype">char</span> *src,<span class="keywordtype">char</span> *dst);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a6a6c7ae3075bd8abd48ac0a9a3e50cea">rm_inv_prefix</a>(<span class="keywordtype">char</span> *src,<span class="keywordtype">char</span> *dst) ;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a7fb033b42337f08d87dbbb2a3e73c0f1">add_inv_prefix</a>(<span class="keywordtype">char</span> *s,<span class="keywordtype">int</span> <a class="code" href="../../d7/de2/if_8c.html#a4417150d9f858949bd9ea8794995ebcc">family</a>);</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a1b42acd03b0557a3849dd46e95adabed">swapped_straddr</a>(<span class="keywordtype">char</span> *src,<span class="keywordtype">char</span> *dst) ;</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a32b90ae5be1ca9761e1f94a18d06fd5a">swapped_straddr_pref</a>(<span class="keywordtype">char</span> *src,<span class="keywordtype">char</span> *dst,<span class="keywordtype">int</span> <a class="code" href="../../d7/de2/if_8c.html#a4417150d9f858949bd9ea8794995ebcc">family</a>);</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a54862bb1eb9a353af0979bf8c61180fa">nametolbl</a>(<span class="keywordtype">char</span> *name,<span class="keywordtype">char</span> *dst);</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#aba15c15718fb33f9f84fe85d6bd66587">d_hdr_u</a>(<span class="keywordtype">char</span> *buf,<a class="code" href="../../d4/d99/structdns__pkt__hdr.html">dns_pkt_hdr</a> *dph);</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a0f94f9fa877277fba9ac625aa139bede">d_qst_u</a>(<span class="keywordtype">char</span> *start_buf,<span class="keywordtype">char</span> *buf,<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp,<span class="keywordtype">int</span> limit_len);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a972373d8c1c2a0b73b16e54ad166435a">d_qsts_u</a>(<span class="keywordtype">char</span> *start_buf,<span class="keywordtype">char</span> *buf,<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp,<span class="keywordtype">int</span> limit_len);</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#adf7bae8f83ed070523ac67113746ac4d">d_a_u</a>(<span class="keywordtype">char</span> *start_buf,<span class="keywordtype">char</span> *buf,<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> **dpa_orig,<span class="keywordtype">int</span> limit_len);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#ad4ee48a02add30c858e9707300d412ea">d_as_u</a>(<span class="keywordtype">char</span> *start_buf,<span class="keywordtype">char</span> *buf,<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> **dpa,<span class="keywordtype">int</span> limit_len,<span class="keywordtype">int</span> count);</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#af6f8ccf019e2ab6a6cf9a6fa04883f07">d_u</a>(<span class="keywordtype">char</span> *buf,<span class="keywordtype">int</span> pktlen,<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> **dpp);</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#ab83a575d780b22ca5e9a7356902fe2da">d_hdr_p</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp,<span class="keywordtype">char</span> *buf);</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#ab77a8691b1324284d5672f304e959fca">d_qst_p</a>(<a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a> *dpq,<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> limitlen);</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a1c7dc24a700e19b82f1c557a120afd68">d_qsts_p</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp,<span class="keywordtype">char</span> *buf,<span class="keywordtype">int</span> limitlen);</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#a0858e261d809f0c9c655f16b55f387a4">d_a_p</a>(<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *dpa,<span class="keywordtype">char</span> *buf,<span class="keywordtype">int</span> limitlen);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#aac9016fc8df6043f5e7de50d562edd15">d_as_p</a>(<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *dpa,<span class="keywordtype">char</span> *buf,<span class="keywordtype">int</span> limitlen,<span class="keywordtype">int</span> count);</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/d92/dnslib_8h.html#af2a40837180b81fd6635f0fe21466aaa">d_p</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp,<span class="keywordtype">char</span> *buf);</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a>* <a class="code" href="../../df/d92/dnslib_8h.html#a623922d6a3fab31bf06d4c937f771b84">create_dns_pkt</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;<a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a>* <a class="code" href="../../df/d92/dnslib_8h.html#a7771bf291d7ddfbb9b9b2f11bc2d83bc">create_dns_pkt_qst</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a>* <a class="code" href="../../df/d92/dnslib_8h.html#ad188026f378b5cc191301677905e520b">create_dns_pkt_a</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;<a class="code" href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a>* <a class="code" href="../../df/d92/dnslib_8h.html#a44b46d72c38e42680ca2863753f13e9e">dns_add_qst</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../df/d92/dnslib_8h.html#abb463988416aeed685b6a169a1bf39da">dns_del_last_qst</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp);</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a>* <a class="code" href="../../df/d92/dnslib_8h.html#a1cb78f4d2f731e5145460e5b27c6a3b2">dns_add_a</a>(<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> **dpa);</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../df/d92/dnslib_8h.html#aa51f779ac55fce4aa6e999776d2c1030">dns_a_default_fill</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp,<a class="code" href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a> *dpa);</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../df/d92/dnslib_8h.html#a85440e389c69d29b599685b5c03f0b4d">destroy_dns_pkt</a>(<a class="code" href="../../dd/d18/structdns__pkt.html">dns_pkt</a> *dp);</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* DNSLIB_H */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;</div>
<div class="ttc" id="structdns__pkt_html_a8307743c21c9f4aacbd9de8440b19e79"><div class="ttname"><a href="../../dd/d18/structdns__pkt.html#a8307743c21c9f4aacbd9de8440b19e79">dns_pkt::pkt_hdr</a></div><div class="ttdeci">dns_pkt_hdr pkt_hdr</div><div class="ttdef"><b>Definition:</b> dnslib.h:113</div></div>
<div class="ttc" id="dnslib_8h_html_a1cb78f4d2f731e5145460e5b27c6a3b2"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a1cb78f4d2f731e5145460e5b27c6a3b2">dns_add_a</a></div><div class="ttdeci">dns_pkt_a * dns_add_a(dns_pkt_a **dpa)</div><div class="ttdef"><b>Definition:</b> dnslib.c:822</div></div>
<div class="ttc" id="dnslib_8h_html_ab77a8691b1324284d5672f304e959fca"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ab77a8691b1324284d5672f304e959fca">d_qst_p</a></div><div class="ttdeci">int d_qst_p(dns_pkt_qst *dpq, char *buf, int limitlen)</div><div class="ttdef"><b>Definition:</b> dnslib.c:608</div></div>
<div class="ttc" id="dnslib_8h_html_af6f8ccf019e2ab6a6cf9a6fa04883f07"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#af6f8ccf019e2ab6a6cf9a6fa04883f07">d_u</a></div><div class="ttdeci">int d_u(char *buf, int pktlen, dns_pkt **dpp)</div><div class="ttdef"><b>Definition:</b> dnslib.c:513</div></div>
<div class="ttc" id="structdns__pkt__a_html_a920a64084a59c76559e60e8bf3be5765"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#a920a64084a59c76559e60e8bf3be5765">dns_pkt_a::ttl</a></div><div class="ttdeci">uint32_t ttl</div><div class="ttdef"><b>Definition:</b> dnslib.h:103</div></div>
<div class="ttc" id="dnslib_8h_html_a32b90ae5be1ca9761e1f94a18d06fd5a"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a32b90ae5be1ca9761e1f94a18d06fd5a">swapped_straddr_pref</a></div><div class="ttdeci">int swapped_straddr_pref(char *src, char *dst, int family)</div><div class="ttdef"><b>Definition:</b> dnslib.c:246</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_ab210fb7ac1997505a0deb5f04ac2a469"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#ab210fb7ac1997505a0deb5f04ac2a469">dns_pkt_hdr::opcode</a></div><div class="ttdeci">uint8_t opcode</div><div class="ttdef"><b>Definition:</b> dnslib.h:68</div></div>
<div class="ttc" id="dnslib_8h_html_ad188026f378b5cc191301677905e520b"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ad188026f378b5cc191301677905e520b">create_dns_pkt_a</a></div><div class="ttdeci">dns_pkt_a * create_dns_pkt_a(void)</div><div class="ttdef"><b>Definition:</b> dnslib.c:784</div></div>
<div class="ttc" id="dnslib_8h_html_abb463988416aeed685b6a169a1bf39da"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#abb463988416aeed685b6a169a1bf39da">dns_del_last_qst</a></div><div class="ttdeci">void dns_del_last_qst(dns_pkt *dp)</div><div class="ttdef"><b>Definition:</b> dnslib.c:807</div></div>
<div class="ttc" id="structdns__pkt__hdr_html"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html">dns_pkt_hdr</a></div><div class="ttdef"><b>Definition:</b> dnslib.h:65</div></div>
<div class="ttc" id="structdns__pkt_html_ac1b76e6791d1b13674e465367e39089b"><div class="ttname"><a href="../../dd/d18/structdns__pkt.html#ac1b76e6791d1b13674e465367e39089b">dns_pkt::pkt_add</a></div><div class="ttdeci">dns_pkt_a * pkt_add</div><div class="ttdef"><b>Definition:</b> dnslib.h:117</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_a86d450b6bb8f9610944f444f33d6cac4"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#a86d450b6bb8f9610944f444f33d6cac4">dns_pkt_hdr::ancount</a></div><div class="ttdeci">uint8_t ancount</div><div class="ttdef"><b>Definition:</b> dnslib.h:76</div></div>
<div class="ttc" id="dnslib_8h_html_a86d0df2c58502d9825661c8b742c1429"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a86d0df2c58502d9825661c8b742c1429">read_label_octet</a></div><div class="ttdeci">int read_label_octet(const char *src, char *dst, int limit)</div><div class="ttdef"><b>Definition:</b> dnslib.c:64</div></div>
<div class="ttc" id="dnslib_8h_html_aa51f779ac55fce4aa6e999776d2c1030"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#aa51f779ac55fce4aa6e999776d2c1030">dns_a_default_fill</a></div><div class="ttdeci">void dns_a_default_fill(dns_pkt *dp, dns_pkt_a *dpa)</div><div class="ttdef"><b>Definition:</b> dnslib.c:841</div></div>
<div class="ttc" id="structdns__pkt__a_html_a6f5ba10c10abedb4233d5fff9a583abb"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#a6f5ba10c10abedb4233d5fff9a583abb">dns_pkt_a::rdata</a></div><div class="ttdeci">char rdata[255]</div><div class="ttdef"><b>Definition:</b> dnslib.h:105</div></div>
<div class="ttc" id="structdns__pkt__qst_html"><div class="ttname"><a href="../../d6/d40/structdns__pkt__qst.html">dns_pkt_qst</a></div><div class="ttdef"><b>Definition:</b> dnslib.h:89</div></div>
<div class="ttc" id="dnslib_8h_html_a54862bb1eb9a353af0979bf8c61180fa"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a54862bb1eb9a353af0979bf8c61180fa">nametolbl</a></div><div class="ttdeci">int nametolbl(char *name, char *dst)</div><div class="ttdef"><b>Definition:</b> dnslib.c:267</div></div>
<div class="ttc" id="dnslib_8h_html_a7fb033b42337f08d87dbbb2a3e73c0f1"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a7fb033b42337f08d87dbbb2a3e73c0f1">add_inv_prefix</a></div><div class="ttdeci">int add_inv_prefix(char *s, int family)</div><div class="ttdef"><b>Definition:</b> dnslib.c:214</div></div>
<div class="ttc" id="structdns__pkt__qst_html_a4e29bf2681c979e15000b704f471942e"><div class="ttname"><a href="../../d6/d40/structdns__pkt__qst.html#a4e29bf2681c979e15000b704f471942e">dns_pkt_qst::qclass</a></div><div class="ttdeci">uint16_t qclass</div><div class="ttdef"><b>Definition:</b> dnslib.h:92</div></div>
<div class="ttc" id="structdns__pkt__a_html_a572d54d845848245f17e603506eb2215"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#a572d54d845848245f17e603506eb2215">dns_pkt_a::name</a></div><div class="ttdeci">char name[255]</div><div class="ttdef"><b>Definition:</b> dnslib.h:100</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_aa28c63b47268dc046ec2b7640f12d034"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#aa28c63b47268dc046ec2b7640f12d034">dns_pkt_hdr::qr</a></div><div class="ttdeci">uint8_t qr</div><div class="ttdef"><b>Definition:</b> dnslib.h:67</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_a8b97d2e3a66a884651db4b19a7f430a6"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#a8b97d2e3a66a884651db4b19a7f430a6">dns_pkt_hdr::id</a></div><div class="ttdeci">uint16_t id</div><div class="ttdef"><b>Definition:</b> dnslib.h:66</div></div>
<div class="ttc" id="structdns__pkt__a_html"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html">dns_pkt_a</a></div><div class="ttdef"><b>Definition:</b> dnslib.h:98</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_aef4dc4de481b664cd1bbec203aa65475"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#aef4dc4de481b664cd1bbec203aa65475">dns_pkt_hdr::z</a></div><div class="ttdeci">uint8_t z</div><div class="ttdef"><b>Definition:</b> dnslib.h:73</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_aab57ae77259f2809fd368a02d5fd71c9"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#aab57ae77259f2809fd368a02d5fd71c9">dns_pkt_hdr::nscount</a></div><div class="ttdeci">uint8_t nscount</div><div class="ttdef"><b>Definition:</b> dnslib.h:77</div></div>
<div class="ttc" id="dnslib_8h_html_a1c7dc24a700e19b82f1c557a120afd68"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a1c7dc24a700e19b82f1c557a120afd68">d_qsts_p</a></div><div class="ttdeci">int d_qsts_p(dns_pkt *dp, char *buf, int limitlen)</div><div class="ttdef"><b>Definition:</b> dnslib.c:635</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_accbb3e587eb8e850f3d5cd2370e01e18"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#accbb3e587eb8e850f3d5cd2370e01e18">dns_pkt_hdr::rcode</a></div><div class="ttdeci">uint8_t rcode</div><div class="ttdef"><b>Definition:</b> dnslib.h:74</div></div>
<div class="ttc" id="dnslib_8h_html_a1b42acd03b0557a3849dd46e95adabed"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a1b42acd03b0557a3849dd46e95adabed">swapped_straddr</a></div><div class="ttdeci">int swapped_straddr(char *src, char *dst)</div><div class="ttdef"><b>Definition:</b> dnslib.c:226</div></div>
<div class="ttc" id="dnslib_8h_html_aba15c15718fb33f9f84fe85d6bd66587"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#aba15c15718fb33f9f84fe85d6bd66587">d_hdr_u</a></div><div class="ttdeci">int d_hdr_u(char *buf, dns_pkt_hdr *dph)</div><div class="ttdef"><b>Definition:</b> dnslib.c:305</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_a62d58876bda5b2f575f8bcd4ff5827f7"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#a62d58876bda5b2f575f8bcd4ff5827f7">dns_pkt_hdr::aa</a></div><div class="ttdeci">uint8_t aa</div><div class="ttdef"><b>Definition:</b> dnslib.h:69</div></div>
<div class="ttc" id="dnslib_8h_html_a60e196daacf355726e3fd6af7b6d1087"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a60e196daacf355726e3fd6af7b6d1087">dns_pkt</a></div><div class="ttdeci">struct dns_pkt dns_pkt</div></div>
<div class="ttc" id="dnslib_8h_html_adf7bae8f83ed070523ac67113746ac4d"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#adf7bae8f83ed070523ac67113746ac4d">d_a_u</a></div><div class="ttdeci">int d_a_u(char *start_buf, char *buf, dns_pkt_a **dpa_orig, int limit_len)</div><div class="ttdef"><b>Definition:</b> dnslib.c:411</div></div>
<div class="ttc" id="dnslib_8h_html_ac9cbd243ea2b7e352d34b9057f9e383e"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ac9cbd243ea2b7e352d34b9057f9e383e">swap_straddr6</a></div><div class="ttdeci">int swap_straddr6(char *src, char *dst)</div><div class="ttdef"><b>Definition:</b> dnslib.c:178</div></div>
<div class="ttc" id="structdns__pkt__a_html_a14a48aa898dd169c856e32eb17319216"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#a14a48aa898dd169c856e32eb17319216">dns_pkt_a::cl</a></div><div class="ttdeci">uint16_t cl</div><div class="ttdef"><b>Definition:</b> dnslib.h:102</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_a6cad31e5e81716dfd1a57a28099e10af"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#a6cad31e5e81716dfd1a57a28099e10af">dns_pkt_hdr::qdcount</a></div><div class="ttdeci">uint8_t qdcount</div><div class="ttdef"><b>Definition:</b> dnslib.h:75</div></div>
<div class="ttc" id="structdns__pkt__a_html_a6fd99eec23f1e20ceda4a304cbdece63"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#a6fd99eec23f1e20ceda4a304cbdece63">dns_pkt_a::rdlength</a></div><div class="ttdeci">uint16_t rdlength</div><div class="ttdef"><b>Definition:</b> dnslib.h:104</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_a5e6964bee973a215425bc866d2b30529"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#a5e6964bee973a215425bc866d2b30529">dns_pkt_hdr::arcount</a></div><div class="ttdeci">uint8_t arcount</div><div class="ttdef"><b>Definition:</b> dnslib.h:78</div></div>
<div class="ttc" id="structdns__pkt_html_a46136950f22790ee2b729f8439ebc562"><div class="ttname"><a href="../../dd/d18/structdns__pkt.html#a46136950f22790ee2b729f8439ebc562">dns_pkt::pkt_auth</a></div><div class="ttdeci">dns_pkt_a * pkt_auth</div><div class="ttdef"><b>Definition:</b> dnslib.h:116</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_a3c492bfbf0a2e579694e2507b7fdfd0f"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#a3c492bfbf0a2e579694e2507b7fdfd0f">dns_pkt_hdr::ra</a></div><div class="ttdeci">uint8_t ra</div><div class="ttdef"><b>Definition:</b> dnslib.h:72</div></div>
<div class="ttc" id="dnslib_8h_html_af2a40837180b81fd6635f0fe21466aaa"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#af2a40837180b81fd6635f0fe21466aaa">d_p</a></div><div class="ttdeci">int d_p(dns_pkt *dp, char *buf)</div><div class="ttdef"><b>Definition:</b> dnslib.c:730</div></div>
<div class="ttc" id="dnslib_8h_html_a7771bf291d7ddfbb9b9b2f11bc2d83bc"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a7771bf291d7ddfbb9b9b2f11bc2d83bc">create_dns_pkt_qst</a></div><div class="ttdeci">dns_pkt_qst * create_dns_pkt_qst(void)</div><div class="ttdef"><b>Definition:</b> dnslib.c:776</div></div>
<div class="ttc" id="structdns__pkt_html"><div class="ttname"><a href="../../dd/d18/structdns__pkt.html">dns_pkt</a></div><div class="ttdef"><b>Definition:</b> dnslib.h:111</div></div>
<div class="ttc" id="structdns__pkt_html_a25139771903d80074f21a36502de4411"><div class="ttname"><a href="../../dd/d18/structdns__pkt.html#a25139771903d80074f21a36502de4411">dns_pkt::pkt_qst</a></div><div class="ttdeci">dns_pkt_qst * pkt_qst</div><div class="ttdef"><b>Definition:</b> dnslib.h:114</div></div>
<div class="ttc" id="dnslib_8h_html_a623922d6a3fab31bf06d4c937f771b84"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a623922d6a3fab31bf06d4c937f771b84">create_dns_pkt</a></div><div class="ttdeci">dns_pkt * create_dns_pkt(void)</div><div class="ttdef"><b>Definition:</b> dnslib.c:764</div></div>
<div class="ttc" id="structdns__pkt__qst_html_ab20045094ed67e899ccd7fe34885b8c4"><div class="ttname"><a href="../../d6/d40/structdns__pkt__qst.html#ab20045094ed67e899ccd7fe34885b8c4">dns_pkt_qst::qname</a></div><div class="ttdeci">char qname[255]</div><div class="ttdef"><b>Definition:</b> dnslib.h:90</div></div>
<div class="ttc" id="dnslib_8h_html_ad4ee48a02add30c858e9707300d412ea"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ad4ee48a02add30c858e9707300d412ea">d_as_u</a></div><div class="ttdeci">int d_as_u(char *start_buf, char *buf, dns_pkt_a **dpa, int limit_len, int count)</div><div class="ttdef"><b>Definition:</b> dnslib.c:488</div></div>
<div class="ttc" id="dnslib_8h_html_a44b46d72c38e42680ca2863753f13e9e"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a44b46d72c38e42680ca2863753f13e9e">dns_add_qst</a></div><div class="ttdeci">dns_pkt_qst * dns_add_qst(dns_pkt *dp)</div><div class="ttdef"><b>Definition:</b> dnslib.c:794</div></div>
<div class="ttc" id="dnslib_8h_html_a0f94f9fa877277fba9ac625aa139bede"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a0f94f9fa877277fba9ac625aa139bede">d_qst_u</a></div><div class="ttdeci">int d_qst_u(char *start_buf, char *buf, dns_pkt *dp, int limit_len)</div><div class="ttdef"><b>Definition:</b> dnslib.c:353</div></div>
<div class="ttc" id="structdns__pkt__qst_html_a8ef59f3015e9457a5f8f61fd40a4318c"><div class="ttname"><a href="../../d6/d40/structdns__pkt__qst.html#a8ef59f3015e9457a5f8f61fd40a4318c">dns_pkt_qst::qtype</a></div><div class="ttdeci">uint16_t qtype</div><div class="ttdef"><b>Definition:</b> dnslib.h:91</div></div>
<div class="ttc" id="dnslib_8h_html_a85440e389c69d29b599685b5c03f0b4d"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a85440e389c69d29b599685b5c03f0b4d">destroy_dns_pkt</a></div><div class="ttdeci">void destroy_dns_pkt(dns_pkt *dp)</div><div class="ttdef"><b>Definition:</b> dnslib.c:848</div></div>
<div class="ttc" id="dnslib_8h_html_aac9016fc8df6043f5e7de50d562edd15"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#aac9016fc8df6043f5e7de50d562edd15">d_as_p</a></div><div class="ttdeci">int d_as_p(dns_pkt_a *dpa, char *buf, int limitlen, int count)</div><div class="ttdef"><b>Definition:</b> dnslib.c:704</div></div>
<div class="ttc" id="structdns__pkt__a_html_a38f8bf6728b4694d3f00cbab5e00b4d5"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#a38f8bf6728b4694d3f00cbab5e00b4d5">dns_pkt_a::type</a></div><div class="ttdeci">uint16_t type</div><div class="ttdef"><b>Definition:</b> dnslib.h:101</div></div>
<div class="ttc" id="dnslib_8h_html_a5851130212850068567ef1e5c2e09fb2"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a5851130212850068567ef1e5c2e09fb2">swap_straddr</a></div><div class="ttdeci">int swap_straddr(char *src, char *dst)</div><div class="ttdef"><b>Definition:</b> dnslib.c:136</div></div>
<div class="ttc" id="dnslib_8h_html_ab83a575d780b22ca5e9a7356902fe2da"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ab83a575d780b22ca5e9a7356902fe2da">d_hdr_p</a></div><div class="ttdeci">int d_hdr_p(dns_pkt *dp, char *buf)</div><div class="ttdef"><b>Definition:</b> dnslib.c:564</div></div>
<div class="ttc" id="structdns__pkt_html_a320fa7737ae7d377c5bc01eeb1b0dd14"><div class="ttname"><a href="../../dd/d18/structdns__pkt.html#a320fa7737ae7d377c5bc01eeb1b0dd14">dns_pkt::pkt_answ</a></div><div class="ttdeci">dns_pkt_a * pkt_answ</div><div class="ttdef"><b>Definition:</b> dnslib.h:115</div></div>
<div class="ttc" id="dnslib_8h_html_a972373d8c1c2a0b73b16e54ad166435a"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a972373d8c1c2a0b73b16e54ad166435a">d_qsts_u</a></div><div class="ttdeci">int d_qsts_u(char *start_buf, char *buf, dns_pkt *dp, int limit_len)</div><div class="ttdef"><b>Definition:</b> dnslib.c:390</div></div>
<div class="ttc" id="dnslib_8h_html_a6a6c7ae3075bd8abd48ac0a9a3e50cea"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a6a6c7ae3075bd8abd48ac0a9a3e50cea">rm_inv_prefix</a></div><div class="ttdeci">int rm_inv_prefix(char *src, char *dst)</div><div class="ttdef"><b>Definition:</b> dnslib.c:190</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_ab12dc47a535f0e6b604586447049cc03"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#ab12dc47a535f0e6b604586447049cc03">dns_pkt_hdr::tc</a></div><div class="ttdeci">uint8_t tc</div><div class="ttdef"><b>Definition:</b> dnslib.h:70</div></div>
<div class="ttc" id="if_8c_html_a4417150d9f858949bd9ea8794995ebcc"><div class="ttname"><a href="../../d7/de2/if_8c.html#a4417150d9f858949bd9ea8794995ebcc">family</a></div><div class="ttdeci">int family</div><div class="ttdef"><b>Definition:</b> if.c:34</div></div>
<div class="ttc" id="dnslib_8h_html_a7f7084664d4dc6199006433f56d8a10e"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a7f7084664d4dc6199006433f56d8a10e">DNS_MAX_HNAME_LEN</a></div><div class="ttdeci">#define DNS_MAX_HNAME_LEN</div><div class="ttdef"><b>Definition:</b> dnslib.h:60</div></div>
<div class="ttc" id="structdns__pkt__hdr_html_af803011ce6d8ce8c35ab821414f1c433"><div class="ttname"><a href="../../d4/d99/structdns__pkt__hdr.html#af803011ce6d8ce8c35ab821414f1c433">dns_pkt_hdr::rd</a></div><div class="ttdeci">uint8_t rd</div><div class="ttdef"><b>Definition:</b> dnslib.h:71</div></div>
<div class="ttc" id="structdns__pkt__qst_html_af04aa17988638e82095456369e6d3203"><div class="ttname"><a href="../../d6/d40/structdns__pkt__qst.html#af04aa17988638e82095456369e6d3203">dns_pkt_qst::next</a></div><div class="ttdeci">struct dns_pkt_qst * next</div><div class="ttdef"><b>Definition:</b> dnslib.h:93</div></div>
<div class="ttc" id="structdns__pkt__a_html_af68ec31dcf0f6187ed0116a7aa5b6739"><div class="ttname"><a href="../../d1/dc9/structdns__pkt__a.html#af68ec31dcf0f6187ed0116a7aa5b6739">dns_pkt_a::next</a></div><div class="ttdeci">struct dns_pkt_a * next</div><div class="ttdef"><b>Definition:</b> dnslib.h:106</div></div>
<div class="ttc" id="dnslib_8h_html_ad469028422c9e87fc86604ead98e6bb1"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ad469028422c9e87fc86604ead98e6bb1">lbltoname</a></div><div class="ttdeci">int lbltoname(char *buf, char *start_pkt, char *dst, int limit)</div><div class="ttdef"><b>Definition:</b> dnslib.c:85</div></div>
<div class="ttc" id="dnslib_8h_html_a0858e261d809f0c9c655f16b55f387a4"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#a0858e261d809f0c9c655f16b55f387a4">d_a_p</a></div><div class="ttdeci">int d_a_p(dns_pkt_a *dpa, char *buf, int limitlen)</div><div class="ttdef"><b>Definition:</b> dnslib.c:652</div></div>
<div class="ttc" id="dnslib_8h_html_ad2b243b66c4278a6c632f3f05fee99d9"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ad2b243b66c4278a6c632f3f05fee99d9">getlblptr</a></div><div class="ttdeci">int getlblptr(char *buf)</div><div class="ttdef"><b>Definition:</b> dnslib.c:34</div></div>
<div class="ttc" id="dnslib_8h_html_ad7b6cf84024d892b81e017eed0c68544"><div class="ttname"><a href="../../df/d92/dnslib_8h.html#ad7b6cf84024d892b81e017eed0c68544">dns_pkt_hdr</a></div><div class="ttdeci">struct dns_pkt_hdr dns_pkt_hdr</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../df/d92/dnslib_8h.html">dnslib.h</a></li>
<li class="footer">Generated on Wed Feb 19 2014 14:19:07 for The Netsukuku Project by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>