master_test.c revision 9a791981764b0e19e0e48f6bd55edf5ad5272f4b
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Copyright (C) 1999 Internet Software Consortium.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Permission to use, copy, modify, and distribute this software for any
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * purpose with or without fee is hereby granted, provided that the above
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * copyright notice and this permission notice appear in all copies.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
421d4a06479e61fbdc35087f3c4abc9fe65ad72aEvan Huntisc_result_t print_dataset(void *arg, dns_name_t *owner,
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrewsprint_dataset(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews isc_buffer_init(&target, buf, 64*1024, ISC_BUFFERTYPE_TEXT);
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews result = dns_rdataset_totext(dataset, owner, ISC_FALSE, ISC_FALSE,
afaa290bb6acc504e93a0adbf20b6dd6c64e6d63Vernon Schryver RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews isc_buffer_init(&source, argv[1], strlen(argv[1]),
9fee08f655527a5dd849b171daeeee1dbbccca76Vernon Schryver isc_buffer_setactive(&source, strlen(argv[1]));
9fee08f655527a5dd849b171daeeee1dbbccca76Vernon Schryver isc_buffer_init(&target, name_buf, 255, ISC_BUFFERTYPE_BINARY);
88112d5fcb6b9e1d0f80105a9d2a6f09440c2401Mark Andrews result = dns_name_fromtext(&origin, &source, dns_rootname,
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews result = dns_master_loadfile(argv[1], &origin, &origin, 1,
9fee08f655527a5dd849b171daeeee1dbbccca76Vernon Schryver fprintf(stdout, "soacount = %d, nscount = %d\n",