<!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><a href="annotated.html"><span>Data 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 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="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">host2wire.h File Reference</div> </div> </div> <div class="contents"> <p>Contains all functions to translate the main structures to wire format. <a href="#details">More...</a></p> <p><a href="host2wire_8h_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> </td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8h.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"> </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> </td><td class="memItemRight" valign="bottom"><a class="el" href="host2wire_8h.html#a8b4eae0e0e47d5657601c2ceeebc9659">ldns_rdf2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *rdf)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copies the rdata data to the buffer in wire format. <a href="#a8b4eae0e0e47d5657601c2ceeebc9659"></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="host2wire_8h.html#a3567d4ea2655e28c47589e3b49f0e40e">ldns_rdf2buffer_wire_canonical</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *rdf)</td></tr> <tr><td class="mdescLeft"> </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="#a3567d4ea2655e28c47589e3b49f0e40e"></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="host2wire_8h.html#a0d1d310bdcc8e37ce8e55657a7a4af29">ldns_rr2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, int section)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copies the rr data to the buffer in wire format. <a href="#a0d1d310bdcc8e37ce8e55657a7a4af29"></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="host2wire_8h.html#aadcaa906616c4888c982976954b62439">ldns_rr2buffer_wire_canonical</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, int section)</td></tr> <tr><td class="mdescLeft"> </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="#aadcaa906616c4888c982976954b62439"></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="host2wire_8h.html#a57553bca83cb9682601ede43af9c111a">ldns_rrsig2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *sigrr)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Converts a rrsig to wireformat BUT EXCLUDE the rrsig rdata This is needed in DNSSEC verification. <a href="#a57553bca83cb9682601ede43af9c111a"></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="host2wire_8h.html#a9d68c3572cc580deffdcdc61008dee95">ldns_rr_rdata2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an rr's rdata to wireformat, while excluding the ownername and all the stuff before the rdata. <a href="#a9d68c3572cc580deffdcdc61008dee95"></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="host2wire_8h.html#a9866cf8090cac3ad261fe33175650ab4">ldns_pkt2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> *pkt)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copies the packet data to the buffer in wire format. <a href="#a9866cf8090cac3ad261fe33175650ab4"></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="host2wire_8h.html#ac188c8c9412516a0de1ea67e59f675ac">ldns_rr_list2buffer_wire</a> (<a class="el" href="structldns__struct__buffer.html">ldns_buffer</a> *output, const <a class="el" href="structldns__struct__rr__list.html">ldns_rr_list</a> *rrlist)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copies the rr_list data to the buffer in wire format. <a href="#ac188c8c9412516a0de1ea67e59f675ac"></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="host2wire_8h.html#a341467e46bb095c77e5ae9a5414adcbe">ldns_rdf2wire</a> (uint8_t **dest, const <a class="el" href="structldns__struct__rdf.html">ldns_rdf</a> *rdf, size_t *size)</td></tr> <tr><td class="mdescLeft"> </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="#a341467e46bb095c77e5ae9a5414adcbe"></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="host2wire_8h.html#a2a3f675a9c1fcc8ff6955a896d13a48e">ldns_rr2wire</a> (uint8_t **dest, const <a class="el" href="structldns__struct__rr.html">ldns_rr</a> *rr, int, size_t *size)</td></tr> <tr><td class="mdescLeft"> </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="#a2a3f675a9c1fcc8ff6955a896d13a48e"></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="host2wire_8h.html#a1d98c8566d3236fe5c727d8e64639b4b">ldns_pkt2wire</a> (uint8_t **dest, const <a class="el" href="structldns__struct__pkt.html">ldns_pkt</a> *p, size_t *size)</td></tr> <tr><td class="mdescLeft"> </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="#a1d98c8566d3236fe5c727d8e64639b4b"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Contains all functions to translate the main structures to wire format. </p> <p>Definition in file <a class="el" href="host2wire_8h_source.html">host2wire.h</a>.</p> </div><hr/><h2>Function Documentation</h2> <a class="anchor" id="aa84f3dd72e98883b193e332ce7bbf9ab"></a><!-- doxytag: member="host2wire.h::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> * </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> * </td> <td class="paramname"><em>name</em> </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="a8b4eae0e0e47d5657601c2ceeebc9659"></a><!-- doxytag: member="host2wire.h::ldns_rdf2buffer_wire" ref="a8b4eae0e0e47d5657601c2ceeebc9659" args="(ldns_buffer *output, 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> * </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> * </td> <td class="paramname"><em>rdf</em> </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="a3567d4ea2655e28c47589e3b49f0e40e"></a><!-- doxytag: member="host2wire.h::ldns_rdf2buffer_wire_canonical" ref="a3567d4ea2655e28c47589e3b49f0e40e" args="(ldns_buffer *output, 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> * </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> * </td> <td class="paramname"><em>rdf</em> </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="a0d1d310bdcc8e37ce8e55657a7a4af29"></a><!-- doxytag: member="host2wire.h::ldns_rr2buffer_wire" ref="a0d1d310bdcc8e37ce8e55657a7a4af29" args="(ldns_buffer *output, 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> * </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> * </td> <td class="paramname"><em>rr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>section</em> </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="aadcaa906616c4888c982976954b62439"></a><!-- doxytag: member="host2wire.h::ldns_rr2buffer_wire_canonical" ref="aadcaa906616c4888c982976954b62439" args="(ldns_buffer *output, 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> * </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> * </td> <td class="paramname"><em>rr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>section</em> </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="a57553bca83cb9682601ede43af9c111a"></a><!-- doxytag: member="host2wire.h::ldns_rrsig2buffer_wire" ref="a57553bca83cb9682601ede43af9c111a" args="(ldns_buffer *output, const ldns_rr *sigrr)" --> <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> * </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> * </td> <td class="paramname"><em>sigrr</em> </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="a9d68c3572cc580deffdcdc61008dee95"></a><!-- doxytag: member="host2wire.h::ldns_rr_rdata2buffer_wire" ref="a9d68c3572cc580deffdcdc61008dee95" args="(ldns_buffer *output, 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> * </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> * </td> <td class="paramname"><em>rr</em> </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="a9866cf8090cac3ad261fe33175650ab4"></a><!-- doxytag: member="host2wire.h::ldns_pkt2buffer_wire" ref="a9866cf8090cac3ad261fe33175650ab4" args="(ldns_buffer *output, const ldns_pkt *pkt)" --> <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> * </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> * </td> <td class="paramname"><em>pkt</em> </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="ac188c8c9412516a0de1ea67e59f675ac"></a><!-- doxytag: member="host2wire.h::ldns_rr_list2buffer_wire" ref="ac188c8c9412516a0de1ea67e59f675ac" args="(ldns_buffer *output, const ldns_rr_list *rrlist)" --> <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> * </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> * </td> <td class="paramname"><em>rrlist</em> </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="a341467e46bb095c77e5ae9a5414adcbe"></a><!-- doxytag: member="host2wire.h::ldns_rdf2wire" ref="a341467e46bb095c77e5ae9a5414adcbe" args="(uint8_t **dest, const ldns_rdf *rdf, size_t *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 ** </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> * </td> <td class="paramname"><em>rdf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>size</em> </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="a2a3f675a9c1fcc8ff6955a896d13a48e"></a><!-- doxytag: member="host2wire.h::ldns_rr2wire" ref="a2a3f675a9c1fcc8ff6955a896d13a48e" args="(uint8_t **dest, const ldns_rr *rr, int, size_t *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 ** </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> * </td> <td class="paramname"><em>rr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>size</em> </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="a1d98c8566d3236fe5c727d8e64639b4b"></a><!-- doxytag: member="host2wire.h::ldns_pkt2wire" ref="a1d98c8566d3236fe5c727d8e64639b4b" args="(uint8_t **dest, const ldns_pkt *p, size_t *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 ** </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> * </td> <td class="paramname"><em>p</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>size</em> </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  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>