00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef DNS_MASTERDUMP_H
00021 #define DNS_MASTERDUMP_H 1
00022
00023
00024
00025
00026
00027
00028
00029 #include <stdio.h>
00030
00031 #include <isc/lang.h>
00032
00033 #include <dns/types.h>
00034
00035
00036
00037
00038
00039 typedef struct dns_master_style dns_master_style_t;
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #define DNS_STYLEFLAG_OMIT_OWNER 0x00010000U
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 #define DNS_STYLEFLAG_OMIT_TTL 0x00020000U
00071
00072
00073 #define DNS_STYLEFLAG_OMIT_CLASS 0x00040000U
00074
00075
00076 #define DNS_STYLEFLAG_TTL 0x00080000U
00077
00078
00079
00080
00081
00082 #define DNS_STYLEFLAG_REL_OWNER 0x00100000U
00083
00084
00085
00086 #define DNS_STYLEFLAG_REL_DATA 0x00200000U
00087
00088
00089 #define DNS_STYLEFLAG_TRUST 0x00400000U
00090
00091
00092 #define DNS_STYLEFLAG_NCACHE 0x00800000U
00093
00094
00095 #define DNS_STYLEFLAG_NO_TTL 0x01000000U
00096
00097
00098 #define DNS_STYLEFLAG_NO_CLASS 0x02000000U
00099
00100
00101 #define DNS_STYLEFLAG_RESIGN 0x04000000U
00102
00103
00104 #define DNS_STYLEFLAG_NOCRYPTO 0x08000000U
00105
00106
00107 #define DNS_STYLEFLAG_COMMENTDATA 0x10000000U
00108
00109
00110 #define DNS_STYLEFLAG_TTL_UNITS 0x20000000U
00111
00112 ISC_LANG_BEGINDECLS
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_default;
00126
00127
00128
00129
00130
00131 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_full;
00132
00133
00134
00135
00136
00137
00138 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t
00139 dns_master_style_explicitttl;
00140
00141
00142
00143
00144
00145 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_cache;
00146
00147
00148
00149
00150
00151
00152
00153 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_simple;
00154
00155
00156
00157
00158 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_debug;
00159
00160
00161
00162
00163 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_comment;
00164
00165
00166
00167
00168 LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_keyzone;
00169
00170
00171
00172
00173
00174 void
00175 dns_dumpctx_attach(dns_dumpctx_t *source, dns_dumpctx_t **target);
00176
00177
00178
00179
00180
00181
00182
00183
00184 void
00185 dns_dumpctx_detach(dns_dumpctx_t **dctxp);
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196 void
00197 dns_dumpctx_cancel(dns_dumpctx_t *dctx);
00198
00199
00200
00201
00202
00203
00204
00205 dns_dbversion_t *
00206 dns_dumpctx_version(dns_dumpctx_t *dctx);
00207
00208
00209
00210
00211
00212
00213
00214 dns_db_t *
00215 dns_dumpctx_db(dns_dumpctx_t *dctx);
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225 isc_result_t
00226 dns_master_dumptostreaminc(isc_mem_t *mctx, dns_db_t *db,
00227 dns_dbversion_t *version,
00228 const dns_master_style_t *style, FILE *f,
00229 isc_task_t *task, dns_dumpdonefunc_t done,
00230 void *done_arg, dns_dumpctx_t **dctxp);
00231
00232 isc_result_t
00233 dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
00234 dns_dbversion_t *version,
00235 const dns_master_style_t *style, FILE *f);
00236
00237 isc_result_t
00238 dns_master_dumptostream2(isc_mem_t *mctx, dns_db_t *db,
00239 dns_dbversion_t *version,
00240 const dns_master_style_t *style,
00241 dns_masterformat_t format, FILE *f);
00242
00243 isc_result_t
00244 dns_master_dumptostream3(isc_mem_t *mctx, dns_db_t *db,
00245 dns_dbversion_t *version,
00246 const dns_master_style_t *style,
00247 dns_masterformat_t format,
00248 dns_masterrawheader_t *header, FILE *f);
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279 isc_result_t
00280 dns_master_dumpinc(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
00281 const dns_master_style_t *style, const char *filename,
00282 isc_task_t *task, dns_dumpdonefunc_t done, void *done_arg,
00283 dns_dumpctx_t **dctxp);
00284
00285 isc_result_t
00286 dns_master_dumpinc2(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
00287 const dns_master_style_t *style, const char *filename,
00288 isc_task_t *task, dns_dumpdonefunc_t done, void *done_arg, dns_dumpctx_t **dctxp, dns_masterformat_t format);
00289
00290 isc_result_t
00291 dns_master_dumpinc3(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
00292 const dns_master_style_t *style, const char *filename,
00293 isc_task_t *task, dns_dumpdonefunc_t done, void
00294 *done_arg, dns_dumpctx_t **dctxp,
00295 dns_masterformat_t format, dns_masterrawheader_t *header);
00296
00297 isc_result_t
00298 dns_master_dump(isc_mem_t *mctx, dns_db_t *db,
00299 dns_dbversion_t *version,
00300 const dns_master_style_t *style, const char *filename);
00301
00302 isc_result_t
00303 dns_master_dump2(isc_mem_t *mctx, dns_db_t *db,
00304 dns_dbversion_t *version,
00305 const dns_master_style_t *style, const char *filename,
00306 dns_masterformat_t format);
00307
00308 isc_result_t
00309 dns_master_dump3(isc_mem_t *mctx, dns_db_t *db,
00310 dns_dbversion_t *version,
00311 const dns_master_style_t *style, const char *filename,
00312 dns_masterformat_t format, dns_masterrawheader_t *header);
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338 isc_result_t
00339 dns_master_rdatasettotext(dns_name_t *owner_name,
00340 dns_rdataset_t *rdataset,
00341 const dns_master_style_t *style,
00342 isc_buffer_t *target);
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355 isc_result_t
00356 dns_master_questiontotext(dns_name_t *owner_name,
00357 dns_rdataset_t *rdataset,
00358 const dns_master_style_t *style,
00359 isc_buffer_t *target);
00360
00361 isc_result_t
00362 dns_master_dumpnodetostream(isc_mem_t *mctx, dns_db_t *db,
00363 dns_dbversion_t *version,
00364 dns_dbnode_t *node, dns_name_t *name,
00365 const dns_master_style_t *style,
00366 FILE *f);
00367
00368 isc_result_t
00369 dns_master_dumpnode(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
00370 dns_dbnode_t *node, dns_name_t *name,
00371 const dns_master_style_t *style, const char *filename);
00372
00373 isc_result_t
00374 dns_master_stylecreate(dns_master_style_t **style, unsigned int flags,
00375 unsigned int ttl_column, unsigned int class_column,
00376 unsigned int type_column, unsigned int rdata_column,
00377 unsigned int line_length, unsigned int tab_width,
00378 isc_mem_t *mctx);
00379
00380 isc_result_t
00381 dns_master_stylecreate2(dns_master_style_t **style, unsigned int flags,
00382 unsigned int ttl_column, unsigned int class_column,
00383 unsigned int type_column, unsigned int rdata_column,
00384 unsigned int line_length, unsigned int tab_width,
00385 unsigned int split_width, isc_mem_t *mctx);
00386 void
00387 dns_master_styledestroy(dns_master_style_t **style, isc_mem_t *mctx);
00388
00389 ISC_LANG_ENDDECLS
00390
00391 #endif