0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 1998-2001, 2004, 2007, 2009, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4b6dc226f78862286daa69fba761eac9fd5da16aAutomatic Updater/* $Id: minfo_14.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
ce8b84ce64a7f1b3b7b558a4aa14be946846080aJames Brister/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
f1b68725503ff3e46001eee5a1751e29a43a09d1Andreas Gustafsson for (i = 0; i < 2; i++) {
add4043305ca411202ed9cf1929a4179016515ceBrian Wellington RETERR(isc_lex_getmastertoken(lexer, &token,
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence buffer_fromregion(&buffer, &token.value.as_region);
9ac7076ebad044afb15e9e2687e3696868778538Mark Andrews RETTOK(dns_name_fromtext(&name, &buffer, origin,
2047977ce2dfcfe3a0fa2d638c3242841310fad3Mark Andrews if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_minfo);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson sub = name_prefix(&rmail, tctx->origin, &prefix);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson sub = name_prefix(&email, tctx->origin, &prefix);
deaaf94332abbfdb3aff53675546acfed16e5eb6Mark Andrews return (dns_name_totext(&prefix, sub, target));
ae114ded82e773a4d9058f833f964a17514712a8Brian Wellington dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
4b6dc226f78862286daa69fba761eac9fd5da16aAutomatic Updater RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
4b6dc226f78862286daa69fba761eac9fd5da16aAutomatic Updater return (dns_name_fromwire(&email, source, dctx, options, target));
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_minfo);
94a08e09db3dc844b6ee4841c368a2d7074a9c3fAndreas Gustafsson dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
ffe74cc719aa0f10c38fbc1f2f3ea7db0960cb8fMark Andrews isc_region_consume(®ion, name_length(&rmail));
deaaf94332abbfdb3aff53675546acfed16e5eb6Mark Andrews return (dns_name_towire(&rmail, cctx, target));
4529cdaedaf1a0a5f8ff89aeca510b7a4475446cBob Halleystatic inline int
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata1->type == dns_rdatatype_minfo);
41aad56b6cc458cbf7b8483576d990a77ae9bac2Andreas Gustafsson order = dns_name_rdatacompare(&name1, &name2);
deaaf94332abbfdb3aff53675546acfed16e5eb6Mark Andrews isc_region_consume(®ion1, name_length(&name1));
deaaf94332abbfdb3aff53675546acfed16e5eb6Mark Andrews isc_region_consume(®ion2, name_length(&name2));
41aad56b6cc458cbf7b8483576d990a77ae9bac2Andreas Gustafsson order = dns_name_rdatacompare(&name1, &name2);
373ce67419680a398ba3dc51a14a486caaf0afb0Mark Andrews RETERR(isc_buffer_copyregion(target, ®ion));
373ce67419680a398ba3dc51a14a486caaf0afb0Mark Andrews return (isc_buffer_copyregion(target, ®ion));
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_minfo);
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews RETERR(name_duporclone(&name, mctx, &minfo->rmailbox));
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews isc_region_consume(®ion, name_length(&name));
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews result = name_duporclone(&name, mctx, &minfo->emailbox);
4529cdaedaf1a0a5f8ff89aeca510b7a4475446cBob Halleystatic inline void
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(minfo->common.rdtype == dns_rdatatype_minfo);
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_minfo);
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_minfo);
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_minfo);
2047977ce2dfcfe3a0fa2d638c3242841310fad3Mark Andrews isc_region_consume(®ion, name_length(&name));
3d17a3ba61a303d5c4d9867068d0fbe9f24d2988Mark Andrewsstatic inline int
854d0238dbc2908490197984b3b9d558008a53dfMark Andrews#endif /* RDATA_GENERIC_MINFO_14_C */