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

« back to all changes in this revision

Viewing changes to lib/lwres/man/lwres_gnba.docbook

  • 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
 
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
2
 
               "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
 
1
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 
2
               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3
3
               [<!ENTITY mdash "&#8212;">]>
4
4
<!--
5
 
 - Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
 
5
 - Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
6
6
 - Copyright (C) 2000, 2001  Internet Software Consortium.
7
7
 -
8
 
 - Permission to use, copy, modify, and distribute this software for any
 
8
 - Permission to use, copy, modify, and/or distribute this software for any
9
9
 - purpose with or without fee is hereby granted, provided that the above
10
10
 - copyright notice and this permission notice appear in all copies.
11
11
 -
18
18
 - PERFORMANCE OF THIS SOFTWARE.
19
19
-->
20
20
 
21
 
<!-- $Id: lwres_gnba.docbook,v 1.4.206.3 2005/05/12 21:36:15 sra Exp $ -->
22
 
 
 
21
<!-- $Id: lwres_gnba.docbook,v 1.11 2007/06/18 23:47:51 tbox Exp $ -->
23
22
<refentry>
24
23
 
25
 
<refentryinfo>
26
 
<date>Jun 30, 2000</date>
27
 
</refentryinfo>
 
24
  <refentryinfo>
 
25
    <date>Jun 30, 2000</date>
 
26
  </refentryinfo>
28
27
 
29
 
<refmeta>
30
 
<refentrytitle>lwres_gnba</refentrytitle>
31
 
<manvolnum>3</manvolnum>
32
 
<refmiscinfo>BIND9</refmiscinfo>
33
 
</refmeta>
 
28
  <refmeta>
 
29
    <refentrytitle>lwres_gnba</refentrytitle>
 
30
    <manvolnum>3</manvolnum>
 
31
    <refmiscinfo>BIND9</refmiscinfo>
 
32
  </refmeta>
34
33
 
35
34
  <docinfo>
36
35
    <copyright>
37
36
      <year>2004</year>
38
37
      <year>2005</year>
 
38
      <year>2007</year>
39
39
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
40
40
    </copyright>
41
41
    <copyright>
45
45
    </copyright>
46
46
  </docinfo>
47
47
 
48
 
<refnamediv>
49
 
<refname>lwres_gnbarequest_render</refname>
50
 
<refname>lwres_gnbaresponse_render</refname>
51
 
<refname>lwres_gnbarequest_parse</refname>
52
 
<refname>lwres_gnbaresponse_parse</refname>
53
 
<refname>lwres_gnbaresponse_free</refname>
54
 
<refname>lwres_gnbarequest_free</refname>
55
 
<refpurpose>lightweight resolver getnamebyaddress message handling</refpurpose>
56
 
</refnamediv>
57
 
 
58
 
<refsynopsisdiv>
59
 
 
60
 
<funcsynopsis>
 
48
  <refnamediv>
 
49
    <refname>lwres_gnbarequest_render</refname>
 
50
    <refname>lwres_gnbaresponse_render</refname>
 
51
    <refname>lwres_gnbarequest_parse</refname>
 
52
    <refname>lwres_gnbaresponse_parse</refname>
 
53
    <refname>lwres_gnbaresponse_free</refname>
 
54
    <refname>lwres_gnbarequest_free</refname>
 
55
    <refpurpose>lightweight resolver getnamebyaddress message handling</refpurpose>
 
56
  </refnamediv>
 
57
 
 
58
  <refsynopsisdiv>
 
59
 
 
60
    <funcsynopsis>
61
61
<funcsynopsisinfo>
62
62
#include &lt;lwres/lwres.h&gt;
63
63
</funcsynopsisinfo>
64
64
 
65
65
<funcprototype>
66
 
<funcdef>
 
66
        <funcdef>
67
67
lwres_result_t
68
68
<function>lwres_gnbarequest_render</function>
69
69
</funcdef>
70
 
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
71
 
<paramdef>lwres_gnbarequest_t *<parameter>req</parameter></paramdef>
72
 
<paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
73
 
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
74
 
</funcprototype>
 
70
        <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
 
71
        <paramdef>lwres_gnbarequest_t *<parameter>req</parameter></paramdef>
 
72
        <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
 
73
        <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
 
74
        </funcprototype>
75
75
 
76
76
<funcprototype>
77
 
<funcdef>
 
77
        <funcdef>
78
78
lwres_result_t
79
79
<function>lwres_gnbaresponse_render</function>
80
80
</funcdef>
81
 
<paramdef>lwres_context_t *ctx</paramdef>
82
 
<paramdef>lwres_gnbaresponse_t *req</paramdef>
83
 
<paramdef>lwres_lwpacket_t *pkt</paramdef>
84
 
<paramdef>lwres_buffer_t *b</paramdef>
85
 
</funcprototype>
 
81
        <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
 
82
        <paramdef>lwres_gnbaresponse_t *<parameter>req</parameter></paramdef>
 
83
        <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
 
84
        <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
 
85
        </funcprototype>
86
86
<funcprototype>
87
 
<funcdef>
 
87
        <funcdef>
88
88
lwres_result_t
89
89
<function>lwres_gnbarequest_parse</function></funcdef>
90
 
<paramdef>lwres_context_t *ctx</paramdef>
91
 
<paramdef>lwres_buffer_t *b</paramdef>
92
 
<paramdef>lwres_lwpacket_t *pkt</paramdef>
93
 
<paramdef>lwres_gnbarequest_t **structp</paramdef>
94
 
</funcprototype>
 
90
        <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
 
91
        <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
 
92
        <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
 
93
        <paramdef>lwres_gnbarequest_t **<parameter>structp</parameter></paramdef>
 
94
        </funcprototype>
95
95
<funcprototype>
96
 
<funcdef>
 
96
        <funcdef>
97
97
lwres_result_t
98
98
<function>lwres_gnbaresponse_parse</function></funcdef>
99
 
<paramdef>lwres_context_t *ctx</paramdef>
100
 
<paramdef>lwres_buffer_t *b</paramdef>
101
 
<paramdef>lwres_lwpacket_t *pkt</paramdef>
102
 
<paramdef>lwres_gnbaresponse_t **structp</paramdef>
103
 
</funcprototype>
 
99
        <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
 
100
        <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
 
101
        <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
 
102
        <paramdef>lwres_gnbaresponse_t **<parameter>structp</parameter></paramdef>
 
103
        </funcprototype>
104
104
 
105
105
<funcprototype>
106
 
<funcdef>
 
106
        <funcdef>
107
107
void
108
108
<function>lwres_gnbaresponse_free</function>
109
109
</funcdef>
110
 
<paramdef>lwres_context_t *ctx</paramdef>
111
 
<paramdef>lwres_gnbaresponse_t **structp</paramdef>
112
 
</funcprototype>
 
110
        <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
 
111
        <paramdef>lwres_gnbaresponse_t **<parameter>structp</parameter></paramdef>
 
112
        </funcprototype>
113
113
<funcprototype>
114
 
<funcdef>
 
114
        <funcdef>
115
115
void
116
116
<function>lwres_gnbarequest_free</function></funcdef>
117
 
<paramdef>lwres_context_t *ctx</paramdef>
118
 
<paramdef>lwres_gnbarequest_t **structp</paramdef>
119
 
</funcprototype>
 
117
        <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
 
118
        <paramdef>lwres_gnbarequest_t **<parameter>structp</parameter></paramdef>
 
119
      </funcprototype>
120
120
</funcsynopsis>
121
121
 
122
 
</refsynopsisdiv>
 
122
  </refsynopsisdiv>
123
123
 
124
 
<refsect1>
125
 
<title>DESCRIPTION</title>
126
 
<para>
127
 
These are low-level routines for creating and parsing
128
 
lightweight resolver address-to-name lookup request and 
129
 
response messages.
130
 
</para>
131
 
<para>
132
 
There are four main functions for the getnamebyaddr opcode.
133
 
One render function converts a getnamebyaddr request structure &mdash;
134
 
<type>lwres_gnbarequest_t</type> &mdash;
135
 
to the lightweight resolver's canonical format.
136
 
It is complemented by a parse function that converts a packet in this
137
 
canonical format to a getnamebyaddr request structure.
138
 
Another render function converts the getnamebyaddr response structure &mdash;
139
 
<type>lwres_gnbaresponse_t</type>
140
 
to the canonical format.
141
 
This is complemented by a parse function which converts a packet in
142
 
canonical format to a getnamebyaddr response structure.
143
 
</para>
144
 
<para>
145
 
These structures are defined in
146
 
<filename>lwres/lwres.h</filename>.
147
 
They are shown below.
148
 
<programlisting>
 
124
  <refsect1>
 
125
    <title>DESCRIPTION</title>
 
126
    <para>
 
127
      These are low-level routines for creating and parsing
 
128
      lightweight resolver address-to-name lookup request and
 
129
      response messages.
 
130
    </para>
 
131
    <para>
 
132
      There are four main functions for the getnamebyaddr opcode.
 
133
      One render function converts a getnamebyaddr request structure &mdash;
 
134
      <type>lwres_gnbarequest_t</type> &mdash;
 
135
      to the lightweight resolver's canonical format.
 
136
      It is complemented by a parse function that converts a packet in this
 
137
      canonical format to a getnamebyaddr request structure.
 
138
      Another render function converts the getnamebyaddr response structure
 
139
      &mdash;
 
140
      <type>lwres_gnbaresponse_t</type>
 
141
      to the canonical format.
 
142
      This is complemented by a parse function which converts a packet in
 
143
      canonical format to a getnamebyaddr response structure.
 
144
    </para>
 
145
    <para>
 
146
      These structures are defined in
 
147
      <filename>lwres/lwres.h</filename>.
 
148
      They are shown below.
 
149
    </para>
 
150
    <para><programlisting>
149
151
#define LWRES_OPCODE_GETNAMEBYADDR      0x00010002U
150
 
 
 
152
</programlisting>
 
153
    </para>
 
154
    <para><programlisting>
151
155
typedef struct {
152
156
        lwres_uint32_t  flags;
153
157
        lwres_addr_t    addr;
154
158
} lwres_gnbarequest_t;
155
 
 
 
159
</programlisting>
 
160
    </para>
 
161
    <para><programlisting>
156
162
typedef struct {
157
163
        lwres_uint32_t  flags;
158
164
        lwres_uint16_t  naliases;
164
170
        size_t          baselen;
165
171
} lwres_gnbaresponse_t;
166
172
</programlisting>
167
 
</para>
168
 
<para>
169
 
<function>lwres_gnbarequest_render()</function>
170
 
uses resolver context
171
 
<varname>ctx</varname>
172
 
to convert getnamebyaddr request structure
173
 
<varname>req</varname>
174
 
to canonical format.
175
 
The packet header structure
176
 
<varname>pkt</varname>
177
 
is initialised and transferred to
178
 
buffer
179
 
<varname>b</varname>.
180
 
The contents of
181
 
<varname>*req</varname>
182
 
are then appended to the buffer in canonical format.
183
 
<function>lwres_gnbaresponse_render()</function>
184
 
performs the same task, except it converts a getnamebyaddr response structure
185
 
<type>lwres_gnbaresponse_t</type>
186
 
to the lightweight resolver's canonical format.
187
 
</para>
188
 
<para>
189
 
<function>lwres_gnbarequest_parse()</function>
190
 
uses context
191
 
<varname>ctx</varname>
192
 
to convert the contents of packet
193
 
<varname>pkt</varname>
194
 
to a
195
 
<type>lwres_gnbarequest_t</type>
196
 
structure.
197
 
Buffer
198
 
<varname>b</varname>
199
 
provides space to be used for storing this structure.
200
 
When the function succeeds, the resulting
201
 
<type>lwres_gnbarequest_t</type>
202
 
is made available through
203
 
<varname>*structp</varname>.
204
 
<function>lwres_gnbaresponse_parse()</function>
205
 
offers the same semantics as
206
 
<function>lwres_gnbarequest_parse()</function>
207
 
except it yields a
208
 
<type>lwres_gnbaresponse_t</type>
209
 
structure.
210
 
</para>
211
 
<para>
212
 
<function>lwres_gnbaresponse_free()</function>
213
 
and
214
 
<function>lwres_gnbarequest_free()</function>
215
 
release the memory in resolver context
216
 
<varname>ctx</varname>
217
 
that was allocated to the
218
 
<type>lwres_gnbaresponse_t</type>
219
 
or
220
 
<type>lwres_gnbarequest_t</type>
221
 
structures referenced via
222
 
<varname>structp</varname>.
223
 
Any memory associated with ancillary buffers and strings for those
224
 
structures is also discarded.
225
 
</para>
226
 
</refsect1>
227
 
<refsect1>
228
 
<title>RETURN VALUES</title>
229
 
<para>
230
 
The getnamebyaddr opcode functions
231
 
<function>lwres_gnbarequest_render()</function>,
232
 
<function>lwres_gnbaresponse_render()</function>
233
 
<function>lwres_gnbarequest_parse()</function>
234
 
and
235
 
<function>lwres_gnbaresponse_parse()</function>
236
 
all return
237
 
<errorcode>LWRES_R_SUCCESS</errorcode>
238
 
on success.
239
 
They return
240
 
<errorcode>LWRES_R_NOMEMORY</errorcode>
241
 
if memory allocation fails.
242
 
<errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
243
 
is returned if the available space in the buffer
244
 
<varname>b</varname>
245
 
is too small to accommodate the packet header or the
246
 
<type>lwres_gnbarequest_t</type>
247
 
and
248
 
<type>lwres_gnbaresponse_t</type>
249
 
structures.
250
 
<function>lwres_gnbarequest_parse()</function>
251
 
and
252
 
<function>lwres_gnbaresponse_parse()</function>
253
 
will return
254
 
<errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
255
 
if the buffer is not empty after decoding the received packet.
256
 
These functions will return
257
 
<errorcode>LWRES_R_FAILURE</errorcode>
258
 
if
259
 
<structfield>pktflags</structfield>
260
 
in the packet header structure
261
 
<type>lwres_lwpacket_t</type>
262
 
indicate that the packet is not a response to an earlier query.
263
 
</para>
264
 
</refsect1>
265
 
<refsect1>
266
 
<title>SEE ALSO</title>
267
 
<para>
268
 
<citerefentry>
269
 
<refentrytitle>lwres_packet</refentrytitle>
270
 
<manvolnum>3</manvolnum>
271
 
</citerefentry>.
272
 
</para>
273
 
</refsect1>
274
 
</refentry>
 
173
    </para>
 
174
 
 
175
    <para><function>lwres_gnbarequest_render()</function>
 
176
      uses resolver context <varname>ctx</varname> to convert
 
177
      getnamebyaddr request structure <varname>req</varname> to
 
178
      canonical format.  The packet header structure
 
179
      <varname>pkt</varname> is initialised and transferred to buffer
 
180
      <varname>b</varname>.  The contents of <varname>*req</varname>
 
181
      are then appended to the buffer in canonical format.
 
182
      <function>lwres_gnbaresponse_render()</function> performs the
 
183
      same task, except it converts a getnamebyaddr response structure
 
184
      <type>lwres_gnbaresponse_t</type> to the lightweight resolver's
 
185
      canonical format.
 
186
    </para>
 
187
 
 
188
    <para><function>lwres_gnbarequest_parse()</function>
 
189
      uses context <varname>ctx</varname> to convert the contents of
 
190
      packet <varname>pkt</varname> to a
 
191
      <type>lwres_gnbarequest_t</type> structure.  Buffer
 
192
      <varname>b</varname> provides space to be used for storing this
 
193
      structure.  When the function succeeds, the resulting
 
194
      <type>lwres_gnbarequest_t</type> is made available through
 
195
      <varname>*structp</varname>.
 
196
      <function>lwres_gnbaresponse_parse()</function> offers the same
 
197
      semantics as <function>lwres_gnbarequest_parse()</function>
 
198
      except it yields a <type>lwres_gnbaresponse_t</type> structure.
 
199
    </para>
 
200
 
 
201
    <para><function>lwres_gnbaresponse_free()</function>
 
202
      and <function>lwres_gnbarequest_free()</function> release the
 
203
      memory in resolver context <varname>ctx</varname> that was
 
204
      allocated to the <type>lwres_gnbaresponse_t</type> or
 
205
      <type>lwres_gnbarequest_t</type> structures referenced via
 
206
      <varname>structp</varname>.  Any memory associated with
 
207
      ancillary buffers and strings for those structures is also
 
208
      discarded.
 
209
    </para>
 
210
  </refsect1>
 
211
 
 
212
  <refsect1>
 
213
    <title>RETURN VALUES</title>
 
214
    <para>
 
215
      The getnamebyaddr opcode functions
 
216
      <function>lwres_gnbarequest_render()</function>,
 
217
      <function>lwres_gnbaresponse_render()</function>
 
218
      <function>lwres_gnbarequest_parse()</function>
 
219
      and
 
220
      <function>lwres_gnbaresponse_parse()</function>
 
221
      all return
 
222
      <errorcode>LWRES_R_SUCCESS</errorcode>
 
223
      on success.
 
224
      They return
 
225
      <errorcode>LWRES_R_NOMEMORY</errorcode>
 
226
      if memory allocation fails.
 
227
      <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
 
228
      is returned if the available space in the buffer
 
229
      <varname>b</varname>
 
230
      is too small to accommodate the packet header or the
 
231
      <type>lwres_gnbarequest_t</type>
 
232
      and
 
233
      <type>lwres_gnbaresponse_t</type>
 
234
      structures.
 
235
      <function>lwres_gnbarequest_parse()</function>
 
236
      and
 
237
      <function>lwres_gnbaresponse_parse()</function>
 
238
      will return
 
239
      <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
 
240
      if the buffer is not empty after decoding the received packet.
 
241
      These functions will return
 
242
      <errorcode>LWRES_R_FAILURE</errorcode>
 
243
      if
 
244
      <structfield>pktflags</structfield>
 
245
      in the packet header structure
 
246
      <type>lwres_lwpacket_t</type>
 
247
      indicate that the packet is not a response to an earlier query.
 
248
    </para>
 
249
  </refsect1>
 
250
  <refsect1>
 
251
    <title>SEE ALSO</title>
 
252
    <para><citerefentry>
 
253
        <refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
 
254
      </citerefentry>.
 
255
    </para>
 
256
  </refsect1>
 
257
</refentry><!--
 
258
 - Local variables:
 
259
 - mode: sgml
 
260
 - End:
 
261
-->