1
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
2
.\" Copyright (C) 2000, 2001 Internet Software Consortium.
1
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
2
.\" Copyright (C) 2000, 2001 Internet Software Consortium.
4
4
.\" Permission to use, copy, modify, and distribute this software for any
5
5
.\" purpose with or without fee is hereby granted, provided that the above
6
6
.\" copyright notice and this permission notice appear in all copies.
8
8
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9
9
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
10
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11
11
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13
13
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
.\" PERFORMANCE OF THIS SOFTWARE.
16
.\" $Id: lwres_gabn.3,v 1.13.2.1.8.1 2004/03/06 07:41:42 marka Exp $
16
.\" $Id: lwres_gabn.3,v 1.13.2.1.8.5 2005/10/13 02:33:52 marka Exp $
18
.TH "LWRES_GABN" "3" "Jun 30, 2000" "BIND9" ""
20
.\" ** You probably do not want to edit this file directly **
21
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
22
.\" Instead of manually editing it, you probably should edit the DocBook XML
23
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
24
.TH "LWRES_GABN" "3" "Jun 30, 2000" "BIND9" "BIND9"
25
.\" disable hyphenation
27
.\" disable justification (adjust text to left margin only)
20
30
lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lwres_gabnresponse_parse, lwres_gabnresponse_free, lwres_gabnrequest_free \- lightweight resolver getaddrbyname message handling
22
\fB#include <lwres/lwres.h>
26
lwres_gabnrequest_render(lwres_context_t *ctx, lwres_gabnrequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
31
lwres_gabnresponse_render(lwres_context_t *ctx, lwres_gabnresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
36
lwres_gabnrequest_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnrequest_t **structp);
41
lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnresponse_t **structp);
46
lwres_gabnresponse_free(lwres_context_t *ctx, lwres_gabnresponse_t **structp);
51
lwres_gabnrequest_free(lwres_context_t *ctx, lwres_gabnrequest_t **structp);
33
#include <lwres/lwres.h>
36
\fBlwres_result_t\ \fBlwres_gabnrequest_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnrequest_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
38
\fBlwres_result_t\ \fBlwres_gabnresponse_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnresponse_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
40
\fBlwres_result_t\ \fBlwres_gabnrequest_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_gabnrequest_t\ **structp\fR\fB);\fR
42
\fBlwres_result_t\ \fBlwres_gabnresponse_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_gabnresponse_t\ **structp\fR\fB);\fR
44
\fBvoid\ \fBlwres_gabnresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnresponse_t\ **structp\fR\fB);\fR
46
\fBvoid\ \fBlwres_gabnrequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnrequest_t\ **structp\fR\fB);\fR
56
These are low-level routines for creating and parsing
57
lightweight resolver name-to-address lookup request and
49
These are low\-level routines for creating and parsing lightweight resolver name\-to\-address lookup request and response messages.
60
There are four main functions for the getaddrbyname opcode.
61
One render function converts a getaddrbyname request structure \(em
62
\fBlwres_gabnrequest_t\fR \(em
63
to the lighweight resolver's canonical format.
64
It is complemented by a parse function that converts a packet in this
65
canonical format to a getaddrbyname request structure.
66
Another render function converts the getaddrbyname response structure \(em
67
\fBlwres_gabnresponse_t\fR \(em
68
to the canonical format.
69
This is complemented by a parse function which converts a packet in
70
canonical format to a getaddrbyname response structure.
51
There are four main functions for the getaddrbyname opcode. One render function converts a getaddrbyname request structure \(em
52
\fBlwres_gabnrequest_t\fR
53
\(em to the lighweight resolver's canonical format. It is complemented by a parse function that converts a packet in this canonical format to a getaddrbyname request structure. Another render function converts the getaddrbyname response structure \(em
54
\fBlwres_gabnresponse_t\fR
55
\(em to the canonical format. This is complemented by a parse function which converts a packet in canonical format to a getaddrbyname response structure.
72
57
These structures are defined in
73
\fI<lwres/lwres.h>\fR.
58
\fI<lwres/lwres.h>\fR. They are shown below.
77
61
#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
79
62
typedef struct lwres_addr lwres_addr_t;
80
63
typedef LWRES_LIST(lwres_addr_t) lwres_addrlist_t;
83
65
lwres_uint32_t flags;
84
66
lwres_uint32_t addrtypes;
85
67
lwres_uint16_t namelen;
87
69
} lwres_gabnrequest_t;
90
71
lwres_uint32_t flags;
91
72
lwres_uint16_t naliases;
153
129
\fBlwres_gabnrequest_t\fR
154
130
structures referenced via
156
Any memory associated with ancillary buffers and strings for those
157
structures is also discarded.
131
\fIstructp\fR. Any memory associated with ancillary buffers and strings for those structures is also discarded.
158
132
.SH "RETURN VALUES"
160
134
The getaddrbyname opcode functions
161
\fBlwres_gabnrequest_render()\fR,
162
\fBlwres_gabnresponse_render()\fR
163
\fBlwres_gabnrequest_parse()\fR
135
\fBlwres_gabnrequest_render()\fR,
136
\fBlwres_gabnresponse_render()\fR\fBlwres_gabnrequest_parse()\fR
165
138
\fBlwres_gabnresponse_parse()\fR
140
\fBLWRES_R_SUCCESS\fR
141
on success. They return
142
\fBLWRES_R_NOMEMORY\fR
171
143
if memory allocation fails.
172
LWRES_R_UNEXPECTEDEND
144
\fBLWRES_R_UNEXPECTEDEND\fR
173
145
is returned if the available space in the buffer
175
147
is too small to accommodate the packet header or the