md_3.c revision 3d5cad69ec20157912e95cf3b79316dfb0a314f3
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews * Copyright (C) 1998 Internet Software Consortium.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff * Permission to use, copy, modify, and distribute this software for any
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff * purpose with or without fee is hereby granted, provided that the above
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff * copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
15a44745412679c30a6d022733925af70a38b715David Lawrence * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
15a44745412679c30a6d022733925af70a38b715David Lawrence * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
15a44745412679c30a6d022733925af70a38b715David Lawrence * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15a44745412679c30a6d022733925af70a38b715David Lawrence * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15a44745412679c30a6d022733925af70a38b715David Lawrence * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
15a44745412679c30a6d022733925af70a38b715David Lawrence * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
806c235ecf533b98d068b3f8df9d7abbe1e30cf9Mark Andrews /* $Id: md_3.c,v 1.4 1999/01/20 05:20:20 marka Exp $ */
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Grafffromtext_md(dns_rdataclass_t class, dns_rdatatype_t type,
ce24330566b66a5ca8522fa948fb36b94a4d6981Mark Andrews isc_boolean_t downcase, isc_buffer_t *target) {
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff unsigned int options = ISC_LEXOPT_EOL | ISC_LEXOPT_EOF;
5bd76af084edfdcd1cb4db9453ac781d32dde6f7Mark Andrews result = isc_lex_gettoken(lexer, options, &token);
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff buffer_fromregion(&buffer, &token.value.as_region,
ac77fece9a62537a9e0e5852498ebeda7b2978c3Bob Halley origin = (origin != NULL) ? origin : dns_rootname;
ac77fece9a62537a9e0e5852498ebeda7b2978c3Bob Halley return (dns_name_fromtext(&name, &buffer, origin, downcase, target));
f9df80f4348ef68043903efa08299480324f4823Michael Grafftotext_md(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
f9df80f4348ef68043903efa08299480324f4823Michael Graff return(dns_name_totext(&prefix, sub, target));
b02262cbcd550c63f85df76edc6fff556ea5e95dMichael Grafffromwire_md(dns_rdataclass_t class, dns_rdatatype_t type,
b02262cbcd550c63f85df76edc6fff556ea5e95dMichael Graff isc_boolean_t downcase, isc_buffer_t *target) {
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer return (dns_name_fromwire(&name, source, dctx, downcase, target));
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyertowire_md(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer return (dns_name_towire(&name, cctx, target));
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyercompare_md(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyerfromstruct_md(dns_rdataclass_t class, dns_rdatatype_t type, void *source,
f9df80f4348ef68043903efa08299480324f4823Michael Grafftostruct_md(dns_rdata_t *rdata, void *target) {
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff#endif /* RDATA_GENERIC_MD_3_H */