/*
* Copyright (C) 1999-2004, 2007, 2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: a6_38.c,v 1.56 2009/12/04 22:06:37 tbox Exp $ */
/* RFC2874 */
#ifndef RDATA_IN_1_A6_28_C
#define RDATA_IN_1_A6_28_C
#define RRTYPE_A6_ATTRIBUTES (0)
static inline isc_result_t
unsigned char prefixlen;
unsigned char octets;
unsigned char mask;
/*
* Prefix length.
*/
ISC_FALSE));
/*
* Suffix.
*/
if (prefixlen != 128) {
/*
* Prefix 0..127.
*/
/*
* Octets 0..15.
*/
ISC_FALSE));
}
if (prefixlen == 0)
return (ISC_R_SUCCESS);
ISC_FALSE));
if ((options & DNS_RDATA_CHECKNAMES) != 0)
return (ISC_R_SUCCESS);
}
static inline isc_result_t
unsigned char prefixlen;
unsigned char octets;
unsigned char mask;
if (prefixlen != 128) {
}
if (prefixlen == 0)
return (ISC_R_SUCCESS);
}
static inline isc_result_t
unsigned char prefixlen;
unsigned char octets;
unsigned char mask;
/*
* Prefix length.
*/
return (ISC_R_UNEXPECTEDEND);
if (prefixlen > 128)
return (ISC_R_RANGE);
/*
* Suffix.
*/
if (prefixlen != 128) {
return (ISC_R_UNEXPECTEDEND);
}
if (prefixlen == 0)
return (ISC_R_SUCCESS);
}
static inline isc_result_t
unsigned char prefixlen;
unsigned char octets;
if (prefixlen == 0)
return (ISC_R_SUCCESS);
}
static inline int
int order;
unsigned char octets;
if (prefixlen1 < prefixlen2)
return (-1);
else if (prefixlen1 > prefixlen2)
return (1);
/*
* Prefix lengths are equal.
*/
if (octets > 0) {
if (order < 0)
return (-1);
else if (order > 0)
return (1);
/*
* Address suffixes are equal.
*/
if (prefixlen1 == 0)
return (order);
}
}
static inline isc_result_t
int octets;
return (ISC_R_RANGE);
/* Suffix */
if (bits != 0) {
octets--;
}
if (octets > 0)
octets));
}
return (ISC_R_SUCCESS);
}
static inline isc_result_t
unsigned char octets;
isc_region_t r;
dns_rdata_toregion(rdata, &r);
isc_region_consume(&r, 1);
/*
* Suffix.
*/
isc_region_consume(&r, octets);
}
/*
* Prefix.
*/
dns_name_fromregion(&name, &r);
}
return (ISC_R_SUCCESS);
}
static inline void
return;
}
static inline isc_result_t
return (ISC_R_SUCCESS);
}
static inline isc_result_t
if (result != ISC_R_SUCCESS)
return (result);
if (prefixlen == 0)
return (ISC_R_SUCCESS);
}
static inline isc_boolean_t
}
static inline isc_boolean_t
unsigned int prefixlen;
if (prefixlen == 0)
return (ISC_TRUE);
return (ISC_FALSE);
}
return (ISC_TRUE);
}
static inline int
}
#endif /* RDATA_IN_1_A6_38_C */