diff options
Diffstat (limited to '')
-rw-r--r-- | lib/lwres/man/lwres_getrrsetbyname.html | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/lib/lwres/man/lwres_getrrsetbyname.html b/lib/lwres/man/lwres_getrrsetbyname.html new file mode 100644 index 0000000..0e83121 --- /dev/null +++ b/lib/lwres/man/lwres_getrrsetbyname.html @@ -0,0 +1,204 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- + - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC") + - + - This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. +--> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>lwres_getrrsetbyname</title> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"> +<a name="id-1"></a><div class="titlepage"></div> + + + + + + + + <div class="refnamediv"> +<h2>Name</h2> +<p> + lwres_getrrsetbyname, + lwres_freerrset + — retrieve DNS records + </p> +</div> + <div class="refsynopsisdiv"> +<h2>Synopsis</h2> + <div class="funcsynopsis"> +<pre class="funcsynopsisinfo">#include <lwres/netdb.h></pre> +<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"> +<tr> +<td><code class="funcdef"> +int +<b class="fsfunc">lwres_getrrsetbyname</b>(</code></td> +<td>const char *<var class="pdparam">hostname</var>, </td> +</tr> +<tr> +<td> </td> +<td>unsigned int <var class="pdparam">rdclass</var>, </td> +</tr> +<tr> +<td> </td> +<td>unsigned int <var class="pdparam">rdtype</var>, </td> +</tr> +<tr> +<td> </td> +<td>unsigned int <var class="pdparam">flags</var>, </td> +</tr> +<tr> +<td> </td> +<td>struct rrsetinfo **<var class="pdparam">res</var><code>)</code>;</td> +</tr> +</table> +<div class="funcprototype-spacer"> </div> +<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr> +<td><code class="funcdef"> +void +<b class="fsfunc">lwres_freerrset</b>(</code></td> +<td>struct rrsetinfo *<var class="pdparam">rrset</var><code>)</code>;</td> +</tr></table> +<div class="funcprototype-spacer"> </div> +</div> + + <p> + The following structures are used: + </p> + <pre class="programlisting"> +struct rdatainfo { + unsigned int rdi_length; /* length of data */ + unsigned char *rdi_data; /* record data */ +}; +</pre> +<p> + </p> + <pre class="programlisting"> +struct rrsetinfo { + unsigned int rri_flags; /* RRSET_VALIDATED... */ + unsigned int rri_rdclass; /* class number */ + unsigned int rri_rdtype; /* RR type number */ + unsigned int rri_ttl; /* time to live */ + unsigned int rri_nrdatas; /* size of rdatas array */ + unsigned int rri_nsigs; /* size of sigs array */ + char *rri_name; /* canonical name */ + struct rdatainfo *rri_rdatas; /* individual records */ + struct rdatainfo *rri_sigs; /* individual signatures */ +}; +</pre> +<p> + </p> + </div> + + <div class="refsection"> +<a name="id-1.7"></a><h2>DESCRIPTION</h2> + + <p><code class="function">lwres_getrrsetbyname()</code> + gets a set of resource records associated with a + <em class="parameter"><code>hostname</code></em>, <em class="parameter"><code>class</code></em>, + and <em class="parameter"><code>type</code></em>. + <em class="parameter"><code>hostname</code></em> is a pointer a to + null-terminated string. The <em class="parameter"><code>flags</code></em> field + is currently unused and must be zero. + </p> + <p> + After a successful call to + <code class="function">lwres_getrrsetbyname()</code>, + <em class="parameter"><code>*res</code></em> is a pointer to an + <span class="type">rrsetinfo</span> structure, containing a list of one or + more <span class="type">rdatainfo</span> structures containing resource + records and potentially another list of <span class="type">rdatainfo</span> + structures containing SIG resource records associated with those + records. The members <code class="constant">rri_rdclass</code> and + <code class="constant">rri_rdtype</code> are copied from the parameters. + <code class="constant">rri_ttl</code> and <code class="constant">rri_name</code> + are properties of the obtained rrset. The resource records + contained in <code class="constant">rri_rdatas</code> and + <code class="constant">rri_sigs</code> are in uncompressed DNS wire + format. Properties of the rdataset are represented in the + <code class="constant">rri_flags</code> bitfield. If the RRSET_VALIDATED + bit is set, the data has been DNSSEC validated and the + signatures verified. + </p> + <p> + All of the information returned by + <code class="function">lwres_getrrsetbyname()</code> is dynamically + allocated: the <code class="constant">rrsetinfo</code> and + <code class="constant">rdatainfo</code> structures, and the canonical + host name strings pointed to by the + <code class="constant">rrsetinfo</code>structure. + + Memory allocated for the dynamically allocated structures + created by a successful call to + <code class="function">lwres_getrrsetbyname()</code> is released by + <code class="function">lwres_freerrset()</code>. + + <em class="parameter"><code>rrset</code></em> is a pointer to a <span class="type">struct + rrset</span> created by a call to + <code class="function">lwres_getrrsetbyname()</code>. + </p> + <p></p> + </div> + <div class="refsection"> +<a name="id-1.8"></a><h2>RETURN VALUES</h2> + + <p><code class="function">lwres_getrrsetbyname()</code> + returns zero on success, and one of the following error codes if + an error occurred: + </p> +<div class="variablelist"><dl class="variablelist"> +<dt><span class="term"><code class="constant">ERRSET_NONAME</code></span></dt> +<dd> + <p> + the name does not exist + </p> + </dd> +<dt><span class="term"><code class="constant">ERRSET_NODATA</code></span></dt> +<dd> + <p> + the name exists, but does not have data of the desired type + </p> + </dd> +<dt><span class="term"><code class="constant">ERRSET_NOMEMORY</code></span></dt> +<dd> + <p> + memory could not be allocated + </p> + </dd> +<dt><span class="term"><code class="constant">ERRSET_INVAL</code></span></dt> +<dd> + <p> + a parameter is invalid + </p> + </dd> +<dt><span class="term"><code class="constant">ERRSET_FAIL</code></span></dt> +<dd> + <p> + other failure + </p> + </dd> +<dt><span class="term"><code class="constant"></code></span></dt> +<dd> + <p></p> + </dd> +</dl></div> +<p> + + </p> + </div> + <div class="refsection"> +<a name="id-1.9"></a><h2>SEE ALSO</h2> + + <p><span class="citerefentry"> + <span class="refentrytitle">lwres</span>(3) + </span>. + </p> + + </div> +</div></body> +</html> |