1 .\" Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000, 2001 Internet Software Consortium.
4 .\" Permission to use, copy, modify, and/or 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.
20 .\" Title: lwres_getrrsetbyname
22 .\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
23 .\" Date: Oct 18, 2000
27 .TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" "BIND9"
28 .\" disable hyphenation
30 .\" disable justification (adjust text to left margin only)
33 lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
36 #include <lwres/netdb.h>
39 .BI "int lwres_getrrsetbyname(const\ char\ *" "hostname" ", unsigned\ int\ " "rdclass" ", unsigned\ int\ " "rdtype" ", unsigned\ int\ " "flags" ", struct\ rrsetinfo\ **" "res" ");"
41 .BI "void lwres_freerrset(struct\ rrsetinfo\ *" "rrset" ");"
43 The following structures are used:
48 unsigned int rdi_length; /* length of data */
49 unsigned char *rdi_data; /* record data */
58 unsigned int rri_flags; /* RRSET_VALIDATED... */
59 unsigned int rri_rdclass; /* class number */
60 unsigned int rri_rdtype; /* RR type number */
61 unsigned int rri_ttl; /* time to live */
62 unsigned int rri_nrdatas; /* size of rdatas array */
63 unsigned int rri_nsigs; /* size of sigs array */
64 char *rri_name; /* canonical name */
65 struct rdatainfo *rri_rdatas; /* individual records */
66 struct rdatainfo *rri_sigs; /* individual signatures */
73 \fBlwres_getrrsetbyname()\fR
74 gets a set of resource records associated with a
79 is a pointer a to null\-terminated string. The
81 field is currently unused and must be zero.
83 After a successful call to
84 \fBlwres_getrrsetbyname()\fR,
88 structure, containing a list of one or more
90 structures containing resource records and potentially another list of
92 structures containing SIG resource records associated with those records. The members
96 are copied from the parameters.
100 are properties of the obtained rrset. The resource records contained in
104 are in uncompressed DNS wire format. Properties of the rdataset are represented in the
106 bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC validated and the signatures verified.
108 All of the information returned by
109 \fBlwres_getrrsetbyname()\fR
110 is dynamically allocated: the
114 structures, and the canonical host name strings pointed to by the
115 \fBrrsetinfo\fRstructure. Memory allocated for the dynamically allocated structures created by a successful call to
116 \fBlwres_getrrsetbyname()\fR
118 \fBlwres_freerrset()\fR.
123 \fBlwres_getrrsetbyname()\fR.
127 \fBlwres_getrrsetbyname()\fR
128 returns zero on success, and one of the following error codes if an error occurred:
132 the name does not exist
137 the name exists, but does not have data of the desired type
140 \fBERRSET_NOMEMORY\fR
142 memory could not be allocated
147 a parameter is invalid
161 Copyright \(co 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
163 Copyright \(co 2000, 2001 Internet Software Consortium.