minfo_14.c revision 5d51e67c3b4f35c1be742574aacc1d88fe6ed444
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * Copyright (C) 1998 Internet Software Consortium.
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * Permission to use, copy, modify, and distribute this software for any
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * purpose with or without fee is hereby granted, provided that the above
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * copyright notice and this permission notice appear in all copies.
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewsfromtext_minfo(dns_rdataclass_t class, dns_rdatatype_t type,
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews isc_boolean_t downcase, isc_buffer_t *target) {
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews if (isc_lex_gettoken(lexer, 0, &token) != ISC_R_SUCCESS)
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews buffer_fromregion(&buffer, &token.value.as_region,
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews origin = (origin != NULL) ? origin : dns_rootname;
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = dns_name_fromtext(&name, &buffer, origin, downcase, target);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews if (isc_lex_gettoken(lexer, 0, &token) != ISC_R_SUCCESS)
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews buffer_fromregion(&buffer, &token.value.as_region,
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews origin = (origin != NULL) ? origin : dns_rootname;
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews return (dns_name_fromtext(&name, &buffer, origin, downcase, target));
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewstotext_minfo(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = dns_name_totext(&prefix, sub, target);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = dns_name_totext(&prefix, sub, target);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewsfromwire_minfo(dns_rdataclass_t class, dns_rdatatype_t type,
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews isc_boolean_t downcase, isc_buffer_t *target) {
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = dns_name_fromwire(&rmail, source, dctx, downcase, target);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews return (dns_name_fromwire(&email, source, dctx, downcase, target));
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewstowire_minfo(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = dns_name_towire(&rmail, cctx, target);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = dns_name_towire(&rmail, cctx, target);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewscompare_minfo(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewsfromstruct_minfo(dns_rdataclass_t class, dns_rdatatype_t type, void *source,