lwres_getrrsetbyname.html revision 4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - Copyright (C) 2000, 2001 Internet Software Consortium.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - Permission to use, copy, modify, and/or distribute this software for any
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - purpose with or without fee is hereby granted, provided that the above
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - copyright notice and this permission notice appear in all copies.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw - PERFORMANCE OF THIS SOFTWARE.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw<!-- $Id: lwres_getrrsetbyname.html,v 1.24 2009/07/11 01:12:46 tbox Exp $ -->
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c586600796766c83eb9485c446886fd9ed2359a9Keyur Desai<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami<p>lwres_getrrsetbyname, lwres_freerrset — retrieve DNS records</p>
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami<pre class="funcsynopsisinfo">#include <lwres/netdb.h></pre>
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami<b class="fsfunc">lwres_getrrsetbyname</b>(</code></td>
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States<td>struct rrsetinfo **�</td>
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown<var class="pdparam">res</var><code>)</code>;</td>
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown<b class="fsfunc">lwres_freerrset</b>(</code></td>
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw The following structures are used:
c5c4113dfcabb1eed3d4bdf7609de5170027a794nwstruct rdatainfo {
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rdi_length; /* length of data */
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw unsigned char *rdi_data; /* record data */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brownstruct rrsetinfo {
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rri_flags; /* RRSET_VALIDATED... */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rri_rdclass; /* class number */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rri_rdtype; /* RR type number */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rri_ttl; /* time to live */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rri_nrdatas; /* size of rdatas array */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown unsigned int rri_nsigs; /* size of sigs array */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown char *rri_name; /* canonical name */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown struct rdatainfo *rri_rdatas; /* individual records */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown struct rdatainfo *rri_sigs; /* individual signatures */
8e22821528b08c6dba4e8176351560f316f6d0dedm gets a set of resource records associated with a
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <em class="parameter"><code>hostname</code></em>, <em class="parameter"><code>class</code></em>,
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown and <em class="parameter"><code>type</code></em>.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <em class="parameter"><code>hostname</code></em> is a pointer a to
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown null-terminated string. The <em class="parameter"><code>flags</code></em> field
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown is currently unused and must be zero.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown After a successful call to
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="function">lwres_getrrsetbyname()</code>,
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <em class="parameter"><code>*res</code></em> is a pointer to an
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <span class="type">rrsetinfo</span> structure, containing a list of one or
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown more <span class="type">rdatainfo</span> structures containing resource
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown records and potentially another list of <span class="type">rdatainfo</span>
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown structures containing SIG resource records associated with those
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown records. The members <code class="constant">rri_rdclass</code> and
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="constant">rri_rdtype</code> are copied from the parameters.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="constant">rri_ttl</code> and <code class="constant">rri_name</code>
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States are properties of the obtained rrset. The resource records
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown contained in <code class="constant">rri_rdatas</code> and
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="constant">rri_sigs</code> are in uncompressed DNS wire
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown format. Properties of the rdataset are represented in the
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="constant">rri_flags</code> bitfield. If the RRSET_VALIDATED
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown bit is set, the data has been DNSSEC validated and the
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown signatures verified.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown All of the information returned by
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="function">lwres_getrrsetbyname()</code> is dynamically
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown allocated: the <code class="constant">rrsetinfo</code> and
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="constant">rdatainfo</code> structures, and the canonical
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown host name strings pointed to by the
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown <code class="constant">rrsetinfo</code>structure.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw Memory allocated for the dynamically allocated structures
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw created by a successful call to