mx_15.c revision 6d12fdf96621801e80f3f4c2a8a569fe48766a20
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews * Copyright (C) 1998, 1999, 2000 Internet Software Consortium.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * Permission to use, copy, modify, and distribute this software for any
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * purpose with or without fee is hereby granted, provided that the above
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * 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
35541328a8c18ba1f984300dfe30ec8713c90031Mark Andrews/* $Id: mx_15.c,v 1.37 2000/06/01 18:26:21 tale Exp $ */
110d1702731f42dd620879c1d765ebe91f3920ceMichael Graff/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley RETERR(uint16_tobuffer(token.value.as_ulong, target));
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley buffer_fromregion(&buffer, &token.value.as_region);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley origin = (origin != NULL) ? origin : dns_rootname;
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley return (dns_name_fromtext(&name, &buffer, origin, downcase, target));
80b782f356f0692c11b4e52e8dd46ec41704e5a2Mark Andrews unsigned short num;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
078d49b63324f01d98301ee21671abee0c41fcdeBob Halley return (dns_name_fromwire(&name, source, dctx, downcase, target));
732e0731dec1922747bb3b3147cf2c3d16b22eaaBob Halley dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
28640d1da26d561f4137122fe64e9e8cc08bf11eBob Halleystatic inline int
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halleystatic inline void
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#endif /* RDATA_GENERIC_MX_15_C */