a6_38.h revision 901b5fb3b3fa409a42ac7e93b7643f373997305b
ca41b452ede6feaa9d8739ec3cae19389a7b0d03Bob Halley * Copyright (C) 1999 Internet Software Consortium.
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * Permission to use, copy, modify, and distribute this software for any
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * purpose with or without fee is hereby granted, provided that the above
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * copyright notice and this permission notice appear in all copies.
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley /* $Id: a6_38.h,v 1.1 1999/02/02 04:52:31 marka Exp $ */
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley#define MAX(A, B) ((A > B) ? (A) : (B))
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halleyfromtext_in_a6(dns_rdataclass_t class, dns_rdatatype_t type,
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley unsigned char prefixlen;
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley unsigned char octets;
941f41d6139c868e357892869c94c4693b943373Bob Halley unsigned char mask;
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley /* prefix length */
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley /* suffix */
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley /* prefix 0..127 */
01cc5813ca716d48c46960302d9845ef7c984f93Bob Halley /* octets 0..15 */
01cc5813ca716d48c46960302d9845ef7c984f93Bob Halley RETERR(gettoken(lexer, &token, isc_tokentype_string,
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley if (isc_inet_pton(AF_INET6, token.value.as_pointer, &addr) != 1)
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley RETERR(mem_tobuffer(target, &addr[octets], 16 - octets));
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley buffer_fromregion(&buffer, &token.value.as_region,
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley origin = (origin != NULL) ? origin : dns_rootname;
01cc5813ca716d48c46960302d9845ef7c984f93Bob Halley return (dns_name_fromtext(&name, &buffer, origin, downcase, target));
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halleytotext_in_a6(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley unsigned char prefixlen;
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley unsigned char octets;
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley unsigned char mask;
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halleyfromwire_in_a6(dns_rdataclass_t class, dns_rdatatype_t type,
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley unsigned char prefixlen;
e4653123ecc6cdbfc0b9eda6e98e44af3b1f9a08Mark Andrews unsigned char octets;
e4653123ecc6cdbfc0b9eda6e98e44af3b1f9a08Mark Andrews unsigned char mask;
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley /* prefix length */
68d654930939926e4ddbe2b68234dd7c2da97de5Bob Halley /* suffix */
return (DNS_R_UNEXPECTEDEND);
if (prefixlen == 0)
return (DNS_R_SUCCESS);
static dns_result_t
unsigned char prefixlen;
unsigned char octets;
if (prefixlen == 0)
return (DNS_R_SUCCESS);
int result;
unsigned char prefixlen;
unsigned char octets;
if (result != 0)
static dns_result_t
return (DNS_R_NOTIMPLEMENTED);
static dns_result_t
return (DNS_R_NOTIMPLEMENTED);