Sophie

Sophie

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

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="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">buffer.h File Reference</div>  </div>
</div>
<div class="contents">

<p>This file contains the definition of ldns_buffer, and functions to manipulate those.  
<a href="#details">More...</a></p>

<p><a href="buffer_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html">ldns_struct_buffer</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">implementation of buffers to ease operations  <a href="structldns__struct__buffer.html#details">More...</a><br/></td></tr>
<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="buffer_8h.html#af725b95a81365884b13c31a2f5d4c107">LDNS_MIN_BUFLEN</a>&#160;&#160;&#160;512</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">number of initial bytes in buffer of which we cannot tell the size before hand  <a href="#af725b95a81365884b13c31a2f5d4c107"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structldns__struct__buffer.html">ldns_struct_buffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a18a66fc6cf2cca871542c747e3c95385">ldns_buffer</a></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="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#ac6d413e9a76bf7e7c2022f13e36b9900">ldns_buffer_new</a> (size_t capacity)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a new buffer with the specified capacity.  <a href="#ac6d413e9a76bf7e7c2022f13e36b9900"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a7f33a4c147914739da73ccc4caa2bd7f">ldns_buffer_new_frm_data</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, void *data, size_t size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a buffer with the specified data.  <a href="#a7f33a4c147914739da73ccc4caa2bd7f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a4e16fc0b5f97c6a3d91533c93f8f47c2">ldns_buffer_set_capacity</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, size_t capacity)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">changes the buffer's capacity.  <a href="#a4e16fc0b5f97c6a3d91533c93f8f47c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a8ba0bcb3201dae8d3e563ed201decc7c">ldns_buffer_reserve</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, size_t amount)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">ensures BUFFER can contain at least AMOUNT more bytes.  <a href="#a8ba0bcb3201dae8d3e563ed201decc7c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#ad0bd2ed28633df90c9c99974eaae4b5a">ldns_buffer_printf</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer, const char *format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">prints to the buffer, increasing the capacity if required using buffer_reserve().  <a href="#ad0bd2ed28633df90c9c99974eaae4b5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a1615da957ad5a24a8b5cc1ba2f2b7f44">ldns_buffer_free</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">frees the buffer.  <a href="#a1615da957ad5a24a8b5cc1ba2f2b7f44"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#aedc3ca34290f5faad3cca548bb7125ab">ldns_buffer_export</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *buffer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes the buffer fixed and returns a pointer to the data.  <a href="#aedc3ca34290f5faad3cca548bb7125ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a8aad3e9f377019a428cfd92b0ef6d534">ldns_buffer_copy</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *result, <a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *from)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy contents of the other buffer to this buffer.  <a href="#a8aad3e9f377019a428cfd92b0ef6d534"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This file contains the definition of ldns_buffer, and functions to manipulate those. </p>

<p>Definition in file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="af725b95a81365884b13c31a2f5d4c107"></a><!-- doxytag: member="buffer.h::LDNS_MIN_BUFLEN" ref="af725b95a81365884b13c31a2f5d4c107" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LDNS_MIN_BUFLEN&#160;&#160;&#160;512</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>number of initial bytes in buffer of which we cannot tell the size before hand </p>

<p>Definition at line <a class="el" href="buffer_8h_source.html#l00033">33</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a18a66fc6cf2cca871542c747e3c95385"></a><!-- doxytag: member="buffer.h::ldns_buffer" ref="a18a66fc6cf2cca871542c747e3c95385" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structldns__struct__buffer.html">ldns_struct_buffer</a> <a class="el" href="structldns__struct__buffer.html">ldns_buffer</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="buffer_8h_source.html#l00072">72</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ac6d413e9a76bf7e7c2022f13e36b9900"></a><!-- doxytag: member="buffer.h::ldns_buffer_new" ref="ac6d413e9a76bf7e7c2022f13e36b9900" args="(size_t capacity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a>* ldns_buffer_new </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>capacity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>creates a new buffer with the specified capacity. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">capacity</td><td>the size (in bytes) to allocate for the buffer </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the created buffer </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00016">16</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00059">ldns_struct_buffer::_capacity</a>, <a class="el" href="buffer_8h_source.html#l00062">ldns_struct_buffer::_data</a>, <a class="el" href="buffer_8h_source.html#l00065">ldns_struct_buffer::_fixed</a>, <a class="el" href="buffer_8h_source.html#l00056">ldns_struct_buffer::_limit</a>, <a class="el" href="buffer_8h_source.html#l00053">ldns_struct_buffer::_position</a>, <a class="el" href="buffer_8h_source.html#l00070">ldns_struct_buffer::_status</a>, <a class="el" href="util_8h_source.html#l00060">LDNS_FREE</a>, <a class="el" href="util_8h_source.html#l00049">LDNS_MALLOC</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="a7f33a4c147914739da73ccc4caa2bd7f"></a><!-- doxytag: member="buffer.h::ldns_buffer_new_frm_data" ref="a7f33a4c147914739da73ccc4caa2bd7f" args="(ldns_buffer *buffer, void *data, size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ldns_buffer_new_frm_data </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">void *&#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>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>creates a buffer with the specified data. </p>
<p>The data IS copied and MEMORY allocations are done. The buffer is not fixed and can be resized using buffer_reserve().</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>pointer to the buffer to put the data in </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>the data to encapsulate in the buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>the size of the data </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00041">41</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00059">ldns_struct_buffer::_capacity</a>, <a class="el" href="buffer_8h_source.html#l00062">ldns_struct_buffer::_data</a>, <a class="el" href="buffer_8h_source.html#l00065">ldns_struct_buffer::_fixed</a>, <a class="el" href="buffer_8h_source.html#l00056">ldns_struct_buffer::_limit</a>, <a class="el" href="buffer_8h_source.html#l00053">ldns_struct_buffer::_position</a>, <a class="el" href="buffer_8h_source.html#l00070">ldns_struct_buffer::_status</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="a4e16fc0b5f97c6a3d91533c93f8f47c2"></a><!-- doxytag: member="buffer.h::ldns_buffer_set_capacity" ref="a4e16fc0b5f97c6a3d91533c93f8f47c2" args="(ldns_buffer *buffer, size_t capacity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ldns_buffer_set_capacity </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">size_t&#160;</td>
          <td class="paramname"><em>capacity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>changes the buffer's capacity. </p>
<p>The data is reallocated so any pointers to the data may become invalid. The buffer's limit is set to the buffer's new capacity. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>the buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">capacity</td><td>the capacity to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>whether this failed or succeeded </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00060">60</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00059">ldns_struct_buffer::_capacity</a>, <a class="el" href="buffer_8h_source.html#l00062">ldns_struct_buffer::_data</a>, <a class="el" href="buffer_8h_source.html#l00056">ldns_struct_buffer::_limit</a>, <a class="el" href="buffer_8h_source.html#l00053">ldns_struct_buffer::_position</a>, <a class="el" href="buffer_8h_source.html#l00070">ldns_struct_buffer::_status</a>, <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>, and <a class="el" href="util_8h_source.html#l00057">LDNS_XREALLOC</a>.</p>

</div>
</div>
<a class="anchor" id="a8ba0bcb3201dae8d3e563ed201decc7c"></a><!-- doxytag: member="buffer.h::ldns_buffer_reserve" ref="a8ba0bcb3201dae8d3e563ed201decc7c" args="(ldns_buffer *buffer, size_t amount)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ldns_buffer_reserve </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">size_t&#160;</td>
          <td class="paramname"><em>amount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ensures BUFFER can contain at least AMOUNT more bytes. </p>
<p>The buffer's capacity is increased if necessary using buffer_set_capacity().</p>
<p>The buffer's limit is always set to the (possibly increased) capacity. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>the buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">amount</td><td>amount to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>whether this failed or succeeded </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00079">79</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00059">ldns_struct_buffer::_capacity</a>, <a class="el" href="buffer_8h_source.html#l00065">ldns_struct_buffer::_fixed</a>, <a class="el" href="buffer_8h_source.html#l00056">ldns_struct_buffer::_limit</a>, <a class="el" href="buffer_8h_source.html#l00053">ldns_struct_buffer::_position</a>, <a class="el" href="buffer_8h_source.html#l00070">ldns_struct_buffer::_status</a>, <a class="el" href="buffer_8c_source.html#l00060">ldns_buffer_set_capacity()</a>, and <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>.</p>

</div>
</div>
<a class="anchor" id="ad0bd2ed28633df90c9c99974eaae4b5a"></a><!-- doxytag: member="buffer.h::ldns_buffer_printf" ref="ad0bd2ed28633df90c9c99974eaae4b5a" args="(ldns_buffer *buffer, const char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ldns_buffer_printf </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 char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>prints to the buffer, increasing the capacity if required using buffer_reserve(). </p>
<p>The buffer's position is set to the terminating '\0' Returns the number of characters written (not including the terminating '\0') or -1 on failure. </p>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00099">99</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00059">ldns_struct_buffer::_capacity</a>, <a class="el" href="buffer_8h_source.html#l00056">ldns_struct_buffer::_limit</a>, <a class="el" href="buffer_8h_source.html#l00053">ldns_struct_buffer::_position</a>, <a class="el" href="buffer_8h_source.html#l00070">ldns_struct_buffer::_status</a>, <a class="el" href="buffer_8c_source.html#l00079">ldns_buffer_reserve()</a>, <a class="el" href="error_8h_source.html#l00035">LDNS_STATUS_INTERNAL_ERR</a>, <a class="el" href="error_8h_source.html#l00034">LDNS_STATUS_MEM_ERR</a>, and <a class="el" href="config_8h.html#a90f649eb9607cf5003051e74c60b39a6">vsnprintf()</a>.</p>

</div>
</div>
<a class="anchor" id="a1615da957ad5a24a8b5cc1ba2f2b7f44"></a><!-- doxytag: member="buffer.h::ldns_buffer_free" ref="a1615da957ad5a24a8b5cc1ba2f2b7f44" args="(ldns_buffer *buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ldns_buffer_free </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>frees the buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*buffer</td><td>the buffer to be freed </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00137">137</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00062">ldns_struct_buffer::_data</a>, and <a class="el" href="util_8h_source.html#l00060">LDNS_FREE</a>.</p>

</div>
</div>
<a class="anchor" id="aedc3ca34290f5faad3cca548bb7125ab"></a><!-- doxytag: member="buffer.h::ldns_buffer_export" ref="aedc3ca34290f5faad3cca548bb7125ab" args="(ldns_buffer *buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ldns_buffer_export </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Makes the buffer fixed and returns a pointer to the data. </p>
<p>The caller is responsible for free'ing the result. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*buffer</td><td>the buffer to be exported </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00149">149</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>References <a class="el" href="buffer_8h_source.html#l00062">ldns_struct_buffer::_data</a>, and <a class="el" href="buffer_8h_source.html#l00065">ldns_struct_buffer::_fixed</a>.</p>

</div>
</div>
<a class="anchor" id="a8aad3e9f377019a428cfd92b0ef6d534"></a><!-- doxytag: member="buffer.h::ldns_buffer_copy" ref="a8aad3e9f377019a428cfd92b0ef6d534" args="(ldns_buffer *result, ldns_buffer *from)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ldns_buffer_copy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *&#160;</td>
          <td class="paramname"><em>result</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>from</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy contents of the other buffer to this buffer. </p>
<p>Silently truncated if this buffer is too small. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">*result</td><td>resulting buffer which is copied to. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*from</td><td>what to copy to result. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00167">167</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</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>