masterdump.c revision d8e34837cd6c88c42b3ecdb9107a43ecf8252e79
34729dbcb3526974cf98ee03ec20a107d9458417Andreas Gustafsson * Copyright (C) 1999, 2000 Internet Software Consortium.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Permission to use, copy, modify, and distribute this software for any
34729dbcb3526974cf98ee03ec20a107d9458417Andreas Gustafsson * purpose with or without fee is hereby granted, provided that the above
34729dbcb3526974cf98ee03ec20a107d9458417Andreas Gustafsson * copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
#define RETERR(x) do { \
return (__r); \
struct dns_master_style {
unsigned int ttl_column;
unsigned int class_column;
unsigned int type_column;
unsigned int rdata_column;
unsigned int line_length;
unsigned int tab_width;
* rdata.h.
typedef struct dns_totext_ctx {
char * linebreak;
const dns_master_style_t
static isc_result_t
isc_region_t r;
unsigned int from;
if (ntabs < 0)
ntabs = 0;
if (ntabs > 0) {
return (ISC_R_NOSPACE);
p = r.base;
t = ntabs;
if (n > N_TABS)
n = N_TABS;
return (ISC_R_NOSPACE);
p = r.base;
t = nspaces;
if (n > N_SPACES)
n = N_SPACES;
return (ISC_R_SUCCESS);
static isc_result_t
isc_region_t r;
unsigned int col = 0;
return (DNS_R_TEXTTOOLONG);
return (DNS_R_TEXTTOOLONG);
return (result);
return (DNS_R_TEXTTOOLONG);
return (ISC_R_SUCCESS);
!= ISC_R_SUCCESS) \
return (result); \
static isc_result_t
unsigned int column;
column = 0;
!first))
target));
isc_region_t r;
unsigned int length;
return (ISC_R_NOSPACE);
unsigned int class_start;
target);
return (result);
unsigned int type_start;
return (result);
isc_region_t r;
target));
return (ISC_R_NOSPACE);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int column;
isc_region_t r;
column = 0;
target));
unsigned int class_start;
return (result);
unsigned int type_start;
return (result);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
* only by wire_test.c.
return (ISC_R_UNEXPECTED);
if (no_rdata_or_ttl)
static isc_result_t
isc_region_t r;
int newlength;
void *newmem;
return (ISC_R_NOMEMORY);
return (result);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
buffer, f);
return (result);
return (result);
return (ISC_R_SUCCESS);
FILE *f)
char *bufmem;
isc_region_t r;
return (ISC_R_UNEXPECTED);
return (ISC_R_NOMEMORY);
&dbiter);
goto create_iter_failure;
(char *) r.base);
goto iter_failure;
&buffer, f);
goto iter_failure;
goto iter_failure;
return (result);
return (ISC_R_UNEXPECTED);
return (ISC_R_UNEXPECTED);
return (result);