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 INTERNET SOFTWARE CONSORTIUM
9 .\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
10 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
11 .\" INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
12 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
13 .\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
14 .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15 .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" ""
19 lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
21 \fB#include <lwres/netdb.h>
25 lwres_getrrsetbyname(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);
30 lwres_freerrset(struct rrsetinfo *rrset);
33 The following structures are used:
37 unsigned int rdi_length; /* length of data */
38 unsigned char *rdi_data; /* record data */
42 unsigned int rri_flags; /* RRSET_VALIDATED... */
43 unsigned int rri_rdclass; /* class number */
44 unsigned int rri_rdtype; /* RR type number */
45 unsigned int rri_ttl; /* time to live */
46 unsigned int rri_nrdatas; /* size of rdatas array */
47 unsigned int rri_nsigs; /* size of sigs array */
48 char *rri_name; /* canonical name */
49 struct rdatainfo *rri_rdatas; /* individual records */
50 struct rdatainfo *rri_sigs; /* individual signatures */
56 \fBlwres_getrrsetbyname()\fR
57 gets a set of resource records associated with a
64 a pointer a to null-terminated string. The
66 field is currently unused and must be zero.
68 After a successful call to
69 \fBlwres_getrrsetbyname()\fR,
73 structure, containing a list of one or more
75 structures containing resource records and potentially another list of
77 structures containing SIG resource records
78 associated with those records.
83 are copied from the parameters.
87 are properties of the obtained rrset.
88 The resource records contained in
92 are in uncompressed DNS wire format.
93 Properties of the rdataset are represented in the
95 bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC
96 validated and the signatures verified.
98 All of the information returned by
99 \fBlwres_getrrsetbyname()\fR
100 is dynamically allocated: the
105 and the canonical host name strings pointed to by the
107 Memory allocated for the dynamically allocated structures created by
109 \fBlwres_getrrsetbyname()\fR
111 \fBlwres_freerrset()\fR.
116 \fBlwres_getrrsetbyname()\fR.
120 \fBlwres_getrrsetbyname()\fR
121 returns zero on success, and one of the following error
122 codes if an error occurred:
125 the name does not exist
128 the name exists, but does not have data of the desired type
130 \fBERRSET_NOMEMORY\fR
131 memory could not be allocated
134 a parameter is invalid