opt_41.c revision 3d17a3ba61a303d5c4d9867068d0fbe9f24d2988
/*
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* 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.
*/
/* $Id: opt_41.c,v 1.34 2009/12/04 21:09:34 marka Exp $ */
/* Reviewed: Thu Mar 16 14:06:44 PST 2000 by gson */
/* RFC2671 */
#ifndef RDATA_GENERIC_OPT_41_C
#define RDATA_GENERIC_OPT_41_C
#define RRTYPE_OPT_ATTRIBUTES (DNS_RDATATYPEATTR_SINGLETON | \
static inline isc_result_t
/*
* OPT records do not have a text format.
*/
return (ISC_R_NOTIMPLEMENTED);
}
static inline isc_result_t
isc_region_t r;
char buf[sizeof("64000 64000")];
/*
* OPT records do not have a text format.
*/
dns_rdata_toregion(rdata, &r);
while (r.length > 0) {
option = uint16_fromregion(&r);
isc_region_consume(&r, 2);
length = uint16_fromregion(&r);
isc_region_consume(&r, 2);
if (length > 0) {
or = r;
isc_region_consume(&r, length);
}
if (r.length > 0)
}
return (ISC_R_SUCCESS);
}
static inline isc_result_t
unsigned int total;
total = 0;
return (ISC_R_UNEXPECTEDEND);
/*
* Eat the 16bit option code. There is nothing to
* be done with it currently.
*/
total += 4;
return (ISC_R_UNEXPECTEDEND);
}
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
}
static inline isc_result_t
}
static inline int
}
static inline isc_result_t
return (ISC_R_UNEXPECTEDEND);
}
return (ISC_R_UNEXPECTEDEND);
}
static inline isc_result_t
isc_region_t r;
dns_rdata_toregion(rdata, &r);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
}
static inline void
return;
}
static inline isc_result_t
return (ISC_R_SUCCESS);
}
static inline isc_result_t
/*
* OPT records are not digested.
*/
return (ISC_R_NOTIMPLEMENTED);
}
static inline isc_boolean_t
}
static inline isc_boolean_t
return (ISC_TRUE);
}
static inline int
}
#endif /* RDATA_GENERIC_OPT_41_C */