Sophie

Sophie

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

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>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">host2wire.c File Reference</div>  </div>
</div>
<div class="contents">

<p><a href="host2wire_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#aa84f3dd72e98883b193e332ce7bbf9ab">ldns_dname2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the dname data to the buffer in wire format.  <a href="#aa84f3dd72e98883b193e332ce7bbf9ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a0147a3a16d5a149a6aee49cc967a9897">ldns_rdf2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *rdf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the rdata data to the buffer in wire format.  <a href="#a0147a3a16d5a149a6aee49cc967a9897"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a4aa34f5ab334033bffbebad8daaa6684">ldns_rdf2buffer_wire_canonical</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *rdf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the rdata data to the buffer in wire format If the rdata is a dname, the letters will be lowercased during the conversion.  <a href="#a4aa34f5ab334033bffbebad8daaa6684"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a2b65b6f4ecb3364639d46ce3a8276153">ldns_rr_list2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rr__list.html">ldns_rr_list</a> *rr_list)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the rr_list data to the buffer in wire format.  <a href="#a2b65b6f4ecb3364639d46ce3a8276153"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a184a3e6ef580e65fdbe7ec5d2d0fb4da">ldns_rr2buffer_wire_canonical</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, int section)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the rr data to the buffer in wire format, in canonical format according to RFC3597 (every dname in rdata fields of RR's mentioned in that RFC will be lowercased)  <a href="#a184a3e6ef580e65fdbe7ec5d2d0fb4da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#ac590684e9355bca1742de1e351654048">ldns_rr2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, int section)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the rr data to the buffer in wire format.  <a href="#ac590684e9355bca1742de1e351654048"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a2c9c3a23cf907d632f9f85aa72f2bbf0">ldns_rrsig2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a rrsig to wireformat BUT EXCLUDE the rrsig rdata This is needed in DNSSEC verification.  <a href="#a2c9c3a23cf907d632f9f85aa72f2bbf0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#abf2bee8d29d4a8e29e4f64ea79b7c645">ldns_rr_rdata2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an rr's rdata to wireformat, while excluding the ownername and all the stuff before the rdata.  <a href="#abf2bee8d29d4a8e29e4f64ea79b7c645"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#aa40d4e3f29ccf46535901c5d5010054b">ldns_pkt2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const <a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> *packet)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the packet data to the buffer in wire format.  <a href="#aa40d4e3f29ccf46535901c5d5010054b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a772e160d3d0c4eefc02c59107e19f09a">ldns_rdf2wire</a> (uint8_t **dest, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *rdf, size_t *result_size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates an array of uint8_t at dest, and puts the wireformat of the given rdf in that array.  <a href="#a772e160d3d0c4eefc02c59107e19f09a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#aae486b38af7f9bb7997c8291c44adba7">ldns_rr2wire</a> (uint8_t **dest, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, int section, size_t *result_size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates an array of uint8_t at dest, and puts the wireformat of the given rr in that array.  <a href="#aae486b38af7f9bb7997c8291c44adba7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8c.html#a2e9c17a2c51bbe8c8a41527211e7157c">ldns_pkt2wire</a> (uint8_t **dest, const <a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> *packet, size_t *result_size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates an array of uint8_t at dest, and puts the wireformat of the given packet in that array.  <a href="#a2e9c17a2c51bbe8c8a41527211e7157c"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aa84f3dd72e98883b193e332ce7bbf9ab"></a><!-- doxytag: member="host2wire.c::ldns_dname2buffer_wire" ref="aa84f3dd72e98883b193e332ce7bbf9ab" args="(ldns_buffer *buffer, const ldns_rdf *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_dname2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the dname data to the buffer in wire format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*buffer</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*name</td><td>rdata dname to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00027">27</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00079">ldns_buffer_reserve()</a>, <a class="el" href="rdata_8c_source.html#l00038">ldns_rdf_data()</a>, and <a class="el" href="rdata_8c_source.html#l00024">ldns_rdf_size()</a>.</p>

</div>
</div>
<a class="anchor" id="a0147a3a16d5a149a6aee49cc967a9897"></a><!-- doxytag: member="host2wire.c::ldns_rdf2buffer_wire" ref="a0147a3a16d5a149a6aee49cc967a9897" args="(ldns_buffer *buffer, const ldns_rdf *rdf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rdf2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *&#160;</td>
          <td class="paramname"><em>rdf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the rdata data to the buffer in wire format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*rdf</td><td>rdata to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00036">36</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00079">ldns_buffer_reserve()</a>, <a class="el" href="rdata_8c_source.html#l00038">ldns_rdf_data()</a>, and <a class="el" href="rdata_8c_source.html#l00024">ldns_rdf_size()</a>.</p>

</div>
</div>
<a class="anchor" id="a4aa34f5ab334033bffbebad8daaa6684"></a><!-- doxytag: member="host2wire.c::ldns_rdf2buffer_wire_canonical" ref="a4aa34f5ab334033bffbebad8daaa6684" args="(ldns_buffer *buffer, const ldns_rdf *rdf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rdf2buffer_wire_canonical </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *&#160;</td>
          <td class="paramname"><em>rdf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the rdata data to the buffer in wire format If the rdata is a dname, the letters will be lowercased during the conversion. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*rdf</td><td>rdata to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00045">45</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00079">ldns_buffer_reserve()</a>, <a class="el" href="dname_8h_source.html#l00049">LDNS_DNAME_NORMALIZE</a>, <a class="el" href="rdata_8c_source.html#l00038">ldns_rdf_data()</a>, <a class="el" href="rdata_8c_source.html#l00031">ldns_rdf_get_type()</a>, <a class="el" href="rdata_8c_source.html#l00024">ldns_rdf_size()</a>, and <a class="el" href="rdata_8h_source.html#l00049">LDNS_RDF_TYPE_DNAME</a>.</p>

</div>
</div>
<a class="anchor" id="a2b65b6f4ecb3364639d46ce3a8276153"></a><!-- doxytag: member="host2wire.c::ldns_rr_list2buffer_wire" ref="a2b65b6f4ecb3364639d46ce3a8276153" args="(ldns_buffer *buffer, const ldns_rr_list *rr_list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rr_list2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rr__list.html">ldns_rr_list</a> *&#160;</td>
          <td class="paramname"><em>rrlist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the rr_list data to the buffer in wire format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*rrlist</td><td>rr_list to to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00071">71</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="host2wire_8c_source.html#l00159">ldns_rr2buffer_wire()</a>, <a class="el" href="rr_8c_source.html#l00920">ldns_rr_list_rr()</a>, <a class="el" href="rr_8c_source.html#l00887">ldns_rr_list_rr_count()</a>, and <a class="el" href="packet_8h_source.html#l00278">LDNS_SECTION_ANY</a>.</p>

</div>
</div>
<a class="anchor" id="a184a3e6ef580e65fdbe7ec5d2d0fb4da"></a><!-- doxytag: member="host2wire.c::ldns_rr2buffer_wire_canonical" ref="a184a3e6ef580e65fdbe7ec5d2d0fb4da" args="(ldns_buffer *buffer, const ldns_rr *rr, int section)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rr2buffer_wire_canonical </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *&#160;</td>
          <td class="paramname"><em>rr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>section</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the rr data to the buffer in wire format, in canonical format according to RFC3597 (every dname in rdata fields of RR's mentioned in that RFC will be lowercased) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*rr</td><td>resource record to convert </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">section</td><td>the section in the packet this rr is supposed to be in (to determine whether to add rdata or not) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00085">85</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00079">ldns_buffer_reserve()</a>, <a class="el" href="host2wire_8c_source.html#l00036">ldns_rdf2buffer_wire()</a>, <a class="el" href="host2wire_8c_source.html#l00045">ldns_rdf2buffer_wire_canonical()</a>, <a class="el" href="rr_8c_source.html#l00879">ldns_rr_get_class()</a>, <a class="el" href="rr_8c_source.html#l00873">ldns_rr_get_type()</a>, <a class="el" href="rr_8c_source.html#l00849">ldns_rr_owner()</a>, <a class="el" href="rr_8c_source.html#l00867">ldns_rr_rd_count()</a>, <a class="el" href="rr_8c_source.html#l00839">ldns_rr_rdf()</a>, <a class="el" href="rr_8c_source.html#l00861">ldns_rr_ttl()</a>, <a class="el" href="rr_8h_source.html#l00157">LDNS_RR_TYPE_A6</a>, <a class="el" href="rr_8h_source.html#l00117">LDNS_RR_TYPE_AFSDB</a>, <a class="el" href="rr_8h_source.html#l00091">LDNS_RR_TYPE_CNAME</a>, <a class="el" href="rr_8h_source.html#l00159">LDNS_RR_TYPE_DNAME</a>, <a class="el" href="rr_8h_source.html#l00107">LDNS_RR_TYPE_HINFO</a>, <a class="el" href="rr_8h_source.html#l00153">LDNS_RR_TYPE_KX</a>, <a class="el" href="rr_8h_source.html#l00095">LDNS_RR_TYPE_MB</a>, <a class="el" href="rr_8h_source.html#l00087">LDNS_RR_TYPE_MD</a>, <a class="el" href="rr_8h_source.html#l00089">LDNS_RR_TYPE_MF</a>, <a class="el" href="rr_8h_source.html#l00097">LDNS_RR_TYPE_MG</a>, <a class="el" href="rr_8h_source.html#l00109">LDNS_RR_TYPE_MINFO</a>, <a class="el" href="rr_8h_source.html#l00099">LDNS_RR_TYPE_MR</a>, <a class="el" href="rr_8h_source.html#l00111">LDNS_RR_TYPE_MX</a>, <a class="el" href="rr_8h_source.html#l00151">LDNS_RR_TYPE_NAPTR</a>, <a class="el" href="rr_8h_source.html#l00085">LDNS_RR_TYPE_NS</a>, <a class="el" href="rr_8h_source.html#l00141">LDNS_RR_TYPE_NXT</a>, <a class="el" href="rr_8h_source.html#l00105">LDNS_RR_TYPE_PTR</a>, <a class="el" href="rr_8h_source.html#l00133">LDNS_RR_TYPE_PX</a>, <a class="el" href="rr_8h_source.html#l00115">LDNS_RR_TYPE_RP</a>, <a class="el" href="rr_8h_source.html#l00123">LDNS_RR_TYPE_RT</a>, <a class="el" href="rr_8h_source.html#l00129">LDNS_RR_TYPE_SIG</a>, <a class="el" href="rr_8h_source.html#l00093">LDNS_RR_TYPE_SOA</a>, <a class="el" href="rr_8h_source.html#l00147">LDNS_RR_TYPE_SRV</a>, and <a class="el" href="packet_8h_source.html#l00273">LDNS_SECTION_QUESTION</a>.</p>

</div>
</div>
<a class="anchor" id="ac590684e9355bca1742de1e351654048"></a><!-- doxytag: member="host2wire.c::ldns_rr2buffer_wire" ref="ac590684e9355bca1742de1e351654048" args="(ldns_buffer *buffer, const ldns_rr *rr, int section)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rr2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *&#160;</td>
          <td class="paramname"><em>rr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>section</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the rr data to the buffer in wire format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*rr</td><td>resource record to convert </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">section</td><td>the section in the packet this rr is supposed to be in (to determine whether to add rdata or not) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00159">159</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00079">ldns_buffer_reserve()</a>, <a class="el" href="host2wire_8c_source.html#l00027">ldns_dname2buffer_wire()</a>, <a class="el" href="host2wire_8c_source.html#l00036">ldns_rdf2buffer_wire()</a>, <a class="el" href="rr_8c_source.html#l00879">ldns_rr_get_class()</a>, <a class="el" href="rr_8c_source.html#l00873">ldns_rr_get_type()</a>, <a class="el" href="rr_8c_source.html#l00849">ldns_rr_owner()</a>, <a class="el" href="rr_8c_source.html#l00867">ldns_rr_rd_count()</a>, <a class="el" href="rr_8c_source.html#l00839">ldns_rr_rdf()</a>, <a class="el" href="rr_8c_source.html#l00861">ldns_rr_ttl()</a>, and <a class="el" href="packet_8h_source.html#l00273">LDNS_SECTION_QUESTION</a>.</p>

</div>
</div>
<a class="anchor" id="a2c9c3a23cf907d632f9f85aa72f2bbf0"></a><!-- doxytag: member="host2wire.c::ldns_rrsig2buffer_wire" ref="a2c9c3a23cf907d632f9f85aa72f2bbf0" args="(ldns_buffer *buffer, const ldns_rr *rr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rrsig2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *&#160;</td>
          <td class="paramname"><em>sigrr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a rrsig to wireformat BUT EXCLUDE the rrsig rdata This is needed in DNSSEC verification. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sigrr</td><td>signature rr to operate on </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00196">196</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="host2wire_8c_source.html#l00036">ldns_rdf2buffer_wire()</a>, <a class="el" href="rr_8c_source.html#l00873">ldns_rr_get_type()</a>, <a class="el" href="rr_8c_source.html#l00867">ldns_rr_rd_count()</a>, <a class="el" href="rr_8c_source.html#l00839">ldns_rr_rdf()</a>, <a class="el" href="rr_8h_source.html#l00173">LDNS_RR_TYPE_RRSIG</a>, and <a class="el" href="error_8h_source.html#l00037">LDNS_STATUS_ERR</a>.</p>

</div>
</div>
<a class="anchor" id="abf2bee8d29d4a8e29e4f64ea79b7c645"></a><!-- doxytag: member="host2wire.c::ldns_rr_rdata2buffer_wire" ref="abf2bee8d29d4a8e29e4f64ea79b7c645" args="(ldns_buffer *buffer, const ldns_rr *rr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rr_rdata2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *&#160;</td>
          <td class="paramname"><em>rr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts an rr's rdata to wireformat, while excluding the ownername and all the stuff before the rdata. </p>
<p>This is needed in DNSSEC keytag calculation, the ds calcalution from the key and maybe elsewhere.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer where to put the result </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*rr</td><td>rr to operate on </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00215">215</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="host2wire_8c_source.html#l00036">ldns_rdf2buffer_wire()</a>, <a class="el" href="rr_8c_source.html#l00867">ldns_rr_rd_count()</a>, and <a class="el" href="rr_8c_source.html#l00839">ldns_rr_rdf()</a>.</p>

</div>
</div>
<a class="anchor" id="aa40d4e3f29ccf46535901c5d5010054b"></a><!-- doxytag: member="host2wire.c::ldns_pkt2buffer_wire" ref="aa40d4e3f29ccf46535901c5d5010054b" args="(ldns_buffer *buffer, const ldns_pkt *packet)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_pkt2buffer_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> *&#160;</td>
          <td class="paramname"><em>pkt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the packet data to the buffer in wire format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>buffer to append the result to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*pkt</td><td>packet to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ldns_status </dd></dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00268">268</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="packet_8h_source.html#l00257">ldns_struct_pkt::_edns_data</a>, <a class="el" href="packet_8c_source.html#l00141">ldns_pkt_additional()</a>, <a class="el" href="packet_8c_source.html#l00129">ldns_pkt_answer()</a>, <a class="el" href="packet_8c_source.html#l00135">ldns_pkt_authority()</a>, <a class="el" href="packet_8c_source.html#l00712">ldns_pkt_edns()</a>, <a class="el" href="packet_8c_source.html#l00212">ldns_pkt_edns_extended_rcode()</a>, <a class="el" href="packet_8c_source.html#l00206">ldns_pkt_edns_udp_size()</a>, <a class="el" href="packet_8c_source.html#l00218">ldns_pkt_edns_version()</a>, <a class="el" href="packet_8c_source.html#l00224">ldns_pkt_edns_z()</a>, <a class="el" href="packet_8c_source.html#l00123">ldns_pkt_question()</a>, <a class="el" href="packet_8c_source.html#l00444">ldns_pkt_tsig()</a>, <a class="el" href="rdata_8c_source.html#l00249">ldns_rdf_new_frm_str()</a>, <a class="el" href="rdata_8h_source.html#l00049">LDNS_RDF_TYPE_DNAME</a>, <a class="el" href="host2wire_8c_source.html#l00159">ldns_rr2buffer_wire()</a>, <a class="el" href="rr_8c_source.html#l00075">ldns_rr_free()</a>, <a class="el" href="rr_8c_source.html#l00920">ldns_rr_list_rr()</a>, <a class="el" href="rr_8c_source.html#l00887">ldns_rr_list_rr_count()</a>, <a class="el" href="rr_8c_source.html#l00024">ldns_rr_new()</a>, <a class="el" href="rr_8c_source.html#l00810">ldns_rr_pop_rdf()</a>, <a class="el" href="rr_8c_source.html#l00787">ldns_rr_push_rdf()</a>, <a class="el" href="rr_8c_source.html#l00764">ldns_rr_set_class()</a>, <a class="el" href="rr_8c_source.html#l00734">ldns_rr_set_owner()</a>, <a class="el" href="rr_8c_source.html#l00746">ldns_rr_set_ttl()</a>, <a class="el" href="rr_8c_source.html#l00758">ldns_rr_set_type()</a>, <a class="el" href="rr_8h_source.html#l00163">LDNS_RR_TYPE_OPT</a>, <a class="el" href="packet_8h_source.html#l00276">LDNS_SECTION_ADDITIONAL</a>, <a class="el" href="packet_8h_source.html#l00274">LDNS_SECTION_ANSWER</a>, <a class="el" href="packet_8h_source.html#l00275">LDNS_SECTION_AUTHORITY</a>, <a class="el" href="packet_8h_source.html#l00273">LDNS_SECTION_QUESTION</a>, <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>, and <a class="el" href="error_8h_source.html#l00026">LDNS_STATUS_OK</a>.</p>

</div>
</div>
<a class="anchor" id="a772e160d3d0c4eefc02c59107e19f09a"></a><!-- doxytag: member="host2wire.c::ldns_rdf2wire" ref="a772e160d3d0c4eefc02c59107e19f09a" args="(uint8_t **dest, const ldns_rdf *rdf, size_t *result_size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rdf2wire </td>
          <td>(</td>
          <td class="paramtype">uint8_t **&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *&#160;</td>
          <td class="paramname"><em>rdf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocates an array of uint8_t at dest, and puts the wireformat of the given rdf in that array. </p>
<p>The result_size value contains the length of the array, if it succeeds, and 0 otherwise (in which case the function also returns NULL)</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">dest</td><td>pointer to the array of bytes to be created </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rdf</td><td>the rdata field to convert </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">size</td><td>the size of the converted result </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00340">340</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00149">ldns_buffer_export()</a>, <a class="el" href="buffer_8c_source.html#l00137">ldns_buffer_free()</a>, <a class="el" href="buffer_8c_source.html#l00016">ldns_buffer_new()</a>, <a class="el" href="packet_8h_source.html#l00024">LDNS_MAX_PACKETLEN</a>, <a class="el" href="host2wire_8c_source.html#l00036">ldns_rdf2buffer_wire()</a>, <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>, <a class="el" href="error_8h_source.html#l00026">LDNS_STATUS_OK</a>, and <a class="el" href="util_8h_source.html#l00051">LDNS_XMALLOC</a>.</p>

</div>
</div>
<a class="anchor" id="aae486b38af7f9bb7997c8291c44adba7"></a><!-- doxytag: member="host2wire.c::ldns_rr2wire" ref="aae486b38af7f9bb7997c8291c44adba7" args="(uint8_t **dest, const ldns_rr *rr, int section, size_t *result_size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_rr2wire </td>
          <td>(</td>
          <td class="paramtype">uint8_t **&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *&#160;</td>
          <td class="paramname"><em>rr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocates an array of uint8_t at dest, and puts the wireformat of the given rr in that array. </p>
<p>The result_size value contains the length of the array, if it succeeds, and 0 otherwise (in which case the function also returns NULL)</p>
<p>If the section argument is LDNS_SECTION_QUESTION, data like ttl and rdata are not put into the result</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">dest</td><td>pointer to the array of bytes to be created </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rr</td><td>the rr to convert </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">size</td><td>the size of the converted result </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00372">372</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00149">ldns_buffer_export()</a>, <a class="el" href="buffer_8c_source.html#l00137">ldns_buffer_free()</a>, <a class="el" href="buffer_8c_source.html#l00016">ldns_buffer_new()</a>, <a class="el" href="packet_8h_source.html#l00024">LDNS_MAX_PACKETLEN</a>, <a class="el" href="host2wire_8c_source.html#l00159">ldns_rr2buffer_wire()</a>, <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>, <a class="el" href="error_8h_source.html#l00026">LDNS_STATUS_OK</a>, and <a class="el" href="util_8h_source.html#l00051">LDNS_XMALLOC</a>.</p>

</div>
</div>
<a class="anchor" id="a2e9c17a2c51bbe8c8a41527211e7157c"></a><!-- doxytag: member="host2wire.c::ldns_pkt2wire" ref="a2e9c17a2c51bbe8c8a41527211e7157c" args="(uint8_t **dest, const ldns_pkt *packet, size_t *result_size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> ldns_pkt2wire </td>
          <td>(</td>
          <td class="paramtype">uint8_t **&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocates an array of uint8_t at dest, and puts the wireformat of the given packet in that array. </p>
<p>The result_size value contains the length of the array, if it succeeds, and 0 otherwise (in which case the function also returns NULL) </p>

<p>Definition at line <a class="el" href="host2wire_8c_source.html#l00404">404</a> of file <a class="el" href="host2wire_8c_source.html">host2wire.c</a>.</p>

<p>References <a class="el" href="buffer_8c_source.html#l00149">ldns_buffer_export()</a>, <a class="el" href="buffer_8c_source.html#l00137">ldns_buffer_free()</a>, <a class="el" href="buffer_8c_source.html#l00016">ldns_buffer_new()</a>, <a class="el" href="packet_8h_source.html#l00024">LDNS_MAX_PACKETLEN</a>, <a class="el" href="host2wire_8c_source.html#l00268">ldns_pkt2buffer_wire()</a>, <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>, <a class="el" href="error_8h_source.html#l00026">LDNS_STATUS_OK</a>, and <a class="el" href="util_8h_source.html#l00051">LDNS_XMALLOC</a>.</p>

</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>