~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/lwres/man/lwres_noop.3

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2006-01-05 12:29:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060105122928-oih7ttkkmpb90q8q
Tags: 1:9.3.2-1
* New upstream
* use lsb-base for start/stop messages in init.d.
* switch to debhelper 4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
2
 
.\" Copyright (C) 2000, 2001  Internet Software Consortium.
3
 
.\"
 
1
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
 
2
.\" Copyright (C) 2000, 2001 Internet Software Consortium.
 
3
.\" 
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.
7
 
.\"
 
7
.\" 
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.
15
15
.\"
16
 
.\" $Id: lwres_noop.3,v 1.14.2.1.8.1 2004/03/06 07:41:44 marka Exp $
 
16
.\" $Id: lwres_noop.3,v 1.14.2.1.8.5 2005/10/13 02:33:54 marka Exp $
17
17
.\"
18
 
.TH "LWRES_NOOP" "3" "Jun 30, 2000" "BIND9" ""
19
 
.SH NAME
20
 
lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free \- lightweight resolver no-op message handling
21
 
.SH SYNOPSIS
22
 
\fB#include <lwres/lwres.h>
23
 
.sp
24
 
.na
25
 
lwres_result_t
26
 
lwres_nooprequest_render(lwres_context_t *ctx, lwres_nooprequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
27
 
.ad
28
 
.sp
29
 
.na
30
 
lwres_result_t
31
 
lwres_noopresponse_render(lwres_context_t *ctx, lwres_noopresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
32
 
.ad
33
 
.sp
34
 
.na
35
 
lwres_result_t
36
 
lwres_nooprequest_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_nooprequest_t **structp);
37
 
.ad
38
 
.sp
39
 
.na
40
 
lwres_result_t
41
 
lwres_noopresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_noopresponse_t **structp);
42
 
.ad
43
 
.sp
44
 
.na
45
 
void
46
 
lwres_noopresponse_free(lwres_context_t *ctx, lwres_noopresponse_t **structp);
47
 
.ad
48
 
.sp
49
 
.na
50
 
void
51
 
lwres_nooprequest_free(lwres_context_t *ctx, lwres_nooprequest_t **structp);
52
 
.ad
53
 
\fR
 
18
.hy 0
 
19
.ad l
 
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_NOOP" "3" "Jun 30, 2000" "BIND9" "BIND9"
 
25
.\" disable hyphenation
 
26
.nh
 
27
.\" disable justification (adjust text to left margin only)
 
28
.ad l
 
29
.SH "NAME"
 
30
lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free \- lightweight resolver no\-op message handling
 
31
.SH "SYNOPSIS"
 
32
.nf
 
33
#include <lwres/lwres.h>
 
34
.fi
 
35
.HP 40
 
36
\fBlwres_result_t\ \fBlwres_nooprequest_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_nooprequest_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
 
37
.HP 41
 
38
\fBlwres_result_t\ \fBlwres_noopresponse_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_noopresponse_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
 
39
.HP 39
 
40
\fBlwres_result_t\ \fBlwres_nooprequest_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_nooprequest_t\ **structp\fR\fB);\fR
 
41
.HP 40
 
42
\fBlwres_result_t\ \fBlwres_noopresponse_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_noopresponse_t\ **structp\fR\fB);\fR
 
43
.HP 29
 
44
\fBvoid\ \fBlwres_noopresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_noopresponse_t\ **structp\fR\fB);\fR
 
45
.HP 28
 
46
\fBvoid\ \fBlwres_nooprequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_nooprequest_t\ **structp\fR\fB);\fR
54
47
.SH "DESCRIPTION"
55
48
.PP
56
 
These are low-level routines for creating and parsing
57
 
lightweight resolver no-op request and response messages.
58
 
.PP
59
 
The no-op message is analogous to a \fBping\fR packet: 
60
 
a packet is sent to the resolver daemon and is simply echoed back.
61
 
The opcode is intended to allow a client to determine if the server is
62
 
operational or not.
63
 
.PP
64
 
There are four main functions for the no-op opcode.
65
 
One render function converts a no-op request structure \(em
66
 
\fBlwres_nooprequest_t\fR \(em
67
 
to the lighweight resolver's canonical format.
68
 
It is complemented by a parse function that converts a packet in this
69
 
canonical format to a no-op request structure.
70
 
Another render function converts the no-op response structure \(em
 
49
These are low\-level routines for creating and parsing lightweight resolver no\-op request and response messages.
 
50
.PP
 
51
The no\-op message is analogous to a
 
52
\fBping\fR
 
53
packet: a packet is sent to the resolver daemon and is simply echoed back. The opcode is intended to allow a client to determine if the server is operational or not.
 
54
.PP
 
55
There are four main functions for the no\-op opcode. One render function converts a no\-op request structure \(em
 
56
\fBlwres_nooprequest_t\fR
 
57
\(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 no\-op request structure. Another render function converts the no\-op response structure \(em
71
58
\fBlwres_noopresponse_t\fR
72
 
to the canonical format.
73
 
This is complemented by a parse function which converts a packet in
74
 
canonical format to a no-op response structure.
 
59
to the canonical format. This is complemented by a parse function which converts a packet in canonical format to a no\-op response structure.
75
60
.PP
76
61
These structures are defined in
77
 
\fIlwres/lwres.h\fR.
78
 
They are shown below.
 
62
\fIlwres/lwres.h\fR. They are shown below.
79
63
.sp
80
64
.nf
81
65
#define LWRES_OPCODE_NOOP       0x00000000U
82
 
 
83
66
typedef struct {
84
67
        lwres_uint16_t  datalength;
85
68
        unsigned char   *data;
86
69
} lwres_nooprequest_t;
87
 
 
88
70
typedef struct {
89
71
        lwres_uint16_t  datalength;
90
72
        unsigned char   *data;
91
73
} lwres_noopresponse_t;
 
74
.fi
92
75
.sp
93
 
.fi
94
 
Although the structures have different types, they are identical.
95
 
This is because the no-op opcode simply echos whatever data was sent:
96
 
the response is therefore identical to the request.
97
 
.PP
98
 
\fBlwres_nooprequest_render()\fR uses resolver
99
 
context \fIctx\fR to convert no-op request structure
100
 
\fIreq\fR to canonical format. The packet header
101
 
structure \fIpkt\fR is initialised and transferred to
102
 
buffer \fIb\fR. The contents of
103
 
\fI*req\fR are then appended to the buffer in
104
 
canonical format. \fBlwres_noopresponse_render()\fR
105
 
performs the same task, except it converts a no-op response structure
106
 
\fBlwres_noopresponse_t\fR to the lightweight resolver's
107
 
canonical format.
108
 
.PP
109
 
\fBlwres_nooprequest_parse()\fR uses context
110
 
\fIctx\fR to convert the contents of packet
111
 
\fIpkt\fR to a \fBlwres_nooprequest_t\fR
112
 
structure. Buffer \fIb\fR provides space to be used
113
 
for storing this structure. When the function succeeds, the resulting
114
 
\fBlwres_nooprequest_t\fR is made available through
 
76
Although the structures have different types, they are identical. This is because the no\-op opcode simply echos whatever data was sent: the response is therefore identical to the request.
 
77
.PP
 
78
\fBlwres_nooprequest_render()\fR
 
79
uses resolver context
 
80
\fIctx\fR
 
81
to convert no\-op request structure
 
82
\fIreq\fR
 
83
to canonical format. The packet header structure
 
84
\fIpkt\fR
 
85
is initialised and transferred to buffer
 
86
\fIb\fR. The contents of
 
87
\fI*req\fR
 
88
are then appended to the buffer in canonical format.
 
89
\fBlwres_noopresponse_render()\fR
 
90
performs the same task, except it converts a no\-op response structure
 
91
\fBlwres_noopresponse_t\fR
 
92
to the lightweight resolver's canonical format.
 
93
.PP
 
94
\fBlwres_nooprequest_parse()\fR
 
95
uses context
 
96
\fIctx\fR
 
97
to convert the contents of packet
 
98
\fIpkt\fR
 
99
to a
 
100
\fBlwres_nooprequest_t\fR
 
101
structure. Buffer
 
102
\fIb\fR
 
103
provides space to be used for storing this structure. When the function succeeds, the resulting
 
104
\fBlwres_nooprequest_t\fR
 
105
is made available through
115
106
\fI*structp\fR.
116
 
\fBlwres_noopresponse_parse()\fR offers the same
117
 
semantics as \fBlwres_nooprequest_parse()\fR except it
118
 
yields a \fBlwres_noopresponse_t\fR structure.
 
107
\fBlwres_noopresponse_parse()\fR
 
108
offers the same semantics as
 
109
\fBlwres_nooprequest_parse()\fR
 
110
except it yields a
 
111
\fBlwres_noopresponse_t\fR
 
112
structure.
119
113
.PP
120
 
\fBlwres_noopresponse_free()\fR and
121
 
\fBlwres_nooprequest_free()\fR release the memory in
122
 
resolver context \fIctx\fR that was allocated to the
123
 
\fBlwres_noopresponse_t\fR or \fBlwres_nooprequest_t\fR
124
 
structures referenced via \fIstructp\fR.
 
114
\fBlwres_noopresponse_free()\fR
 
115
and
 
116
\fBlwres_nooprequest_free()\fR
 
117
release the memory in resolver context
 
118
\fIctx\fR
 
119
that was allocated to the
 
120
\fBlwres_noopresponse_t\fR
 
121
or
 
122
\fBlwres_nooprequest_t\fR
 
123
structures referenced via
 
124
\fIstructp\fR.
125
125
.SH "RETURN VALUES"
126
126
.PP
127
 
The no-op opcode functions
 
127
The no\-op opcode functions
128
128
\fBlwres_nooprequest_render()\fR,
129
 
\fBlwres_noopresponse_render()\fR
130
 
\fBlwres_nooprequest_parse()\fR
 
129
\fBlwres_noopresponse_render()\fR\fBlwres_nooprequest_parse()\fR
131
130
and
132
131
\fBlwres_noopresponse_parse()\fR
133
132
all return
134
 
LWRES_R_SUCCESS
135
 
on success.
136
 
They return
137
 
LWRES_R_NOMEMORY
 
133
\fBLWRES_R_SUCCESS\fR
 
134
on success. They return
 
135
\fBLWRES_R_NOMEMORY\fR
138
136
if memory allocation fails.
139
 
LWRES_R_UNEXPECTEDEND
 
137
\fBLWRES_R_UNEXPECTEDEND\fR
140
138
is returned if the available space in the buffer
141
139
\fIb\fR
142
140
is too small to accommodate the packet header or the
148
146
and
149
147
\fBlwres_noopresponse_parse()\fR
150
148
will return
151
 
LWRES_R_UNEXPECTEDEND
152
 
if the buffer is not empty after decoding the received packet.
153
 
These functions will return
154
 
LWRES_R_FAILURE
 
149
\fBLWRES_R_UNEXPECTEDEND\fR
 
150
if the buffer is not empty after decoding the received packet. These functions will return
 
151
\fBLWRES_R_FAILURE\fR
155
152
if
156
 
pktflags
 
153
\fBpktflags\fR
157
154
in the packet header structure
158
155
\fBlwres_lwpacket_t\fR
159
156
indicate that the packet is not a response to an earlier query.
160
157
.SH "SEE ALSO"
161
158
.PP
162
 
\fBlwres_packet\fR(3)
 
159
\fBlwres_packet\fR(3 )