905N/A - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 905N/A - Copyright (C) 2000, 2001 Internet Software Consortium. 905N/A - Permission to use, copy, modify, and distribute this software for any 905N/A - purpose with or without fee is hereby granted, provided that the above 905N/A - copyright notice and this permission notice appear in all copies. 905N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 905N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 905N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 905N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 905N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 905N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 905N/A - PERFORMANCE OF THIS SOFTWARE. 905N/A>lwres_getrrsetbyname</
TITLE 3996N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.73 4448N/A>lwres_getrrsetbyname, lwres_freerrset -- retrieve DNS records</
DIV 4448N/A>(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);</
CODE 4448N/A>(struct rrsetinfo *rrset);</
CODE 4448N/A>The following structures are used:
4448N/A unsigned int rdi_length; /* length of data */
905N/A unsigned char *rdi_data; /* record data */
7049N/A unsigned int rri_flags; /* RRSET_VALIDATED... */
905N/A unsigned int rri_rdclass; /* class number */
905N/A unsigned int rri_rdtype; /* RR type number */
905N/A unsigned int rri_ttl; /* time to live */
905N/A unsigned int rri_nrdatas; /* size of rdatas array */
905N/A unsigned int rri_nsigs; /* size of sigs array */
905N/A char *rri_name; /* canonical name */
905N/A struct rdatainfo *rri_rdatas; /* individual records */
4448N/A struct rdatainfo *rri_sigs; /* individual signatures */
905N/A>lwres_getrrsetbyname()</
TT 4448N/Agets 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()</
TTstructure, 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()</
TTis dynamically allocated: the
and the canonical host name strings pointed to by the
Memory allocated for the dynamically allocated structures created by
>lwres_getrrsetbyname()</
TT>lwres_getrrsetbyname()</
TT>lwres_getrrsetbyname()</
TTreturns 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