soa_6.h revision 26b0f58b6c4d65bc8b131debf40b8c376c2978bf
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * Copyright (C) 1998 Internet Software Consortium.
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * Permission to use, copy, modify, and distribute this software for any
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * purpose with or without fee is hereby granted, provided that the above
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * copyright notice and this permission notice appear in all copies.
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
f2314fbd7911bacccf87d13562b38fafa1aac9eaMichael Graff * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff /* $Id: soa_6.h,v 1.5 1999/01/20 02:41:11 halley Exp $ */
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Grafffromtext_soa(dns_rdataclass_t class, dns_rdatatype_t type,
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff isc_boolean_t downcase, isc_buffer_t *target) {
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff if (isc_lex_gettoken(lexer, 0, &token) != ISC_R_SUCCESS)
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff buffer_fromregion(&buffer, &token.value.as_region,
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff origin = (origin != NULL) ? origin : dns_rootname;
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_fromtext(&name, &buffer, origin, downcase, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff if (isc_lex_gettoken(lexer, 0, &token) != ISC_R_SUCCESS)
db4871e8437dd0067614b4dfd9183cab3425e836Michael Graff buffer_fromregion(&buffer, &token.value.as_region,
db4871e8437dd0067614b4dfd9183cab3425e836Michael Graff origin = (origin != NULL) ? origin : dns_rootname;
db4871e8437dd0067614b4dfd9183cab3425e836Michael Graff result = dns_name_fromtext(&name, &buffer, origin, downcase, target);
db4871e8437dd0067614b4dfd9183cab3425e836Michael Graff for (i = 0; i < 5; i++) {
db4871e8437dd0067614b4dfd9183cab3425e836Michael Graff if (isc_lex_gettoken(lexer, ISC_LEXOPT_NUMBER, &token)
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = uint32_fromtext(token.value.as_ulong, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Grafftotext_soa(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff isc_region_consume(&dregion, name_length(&mname));
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff isc_region_consume(&dregion, name_length(&rname));
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_totext(&prefix, sub, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_totext(&prefix, sub, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff for (i = 0; i < 5 ; i++) {
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff unsigned long num;
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Grafffromwire_soa(dns_rdataclass_t class, dns_rdatatype_t type,
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff isc_boolean_t downcase, isc_buffer_t *target) {
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_fromwire(&mname, source, dctx, downcase, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_fromwire(&rname, source, dctx, downcase, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Grafftowire_soa(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff isc_region_consume(&sregion, name_length(&mname));
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_towire(&mname, cctx, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff isc_region_consume(&sregion, name_length(&rname));
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = dns_name_towire(&rname, cctx, target);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graffcompare_soa(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Graff result = memcmp(region1.base, region2.base, 12);
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Grafffromstruct_soa(dns_rdataclass_t class, dns_rdatatype_t type, void *source,
bb2d54f1b3654857b8cb0209612ed847afbd9d3cMichael Grafftostruct_soa(dns_rdata_t *rdata, void *target) {
return (DNS_R_NOTIMPLEMENTED);