rdata.c revision 2383eb527269d333df4222da20e4b422c3662daa
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * Copyright (C) 1998-2003 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and/or distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * copyright notice and this permission notice appear in all copies.
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews * PERFORMANCE OF THIS SOFTWARE.
return (_r); \
void *arg
typedef struct dns_rdata_textctx {
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_boolean_t
static isc_result_t
static isc_result_t
static isc_boolean_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_uint32_t
static isc_uint16_t
static isc_uint8_t
static isc_uint8_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_uint16_t
static isc_result_t
const char *xdigits;
unsigned int val;
seen_xdigits = 0;
val = 0;
const char *pch;
if (!seen_xdigits)
seen_xdigits = 0;
val = 0;
if (seen_xdigits) {
int result;
return (result);
static inline isc_result_t
return (ISC_R_SUCCESS);
void *new;
return (source);
return (new);
#include "code.h"
int result = 0;
if (use_default) {
return (result);
int result = 0;
if (use_default) {
return (result);
unsigned int length;
if (type == 0)
return (DNS_R_FORMERR);
if (use_default) {
return (result);
return (ISC_R_SUCCESS);
if (use_default) {
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (result);
static isc_result_t
return (DNS_R_METATYPE);
ISC_FALSE));
return (ISC_R_RANGE);
return (result);
goto failure;
goto failure;
isc_region_t r;
goto failure;
return (ISC_R_SUCCESS);
return (result);
char *name;
unsigned long line;
unsigned int length;
return (result);
if (!unknown)
return (result);
static isc_result_t
return (result);
return (result);
return (result);
target);
return (result);
static isc_result_t
return (ISC_R_SUCCESS);
if (use_default)
return (result);
unsigned int length;
if (use_default)
(void)NULL;
return (result);
if (use_default)
(void)NULL;
return (result);
void *arg)
if (use_default)
return (result);
isc_region_t r;
if (use_default) {
return (result);
return (result);
return (result);
return (DNS_RDATATYPEATTR_UNKNOWN);
unsigned int hash;
return (DNS_R_UNKNOWN);
char *endp;
unsigned int val;
return (ISC_R_SUCCESS);
return (DNS_R_UNKNOWN);
if (size == 0U)
static isc_result_t
unsigned int tl;
unsigned char *sp;
char *tp;
n = *sp++;
if (quote) {
return (ISC_R_NOSPACE);
tl--;
return (ISC_R_NOSPACE);
sp++;
return (ISC_R_NOSPACE);
tl--;
return (ISC_R_NOSPACE);
tl--;
if (quote) {
return (ISC_R_NOSPACE);
tl--;
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int n, nrem;
return (ISC_R_NOSPACE);
nrem--;
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
if (nrem == 0)
nrem--;
if (escape)
return (DNS_R_SYNTAX);
return (ISC_R_SUCCESS);
static isc_result_t
return(ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int tl;
unsigned int n0, n;
unsigned char *sp;
char *tp;
return (ISC_R_NOSPACE);
tl--;
if (lenbyte) {
return (ISC_R_NOSPACE);
sp++;
return (ISC_R_NOSPACE);
tl--;
return (ISC_R_NOSPACE);
tl--;
return (ISC_R_NOSPACE);
tl--;
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int n, nrem;
unsigned char *t0, *t;
return (ISC_R_NOSPACE);
if (lenbyte) {
nrem--;
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
return (DNS_R_SYNTAX);
nrem--;
if (nrem == 0)
if (escape)
return (DNS_R_SYNTAX);
if (lenbyte) {
return (ISC_R_SUCCESS);
static isc_result_t
return(ISC_R_UNEXPECTEDEND);
return (DNS_R_SYNTAX);
if (lenbyte) {
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_boolean_t
goto return_false;
goto return_false;
goto return_false;
goto return_false;
goto return_false;
return (ISC_TRUE);
return (ISC_FALSE);
static isc_result_t
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOSPACE);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_boolean_t
static isc_result_t
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_RANGE);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_RANGE);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
isc_region_t r;
static isc_uint32_t
return(value);
static isc_uint16_t
static isc_uint16_t
static isc_uint8_t
static isc_uint8_t
static isc_result_t
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
c = (unsigned char)value;
if (!isascii(c))
if (isupper(c))
c = tolower(c);
return (int)(s - hexdigits);
return (int)(s - decdigits);
struct state {
static isc_result_t
if (bcount != 0)
return(DNS_R_SYNTAX);
if (bcount == 0) {
++bcount;
++bcount;
word = 0;
bcount = 0;
return(DNS_R_SYNTAX);
return(ISC_R_SUCCESS);
static isc_result_t
Ceor ^= c;
Csum += c;
Crot += c;
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
ISC_FALSE));
ISC_FALSE));
ISC_FALSE));
return (DNS_R_SYNTAX);
ISC_FALSE));
return (DNS_R_SYNTAX);
ISC_FALSE));
return (DNS_R_SYNTAX);
return(DNS_R_BADCKSUM);
return (ISC_R_SUCCESS);
static isc_result_t
Ceor ^= c;
Csum += c;
Crot += c;
word |= c;
if (word == 0) {
return (ISC_R_NOSPACE);
register int tmp = 0;
if (tmpword < 0) {
if (tmpword < 0) {
return (ISC_R_NOSPACE);
+ tmp];
bcount = 0;
return (ISC_R_SUCCESS);
static isc_result_t
int inc;
while (bcount != 0)
const char *file;
unsigned long line;
const char *file;
unsigned long line;
case isc_tokentype_eol:
case isc_tokentype_eof:
case isc_tokentype_number:
case isc_tokentype_string:
case isc_tokentype_qstring:
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
switch (section) {
case DNS_SECTION_PREREQUISITE:
case dns_rdataclass_none:
case dns_rdatatype_any:
case dns_rdataclass_any:
case dns_rdatatype_any:
case DNS_SECTION_UPDATE:
case dns_rdataclass_none:
case dns_rdataclass_any:
case dns_rdatatype_any: