masterdump.c revision 123a3dddc94534d3a6c6f81c118a5b63dc5994c3
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * Copyright (C) 1999-2001 Internet Software Consortium.
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * Permission to use, copy, modify, and distribute this software for any
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * purpose with or without fee is hereby granted, provided that the above
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * copyright notice and this permission notice appear in all copies.
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
62f2fefaec754e6a4841ff0e72726e6c0cd89c86Michał Kępień/* $Id: masterdump.c,v 1.45 2001/03/07 22:30:21 gson Exp $ */
#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
const dns_master_style_t
const dns_master_style_t
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);
int sig;
sig = 0;
case dns_rdatatype_soa:
case dns_rdatatype_ns:
dump_order_compare(const void *a, const void *b) {
static isc_result_t
buffer, f);
return (dumpresult);
goto again;
return (itresult);
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);
char *tempname;
int tempnamelen;
return (ISC_R_NOMEMORY);
goto cleanup;
goto cleanup;
(void)isc_stdio_close(f);
goto cleanup;
goto cleanup;
goto cleanup;
return (result);
FILE *f)
char *bufmem;
return (ISC_R_UNEXPECTED);
return (ISC_R_NOMEMORY);
goto failure;
goto failure;
return (result);
return (ISC_R_UNEXPECTED);
style, f);
return (ISC_R_UNEXPECTED);
return (result);