mx_15.c revision 52637f592f705ca93fadc218e403fd55e8ce4aea
5fa46bc91672ef5737aee6f99763161511566c24Tinderbox User * Copyright (C) 1998, 1999 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Permission to use, copy, modify, and distribute this software for any
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * purpose with or without fee is hereby granted, provided that the above
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
28a8f5b0de57d269cf2845c69cb6abe18cbd3b3aMark Andrews /* $Id: mx_15.c,v 1.12 1999/02/22 07:24:01 marka Exp $ */
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halleyfromtext_mx(dns_rdataclass_t class, dns_rdatatype_t type,
9192e92f7d0f4e78385a1d5f9b6607cc5bf0e42aBob Halley RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
6d5032f9a23fe1197610114983c9938ac419b20cBrian Wellington RETERR(uint16_tobuffer(token.value.as_ulong, target));
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley buffer_fromregion(&buffer, &token.value.as_region,
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley origin = (origin != NULL) ? origin : dns_rootname;
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley return (dns_name_fromtext(&name, &buffer, origin, downcase, target));
cee7525336d4710a64368875d92eb439d4d3efb1Mark Andrewstotext_mx(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley unsigned short num;
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halleyfromwire_mx(dns_rdataclass_t class, dns_rdatatype_t type,
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley return (dns_name_fromwire(&name, source, dctx, downcase, target));
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halleytowire_mx(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrencecompare_mx(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence return (dns_name_rdatacompare(&name1, &name2));
e672951ed28b2e9cc7a19c3d7fa4a258382f981cAutomatic Updaterfromstruct_mx(dns_rdataclass_t class, dns_rdatatype_t type, void *source,
4755b174df8221dff7e872f21d42b3572a74bf2fAndreas Gustafssontostruct_mx(dns_rdata_t *rdata, void *target) {
4755b174df8221dff7e872f21d42b3572a74bf2fAndreas Gustafsson#endif /* RDATA_GENERIC_MX_15_H */