1 .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000, 2001 Internet Software Consortium.
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
16 .\" $Id: lwres_getrrsetbyname.3,v 1.11.2.2 2004/03/15 04:45:03 marka Exp $
18 .TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" ""
20 lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
22 \fB#include <lwres/netdb.h>
26 lwres_getrrsetbyname(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);
31 lwres_freerrset(struct rrsetinfo *rrset);
35 The following structures are used:
39 unsigned int rdi_length; /* length of data */
40 unsigned char *rdi_data; /* record data */
44 unsigned int rri_flags; /* RRSET_VALIDATED... */
45 unsigned int rri_rdclass; /* class number */
46 unsigned int rri_rdtype; /* RR type number */
47 unsigned int rri_ttl; /* time to live */
48 unsigned int rri_nrdatas; /* size of rdatas array */
49 unsigned int rri_nsigs; /* size of sigs array */
50 char *rri_name; /* canonical name */
51 struct rdatainfo *rri_rdatas; /* individual records */
52 struct rdatainfo *rri_sigs; /* individual signatures */
58 \fBlwres_getrrsetbyname()\fR
59 gets a set of resource records associated with a
66 a pointer a to null-terminated string. The
68 field is currently unused and must be zero.
70 After a successful call to
71 \fBlwres_getrrsetbyname()\fR,
75 structure, containing a list of one or more
77 structures containing resource records and potentially another list of
79 structures containing SIG resource records
80 associated with those records.
85 are copied from the parameters.
89 are properties of the obtained rrset.
90 The resource records contained in
94 are in uncompressed DNS wire format.
95 Properties of the rdataset are represented in the
97 bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC
98 validated and the signatures verified.
100 All of the information returned by
101 \fBlwres_getrrsetbyname()\fR
102 is dynamically allocated: the
107 and the canonical host name strings pointed to by the
109 Memory allocated for the dynamically allocated structures created by
111 \fBlwres_getrrsetbyname()\fR
113 \fBlwres_freerrset()\fR.
118 \fBlwres_getrrsetbyname()\fR.
122 \fBlwres_getrrsetbyname()\fR
123 returns zero on success, and one of the following error
124 codes if an error occurred:
127 the name does not exist
130 the name exists, but does not have data of the desired type
132 \fBERRSET_NOMEMORY\fR
133 memory could not be allocated
136 a parameter is invalid