unspec_103.c revision e14969d29389da21783a18d58c207266a94bb538
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 1999, 2000 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
2bef3713093349af52ba61eaab07adf3207da873Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
2bef3713093349af52ba61eaab07adf3207da873Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
2bef3713093349af52ba61eaab07adf3207da873Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
2bef3713093349af52ba61eaab07adf3207da873Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
2bef3713093349af52ba61eaab07adf3207da873Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
de7df3e56fe99c33a415674b018aae93eee94750Evan Hunt * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
2bef3713093349af52ba61eaab07adf3207da873Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
de7df3e56fe99c33a415674b018aae93eee94750Evan Hunt/* $Id: unspec_103.c,v 1.19 2000/05/13 22:39:03 tale Exp $ */
2bef3713093349af52ba61eaab07adf3207da873Mark Andrewsfromtext_unspec(dns_rdataclass_t rdclass, dns_rdatatype_t type,
de7df3e56fe99c33a415674b018aae93eee94750Evan Hunttotext_unspec(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
de7df3e56fe99c33a415674b018aae93eee94750Evan Hunt return (btoa_totext(rdata->data, rdata->length, target));
2bef3713093349af52ba61eaab07adf3207da873Mark Andrewsfromwire_unspec(dns_rdataclass_t rdclass, dns_rdatatype_t type,
40a7e85f3ee3bd66a8f87bf8af674e1e48b05396Evan Hunt return (mem_tobuffer(target, sr.base, sr.length));
de7df3e56fe99c33a415674b018aae93eee94750Evan Hunttowire_unspec(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
67adc03ef81fb610f8df093b17f55275ee816754Evan Hunt return (mem_tobuffer(target, rdata->data, rdata->length));
434bfc3dfa2003ba0dd4b2392286806131fd6724Evan Huntstatic inline int
434bfc3dfa2003ba0dd4b2392286806131fd6724Evan Huntcompare_unspec(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
40a7e85f3ee3bd66a8f87bf8af674e1e48b05396Evan Huntfromstruct_unspec(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
baad8d9fd8dd054ce1edf350ff0c0f2038a1519eEvan Hunttostruct_unspec(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
434bfc3dfa2003ba0dd4b2392286806131fd6724Evan Hunt unspec->data = mem_maybedup(mctx, r.base, r.length);
22e29471c784acd09619841926c4f765e36ac74aEvan Huntstatic inline void
a0c1ad17abcf07a2765eb054304d9b8b09887af2Tinderbox Useradditionaldata_unspec(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
return (ISC_R_SUCCESS);
static inline isc_result_t
isc_region_t r;