~ubuntu-branches/ubuntu/maverick/bind9/maverick

« back to all changes in this revision

Viewing changes to lib/lwres/man/lwres_getrrsetbyname.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!--
2
 
 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
 
2
 - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
3
3
 - Copyright (C) 2000, 2001 Internet Software Consortium.
4
4
 - 
5
5
 - Permission to use, copy, modify, and distribute this software for any
14
14
 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
 - PERFORMANCE OF THIS SOFTWARE.
16
16
-->
17
 
<!-- $Id: lwres_getrrsetbyname.html,v 1.5.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
 
17
<!-- $Id: lwres_getrrsetbyname.html,v 1.23 2007/01/30 00:24:59 marka Exp $ -->
18
18
<html>
19
19
<head>
20
20
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21
21
<title>lwres_getrrsetbyname</title>
22
 
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 
22
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23
23
</head>
24
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25
 
<a name="id2463721"></a><div class="titlepage"></div>
 
25
<a name="id2476275"></a><div class="titlepage"></div>
26
26
<div class="refnamediv">
27
27
<h2>Name</h2>
28
28
<p>lwres_getrrsetbyname, lwres_freerrset &#8212; retrieve DNS records</p>
36
36
<td><code class="funcdef">
37
37
int
38
38
<b class="fsfunc">lwres_getrrsetbyname</b>(</code></td>
39
 
<td>�</td>
40
 
<td>, </td>
41
 
</tr>
42
 
<tr>
43
 
<td>�</td>
44
 
<td>�</td>
45
 
<td>, </td>
46
 
</tr>
47
 
<tr>
48
 
<td>�</td>
49
 
<td>�</td>
50
 
<td>, </td>
51
 
</tr>
52
 
<tr>
53
 
<td>�</td>
54
 
<td>�</td>
55
 
<td>, </td>
56
 
</tr>
57
 
<tr>
58
 
<td>�</td>
59
 
<td>�</td>
60
 
<td>
61
 
<code>)</code>;</td>
 
39
<td>const char *�</td>
 
40
<td>
 
41
<var class="pdparam">hostname</var>, </td>
 
42
</tr>
 
43
<tr>
 
44
<td>�</td>
 
45
<td>unsigned int �</td>
 
46
<td>
 
47
<var class="pdparam">rdclass</var>, </td>
 
48
</tr>
 
49
<tr>
 
50
<td>�</td>
 
51
<td>unsigned int �</td>
 
52
<td>
 
53
<var class="pdparam">rdtype</var>, </td>
 
54
</tr>
 
55
<tr>
 
56
<td>�</td>
 
57
<td>unsigned int �</td>
 
58
<td>
 
59
<var class="pdparam">flags</var>, </td>
 
60
</tr>
 
61
<tr>
 
62
<td>�</td>
 
63
<td>struct rrsetinfo **�</td>
 
64
<td>
 
65
<var class="pdparam">res</var><code>)</code>;</td>
62
66
</tr>
63
67
</table>
64
68
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
65
69
<td><code class="funcdef">
66
70
void
67
71
<b class="fsfunc">lwres_freerrset</b>(</code></td>
68
 
<td>�</td>
 
72
<td>struct rrsetinfo *�</td>
69
73
<td>
70
 
<code>)</code>;</td>
 
74
<var class="pdparam">rrset</var><code>)</code>;</td>
71
75
</tr></table>
72
76
</div>
73
77
<p>
74
 
The following structures are used:
75
 
</p>
 
78
      The following structures are used:
 
79
    </p>
76
80
<pre class="programlisting">
77
81
struct  rdatainfo {
78
82
        unsigned int            rdi_length;     /* length of data */
79
83
        unsigned char           *rdi_data;      /* record data */
80
84
};
81
 
 
 
85
</pre>
 
86
<p>
 
87
    </p>
 
88
<pre class="programlisting">
82
89
struct  rrsetinfo {
83
90
        unsigned int            rri_flags;      /* RRSET_VALIDATED... */
84
91
        unsigned int            rri_rdclass;    /* class number */
92
99
};
93
100
</pre>
94
101
<p>
95
 
</p>
96
 
</div>
97
 
<div class="refsect1" lang="en">
98
 
<a name="id2525878"></a><h2>DESCRIPTION</h2>
99
 
<p>
100
 
<code class="function">lwres_getrrsetbyname()</code>
101
 
gets a set of resource records associated with a
102
 
<em class="parameter"><code>hostname</code></em>,
103
 
 
104
 
<em class="parameter"><code>class</code></em>,
105
 
 
106
 
and
107
 
<em class="parameter"><code>type</code></em>.
108
 
 
109
 
<em class="parameter"><code>hostname</code></em>
110
 
is
111
 
a pointer a to null-terminated string.  The
112
 
<em class="parameter"><code>flags</code></em>
113
 
field is currently unused and must be zero.
114
 
</p>
115
 
<p>
116
 
After a successful call to
117
 
<code class="function">lwres_getrrsetbyname()</code>,
118
 
 
119
 
<em class="parameter"><code>*res</code></em>
120
 
is a pointer to an
121
 
<span class="type">rrsetinfo</span>
122
 
structure, containing a list of one or more
123
 
<span class="type">rdatainfo</span>
124
 
structures containing resource records and potentially another list of
125
 
<span class="type">rdatainfo</span>
126
 
structures containing SIG resource records
127
 
associated with those records.
128
 
The members
129
 
<code class="constant">rri_rdclass</code>
130
 
and
131
 
<code class="constant">rri_rdtype</code>
132
 
are copied from the parameters.
133
 
<code class="constant">rri_ttl</code>
134
 
and
135
 
<code class="constant">rri_name</code>
136
 
are properties of the obtained rrset.
137
 
The resource records contained in
138
 
<code class="constant">rri_rdatas</code>
139
 
and
140
 
<code class="constant">rri_sigs</code>
141
 
are in uncompressed DNS wire format.
142
 
Properties of the rdataset are represented in the
143
 
<code class="constant">rri_flags</code>
144
 
bitfield.  If the RRSET_VALIDATED bit is set, the data has been DNSSEC
145
 
validated and the signatures verified.  
146
 
</p>
147
 
<p>
148
 
All of the information returned by
149
 
<code class="function">lwres_getrrsetbyname()</code>
150
 
is dynamically allocated: the
151
 
<code class="constant">rrsetinfo</code>
152
 
and
153
 
<code class="constant">rdatainfo</code>
154
 
structures,
155
 
and the canonical host name strings pointed to by the
156
 
<code class="constant">rrsetinfo</code>structure.
157
 
 
158
 
Memory allocated for the dynamically allocated structures created by
159
 
a successful call to
160
 
<code class="function">lwres_getrrsetbyname()</code>
161
 
is released by
162
 
<code class="function">lwres_freerrset()</code>.
163
 
 
164
 
<em class="parameter"><code>rrset</code></em>
165
 
is a pointer to a
166
 
<span class="type">struct rrset</span>
167
 
created by a call to
168
 
<code class="function">lwres_getrrsetbyname()</code>.
169
 
 
170
 
</p>
171
 
<p>
172
 
</p>
173
 
</div>
174
 
<div class="refsect1" lang="en">
175
 
<a name="id2526058"></a><h2>RETURN VALUES</h2>
176
 
<p>
177
 
<code class="function">lwres_getrrsetbyname()</code>
178
 
returns zero on success, and one of the following error
179
 
codes if an error occurred:
180
 
</p>
 
102
    </p>
 
103
</div>
 
104
<div class="refsect1" lang="en">
 
105
<a name="id2543414"></a><h2>DESCRIPTION</h2>
 
106
<p><code class="function">lwres_getrrsetbyname()</code>
 
107
      gets a set of resource records associated with a
 
108
      <em class="parameter"><code>hostname</code></em>, <em class="parameter"><code>class</code></em>,
 
109
      and <em class="parameter"><code>type</code></em>.
 
110
      <em class="parameter"><code>hostname</code></em> is a pointer a to
 
111
      null-terminated string.  The <em class="parameter"><code>flags</code></em> field
 
112
      is currently unused and must be zero.
 
113
    </p>
 
114
<p>
 
115
      After a successful call to
 
116
      <code class="function">lwres_getrrsetbyname()</code>,
 
117
      <em class="parameter"><code>*res</code></em> is a pointer to an
 
118
      <span class="type">rrsetinfo</span> structure, containing a list of one or
 
119
      more <span class="type">rdatainfo</span> structures containing resource
 
120
      records and potentially another list of <span class="type">rdatainfo</span>
 
121
      structures containing SIG resource records associated with those
 
122
      records.  The members <code class="constant">rri_rdclass</code> and
 
123
      <code class="constant">rri_rdtype</code> are copied from the parameters.
 
124
      <code class="constant">rri_ttl</code> and <code class="constant">rri_name</code>
 
125
      are properties of the obtained rrset.  The resource records
 
126
      contained in <code class="constant">rri_rdatas</code> and
 
127
      <code class="constant">rri_sigs</code> are in uncompressed DNS wire
 
128
      format.  Properties of the rdataset are represented in the
 
129
      <code class="constant">rri_flags</code> bitfield.  If the RRSET_VALIDATED
 
130
      bit is set, the data has been DNSSEC validated and the
 
131
      signatures verified.
 
132
    </p>
 
133
<p>
 
134
      All of the information returned by
 
135
      <code class="function">lwres_getrrsetbyname()</code> is dynamically
 
136
      allocated: the <code class="constant">rrsetinfo</code> and
 
137
      <code class="constant">rdatainfo</code> structures, and the canonical
 
138
      host name strings pointed to by the
 
139
      <code class="constant">rrsetinfo</code>structure.
 
140
 
 
141
      Memory allocated for the dynamically allocated structures
 
142
      created by a successful call to
 
143
      <code class="function">lwres_getrrsetbyname()</code> is released by
 
144
      <code class="function">lwres_freerrset()</code>.
 
145
 
 
146
      <em class="parameter"><code>rrset</code></em> is a pointer to a <span class="type">struct
 
147
      rrset</span> created by a call to
 
148
      <code class="function">lwres_getrrsetbyname()</code>.
 
149
    </p>
 
150
<p></p>
 
151
</div>
 
152
<div class="refsect1" lang="en">
 
153
<a name="id2543526"></a><h2>RETURN VALUES</h2>
 
154
<p><code class="function">lwres_getrrsetbyname()</code>
 
155
      returns zero on success, and one of the following error codes if
 
156
      an error occurred:
 
157
      </p>
181
158
<div class="variablelist"><dl>
182
159
<dt><span class="term"><code class="constant">ERRSET_NONAME</code></span></dt>
183
160
<dd><p>
184
 
the name does not exist
185
 
</p></dd>
 
161
              the name does not exist
 
162
            </p></dd>
186
163
<dt><span class="term"><code class="constant">ERRSET_NODATA</code></span></dt>
187
164
<dd><p>
188
 
the name exists, but does not have data of the desired type
189
 
</p></dd>
 
165
              the name exists, but does not have data of the desired type
 
166
            </p></dd>
190
167
<dt><span class="term"><code class="constant">ERRSET_NOMEMORY</code></span></dt>
191
168
<dd><p>
192
 
memory could not be allocated
193
 
</p></dd>
 
169
              memory could not be allocated
 
170
            </p></dd>
194
171
<dt><span class="term"><code class="constant">ERRSET_INVAL</code></span></dt>
195
172
<dd><p>
196
 
a parameter is invalid
197
 
</p></dd>
 
173
              a parameter is invalid
 
174
            </p></dd>
198
175
<dt><span class="term"><code class="constant">ERRSET_FAIL</code></span></dt>
199
176
<dd><p>
200
 
other failure
201
 
</p></dd>
 
177
              other failure
 
178
            </p></dd>
202
179
<dt><span class="term"><code class="constant"></code></span></dt>
203
 
<dd><p>
204
 
</p></dd>
 
180
<dd><p></p></dd>
205
181
</dl></div>
206
182
<p>
207
183
 
208
 
</p>
 
184
    </p>
209
185
</div>
210
186
<div class="refsect1" lang="en">
211
 
<a name="id2526132"></a><h2>SEE ALSO</h2>
212
 
<p>
213
 
<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>.
214
 
</p>
 
187
<a name="id2543626"></a><h2>SEE ALSO</h2>
 
188
<p><span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>.
 
189
    </p>
215
190
</div>
216
191
</div></body>
217
192
</html>