163N/A - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") 163N/A - Copyright (C) 2000, 2001 Internet Software Consortium. 163N/A - Permission to use, copy, modify, and distribute this software for any 163N/A - purpose with or without fee is hereby granted, provided that the above 163N/A - copyright notice and this permission notice appear in all copies. 163N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 163N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 163N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 163N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 163N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 163N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 163N/A - PERFORMANCE OF THIS SOFTWARE. 163N/A>lwres_getrrsetbyname</
TITLE 163N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.79"></
HEAD 163N/A>lwres_getrrsetbyname</
H1 163N/A>lwres_getrrsetbyname, lwres_freerrset -- retrieve DNS records</
DIV 163N/ACLASS="FUNCSYNOPSISINFO" 163N/Alwres_getrrsetbyname</
CODE 163N/A>(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);</
CODE 163N/A>(struct rrsetinfo *rrset);</
CODE 163N/A>The following structures are used:
163N/A unsigned int rdi_length; /* length of data */
211N/A unsigned char *rdi_data; /* record data */
163N/A unsigned int rri_flags; /* RRSET_VALIDATED... */
163N/A unsigned int rri_rdclass; /* class number */
163N/A unsigned int rri_rdtype; /* RR type number */
163N/A unsigned int rri_ttl; /* time to live */
181N/A unsigned int rri_nrdatas; /* size of rdatas array */
163N/A unsigned int rri_nsigs; /* size of sigs array */
163N/A char *rri_name; /* canonical name */
163N/A struct rdatainfo *rri_rdatas; /* individual records */
163N/A struct rdatainfo *rri_sigs; /* individual signatures */
>lwres_getrrsetbyname()</
CODEgets a set of resource records associated with a
a pointer a to null-terminated string. The
field is currently unused and must be zero.</
P>After a successful call to
>lwres_getrrsetbyname()</
CODEstructure, containing a list of one or more
structures containing resource records and potentially another list of
structures containing SIG resource records
associated with those records.
are copied from the parameters.
are properties of the obtained rrset.
The resource records contained in
are in uncompressed DNS wire format.
Properties of the rdataset are represented in the
bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC
validated and the signatures verified. </
P>All of the information returned by
>lwres_getrrsetbyname()</
CODEis dynamically allocated: the
and the canonical host name strings pointed to by the
Memory allocated for the dynamically allocated structures created by
>lwres_getrrsetbyname()</
CODE>lwres_getrrsetbyname()</
CODE>lwres_getrrsetbyname()</
CODEreturns zero on success, and one of the following error
codes if an error occurred:
>the name does not exist</
P>the name exists, but does not have data of the desired type</
P>memory could not be allocated</
P>a parameter is invalid</
P