lwres_getrrsetbyname.docbook revision c651f15b30f1dae5cc2f00878fb5da5b3a35a468
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - Copyright (C) 2000, 2001 Internet Software Consortium.
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - Permission to use, copy, modify, and distribute this software for any
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - purpose with or without fee is hereby granted, provided that the above
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - copyright notice and this permission notice appear in all copies.
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg - PERFORMANCE OF THIS SOFTWARE.
7190e58eec40192c9719d2f2593471eda14e7e7cfuankg<!-- $Id: lwres_getrrsetbyname.docbook,v 1.5 2005/04/07 03:50:03 marka Exp $ -->
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg<refentryinfo>
95ca7cc2aa11b41497ffab3a1003bc09d24b6bc1fuankg</refentryinfo>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</refnamediv>
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes<refsynopsisdiv>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<funcsynopsis>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<funcsynopsisinfo>#include <lwres/netdb.h></funcsynopsisinfo>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<funcprototype>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<function>lwres_getrrsetbyname</function></funcdef>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</funcprototype>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<funcprototype>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</funcprototype>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</funcsynopsis>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesThe following structures are used:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<programlisting>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesstruct rdatainfo {
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes unsigned int rdi_length; /* length of data */
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes unsigned char *rdi_data; /* record data */
b387b9d37fc71c534f4718777454a8f5a1169017fuankgstruct rrsetinfo {
b387b9d37fc71c534f4718777454a8f5a1169017fuankg unsigned int rri_flags; /* RRSET_VALIDATED... */
b387b9d37fc71c534f4718777454a8f5a1169017fuankg unsigned int rri_rdclass; /* class number */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes unsigned int rri_rdtype; /* RR type number */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes unsigned int rri_ttl; /* time to live */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes unsigned int rri_nrdatas; /* size of rdatas array */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes unsigned int rri_nsigs; /* size of sigs array */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes char *rri_name; /* canonical name */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes struct rdatainfo *rri_rdatas; /* individual records */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes struct rdatainfo *rri_sigs; /* individual signatures */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</programlisting>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</refsynopsisdiv>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesgets a set of resource records associated with a
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesa pointer a to null-terminated string. The
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesfield is currently unused and must be zero.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesAfter a successful call to
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesis a pointer to an
ce22ce4743d79a889dca64df4459c598e2c188c7fuankgstructure, containing a list of one or more
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesstructures containing resource records and potentially another list of
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesstructures containing SIG resource records
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesassociated with those records.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesare copied from the parameters.
ce22ce4743d79a889dca64df4459c598e2c188c7fuankgare properties of the obtained rrset.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesThe resource records contained in
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesare in uncompressed DNS wire format.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesProperties of the rdataset are represented in the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesbitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesvalidated and the signatures verified.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesAll of the information returned by
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesis dynamically allocated: the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesand the canonical host name strings pointed to by the
ce22ce4743d79a889dca64df4459c598e2c188c7fuankgMemory allocated for the dynamically allocated structures created by
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesa successful call to
ce22ce4743d79a889dca64df4459c598e2c188c7fuankgis released by
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesis a pointer to a
bb2b38cd44b032118359afbc743efbea12f48e61bnicholescreated by a call to
41022996c916eb4ab2ec3204eb491b64779eb100bnicholesreturns zero on success, and one of the following error
bb2b38cd44b032118359afbc743efbea12f48e61bnicholescodes if an error occurred:
ce22ce4743d79a889dca64df4459c598e2c188c7fuankg<variablelist>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<varlistentry><term><constant>ERRSET_NONAME</constant></term>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesthe name does not exist
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<varlistentry><term><constant>ERRSET_NODATA</constant></term>
ce22ce4743d79a889dca64df4459c598e2c188c7fuankgthe name exists, but does not have data of the desired type
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<varlistentry><term><constant>ERRSET_NOMEMORY</constant></term>
0662ed52e814f8f08ef0e09956413a792584eddffuankgmemory could not be allocated
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<varlistentry><term><constant>ERRSET_INVAL</constant></term>
0662ed52e814f8f08ef0e09956413a792584eddffuankga parameter is invalid
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<varlistentry><term><constant>ERRSET_FAIL</constant></term>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesother failure
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</variablelist>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<citerefentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes</citerefentry>.