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

« back to all changes in this revision

Viewing changes to lib/dns/include/dns/masterdump.h

  • 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-2007  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 1999-2002  Internet Software Consortium.
4
4
 *
5
 
 * Permission to use, copy, modify, and distribute this software for any
 
5
 * Permission to use, copy, modify, and/or distribute this software for any
6
6
 * purpose with or without fee is hereby granted, provided that the above
7
7
 * copyright notice and this permission notice appear in all copies.
8
8
 *
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: masterdump.h,v 1.22.12.10 2005/09/06 02:12:41 marka Exp $ */
 
18
/* $Id: masterdump.h,v 1.39 2007/06/19 23:47:17 tbox Exp $ */
19
19
 
20
20
#ifndef DNS_MASTERDUMP_H
21
21
#define DNS_MASTERDUMP_H 1
22
22
 
 
23
/*! \file dns/masterdump.h */
 
24
 
23
25
/***
24
26
 ***    Imports
25
27
 ***/
46
48
 * rdata.h.
47
49
 */
48
50
 
49
 
/* Omit the owner name when possible. */
 
51
/*% Omit the owner name when possible. */
50
52
#define DNS_STYLEFLAG_OMIT_OWNER        0x00010000U
51
53
 
52
 
/*
 
54
/*%
53
55
 * Omit the TTL when possible.  If DNS_STYLEFLAG_TTL is
54
56
 * also set, this means no TTLs are ever printed
55
57
 * because $TTL directives are generated before every
67
69
 */
68
70
#define DNS_STYLEFLAG_OMIT_TTL          0x00020000U
69
71
 
70
 
/* Omit the class when possible. */
 
72
/*% Omit the class when possible. */
71
73
#define DNS_STYLEFLAG_OMIT_CLASS        0x00040000U
72
74
 
73
 
/* Output $TTL directives. */
 
75
/*% Output $TTL directives. */
74
76
#define DNS_STYLEFLAG_TTL               0x00080000U
75
77
 
76
 
/*
 
78
/*%
77
79
 * Output $ORIGIN directives and print owner names relative to
78
80
 * the origin when possible.
79
81
 */
80
82
#define DNS_STYLEFLAG_REL_OWNER         0x00100000U
81
83
 
82
 
/* Print domain names in RR data in relative form when possible.
 
84
/*% Print domain names in RR data in relative form when possible.
83
85
   For this to take effect, DNS_STYLEFLAG_REL_OWNER must also be set. */
84
86
#define DNS_STYLEFLAG_REL_DATA          0x00200000U
85
87
 
86
 
/* Print the trust level of each rdataset. */
 
88
/*% Print the trust level of each rdataset. */
87
89
#define DNS_STYLEFLAG_TRUST             0x00400000U
88
90
 
89
 
/* Print negative caching entries. */
 
91
/*% Print negative caching entries. */
90
92
#define DNS_STYLEFLAG_NCACHE            0x00800000U
91
93
 
92
 
/* Never print the TTL */
 
94
/*% Never print the TTL */
93
95
#define DNS_STYLEFLAG_NO_TTL            0x01000000U
94
96
                    
95
 
/* Never print the CLASS */
 
97
/*% Never print the CLASS */
96
98
#define DNS_STYLEFLAG_NO_CLASS          0x02000000U 
97
99
 
98
100
ISC_LANG_BEGINDECLS
101
103
 ***    Constants
102
104
 ***/
103
105
 
104
 
/*
 
106
/*%
105
107
 * The default master file style.
106
108
 *
107
109
 * This uses $TTL directives to avoid the need to dedicate a
110
112
 */
111
113
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_default;
112
114
 
113
 
/*
 
115
/*%
114
116
 * A master file style that dumps zones to a very generic format easily
115
117
 * imported/checked with external tools.
116
118
 */
117
119
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_full;
118
120
 
119
 
/*
 
121
/*%
120
122
 * A master file style that prints explicit TTL values on each 
121
123
 * record line, never using $TTL statements.  The TTL has a tab 
122
124
 * stop of its own, but the class and type share one.
124
126
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t
125
127
                                        dns_master_style_explicitttl;
126
128
 
127
 
/*
 
129
/*%
128
130
 * A master style format designed for cache files.  It prints explicit TTL
129
131
 * values on each record line and never uses $ORIGIN or relative names.
130
132
 */
131
133
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_cache;
132
134
 
133
 
/*
 
135
/*%
134
136
 * A master style that prints name, ttl, class, type, and value on 
135
137
 * every line.  Similar to explicitttl above, but more verbose.  
136
138
 * Intended for generating master files which can be easily parsed 
138
140
 */
139
141
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_simple;
140
142
 
141
 
/*
 
143
/*%
142
144
 * The style used for debugging, "dig" output, etc.
143
145
 */
144
146
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_debug;
149
151
 
150
152
void
151
153
dns_dumpctx_attach(dns_dumpctx_t *source, dns_dumpctx_t **target);
152
 
/*
 
154
/*%<
153
155
 * Attach to a dump context.
154
156
 *
155
157
 * Require:
156
 
 *      'source' to be valid.
157
 
 *      'target' to be non NULL and '*target' to be NULL.
 
158
 *\li   'source' to be valid.
 
159
 *\li   'target' to be non NULL and '*target' to be NULL.
158
160
 */
159
161
 
160
162
void
161
163
dns_dumpctx_detach(dns_dumpctx_t **dctxp);
162
 
/*
 
164
/*%<
163
165
 * Detach from a dump context.
164
166
 *
165
167
 * Require:
166
 
 *      'dctxp' to point to a valid dump context.
 
168
 *\li   'dctxp' to point to a valid dump context.
167
169
 *
168
170
 * Ensures:
169
 
 *      '*dctxp' is NULL.
 
171
 *\li   '*dctxp' is NULL.
170
172
 */
171
173
 
172
174
void
173
175
dns_dumpctx_cancel(dns_dumpctx_t *dctx);
174
 
/*
 
176
/*%<
175
177
 * Cancel a in progress dump.
176
178
 *
177
179
 * Require:
178
 
 *      'dctx' to be valid.
 
180
 *\li   'dctx' to be valid.
179
181
 */
180
182
 
181
183
dns_dbversion_t *
182
184
dns_dumpctx_version(dns_dumpctx_t *dctx);
183
 
/*
 
185
/*%<
184
186
 * Return the version handle (if any) of the database being dumped.
185
187
 *
186
188
 * Require:
187
 
 *      'dctx' to be valid.
 
189
 *\li   'dctx' to be valid.
188
190
 */
189
191
 
190
192
dns_db_t *
191
193
dns_dumpctx_db(dns_dumpctx_t *dctx);
192
 
/*
 
194
/*%<
193
195
 * Return the database being dumped.
194
196
 *
195
197
 * Require:
196
 
 *      'dctx' to be valid.
 
198
 *\li   'dctx' to be valid.
197
199
 */
198
200
 
199
201
 
 
202
/*@{*/
200
203
isc_result_t
201
204
dns_master_dumptostreaminc(isc_mem_t *mctx, dns_db_t *db,
202
205
                           dns_dbversion_t *version,
208
211
dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
209
212
                        dns_dbversion_t *version,
210
213
                        const dns_master_style_t *style, FILE *f);
211
 
/*
212
 
 * Dump the database 'db' to the steam 'f' in RFC1035 master
213
 
 * file format, in the style defined by 'style'
214
 
 * (e.g., &dns_default_master_style_default)
 
214
 
 
215
isc_result_t
 
216
dns_master_dumptostream2(isc_mem_t *mctx, dns_db_t *db,
 
217
                         dns_dbversion_t *version,
 
218
                         const dns_master_style_t *style,
 
219
                         dns_masterformat_t format, FILE *f);
 
220
/*%<
 
221
 * Dump the database 'db' to the steam 'f' in the specified format by
 
222
 * 'format'.  If the format is dns_masterformat_text (the RFC1035 format),
 
223
 * 'style' specifies the file style (e.g., &dns_master_style_default).
 
224
 *
 
225
 * dns_master_dumptostream() is an old form of dns_master_dumptostream2(),
 
226
 * which always specifies the dns_masterformat_text format.
215
227
 *
216
228
 * Temporary dynamic memory may be allocated from 'mctx'.
217
229
 *
218
230
 * Require:
219
 
 *      'task' to be valid.
220
 
 *      'done' to be non NULL.
221
 
 *      'dctxp' to be non NULL && '*dctxp' to be NULL.
 
231
 *\li   'task' to be valid.
 
232
 *\li   'done' to be non NULL.
 
233
 *\li   'dctxp' to be non NULL && '*dctxp' to be NULL.
222
234
 * 
223
235
 * Returns:
224
 
 *      ISC_R_SUCCESS
225
 
 *      DNS_R_CONTINUE  dns_master_dumptostreaminc() only.
226
 
 *      ISC_R_NOMEMORY
227
 
 *      Any database or rrset iterator error.
228
 
 *      Any dns_rdata_totext() error code.
 
236
 *\li   ISC_R_SUCCESS
 
237
 *\li   ISC_R_CONTINUE  dns_master_dumptostreaminc() only.
 
238
 *\li   ISC_R_NOMEMORY
 
239
 *\li   Any database or rrset iterator error.
 
240
 *\li   Any dns_rdata_totext() error code.
229
241
 */
 
242
/*@}*/
230
243
 
 
244
/*@{*/
231
245
isc_result_t
232
246
dns_master_dumpinc(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
233
247
                   const dns_master_style_t *style, const char *filename,
235
249
                   dns_dumpctx_t **dctxp);
236
250
 
237
251
isc_result_t
 
252
dns_master_dumpinc2(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
 
253
                    const dns_master_style_t *style, const char *filename,
 
254
                    isc_task_t *task, dns_dumpdonefunc_t done, void *done_arg,                      dns_dumpctx_t **dctxp, dns_masterformat_t format);
 
255
 
 
256
isc_result_t
238
257
dns_master_dump(isc_mem_t *mctx, dns_db_t *db,
239
258
                dns_dbversion_t *version,
240
259
                const dns_master_style_t *style, const char *filename);
241
 
/*
242
 
 * Dump the database 'db' to the file 'filename' in RFC1035 master
243
 
 * file format, in the style defined by 'style'
244
 
 * (e.g., &dns_default_master_style_default)
 
260
 
 
261
isc_result_t
 
262
dns_master_dump2(isc_mem_t *mctx, dns_db_t *db,
 
263
                 dns_dbversion_t *version,
 
264
                 const dns_master_style_t *style, const char *filename,
 
265
                 dns_masterformat_t format);
 
266
 
 
267
/*%<
 
268
 * Dump the database 'db' to the file 'filename' in the specified format by
 
269
 * 'format'.  If the format is dns_masterformat_text (the RFC1035 format),
 
270
 * 'style' specifies the file style (e.g., &dns_master_style_default).
 
271
 *
 
272
 * dns_master_dumpinc() and dns_master_dump() are old forms of _dumpinc2()
 
273
 * and _dump2(), respectively, which always specify the dns_masterformat_text
 
274
 * format.
245
275
 *
246
276
 * Temporary dynamic memory may be allocated from 'mctx'.
247
277
 *
248
278
 * Returns:
249
 
 *      ISC_R_SUCCESS
250
 
 *      DNS_R_CONTINUE  dns_master_dumpinc() only.
251
 
 *      ISC_R_NOMEMORY
252
 
 *      Any database or rrset iterator error.
253
 
 *      Any dns_rdata_totext() error code.
 
279
 *\li   ISC_R_SUCCESS
 
280
 *\li   ISC_R_CONTINUE  dns_master_dumpinc() only.
 
281
 *\li   ISC_R_NOMEMORY
 
282
 *\li   Any database or rrset iterator error.
 
283
 *\li   Any dns_rdata_totext() error code.
254
284
 */
 
285
/*@}*/
255
286
 
256
287
isc_result_t
257
288
dns_master_rdatasettotext(dns_name_t *owner_name,
258
289
                          dns_rdataset_t *rdataset,
259
290
                          const dns_master_style_t *style,
260
291
                          isc_buffer_t *target);
261
 
/*
 
292
/*%<
262
293
 * Convert 'rdataset' to text format, storing the result in 'target'.
263
294
 *
264
295
 * Notes:
265
 
 *      The rdata cursor position will be changed.
 
296
 *\li   The rdata cursor position will be changed.
266
297
 *
267
298
 * Requires:
268
 
 *      'rdataset' is a valid non-question rdataset.
 
299
 *\li   'rdataset' is a valid non-question rdataset.
269
300
 *
270
 
 *      'rdataset' is not empty.
 
301
 *\li   'rdataset' is not empty.
271
302
 */
272
303
 
273
304
isc_result_t