00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef DNS_MASTER_H
00021 #define DNS_MASTER_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 #define DNS_MASTER_AGETTL 0x00000001
00039 #define DNS_MASTER_MANYERRORS 0x00000002
00040 #define DNS_MASTER_NOINCLUDE 0x00000004
00041 #define DNS_MASTER_ZONE 0x00000008
00042 #define DNS_MASTER_HINT 0x00000010
00043 #define DNS_MASTER_SLAVE 0x00000020
00044 #define DNS_MASTER_CHECKNS 0x00000040
00045
00046
00047
00048 #define DNS_MASTER_FATALNS 0x00000080
00049
00050
00051
00052 #define DNS_MASTER_CHECKNAMES 0x00000100
00053 #define DNS_MASTER_CHECKNAMESFAIL 0x00000200
00054 #define DNS_MASTER_CHECKWILDCARD 0x00000400
00055 #define DNS_MASTER_CHECKMX 0x00000800
00056 #define DNS_MASTER_CHECKMXFAIL 0x00001000
00057
00058 #define DNS_MASTER_RESIGN 0x00002000
00059 #define DNS_MASTER_KEY 0x00004000
00060 #define DNS_MASTER_NOTTL 0x00008000
00061 #define DNS_MASTER_CHECKTTL 0x00010000
00062
00063 ISC_LANG_BEGINDECLS
00064
00065
00066
00067
00068
00069
00070
00071 #define DNS_RAWFORMAT_VERSION 1
00072
00073
00074
00075
00076 #define DNS_MASTERRAW_COMPAT 0x01
00077 #define DNS_MASTERRAW_SOURCESERIALSET 0x02
00078 #define DNS_MASTERRAW_LASTXFRINSET 0x04
00079
00080
00081 struct dns_masterrawheader {
00082 isc_uint32_t format;
00083
00084
00085
00086 isc_uint32_t version;
00087
00088 isc_uint32_t dumptime;
00089
00090 isc_uint32_t flags;
00091 isc_uint32_t sourceserial;
00092
00093 isc_uint32_t lastxfrin;
00094
00095 };
00096
00097
00098 typedef struct {
00099 isc_uint32_t totallen;
00100
00101
00102 dns_rdataclass_t rdclass;
00103 dns_rdatatype_t type;
00104 dns_rdatatype_t covers;
00105 dns_ttl_t ttl;
00106 isc_uint32_t nrdata;
00107
00108 } dns_masterrawrdataset_t;
00109
00110
00111
00112
00113
00114 typedef void
00115 (*dns_masterincludecb_t)(const char *file, void *arg);
00116
00117
00118
00119
00120
00121 isc_result_t
00122 dns_master_loadfile(const char *master_file,
00123 dns_name_t *top,
00124 dns_name_t *origin,
00125 dns_rdataclass_t zclass,
00126 unsigned int options,
00127 dns_rdatacallbacks_t *callbacks,
00128 isc_mem_t *mctx);
00129
00130 isc_result_t
00131 dns_master_loadfile2(const char *master_file,
00132 dns_name_t *top,
00133 dns_name_t *origin,
00134 dns_rdataclass_t zclass,
00135 unsigned int options,
00136 dns_rdatacallbacks_t *callbacks,
00137 isc_mem_t *mctx,
00138 dns_masterformat_t format);
00139
00140 isc_result_t
00141 dns_master_loadfile3(const char *master_file,
00142 dns_name_t *top,
00143 dns_name_t *origin,
00144 dns_rdataclass_t zclass,
00145 unsigned int options,
00146 isc_uint32_t resign,
00147 dns_rdatacallbacks_t *callbacks,
00148 isc_mem_t *mctx,
00149 dns_masterformat_t format);
00150
00151 isc_result_t
00152 dns_master_loadfile4(const char *master_file,
00153 dns_name_t *top,
00154 dns_name_t *origin,
00155 dns_rdataclass_t zclass,
00156 unsigned int options,
00157 isc_uint32_t resign,
00158 dns_rdatacallbacks_t *callbacks,
00159 dns_masterincludecb_t include_cb,
00160 void *include_arg, isc_mem_t *mctx,
00161 dns_masterformat_t format);
00162
00163 isc_result_t
00164 dns_master_loadfile5(const char *master_file,
00165 dns_name_t *top,
00166 dns_name_t *origin,
00167 dns_rdataclass_t zclass,
00168 unsigned int options,
00169 isc_uint32_t resign,
00170 dns_rdatacallbacks_t *callbacks,
00171 dns_masterincludecb_t include_cb,
00172 void *include_arg, isc_mem_t *mctx,
00173 dns_masterformat_t format,
00174 dns_ttl_t maxttl);
00175
00176 isc_result_t
00177 dns_master_loadstream(FILE *stream,
00178 dns_name_t *top,
00179 dns_name_t *origin,
00180 dns_rdataclass_t zclass,
00181 unsigned int options,
00182 dns_rdatacallbacks_t *callbacks,
00183 isc_mem_t *mctx);
00184
00185 isc_result_t
00186 dns_master_loadbuffer(isc_buffer_t *buffer,
00187 dns_name_t *top,
00188 dns_name_t *origin,
00189 dns_rdataclass_t zclass,
00190 unsigned int options,
00191 dns_rdatacallbacks_t *callbacks,
00192 isc_mem_t *mctx);
00193
00194 isc_result_t
00195 dns_master_loadlexer(isc_lex_t *lex,
00196 dns_name_t *top,
00197 dns_name_t *origin,
00198 dns_rdataclass_t zclass,
00199 unsigned int options,
00200 dns_rdatacallbacks_t *callbacks,
00201 isc_mem_t *mctx);
00202
00203 isc_result_t
00204 dns_master_loadfileinc(const char *master_file,
00205 dns_name_t *top,
00206 dns_name_t *origin,
00207 dns_rdataclass_t zclass,
00208 unsigned int options,
00209 dns_rdatacallbacks_t *callbacks,
00210 isc_task_t *task,
00211 dns_loaddonefunc_t done, void *done_arg,
00212 dns_loadctx_t **ctxp, isc_mem_t *mctx);
00213
00214 isc_result_t
00215 dns_master_loadfileinc2(const char *master_file,
00216 dns_name_t *top,
00217 dns_name_t *origin,
00218 dns_rdataclass_t zclass,
00219 unsigned int options,
00220 dns_rdatacallbacks_t *callbacks,
00221 isc_task_t *task,
00222 dns_loaddonefunc_t done, void *done_arg,
00223 dns_loadctx_t **ctxp, isc_mem_t *mctx,
00224 dns_masterformat_t format);
00225
00226 isc_result_t
00227 dns_master_loadfileinc3(const char *master_file,
00228 dns_name_t *top,
00229 dns_name_t *origin,
00230 dns_rdataclass_t zclass,
00231 unsigned int options,
00232 isc_uint32_t resign,
00233 dns_rdatacallbacks_t *callbacks,
00234 isc_task_t *task,
00235 dns_loaddonefunc_t done, void *done_arg,
00236 dns_loadctx_t **ctxp, isc_mem_t *mctx,
00237 dns_masterformat_t format);
00238
00239 isc_result_t
00240 dns_master_loadfileinc4(const char *master_file,
00241 dns_name_t *top,
00242 dns_name_t *origin,
00243 dns_rdataclass_t zclass,
00244 unsigned int options,
00245 isc_uint32_t resign,
00246 dns_rdatacallbacks_t *callbacks,
00247 isc_task_t *task,
00248 dns_loaddonefunc_t done, void *done_arg,
00249 dns_loadctx_t **ctxp,
00250 dns_masterincludecb_t include_cb, void *include_arg,
00251 isc_mem_t *mctx, dns_masterformat_t format);
00252
00253 isc_result_t
00254 dns_master_loadfileinc5(const char *master_file,
00255 dns_name_t *top,
00256 dns_name_t *origin,
00257 dns_rdataclass_t zclass,
00258 unsigned int options,
00259 isc_uint32_t resign,
00260 dns_rdatacallbacks_t *callbacks,
00261 isc_task_t *task,
00262 dns_loaddonefunc_t done, void *done_arg,
00263 dns_loadctx_t **ctxp,
00264 dns_masterincludecb_t include_cb, void *include_arg,
00265 isc_mem_t *mctx, dns_masterformat_t format,
00266 isc_uint32_t maxttl);
00267
00268 isc_result_t
00269 dns_master_loadstreaminc(FILE *stream,
00270 dns_name_t *top,
00271 dns_name_t *origin,
00272 dns_rdataclass_t zclass,
00273 unsigned int options,
00274 dns_rdatacallbacks_t *callbacks,
00275 isc_task_t *task,
00276 dns_loaddonefunc_t done, void *done_arg,
00277 dns_loadctx_t **ctxp, isc_mem_t *mctx);
00278
00279 isc_result_t
00280 dns_master_loadbufferinc(isc_buffer_t *buffer,
00281 dns_name_t *top,
00282 dns_name_t *origin,
00283 dns_rdataclass_t zclass,
00284 unsigned int options,
00285 dns_rdatacallbacks_t *callbacks,
00286 isc_task_t *task,
00287 dns_loaddonefunc_t done, void *done_arg,
00288 dns_loadctx_t **ctxp, isc_mem_t *mctx);
00289
00290 isc_result_t
00291 dns_master_loadlexerinc(isc_lex_t *lex,
00292 dns_name_t *top,
00293 dns_name_t *origin,
00294 dns_rdataclass_t zclass,
00295 unsigned int options,
00296 dns_rdatacallbacks_t *callbacks,
00297 isc_task_t *task,
00298 dns_loaddonefunc_t done, void *done_arg,
00299 dns_loadctx_t **ctxp, isc_mem_t *mctx);
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
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
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 void
00351 dns_loadctx_detach(dns_loadctx_t **ctxp);
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362 void
00363 dns_loadctx_attach(dns_loadctx_t *source, dns_loadctx_t **target);
00364
00365
00366
00367
00368
00369
00370
00371
00372 void
00373 dns_loadctx_cancel(dns_loadctx_t *ctx);
00374
00375
00376
00377
00378
00379
00380
00381 void
00382 dns_master_initrawheader(dns_masterrawheader_t *header);
00383
00384
00385
00386
00387 ISC_LANG_ENDDECLS
00388
00389 #endif