rdata.c revision bfb2a81b65579882a80855c279cedc45aebd62e8
/*
* Copyright (C) 1998 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include <stdio.h>
#include <isc/assertions.h>
dns_name_t *target);
unsigned int type);
#include "code.h"
/***
*** Initialization
***/
void
/* ISC_LIST_INIT(rdata->list); */
}
/***
*** Comparisons
***/
int
int result;
int l;
if (result == -2) {
else
}
return (result);
}
/***
*** Conversions
***/
void
isc_region_t *r) {
}
void
}
isc_buffer_t *target) {
if (result == DNS_R_DEFAULT)
/* We should have consumed all out buffer */
if (!buffer_empty(source))
result = DNS_R_WIRE;
}
if (result != DNS_R_SUCCESS) {
}
return (result);
}
isc_buffer_t *target) {
if (result == DNS_R_DEFAULT) {
return (DNS_R_NOSPACE);
return (DNS_R_SUCCESS);
}
return (result);
}
isc_buffer_t *target) {
if (result == DNS_R_DEFAULT)
}
if (result != DNS_R_SUCCESS) {
}
return (result);
}
if (result == DNS_R_DEFAULT)
return (result);
}
void *source,
isc_buffer_t *target) {
if (result == DNS_R_DEFAULT)
}
if (result != DNS_R_SUCCESS)
return (result);
}
if (result == DNS_R_DEFAULT)
return (result);
}
static unsigned int
}
static dns_result_t
unsigned int tl;
unsigned int n;
unsigned char *sp;
unsigned char *tp;
n = *sp++;
if (tl < 1)
return (DNS_R_NOSPACE);
*tp++ = '"';
tl--;
while (n--) {
if (tl < 4)
return (DNS_R_NOSPACE);
tp += 4;
tl -= 4;
continue;
}
if (tl < 2)
return (DNS_R_NOSPACE);
*tp++ = '\\';
tl--;
}
if (tl < 1)
return (DNS_R_NOSPACE);
tl--;
}
if (tl < 1)
return (DNS_R_NOSPACE);
*tp++ = '"';
tl--;
return (DNS_R_SUCCESS);
}
static dns_result_t
return (DNS_R_NOSPACE);
return (DNS_R_UNKNOWN);
return (DNS_R_SUCCESS);
}
static dns_result_t
unsigned int n;
return (DNS_R_UNKNOWN);
return (DNS_R_NOSPACE);
isc_buffer_forward(source, n);
isc_buffer_add(target, n);
return (DNS_R_SUCCESS);
}
static isc_boolean_t
goto return_false;
goto return_false;
goto return_false;
goto return_false;
return (ISC_TRUE);
return (ISC_FALSE);
}
static dns_result_t
unsigned int l;
return (DNS_R_NOSPACE);
isc_buffer_add(target, l);
return (DNS_R_SUCCESS);
}
static isc_boolean_t
}
static void
unsigned int type) {
}
static isc_result_t
return (DNS_R_NOSPACE);
return (DNS_R_SUCCESS);
}
static isc_result_t
return (DNS_R_NOSPACE);
return (DNS_R_SUCCESS);
}
static unsigned long
unsigned long value;
return(value);
}
static unsigned short
}