Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3a718fcad37ff363f65d6a6e994e272 > files > 203

ldns-devel-1.6.12-1.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1">
<title>ldns documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div class="logo">
<img src="LogoInGradientBar2-y100.png"/>
</div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</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><a href="dirs.html"><span>Directories</span></a></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 id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_7a7a565456b510ac01baf8655647d8a2.html">ldns</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">packet.h</div>  </div>
</div>
<div class="contents">
<a href="packet_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * packet.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * DNS packet definitions</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * a Net::DNS like library for C</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * (c) NLnet Labs, 2005-2006</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * See the file LICENSE for the license</span>
<a name="l00011"></a>00011 <span class="comment"> */</span>
<a name="l00012"></a>00012 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef LDNS_PACKET_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define LDNS_PACKET_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a><a class="code" href="packet_8h.html#a0335fad1ab5f49839cd6c5a71e3d721b">00024</a> <span class="preprocessor">#define LDNS_MAX_PACKETLEN         65535</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="comment">/* allow flags to be given to mk_query */</span>
<a name="l00027"></a><a class="code" href="packet_8h.html#a29f9041feed3666d76397eb0e6fe2825">00027</a> <span class="preprocessor">#define LDNS_QR         1       </span><span class="comment">/* QueRy - query flag */</span>
<a name="l00028"></a><a class="code" href="packet_8h.html#ad8fefc0aab73eca32427f0430628a705">00028</a> <span class="preprocessor">#define LDNS_AA         2       </span><span class="comment">/* Authoritative Answer - server flag */</span>
<a name="l00029"></a><a class="code" href="packet_8h.html#a42d266eca2ae3c2de53158f73694e769">00029</a> <span class="preprocessor">#define LDNS_TC         4       </span><span class="comment">/* TrunCated - server flag */</span>
<a name="l00030"></a><a class="code" href="packet_8h.html#adbf4098a01ab543ebbcbd329103cc8d9">00030</a> <span class="preprocessor">#define LDNS_RD         8       </span><span class="comment">/* Recursion Desired - query flag */</span>
<a name="l00031"></a><a class="code" href="packet_8h.html#a3c24bf1d1dbf15f5ab3fd3ba31c3660e">00031</a> <span class="preprocessor">#define LDNS_CD         16      </span><span class="comment">/* Checking Disabled - query flag */</span>
<a name="l00032"></a><a class="code" href="packet_8h.html#a16eece64719b26d87f79ce7fede79a28">00032</a> <span class="preprocessor">#define LDNS_RA         32      </span><span class="comment">/* Recursion Available - server flag */</span>
<a name="l00033"></a><a class="code" href="packet_8h.html#aefb35ef2047a09c9c64973bef1a59898">00033</a> <span class="preprocessor">#define LDNS_AD         64      </span><span class="comment">/* Authenticated Data - server flag */</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;<a class="code" href="error_8h.html" title="Defines error numbers and functions to translate those to a readable string.">ldns/error.h</a>&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;<a class="code" href="common_8h.html" title="Common definitions for LDNS.">ldns/common.h</a>&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;<a class="code" href="rr_8h.html" title="Contains the definition of ldns_rr and functions to manipulate those.">ldns/rr.h</a>&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;sys/time.h&gt;</span>
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="comment">/* opcodes for pkt&#39;s */</span>
<a name="l00045"></a><a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20">00045</a> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20">ldns_enum_pkt_opcode</a> {
<a name="l00046"></a><a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20a889e39287d71fc5ebe95700040ee67bb">00046</a>         <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20a889e39287d71fc5ebe95700040ee67bb">LDNS_PACKET_QUERY</a> = 0,
<a name="l00047"></a><a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20a38bc274e18bd6c83f803450f9310d0b4">00047</a>         <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20a38bc274e18bd6c83f803450f9310d0b4">LDNS_PACKET_IQUERY</a> = 1,
<a name="l00048"></a><a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20aab61063e4ba4ee58d655be8fa0d32a0d">00048</a>         <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20aab61063e4ba4ee58d655be8fa0d32a0d">LDNS_PACKET_STATUS</a> = 2, <span class="comment">/* there is no 3?? DNS is weird */</span>
<a name="l00049"></a><a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20a70c7e2ddbffea1a09c71c0faa9f2e7db">00049</a>         <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20a70c7e2ddbffea1a09c71c0faa9f2e7db">LDNS_PACKET_NOTIFY</a> = 4,
<a name="l00050"></a><a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20ab8ce3392553e5a300419e05ec3a6ab2f">00050</a>         <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20ab8ce3392553e5a300419e05ec3a6ab2f">LDNS_PACKET_UPDATE</a> = 5
<a name="l00051"></a>00051 };
<a name="l00052"></a><a class="code" href="packet_8h.html#a9108e104c619091d0f83381cfc1ea64b">00052</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#a7b6e5e8c3d0e09c0a51b5cb46a1f8e20">ldns_enum_pkt_opcode</a> <a class="code" href="packet_8h.html#a9108e104c619091d0f83381cfc1ea64b">ldns_pkt_opcode</a>;
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="comment">/* rcodes for pkts */</span>
<a name="l00055"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2e">00055</a> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2e">ldns_enum_pkt_rcode</a> {
<a name="l00056"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eaed41de4608a4fe343fb7321d38f577b7">00056</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eaed41de4608a4fe343fb7321d38f577b7">LDNS_RCODE_NOERROR</a> = 0,
<a name="l00057"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea234c4a2479907e919bdc796d162e7e5d">00057</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea234c4a2479907e919bdc796d162e7e5d">LDNS_RCODE_FORMERR</a> = 1,
<a name="l00058"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea3e47b4279a03871086ad3c982d8f7f4e">00058</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea3e47b4279a03871086ad3c982d8f7f4e">LDNS_RCODE_SERVFAIL</a> = 2,
<a name="l00059"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eac01c2b2bd1aad5bad94981afb97f5f72">00059</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eac01c2b2bd1aad5bad94981afb97f5f72">LDNS_RCODE_NXDOMAIN</a> = 3,
<a name="l00060"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea409df5dae301f4305944cae96c696caa">00060</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea409df5dae301f4305944cae96c696caa">LDNS_RCODE_NOTIMPL</a> = 4,
<a name="l00061"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea023d50f9d3a62cf83a2c13fd2e92b5c6">00061</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea023d50f9d3a62cf83a2c13fd2e92b5c6">LDNS_RCODE_REFUSED</a> = 5,
<a name="l00062"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea23062185144a7e4c27d17564d7e3c35e">00062</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea23062185144a7e4c27d17564d7e3c35e">LDNS_RCODE_YXDOMAIN</a> = 6,
<a name="l00063"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea3702c2e5785f0f11516423a07277151f">00063</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea3702c2e5785f0f11516423a07277151f">LDNS_RCODE_YXRRSET</a> = 7,
<a name="l00064"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea9948710319d71abe34d74380d4a4439d">00064</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2ea9948710319d71abe34d74380d4a4439d">LDNS_RCODE_NXRRSET</a> = 8,
<a name="l00065"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eadbb23ea2d247dfc825a9c5ee180ca2e7">00065</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eadbb23ea2d247dfc825a9c5ee180ca2e7">LDNS_RCODE_NOTAUTH</a> = 9,
<a name="l00066"></a><a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eaa4352e797fbbe2e0fa55b573fb8a1c55">00066</a>         <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2eaa4352e797fbbe2e0fa55b573fb8a1c55">LDNS_RCODE_NOTZONE</a> = 10
<a name="l00067"></a>00067 };
<a name="l00068"></a><a class="code" href="packet_8h.html#a66980c75b368fd748277e54bc1c8acc0">00068</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#ae3a130700ea54523aacc394180b2fa2e">ldns_enum_pkt_rcode</a> <a class="code" href="packet_8h.html#a66980c75b368fd748277e54bc1c8acc0">ldns_pkt_rcode</a>;
<a name="l00069"></a>00069 
<a name="l00192"></a><a class="code" href="structldns__struct__hdr.html">00192</a> <span class="keyword">struct </span><a class="code" href="structldns__struct__hdr.html" title="Header of a dns packet.">ldns_struct_hdr</a>
<a name="l00193"></a>00193 {
<a name="l00195"></a><a class="code" href="structldns__struct__hdr.html#a0ae245aee47aeaff6752c5838bfe0c43">00195</a>         uint16_t <a class="code" href="structldns__struct__hdr.html#a0ae245aee47aeaff6752c5838bfe0c43" title="Id of a packet.">_id</a>;
<a name="l00197"></a><a class="code" href="structldns__struct__hdr.html#aba1c86565df77ef613f30b4fee22dc5f">00197</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#aba1c86565df77ef613f30b4fee22dc5f" title="Query bit (0=query, 1=answer)">_qr</a>;
<a name="l00199"></a><a class="code" href="structldns__struct__hdr.html#ab30f4c6cf148cd8f11421872f02541e0">00199</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#ab30f4c6cf148cd8f11421872f02541e0" title="Authoritative answer.">_aa</a>;
<a name="l00201"></a><a class="code" href="structldns__struct__hdr.html#acca290e74f3f3ad1e2a295ac015aa447">00201</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#acca290e74f3f3ad1e2a295ac015aa447" title="Packet truncated.">_tc</a>;
<a name="l00203"></a><a class="code" href="structldns__struct__hdr.html#a5d537b5c7ab758c6289f050c90d52d61">00203</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#a5d537b5c7ab758c6289f050c90d52d61" title="Recursion desired.">_rd</a>;
<a name="l00205"></a><a class="code" href="structldns__struct__hdr.html#a998ad0bf461438d8e0352350c3862c22">00205</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#a998ad0bf461438d8e0352350c3862c22" title="Checking disabled.">_cd</a>;
<a name="l00207"></a><a class="code" href="structldns__struct__hdr.html#ad24aac22ef23f99a1067f050de6fcd9c">00207</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#ad24aac22ef23f99a1067f050de6fcd9c" title="Recursion available.">_ra</a>;
<a name="l00209"></a><a class="code" href="structldns__struct__hdr.html#abdb3ed5a171e465d06563c6ce382410b">00209</a>         <span class="keywordtype">bool</span> <a class="code" href="structldns__struct__hdr.html#abdb3ed5a171e465d06563c6ce382410b" title="Authentic data.">_ad</a>;
<a name="l00211"></a><a class="code" href="structldns__struct__hdr.html#a104ead3c495c531fed1a1197a0d78ca3">00211</a>         ldns_pkt_opcode <a class="code" href="structldns__struct__hdr.html#a104ead3c495c531fed1a1197a0d78ca3" title="Query type.">_opcode</a>;         <span class="comment">/* XXX 8 bits? */</span>
<a name="l00213"></a><a class="code" href="structldns__struct__hdr.html#ab90c9e6ed5a4f2d68f4f08d49824c998">00213</a>         uint8_t <a class="code" href="structldns__struct__hdr.html#ab90c9e6ed5a4f2d68f4f08d49824c998" title="Response code.">_rcode</a>;
<a name="l00215"></a><a class="code" href="structldns__struct__hdr.html#a74f241812561c2d4f9207c50c38b1140">00215</a>         uint16_t <a class="code" href="structldns__struct__hdr.html#a74f241812561c2d4f9207c50c38b1140" title="question sec">_qdcount</a>;
<a name="l00217"></a><a class="code" href="structldns__struct__hdr.html#a3b3b9eaa3b71d5338316f00490d3cac5">00217</a>         uint16_t <a class="code" href="structldns__struct__hdr.html#a3b3b9eaa3b71d5338316f00490d3cac5" title="answer sec">_ancount</a>;
<a name="l00219"></a><a class="code" href="structldns__struct__hdr.html#abcff0f5bc5adaeef5b527ce4750d0f45">00219</a>         uint16_t <a class="code" href="structldns__struct__hdr.html#abcff0f5bc5adaeef5b527ce4750d0f45" title="auth sec">_nscount</a>;
<a name="l00221"></a><a class="code" href="structldns__struct__hdr.html#aa0af70f67e604e91536d9fdac85ba8c8">00221</a>         uint16_t <a class="code" href="structldns__struct__hdr.html#aa0af70f67e604e91536d9fdac85ba8c8" title="add sec">_arcount</a>;
<a name="l00222"></a>00222 };
<a name="l00223"></a><a class="code" href="packet_8h.html#a104063349fc805b6fd716652bc3cf46e">00223</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structldns__struct__hdr.html" title="Header of a dns packet.">ldns_struct_hdr</a> <a class="code" href="structldns__struct__hdr.html" title="Header of a dns packet.">ldns_hdr</a>;
<a name="l00224"></a>00224 
<a name="l00233"></a><a class="code" href="structldns__struct__pkt.html">00233</a> <span class="keyword">struct </span><a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_struct_pkt</a>
<a name="l00234"></a>00234 {
<a name="l00236"></a><a class="code" href="structldns__struct__pkt.html#a3fce3071170f72e7f72df3b5742fe3d9">00236</a>         <a class="code" href="structldns__struct__hdr.html" title="Header of a dns packet.">ldns_hdr</a> *<a class="code" href="structldns__struct__pkt.html#a3fce3071170f72e7f72df3b5742fe3d9" title="Header section.">_header</a>;
<a name="l00237"></a>00237         <span class="comment">/* extra items needed in a packet */</span>
<a name="l00239"></a><a class="code" href="structldns__struct__pkt.html#a66859f084530f7c8989f0848ac5a8d62">00239</a>         <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *<a class="code" href="structldns__struct__pkt.html#a66859f084530f7c8989f0848ac5a8d62" title="The size of the wire format of the packet in octets.">_answerfrom</a>;
<a name="l00241"></a><a class="code" href="structldns__struct__pkt.html#a101116c683c4a289ed1aaefbc4c01046">00241</a>         <span class="keyword">struct </span>timeval <a class="code" href="structldns__struct__pkt.html#a101116c683c4a289ed1aaefbc4c01046" title="Timestamp of the time the packet was sent or created.">timestamp</a>;
<a name="l00243"></a><a class="code" href="structldns__struct__pkt.html#a40329a8c4c5b5debc80d4aac5fda03af">00243</a>         uint32_t <a class="code" href="structldns__struct__pkt.html#a40329a8c4c5b5debc80d4aac5fda03af" title="The duration of the query this packet is an answer to.">_querytime</a>;
<a name="l00245"></a><a class="code" href="structldns__struct__pkt.html#a6e2ee710b1c32a784a435c98533a4a0f">00245</a>         <span class="keywordtype">size_t</span> <a class="code" href="structldns__struct__pkt.html#a6e2ee710b1c32a784a435c98533a4a0f" title="The size of the wire format of the packet in octets.">_size</a>;
<a name="l00247"></a><a class="code" href="structldns__struct__pkt.html#ae86d5a820e650c3a0b3a32015dadbc21">00247</a>         <a class="code" href="structldns__struct__rr.html" title="Resource Record.">ldns_rr</a> *<a class="code" href="structldns__struct__pkt.html#ae86d5a820e650c3a0b3a32015dadbc21" title="Optional tsig rr.">_tsig_rr</a>;
<a name="l00249"></a><a class="code" href="structldns__struct__pkt.html#a5e093222fc5989c51a9a823c3b26628b">00249</a>         uint16_t <a class="code" href="structldns__struct__pkt.html#a5e093222fc5989c51a9a823c3b26628b" title="EDNS0 available buffer size, see RFC2671.">_edns_udp_size</a>;
<a name="l00251"></a><a class="code" href="structldns__struct__pkt.html#a1ce89d1765374ccaf0a9b5e55193bd34">00251</a>         uint8_t <a class="code" href="structldns__struct__pkt.html#a1ce89d1765374ccaf0a9b5e55193bd34" title="EDNS0 Extended rcode.">_edns_extended_rcode</a>;
<a name="l00253"></a><a class="code" href="structldns__struct__pkt.html#a6dc55c4e5a910e9b35123d145f81d000">00253</a>         uint8_t <a class="code" href="structldns__struct__pkt.html#a6dc55c4e5a910e9b35123d145f81d000" title="EDNS Version.">_edns_version</a>;
<a name="l00255"></a><a class="code" href="structldns__struct__pkt.html#ad098e6385628e303962f077b335a57d1">00255</a>         uint16_t <a class="code" href="structldns__struct__pkt.html#ad098e6385628e303962f077b335a57d1" title="Reserved EDNS data bits.">_edns_z</a>;
<a name="l00257"></a><a class="code" href="structldns__struct__pkt.html#a7b8d08bfebb7406e81e0dc11b23f747b">00257</a>         <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *<a class="code" href="structldns__struct__pkt.html#a7b8d08bfebb7406e81e0dc11b23f747b" title="Arbitrary EDNS rdata.">_edns_data</a>;
<a name="l00259"></a><a class="code" href="structldns__struct__pkt.html#afe021dd7b64da55c28cd3a1ff170fbc5">00259</a>         <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a>    *<a class="code" href="structldns__struct__pkt.html#afe021dd7b64da55c28cd3a1ff170fbc5" title="Question section.">_question</a>;
<a name="l00261"></a><a class="code" href="structldns__struct__pkt.html#a78f68b9ab9348943d27249fcc944e5e9">00261</a>         <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a>    *<a class="code" href="structldns__struct__pkt.html#a78f68b9ab9348943d27249fcc944e5e9" title="Answer section.">_answer</a>;
<a name="l00263"></a><a class="code" href="structldns__struct__pkt.html#a24e50f4fff0dd22b42e75c37e66a2d23">00263</a>         <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a>    *<a class="code" href="structldns__struct__pkt.html#a24e50f4fff0dd22b42e75c37e66a2d23" title="Authority section.">_authority</a>;
<a name="l00265"></a><a class="code" href="structldns__struct__pkt.html#ad4cf19c78bd6cca0131b2536b7c78c99">00265</a>         <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a>    *<a class="code" href="structldns__struct__pkt.html#ad4cf19c78bd6cca0131b2536b7c78c99" title="Additional section.">_additional</a>;
<a name="l00266"></a>00266 };
<a name="l00267"></a><a class="code" href="packet_8h.html#a6b137fb9a86468d16cf66130db3b9da2">00267</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_struct_pkt</a> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a>;
<a name="l00268"></a>00268 
<a name="l00272"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71">00272</a> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71" title="The sections of a packet.">ldns_enum_pkt_section</a> {
<a name="l00273"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a7f20925b013173d60eccb9d0cf18997e">00273</a>         <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a7f20925b013173d60eccb9d0cf18997e">LDNS_SECTION_QUESTION</a> = 0,
<a name="l00274"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a80effb31e9d19e57c89b79424a0b08ec">00274</a>         <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a80effb31e9d19e57c89b79424a0b08ec">LDNS_SECTION_ANSWER</a> = 1,
<a name="l00275"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71ab4c0eddd3ed0bfc089a7eb0cded20558">00275</a>         <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71ab4c0eddd3ed0bfc089a7eb0cded20558">LDNS_SECTION_AUTHORITY</a> = 2,
<a name="l00276"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a9bf00ce2a238c55f94ceeaf64aecdfbb">00276</a>         <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a9bf00ce2a238c55f94ceeaf64aecdfbb">LDNS_SECTION_ADDITIONAL</a> = 3,
<a name="l00278"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a1e420579b471c9ba1e68080a2d2631ae">00278</a>         <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71a1e420579b471c9ba1e68080a2d2631ae" title="bogus section, if not interested">LDNS_SECTION_ANY</a> = 4,
<a name="l00280"></a><a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71ae9ba705eaab3d3f49701f2405568c104">00280</a>         <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71ae9ba705eaab3d3f49701f2405568c104" title="used to get all non-question rrs from a packet">LDNS_SECTION_ANY_NOQUESTION</a> = 5
<a name="l00281"></a>00281 };
<a name="l00282"></a><a class="code" href="packet_8h.html#a9d9ba3c95f003511a16f9a6236661bc9">00282</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#adad42096a5200b78a988227bd8c59b71" title="The sections of a packet.">ldns_enum_pkt_section</a> <a class="code" href="packet_8h.html#a9d9ba3c95f003511a16f9a6236661bc9">ldns_pkt_section</a>;    
<a name="l00283"></a>00283 
<a name="l00287"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6">00287</a> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6" title="The different types of packets.">ldns_enum_pkt_type</a> {
<a name="l00288"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a2b51d1ee09fec0ba1604adbfda49fad6">00288</a>         <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a2b51d1ee09fec0ba1604adbfda49fad6">LDNS_PACKET_QUESTION</a>,
<a name="l00289"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a4a03b7543de90e425f1aa42222f26303">00289</a>         <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a4a03b7543de90e425f1aa42222f26303">LDNS_PACKET_REFERRAL</a>,
<a name="l00290"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6aee0e0713acd7c445131669d4d196f308">00290</a>         <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6aee0e0713acd7c445131669d4d196f308">LDNS_PACKET_ANSWER</a>,
<a name="l00291"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6aeb7ed7d0fa8ff49380481a116465646e">00291</a>         <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6aeb7ed7d0fa8ff49380481a116465646e">LDNS_PACKET_NXDOMAIN</a>,
<a name="l00292"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a82f24c4681a176ebb5ae592ad562f2af">00292</a>         <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a82f24c4681a176ebb5ae592ad562f2af">LDNS_PACKET_NODATA</a>,
<a name="l00293"></a><a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a6ebb0a09960e0c4570db1ebcc54d5475">00293</a>         <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6a6ebb0a09960e0c4570db1ebcc54d5475">LDNS_PACKET_UNKNOWN</a>
<a name="l00294"></a>00294 };
<a name="l00295"></a><a class="code" href="packet_8h.html#a00b628d0d443c79a6b02d8d3d090c362">00295</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="packet_8h.html#af90dfff82b1b29392ed871883727aff6" title="The different types of packets.">ldns_enum_pkt_type</a> <a class="code" href="packet_8h.html#a00b628d0d443c79a6b02d8d3d090c362">ldns_pkt_type</a>;
<a name="l00296"></a>00296 
<a name="l00297"></a>00297 <span class="comment">/* prototypes */</span>
<a name="l00298"></a>00298 
<a name="l00299"></a>00299 <span class="comment">/* read */</span>
<a name="l00300"></a>00300 
<a name="l00306"></a>00306 uint16_t <a class="code" href="packet_8c.html#a439764a9c9642e71cc1e65394ff4ab12" title="Read the packet id.">ldns_pkt_id</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00312"></a>00312 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a5a6bec737775ffadf911dfacd99ebcb1" title="Read the packet&#39;s qr bit.">ldns_pkt_qr</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00318"></a>00318 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#aee3ba5406c1eb662d24236d6a7cdd07b" title="Read the packet&#39;s aa bit.">ldns_pkt_aa</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00324"></a>00324 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#af68cefc5ba30989f5ab3bde0f0ffd6d5" title="Read the packet&#39;s tc bit.">ldns_pkt_tc</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00330"></a>00330 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#aa43df2154a7b7e9c3f9019934c211474" title="Read the packet&#39;s rd bit.">ldns_pkt_rd</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00336"></a>00336 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a877d710d1aed4e2c4b24d07ff3cf536f" title="Read the packet&#39;s cd bit.">ldns_pkt_cd</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00342"></a>00342 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#abdfd0ce183dea2dddbe16add9dd91c10" title="Read the packet&#39;s ra bit.">ldns_pkt_ra</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00348"></a>00348 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a9d2640a12ef6e2a67686ffd19aac5421" title="Read the packet&#39;s ad bit.">ldns_pkt_ad</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00354"></a>00354 ldns_pkt_opcode <a class="code" href="packet_8c.html#a2714c10ca2228ef57070b63e6b60b8c5" title="Read the packet&#39;s code.">ldns_pkt_get_opcode</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00360"></a>00360 ldns_pkt_rcode <a class="code" href="packet_8c.html#af4256a808233651ea1a5bdab74ce2d8e" title="Return the packet&#39;s respons code.">ldns_pkt_get_rcode</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00366"></a>00366 uint16_t <a class="code" href="packet_8c.html#acfd9095572aa59123edcdeb598976b69" title="Return the packet&#39;s qd count.">ldns_pkt_qdcount</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00372"></a>00372 uint16_t <a class="code" href="packet_8c.html#a801e0c9c3766dde74347793984ecd417" title="Return the packet&#39;s an count.">ldns_pkt_ancount</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00378"></a>00378 uint16_t <a class="code" href="packet_8c.html#ac551c3cfc6a48241e1d4cd4d1390df1c" title="Return the packet&#39;s ns count.">ldns_pkt_nscount</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00384"></a>00384 uint16_t <a class="code" href="packet_8c.html#a45ad46caf5027284947fe58b77b2a93a" title="Return the packet&#39;s ar count.">ldns_pkt_arcount</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00385"></a>00385 
<a name="l00391"></a>00391 <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *<a class="code" href="packet_8c.html#a126c9035ceb1517ddf23e1f22c384458" title="Return the packet&#39;s answerfrom.">ldns_pkt_answerfrom</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00392"></a>00392 
<a name="l00398"></a>00398 <span class="keyword">struct </span>timeval <a class="code" href="packet_8c.html#a493839636f08954deb43adc219c21af9" title="Return the packet&#39;s timestamp.">ldns_pkt_timestamp</a>(const <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00404"></a>00404 uint32_t <a class="code" href="packet_8c.html#a9f54048e7a06924bebdc74c11c56fa96" title="Return the packet&#39;s querytime.">ldns_pkt_querytime</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00405"></a>00405 
<a name="l00411"></a>00411 <span class="keywordtype">size_t</span> <a class="code" href="packet_8c.html#a973aae4a231e8022bb095defcc9ca264" title="Return the packet&#39;s size in bytes.">ldns_pkt_size</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00412"></a>00412 
<a name="l00418"></a>00418 <a class="code" href="structldns__struct__rr.html" title="Resource Record.">ldns_rr</a> *<a class="code" href="packet_8c.html#ad7dead450927dc5d6db4dd4ef7c738e1" title="Return the packet&#39;s tsig pseudo rr&#39;s.">ldns_pkt_tsig</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00419"></a>00419 
<a name="l00425"></a>00425 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#a3dbd67b300227c8a40daf3865aeb236e" title="Return the packet&#39;s question section.">ldns_pkt_question</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00431"></a>00431 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#abe3507def1f75f9a369334f75a4b4799" title="Return the packet&#39;s answer section.">ldns_pkt_answer</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00437"></a>00437 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#a7edc2a338e1adfce9ef3ae137e6aa5d6" title="Return the packet&#39;s authority section.">ldns_pkt_authority</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00443"></a>00443 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#a9419e23858eddcd58bd61fcf39cffd61" title="Return the packet&#39;s additional section.">ldns_pkt_additional</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00450"></a>00450 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#ac9f8ff07f45c9c36b47736fc08c1eb8a" title="Return the packet&#39;s question, answer, authority and additional sections concatenated, in a new rr_list clone.">ldns_pkt_all</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00457"></a>00457 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#a91b26db3a3540d0895bd1f9e3c55113e" title="Return the packet&#39;s answer, authority and additional sections concatenated, in a new rr_list clone...">ldns_pkt_all_noquestion</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00458"></a>00458 
<a name="l00466"></a>00466 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#acd92ec99a8c81e77695afda18454d672" title="return all the rr_list&#39;s in the packet.">ldns_pkt_get_section_clone</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, ldns_pkt_section s);
<a name="l00467"></a>00467 
<a name="l00476"></a>00476 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#a79a420bff29961c68dfd6a1d199b9bdc" title="return all the rr with a specific name from a packet.">ldns_pkt_rr_list_by_name</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *r, ldns_pkt_section s);
<a name="l00485"></a>00485 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#aff953969fdd5f6bbbae10569f3455505" title="return all the rr with a specific type from a packet.">ldns_pkt_rr_list_by_type</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="rr_8h.html#a5b71c1de711a178f6fbda5d684cdfed5">ldns_rr_type</a> t, ldns_pkt_section s);
<a name="l00495"></a>00495 <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *<a class="code" href="packet_8c.html#a817ba0b6b178f84d9a83b09e4fdf6772" title="return all the rr with a specific type and type from a packet.">ldns_pkt_rr_list_by_name_and_type</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, <span class="keyword">const</span> <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *ownername, <a class="code" href="rr_8h.html#a5b71c1de711a178f6fbda5d684cdfed5">ldns_rr_type</a> type, ldns_pkt_section sec);
<a name="l00496"></a>00496 
<a name="l00497"></a>00497 
<a name="l00504"></a>00504 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a001c373c7573e8b42b21a40b1ece7352" title="check to see if an rr exist in the packet">ldns_pkt_rr</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *pkt, ldns_pkt_section sec, <a class="code" href="structldns__struct__rr.html" title="Resource Record.">ldns_rr</a> *rr);
<a name="l00505"></a>00505 
<a name="l00506"></a>00506 
<a name="l00513"></a>00513 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#abfe7d7d5b58daf4356be275aec0caf13" title="sets the flags in a packet.">ldns_pkt_set_flags</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *pkt, uint16_t flags);
<a name="l00514"></a>00514 
<a name="l00520"></a>00520 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ace4a28c5ddb36917440db70bc4bd9614" title="Set the packet&#39;s id.">ldns_pkt_set_id</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint16_t <span class="keywordtype">id</span>);
<a name="l00525"></a>00525 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a34c00d474f6d869ff40829e20c95e35a" title="Set the packet&#39;s id to a random value.">ldns_pkt_set_random_id</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00531"></a>00531 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ae3dc6438162483929b6f5d077a86a6a0" title="Set the packet&#39;s qr bit.">ldns_pkt_set_qr</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00537"></a>00537 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a40702391e1243d6917f9c9648116e2f6" title="Set the packet&#39;s aa bit.">ldns_pkt_set_aa</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00543"></a>00543 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a0d0ec0f182a86863ce394d9846e195ad" title="Set the packet&#39;s tc bit.">ldns_pkt_set_tc</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00549"></a>00549 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a10fac125dc3623c6efa198162bf14663" title="Set the packet&#39;s rd bit.">ldns_pkt_set_rd</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00555"></a>00555 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a7f6bdee14007649153092d2114894665" title="Set the packet&#39;s cd bit.">ldns_pkt_set_cd</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00561"></a>00561 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ac41605bf4a78a5d210a9bb81985adc60" title="Set the packet&#39;s ra bit.">ldns_pkt_set_ra</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00567"></a>00567 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a690ec9f53dcbf146383d05fe9e43c524" title="Set the packet&#39;s ad bit.">ldns_pkt_set_ad</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">bool</span> b);
<a name="l00568"></a>00568 
<a name="l00574"></a>00574 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a31253d7eb96356147df1b1437dab77c7" title="Set the packet&#39;s opcode.">ldns_pkt_set_opcode</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, ldns_pkt_opcode c);
<a name="l00580"></a>00580 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#af61ee2b91dadf199ccbb862e25f2b081" title="Set the packet&#39;s respons code.">ldns_pkt_set_rcode</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint8_t c);
<a name="l00586"></a>00586 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a8c1184a51ba2d82508169d5e9993b9a2" title="Set the packet&#39;s qd count.">ldns_pkt_set_qdcount</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint16_t c);
<a name="l00592"></a>00592 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a102126f65a7311eae3be1c659b4e008b" title="Set the packet&#39;s an count.">ldns_pkt_set_ancount</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint16_t c);
<a name="l00598"></a>00598 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a4bacb8d6c93f808aac967d99ad271631" title="Set the packet&#39;s ns count.">ldns_pkt_set_nscount</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint16_t c);
<a name="l00604"></a>00604 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#af3c11171cf7981f75f68ac1e02b0fed3" title="Set the packet&#39;s arcount.">ldns_pkt_set_arcount</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint16_t c);
<a name="l00610"></a>00610 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ae11de27759e56ecff62e928a0e52e520" title="Set the packet&#39;s answering server.">ldns_pkt_set_answerfrom</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *r);
<a name="l00616"></a>00616 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a192078cf50d0b8ca13098441d34fe60d" title="Set the packet&#39;s query time.">ldns_pkt_set_querytime</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, uint32_t t);
<a name="l00622"></a>00622 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a64bc812fa152d07c2913aa9f635cf33c" title="Set the packet&#39;s size.">ldns_pkt_set_size</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keywordtype">size_t</span> s);
<a name="l00623"></a>00623 
<a name="l00629"></a>00629 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a5568dc152297e14f728d8f94fa66edbe" title="Set the packet&#39;s timestamp.">ldns_pkt_set_timestamp</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <span class="keyword">struct</span> timeval timeval);
<a name="l00636"></a>00636 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ae3464765714e03a3ba105ec4bd172e05" title="Set a packet&#39;s section count to x.">ldns_pkt_set_section_count</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, ldns_pkt_section s, uint16_t x);
<a name="l00642"></a>00642 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a19d8214fc5305aea0403fd70c529b151" title="Set the packet&#39;s tsig rr.">ldns_pkt_set_tsig</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rr.html" title="Resource Record.">ldns_rr</a> *t);
<a name="l00643"></a>00643 
<a name="l00650"></a>00650 ldns_pkt_type <a class="code" href="packet_8c.html#a1595c620dc120eaac333edf8f1ebb904" title="looks inside the packet to determine what kind of packet it is, AUTH, NXDOMAIN, REFERRAL, etc.">ldns_pkt_reply_type</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00651"></a>00651 
<a name="l00657"></a>00657 uint16_t <a class="code" href="packet_8c.html#afc049180b6ff8b892f9ea80a13bf4990" title="return the packet&#39;s edns udp size">ldns_pkt_edns_udp_size</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00663"></a>00663 uint8_t <a class="code" href="packet_8c.html#aa5c655708da9980489d4dc8c00be83c3" title="return the packet&#39;s edns extended rcode">ldns_pkt_edns_extended_rcode</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00669"></a>00669 uint8_t <a class="code" href="packet_8c.html#a082cf0e882efb5496189ce996b5aee05" title="return the packet&#39;s edns version">ldns_pkt_edns_version</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00675"></a>00675 uint16_t <a class="code" href="packet_8c.html#ae53a89970cd3a12eb6615f0f3a16c7b5" title="return the packet&#39;s edns z value">ldns_pkt_edns_z</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00681"></a>00681 <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *<a class="code" href="packet_8c.html#ad55346b7f33de49bf4f3e34fdaa412c6" title="return the packet&#39;s edns data">ldns_pkt_edns_data</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00682"></a>00682 
<a name="l00688"></a>00688 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#addebdf1cc22b12a60d485ddaedab9c4d" title="return the packet&#39;s edns do bit">ldns_pkt_edns_do</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00694"></a>00694 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a8701a54724e418fa28905f5bb15d2b04" title="Set the packet&#39;s edns do bit.">ldns_pkt_set_edns_do</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, <span class="keywordtype">bool</span> value);
<a name="l00695"></a>00695 
<a name="l00705"></a>00705 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a7811437ba5ec3f1a06295af1bd0566c0" title="returns true if this packet needs and EDNS rr to be sent.">ldns_pkt_edns</a>(<span class="keyword">const</span> <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00706"></a>00706 
<a name="l00712"></a>00712 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a2f838fd8f8a7d2e1c1039df0869cdc66" title="Set the packet&#39;s edns udp size.">ldns_pkt_set_edns_udp_size</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, uint16_t s);
<a name="l00718"></a>00718 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ad3b45ffeeb71506329547e976d720a72" title="Set the packet&#39;s edns extended rcode.">ldns_pkt_set_edns_extended_rcode</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, uint8_t c);
<a name="l00724"></a>00724 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#afcdf029dbbced3e04fa6696a3773102c" title="Set the packet&#39;s edns version.">ldns_pkt_set_edns_version</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, uint8_t v);
<a name="l00730"></a>00730 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a9890540c35fba9eebbb42c7cdc56fee6" title="Set the packet&#39;s edns z value.">ldns_pkt_set_edns_z</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, uint16_t z);
<a name="l00736"></a>00736 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#ab4a4e43ac8288fcf2d44beea87c10613" title="Set the packet&#39;s edns data.">ldns_pkt_set_edns_data</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, <a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *data);
<a name="l00737"></a>00737 
<a name="l00742"></a>00742 <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *<a class="code" href="packet_8c.html#a397f48f6716671a13516e37fc465a884" title="allocates and initializes a ldns_pkt structure.">ldns_pkt_new</a>();
<a name="l00743"></a>00743 
<a name="l00749"></a>00749 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a05bd6d99b1f608238c67b84449724c16" title="frees the packet structure and all data that it contains.">ldns_pkt_free</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet);
<a name="l00750"></a>00750 
<a name="l00760"></a>00760 <a class="code" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> <a class="code" href="packet_8c.html#ae46e9b92c59c7466a0615cb2348fac8e" title="creates a query packet for the given name, type, class.">ldns_pkt_query_new_frm_str</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> **p, <span class="keyword">const</span> <span class="keywordtype">char</span> *rr_name, <a class="code" href="rr_8h.html#a5b71c1de711a178f6fbda5d684cdfed5">ldns_rr_type</a> rr_type, <a class="code" href="rr_8h.html#aa11e99c7e7c630e03373f2a2cafc4ee9">ldns_rr_class</a> rr_class , uint16_t flags);
<a name="l00761"></a>00761 
<a name="l00770"></a>00770 <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *<a class="code" href="packet_8c.html#af7eee9c15b0f645d5b5855ef15c4596c" title="creates a packet with a query in it for the given name, type and class.">ldns_pkt_query_new</a>(<a class="code" href="structldns__struct__rdf.html" title="Resource record data field.">ldns_rdf</a> *rr_name, <a class="code" href="rr_8h.html#a5b71c1de711a178f6fbda5d684cdfed5">ldns_rr_type</a> rr_type, <a class="code" href="rr_8h.html#aa11e99c7e7c630e03373f2a2cafc4ee9">ldns_rr_class</a> rr_class, uint16_t flags);
<a name="l00771"></a>00771 
<a name="l00778"></a>00778 <a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *<a class="code" href="packet_8c.html#ac6655ec04b497939fa5b36c6e68832be" title="clones the given packet, creating a fully allocated copy">ldns_pkt_clone</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *pkt);
<a name="l00779"></a>00779 
<a name="l00785"></a>00785 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a3143ac76c5f71627ec670e89d691430b" title="directly set the additional section">ldns_pkt_set_additional</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *rr);
<a name="l00786"></a>00786 
<a name="l00792"></a>00792 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a827e3fc31071f434a591cf2ac1d8b895" title="directly set the answer section">ldns_pkt_set_answer</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *rr);
<a name="l00793"></a>00793 
<a name="l00799"></a>00799 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a8476419cee39b51e239267318a58fe89" title="directly set the question section">ldns_pkt_set_question</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *rr);
<a name="l00800"></a>00800 
<a name="l00806"></a>00806 <span class="keywordtype">void</span> <a class="code" href="packet_8c.html#a50588a27c685da2c79a171cd29b5543c" title="directly set the auhority section">ldns_pkt_set_authority</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p, <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *rr);
<a name="l00807"></a>00807 
<a name="l00815"></a>00815 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a4aff8e1ca9f94ccce45acda26f24f444" title="push an rr on a packet">ldns_pkt_push_rr</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, ldns_pkt_section section, <a class="code" href="structldns__struct__rr.html" title="Resource Record.">ldns_rr</a> *rr);
<a name="l00816"></a>00816 
<a name="l00824"></a>00824 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a95e4cc9c76515cf9f2557fd8f9d3e6c5" title="push an rr on a packet, provided the RR is not there.">ldns_pkt_safe_push_rr</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *pkt, ldns_pkt_section sec, <a class="code" href="structldns__struct__rr.html" title="Resource Record.">ldns_rr</a> *rr);
<a name="l00825"></a>00825 
<a name="l00833"></a>00833 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a653d70d944c5e68786337b0872b6dabe" title="push a rr_list on a packet">ldns_pkt_push_rr_list</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *packet, ldns_pkt_section section, <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *list);
<a name="l00834"></a>00834 
<a name="l00842"></a>00842 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a5451676f5f9d516064883eea094dbbe1" title="push an rr_list to a packet, provided the RRs are not already there.">ldns_pkt_safe_push_rr_list</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *pkt, ldns_pkt_section sec, <a class="code" href="structldns__struct__rr__list.html" title="List or Set of Resource Records.">ldns_rr_list</a> *list);
<a name="l00843"></a>00843 
<a name="l00849"></a>00849 <span class="keywordtype">bool</span> <a class="code" href="packet_8c.html#a742d6602282e8a3defd9dc33a2240d15" title="check if a packet is empty">ldns_pkt_empty</a>(<a class="code" href="structldns__struct__pkt.html" title="DNS packet.">ldns_pkt</a> *p);
<a name="l00850"></a>00850 
<a name="l00851"></a>00851 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00852"></a>00852 <span class="preprocessor"></span>}
<a name="l00853"></a>00853 <span class="preprocessor">#endif</span>
<a name="l00854"></a>00854 <span class="preprocessor"></span>
<a name="l00855"></a>00855 <span class="preprocessor">#endif  </span><span class="comment">/* LDNS_PACKET_H */</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Jan 11 2012 for ldns by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>