/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
*
* 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 ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC 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.
*/
#ifndef lint
#endif
#include "port_before.h"
#if __OpenBSD__
#endif
#include <errno.h>
#include <resolv.h>
#include <string.h>
#include "port_after.h"
#define CONSUME_SRC \
do { \
} while (0)
#define CONSUME_DST \
do { \
} while (0)
#define UNPACK_DNAME \
do { \
size_t t; \
\
return (-1); \
} \
CONSUME_SRC; \
n = t; \
CONSUME_DST; \
} while (0)
#define UNPACK_SOME(x) \
do { \
n = (x); \
return (-1); \
} \
} while (0)
#define UNPACK_REST(x) \
do { \
n = (x); \
return (-1); \
} \
} while (0)
{
int n;
switch (type) {
case ns_t_a:
break;
case ns_t_aaaa:
break;
case ns_t_cname:
case ns_t_mb:
case ns_t_mg:
case ns_t_mr:
case ns_t_ns:
case ns_t_ptr:
case ns_t_dname:
break;
case ns_t_soa:
break;
case ns_t_mx:
case ns_t_afsdb:
case ns_t_rt:
break;
case ns_t_px:
break;
case ns_t_srv:
break;
case ns_t_minfo:
case ns_t_rp:
break;
default:
break;
}
if (rdlen > 0) {
return (-1);
}
return (nrdlen);
}
#define EQUAL_CONSUME \
do { \
} while (0)
#define EQUAL_DNAME \
do { \
ssize_t n; \
\
return (0); \
if (n <= 0) \
return (n); \
n = rdlen1; \
} while (0)
#define EQUAL_SOME(x) \
do { \
size_t n = (x); \
\
return (-1); \
} \
return (0); \
} while (0)
int
{
switch (type) {
case ns_t_cname:
case ns_t_mb:
case ns_t_mg:
case ns_t_mr:
case ns_t_ns:
case ns_t_ptr:
case ns_t_dname:
break;
case ns_t_soa:
/* "There can be only one." --Highlander */
break;
case ns_t_mx:
case ns_t_afsdb:
case ns_t_rt:
break;
case ns_t_px:
break;
case ns_t_srv:
break;
case ns_t_minfo:
case ns_t_rp:
break;
default:
break;
}
return (0);
return (1);
}
#define REFERS_DNAME \
do { \
int n; \
\
if (n < 0) \
return (-1); \
if (n > 0) \
return (1); \
if (n < 0) \
return (-1); \
CONSUME_SRC; \
} while (0)
#define REFERS_SOME(x) \
do { \
size_t n = (x); \
\
if (n > rdlen) { \
return (-1); \
} \
CONSUME_SRC; \
} while (0)
int
{
switch (type) {
case ns_t_cname:
case ns_t_mb:
case ns_t_mg:
case ns_t_mr:
case ns_t_ns:
case ns_t_ptr:
case ns_t_dname:
break;
case ns_t_soa:
break;
case ns_t_mx:
case ns_t_afsdb:
case ns_t_rt:
break;
case ns_t_px:
break;
case ns_t_srv:
break;
case ns_t_minfo:
case ns_t_rp:
break;
default:
break;
}
if (rdlen != 0) {
return (-1);
}
return (0);
}