<!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 Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><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="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-attribs">Data Fields</a> </div> <div class="headertitle"> <div class="title">ldns_struct_buffer Struct Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="ldns_struct_buffer" --> <p>implementation of buffers to ease operations <a href="structldns__struct__buffer.html#details">More...</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html#ac62e89526e2292f430cb815620ee2ebb">_position</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The current position used for reading/writing. <a href="#ac62e89526e2292f430cb815620ee2ebb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html#af6eb085e24852584020b4bc5459d4cf5">_limit</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The read/write limit. <a href="#af6eb085e24852584020b4bc5459d4cf5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html#a0e2253a51f3cfb0a8c8b23d288861326">_capacity</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The amount of data the buffer can contain. <a href="#a0e2253a51f3cfb0a8c8b23d288861326"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">uint8_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html#ae4e2615ee600913816488ec2945b85c7">_data</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The data contained in the buffer. <a href="#ae4e2615ee600913816488ec2945b85c7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html#a67628b76dc8f1e174fa5667e2543bf4a">_fixed</a>: 1</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">If the buffer is fixed it cannot be resized. <a href="#a67628b76dc8f1e174fa5667e2543bf4a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structldns__struct__buffer.html#ad19d973074968b399a74f32b6402c05c">_status</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The current state of the buffer. <a href="#ad19d973074968b399a74f32b6402c05c"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>implementation of buffers to ease operations </p> <p>ldns_buffers can contain arbitrary information, per octet. You can write to the current end of a buffer, read from the current position, and access any data within it.</p> <p>Example use of buffers is in the source code of <a class="el" href="host2str_8c.html">host2str.c</a> </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00050">50</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div><hr/><h2>Field Documentation</h2> <a class="anchor" id="ac62e89526e2292f430cb815620ee2ebb"></a><!-- doxytag: member="ldns_struct_buffer::_position" ref="ac62e89526e2292f430cb815620ee2ebb" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t <a class="el" href="structldns__struct__buffer.html#ac62e89526e2292f430cb815620ee2ebb">ldns_struct_buffer::_position</a></td> </tr> </table> </div> <div class="memdoc"> <p>The current position used for reading/writing. </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00053">53</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div> </div> <a class="anchor" id="af6eb085e24852584020b4bc5459d4cf5"></a><!-- doxytag: member="ldns_struct_buffer::_limit" ref="af6eb085e24852584020b4bc5459d4cf5" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t <a class="el" href="structldns__struct__buffer.html#af6eb085e24852584020b4bc5459d4cf5">ldns_struct_buffer::_limit</a></td> </tr> </table> </div> <div class="memdoc"> <p>The read/write limit. </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00056">56</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div> </div> <a class="anchor" id="a0e2253a51f3cfb0a8c8b23d288861326"></a><!-- doxytag: member="ldns_struct_buffer::_capacity" ref="a0e2253a51f3cfb0a8c8b23d288861326" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t <a class="el" href="structldns__struct__buffer.html#a0e2253a51f3cfb0a8c8b23d288861326">ldns_struct_buffer::_capacity</a></td> </tr> </table> </div> <div class="memdoc"> <p>The amount of data the buffer can contain. </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00059">59</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div> </div> <a class="anchor" id="ae4e2615ee600913816488ec2945b85c7"></a><!-- doxytag: member="ldns_struct_buffer::_data" ref="ae4e2615ee600913816488ec2945b85c7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t* <a class="el" href="structldns__struct__buffer.html#ae4e2615ee600913816488ec2945b85c7">ldns_struct_buffer::_data</a></td> </tr> </table> </div> <div class="memdoc"> <p>The data contained in the buffer. </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00062">62</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div> </div> <a class="anchor" id="a67628b76dc8f1e174fa5667e2543bf4a"></a><!-- doxytag: member="ldns_struct_buffer::_fixed" ref="a67628b76dc8f1e174fa5667e2543bf4a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned <a class="el" href="structldns__struct__buffer.html#a67628b76dc8f1e174fa5667e2543bf4a">ldns_struct_buffer::_fixed</a></td> </tr> </table> </div> <div class="memdoc"> <p>If the buffer is fixed it cannot be resized. </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00065">65</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div> </div> <a class="anchor" id="ad19d973074968b399a74f32b6402c05c"></a><!-- doxytag: member="ldns_struct_buffer::_status" ref="ad19d973074968b399a74f32b6402c05c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="error_8h.html#aaa6d98f86f535cf87b83b89e91f488f9">ldns_status</a> <a class="el" href="structldns__struct__buffer.html#ad19d973074968b399a74f32b6402c05c">ldns_struct_buffer::_status</a></td> </tr> </table> </div> <div class="memdoc"> <p>The current state of the buffer. </p> <p>If writing to the buffer fails for any reason, this value is changed. This way, you can perform multiple writes in sequence and check for success afterwards. </p> <p>Definition at line <a class="el" href="buffer_8h_source.html#l00070">70</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Wed Jan 11 2012 for ldns by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>