0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 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/.
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews for (i = 0; i < 2; i++) {
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews buffer_fromregion(&buffer, &token.value.as_region);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews RETTOK(dns_name_fromtext(&name, &buffer, origin,
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews isc_region_consume(&dregion, name_length(&prev));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews isc_region_consume(&dregion, name_length(&next));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews sub = name_prefix(&prev, tctx->origin, &prefix);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews sub = name_prefix(&next, tctx->origin, &prefix);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews RETERR(dns_name_fromwire(&prev, source, dctx, options, target));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews return(dns_name_fromwire(&next, source, dctx, options, target));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews isc_region_consume(&sregion, name_length(&prev));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews isc_region_consume(&sregion, name_length(&next));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrewsstatic inline int
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews return (isc_region_compare(®ion1, ®ion2));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews RETERR(isc_buffer_copyregion(target, ®ion));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews return(isc_buffer_copyregion(target, ®ion));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews isc_region_consume(®ion, name_length(&name));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews RETERR(name_duporclone(&name, mctx, &talink->prev));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews isc_region_consume(®ion, name_length(&name));
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews result = name_duporclone(&name, mctx, &talink->next);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrewsstatic inline void
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews REQUIRE(talink->common.rdtype == dns_rdatatype_talink);
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrewsstatic inline int
e0a30050c8516a3d54a4f8dcdd88435704a8a3edMark Andrews#endif /* RDATA_GENERIC_TALINK_58_C */