Sophie

Sophie

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

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="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">wire2host.c File Reference</div>  </div>
</div>
<div class="contents">

<p><a href="wire2host_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wire2host_8c.html#a542d428bf1d4a080c332e6291e2cadf0">LDNS_STATUS_CHECK_RETURN</a>(st)&#160;&#160;&#160;{if (st != LDNS_STATUS_OK) { return st; }}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wire2host_8c.html#a89509cf0223950762a81638f0a826713">LDNS_STATUS_CHECK_GOTO</a>(st, label)&#160;&#160;&#160;{if (st != LDNS_STATUS_OK) { /*printf(&quot;STG %s:%d: status code %d\n&quot;, __FILE__, __LINE__, st);*/  goto label; }}</td></tr>
<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="wire2host_8c.html#a3bf2a93cc61e3942288ebb8b803e4ce9">ldns_wire2dname</a> (<a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> **dname, const uint8_t *wire, size_t max, size_t *pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">converts the data on the uint8_t bytearray (in wire format) to a DNS dname rdata field.  <a href="#a3bf2a93cc61e3942288ebb8b803e4ce9"></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="wire2host_8c.html#a75fe7ca2ee5f51b9c8ab14a37a491d43">ldns_wire2rdf</a> (<a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, const uint8_t *wire, size_t max, size_t *pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">converts the data on the uint8_t bytearray (in wire format) to DNS rdata fields, and adds them to the list of rdfs of the given rr.  <a href="#a75fe7ca2ee5f51b9c8ab14a37a491d43"></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="wire2host_8c.html#a5e32cefa04dd6b44e342556c46d4f02f">ldns_wire2rr</a> (<a class="el" href="structldns__struct__rr.html">ldns_rr</a> **rr_p, const uint8_t *wire, size_t max, size_t *pos, <a class="el" href="packet_8h.html#a9d9ba3c95f003511a16f9a6236661bc9">ldns_pkt_section</a> section)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">converts the data on the uint8_t bytearray (in wire format) to a DNS resource record.  <a href="#a5e32cefa04dd6b44e342556c46d4f02f"></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="wire2host_8c.html#aa860408131e728fcf258385c8fd4c324">ldns_buffer2pkt_wire</a> (<a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> **packet, <a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">converts the data on the uint8_t bytearray (in wire format) to a DNS packet.  <a href="#aa860408131e728fcf258385c8fd4c324"></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="wire2host_8c.html#a97a3e0f9c50711f7dcaa5850c6356e09">ldns_wire2pkt</a> (<a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> **packet_p, const uint8_t *wire, size_t max)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">converts the data on the uint8_t bytearray (in wire format) to a DNS packet.  <a href="#a97a3e0f9c50711f7dcaa5850c6356e09"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a542d428bf1d4a080c332e6291e2cadf0"></a><!-- doxytag: member="wire2host.c::LDNS_STATUS_CHECK_RETURN" ref="a542d428bf1d4a080c332e6291e2cadf0" args="(st)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LDNS_STATUS_CHECK_RETURN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">st</td><td>)</td>
          <td>&#160;&#160;&#160;{if (st != LDNS_STATUS_OK) { return st; }}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00152">152</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

</div>
</div>
<a class="anchor" id="a89509cf0223950762a81638f0a826713"></a><!-- doxytag: member="wire2host.c::LDNS_STATUS_CHECK_GOTO" ref="a89509cf0223950762a81638f0a826713" args="(st, label)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LDNS_STATUS_CHECK_GOTO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">st, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">label&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;{if (st != LDNS_STATUS_OK) { /*printf(&quot;STG %s:%d: status code %d\n&quot;, __FILE__, __LINE__, st);*/  goto label; }}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00153">153</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3bf2a93cc61e3942288ebb8b803e4ce9"></a><!-- doxytag: member="wire2host.c::ldns_wire2dname" ref="a3bf2a93cc61e3942288ebb8b803e4ce9" args="(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos)" -->
<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_wire2dname </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> **&#160;</td>
          <td class="paramname"><em>dname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>wire</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>converts the data on the uint8_t bytearray (in wire format) to a DNS dname rdata field. </p>
<p>This function will initialize and allocate memory space for the dname structure. The length of the wiredata of this rdf is added to the *pos value.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dname</td><td>pointer to the structure to hold the rdata value </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">wire</td><td>pointer to the buffer with the data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">max</td><td>the length of the data buffer (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>the position of the rdf in the buffer (ie. the number of bytes from the start of the buffer) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>LDNS_STATUS_OK if everything succeeds, error otherwise </dd></dl>

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00056">56</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

<p>References <a class="el" href="rr_8h_source.html#l00033">LDNS_MAX_DOMAINLEN</a>, <a class="el" href="rr_8h_source.html#l00031">LDNS_MAX_LABELLEN</a>, <a class="el" href="rr_8h_source.html#l00035">LDNS_MAX_POINTERS</a>, <a class="el" href="rdata_8c_source.html#l00193">ldns_rdf_new_frm_data()</a>, <a class="el" href="rdata_8h_source.html#l00049">LDNS_RDF_TYPE_DNAME</a>, <a class="el" href="error_8h_source.html#l00029">LDNS_STATUS_DOMAINNAME_OVERFLOW</a>, <a class="el" href="error_8h_source.html#l00033">LDNS_STATUS_INVALID_POINTER</a>, <a class="el" href="error_8h_source.html#l00028">LDNS_STATUS_LABEL_OVERFLOW</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="error_8h_source.html#l00032">LDNS_STATUS_PACKET_OVERFLOW</a>.</p>

</div>
</div>
<a class="anchor" id="a75fe7ca2ee5f51b9c8ab14a37a491d43"></a><!-- doxytag: member="wire2host.c::ldns_wire2rdf" ref="a75fe7ca2ee5f51b9c8ab14a37a491d43" args="(ldns_rr *rr, const uint8_t *wire, size_t max, size_t *pos)" -->
<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_wire2rdf </td>
          <td>(</td>
          <td class="paramtype"><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">const uint8_t *&#160;</td>
          <td class="paramname"><em>wire</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>converts the data on the uint8_t bytearray (in wire format) to DNS rdata fields, and adds them to the list of rdfs of the given rr. </p>
<p>This function will initialize and allocate memory space for the dname structures. The length of the wiredata of these rdfs is added to the *pos value.</p>
<p>All rdfs belonging to the RR are read; the rr should have no rdfs yet. An error is returned if the format cannot be parsed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rr</td><td>pointer to the ldns_rr structure to hold the rdata value </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">wire</td><td>pointer to the buffer with the data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">max</td><td>the length of the data buffer (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>the position of the rdf in the buffer (ie. the number of bytes from the start of the buffer) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>LDNS_STATUS_OK if everything succeeds, error otherwise </dd></dl>

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00156">156</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

<p>References <a class="el" href="rdata_8c_source.html#l00179">ldns_rdf_new()</a>, <a class="el" href="rdata_8h_source.html#l00037">LDNS_RDF_SIZE_16BYTES</a>, <a class="el" href="rdata_8h_source.html#l00036">LDNS_RDF_SIZE_6BYTES</a>, <a class="el" href="rdata_8h_source.html#l00033">LDNS_RDF_SIZE_BYTE</a>, <a class="el" href="rdata_8h_source.html#l00035">LDNS_RDF_SIZE_DOUBLEWORD</a>, <a class="el" href="rdata_8h_source.html#l00034">LDNS_RDF_SIZE_WORD</a>, <a class="el" href="rdata_8h_source.html#l00057">LDNS_RDF_TYPE_A</a>, <a class="el" href="rdata_8h_source.html#l00059">LDNS_RDF_TYPE_AAAA</a>, <a class="el" href="rdata_8h_source.html#l00079">LDNS_RDF_TYPE_ALG</a>, <a class="el" href="rdata_8h_source.html#l00063">LDNS_RDF_TYPE_APL</a>, <a class="el" href="rdata_8h_source.html#l00101">LDNS_RDF_TYPE_ATMA</a>, <a class="el" href="rdata_8h_source.html#l00065">LDNS_RDF_TYPE_B32_EXT</a>, <a class="el" href="rdata_8h_source.html#l00067">LDNS_RDF_TYPE_B64</a>, <a class="el" href="rdata_8h_source.html#l00077">LDNS_RDF_TYPE_CERT_ALG</a>, <a class="el" href="rdata_8h_source.html#l00075">LDNS_RDF_TYPE_CLASS</a>, <a class="el" href="rdata_8h_source.html#l00049">LDNS_RDF_TYPE_DNAME</a>, <a class="el" href="rdata_8h_source.html#l00069">LDNS_RDF_TYPE_HEX</a>, <a class="el" href="rdata_8h_source.html#l00053">LDNS_RDF_TYPE_INT16</a>, <a class="el" href="rdata_8h_source.html#l00091">LDNS_RDF_TYPE_INT16_DATA</a>, <a class="el" href="rdata_8h_source.html#l00055">LDNS_RDF_TYPE_INT32</a>, <a class="el" href="rdata_8h_source.html#l00051">LDNS_RDF_TYPE_INT8</a>, <a class="el" href="rdata_8h_source.html#l00103">LDNS_RDF_TYPE_IPSECKEY</a>, <a class="el" href="rdata_8h_source.html#l00095">LDNS_RDF_TYPE_LOC</a>, <a class="el" href="rdata_8h_source.html#l00047">LDNS_RDF_TYPE_NONE</a>, <a class="el" href="rdata_8h_source.html#l00099">LDNS_RDF_TYPE_NSAP</a>, <a class="el" href="rdata_8h_source.html#l00071">LDNS_RDF_TYPE_NSEC</a>, <a class="el" href="rdata_8h_source.html#l00107">LDNS_RDF_TYPE_NSEC3_NEXT_OWNER</a>, <a class="el" href="rdata_8h_source.html#l00105">LDNS_RDF_TYPE_NSEC3_SALT</a>, <a class="el" href="rdata_8h_source.html#l00085">LDNS_RDF_TYPE_PERIOD</a>, <a class="el" href="rdata_8h_source.html#l00093">LDNS_RDF_TYPE_SERVICE</a>, <a class="el" href="rdata_8h_source.html#l00061">LDNS_RDF_TYPE_STR</a>, <a class="el" href="rdata_8h_source.html#l00083">LDNS_RDF_TYPE_TIME</a>, <a class="el" href="rdata_8h_source.html#l00088">LDNS_RDF_TYPE_TSIG</a>, <a class="el" href="rdata_8h_source.html#l00087">LDNS_RDF_TYPE_TSIGTIME</a>, <a class="el" href="rdata_8h_source.html#l00073">LDNS_RDF_TYPE_TYPE</a>, <a class="el" href="rdata_8h_source.html#l00081">LDNS_RDF_TYPE_UNKNOWN</a>, <a class="el" href="rdata_8h_source.html#l00097">LDNS_RDF_TYPE_WKS</a>, <a class="el" href="rr_8c_source.html#l02269">ldns_rr_descript()</a>, <a class="el" href="rr_8c_source.html#l02313">ldns_rr_descriptor_field_type()</a>, <a class="el" href="rr_8c_source.html#l02298">ldns_rr_descriptor_maximum()</a>, <a class="el" href="rr_8c_source.html#l00873">ldns_rr_get_type()</a>, <a class="el" href="rr_8c_source.html#l00787">ldns_rr_push_rdf()</a>, <a class="el" href="wire2host_8c_source.html#l00152">LDNS_STATUS_CHECK_RETURN</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>, <a class="el" href="error_8h_source.html#l00032">LDNS_STATUS_PACKET_OVERFLOW</a>, <a class="el" href="wire2host_8c_source.html#l00056">ldns_wire2dname()</a>, and <a class="el" href="util_8h_source.html#l00051">LDNS_XMALLOC</a>.</p>

</div>
</div>
<a class="anchor" id="a5e32cefa04dd6b44e342556c46d4f02f"></a><!-- doxytag: member="wire2host.c::ldns_wire2rr" ref="a5e32cefa04dd6b44e342556c46d4f02f" args="(ldns_rr **rr_p, const uint8_t *wire, size_t max, size_t *pos, ldns_pkt_section 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_wire2rr </td>
          <td>(</td>
          <td class="paramtype"><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">const uint8_t *&#160;</td>
          <td class="paramname"><em>wire</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="packet_8h.html#a9d9ba3c95f003511a16f9a6236661bc9">ldns_pkt_section</a>&#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>converts the data on the uint8_t bytearray (in wire format) to a DNS resource record. </p>
<p>This function will initialize and allocate memory space for the rr structure. The length of the wiredata of this rr is added to the *pos value.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rr</td><td>pointer to the structure to hold the rdata value </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">wire</td><td>pointer to the buffer with the data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">max</td><td>the length of the data buffer (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>the position of the rr in the buffer (ie. the number of bytes from the start of the buffer) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">section</td><td>the section in the packet the rr is meant for </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>LDNS_STATUS_OK if everything succeeds, error otherwise </dd></dl>

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00285">285</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

<p>References <a class="el" href="rr_8c_source.html#l00075">ldns_rr_free()</a>, <a class="el" href="rr_8c_source.html#l00024">ldns_rr_new()</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#l00740">ldns_rr_set_question()</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="packet_8h_source.html#l00273">LDNS_SECTION_QUESTION</a>, <a class="el" href="wire2host_8c_source.html#l00153">LDNS_STATUS_CHECK_GOTO</a>, <a class="el" href="error_8h_source.html#l00026">LDNS_STATUS_OK</a>, <a class="el" href="error_8h_source.html#l00032">LDNS_STATUS_PACKET_OVERFLOW</a>, <a class="el" href="wire2host_8c_source.html#l00056">ldns_wire2dname()</a>, and <a class="el" href="wire2host_8c_source.html#l00156">ldns_wire2rdf()</a>.</p>

</div>
</div>
<a class="anchor" id="aa860408131e728fcf258385c8fd4c324"></a><!-- doxytag: member="wire2host.c::ldns_buffer2pkt_wire" ref="aa860408131e728fcf258385c8fd4c324" args="(ldns_pkt **packet, ldns_buffer *buffer)" -->
<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_buffer2pkt_wire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> **&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>converts the data on the uint8_t bytearray (in wire format) to a DNS packet. </p>
<p>This function will initialize and allocate memory space for the packet structure.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>pointer to the structure to hold the packet </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>the buffer with the data </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>LDNS_STATUS_OK if everything succeeds, error otherwise </dd></dl>

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00361">361</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

<p>References <a class="el" href="wire2host_8c_source.html#l00370">ldns_wire2pkt()</a>.</p>

</div>
</div>
<a class="anchor" id="a97a3e0f9c50711f7dcaa5850c6356e09"></a><!-- doxytag: member="wire2host.c::ldns_wire2pkt" ref="a97a3e0f9c50711f7dcaa5850c6356e09" args="(ldns_pkt **packet_p, const uint8_t *wire, size_t max)" -->
<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_wire2pkt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> **&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>converts the data on the uint8_t bytearray (in wire format) to a DNS packet. </p>
<p>This function will initialize and allocate memory space for the packet structure.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>pointer to the structure to hold the packet </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>pointer to the buffer with the data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>the length of the data buffer (in bytes) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>LDNS_STATUS_OK if everything succeeds, error otherwise </dd></dl>

<p>Definition at line <a class="el" href="wire2host_8c_source.html#l00370">370</a> of file <a class="el" href="wire2host_8c_source.html">wire2host.c</a>.</p>

<p>References <a class="el" href="packet_8c_source.html#l00141">ldns_pkt_additional()</a>, <a class="el" href="packet_8c_source.html#l00105">ldns_pkt_ancount()</a>, <a class="el" href="packet_8c_source.html#l00129">ldns_pkt_answer()</a>, <a class="el" href="packet_8c_source.html#l00117">ldns_pkt_arcount()</a>, <a class="el" href="packet_8c_source.html#l00135">ldns_pkt_authority()</a>, <a class="el" href="packet_8c_source.html#l00776">ldns_pkt_free()</a>, <a class="el" href="packet_8c_source.html#l00724">ldns_pkt_new()</a>, <a class="el" href="packet_8c_source.html#l00111">ldns_pkt_nscount()</a>, <a class="el" href="packet_8c_source.html#l00099">ldns_pkt_qdcount()</a>, <a class="el" href="packet_8c_source.html#l00123">ldns_pkt_question()</a>, <a class="el" href="packet_8c_source.html#l00560">ldns_pkt_set_arcount()</a>, <a class="el" href="packet_8c_source.html#l00615">ldns_pkt_set_edns_data()</a>, <a class="el" href="packet_8c_source.html#l00597">ldns_pkt_set_edns_extended_rcode()</a>, <a class="el" href="packet_8c_source.html#l00591">ldns_pkt_set_edns_udp_size()</a>, <a class="el" href="packet_8c_source.html#l00603">ldns_pkt_set_edns_version()</a>, <a class="el" href="packet_8c_source.html#l00609">ldns_pkt_set_edns_z()</a>, <a class="el" href="packet_8c_source.html#l00585">ldns_pkt_set_size()</a>, <a class="el" href="packet_8c_source.html#l00642">ldns_pkt_set_tsig()</a>, <a class="el" href="rdata_8c_source.html#l00222">ldns_rdf_clone()</a>, <a class="el" href="rr_8c_source.html#l00075">ldns_rr_free()</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#l01062">ldns_rr_list_push_rr()</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#l00163">LDNS_RR_TYPE_OPT</a>, <a class="el" href="rr_8h_source.html#l00192">LDNS_RR_TYPE_TSIG</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="wire2host_8c_source.html#l00153">LDNS_STATUS_CHECK_GOTO</a>, <a class="el" href="error_8h_source.html#l00035">LDNS_STATUS_INTERNAL_ERR</a>, <a class="el" href="error_8h_source.html#l00026">LDNS_STATUS_OK</a>, <a class="el" href="error_8h_source.html#l00032">LDNS_STATUS_PACKET_OVERFLOW</a>, <a class="el" href="error_8h_source.html#l00076">LDNS_STATUS_WIRE_INCOMPLETE_ADDITIONAL</a>, <a class="el" href="error_8h_source.html#l00074">LDNS_STATUS_WIRE_INCOMPLETE_ANSWER</a>, <a class="el" href="error_8h_source.html#l00075">LDNS_STATUS_WIRE_INCOMPLETE_AUTHORITY</a>, <a class="el" href="error_8h_source.html#l00073">LDNS_STATUS_WIRE_INCOMPLETE_QUESTION</a>, and <a class="el" href="wire2host_8c_source.html#l00285">ldns_wire2rr()</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>