1 .\" Copyright (C) 2004, 2005 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.1.8.6 2006/06/29 13:02:31 marka Exp $
20 .\" Title: lwres_getrrsetbyname
22 .\" Generator: DocBook XSL Stylesheets v1.70.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 */
52 unsigned int rri_flags; /* RRSET_VALIDATED... */
53 unsigned int rri_rdclass; /* class number */
54 unsigned int rri_rdtype; /* RR type number */
55 unsigned int rri_ttl; /* time to live */
56 unsigned int rri_nrdatas; /* size of rdatas array */
57 unsigned int rri_nsigs; /* size of sigs array */
58 char *rri_name; /* canonical name */
59 struct rdatainfo *rri_rdatas; /* individual records */
60 struct rdatainfo *rri_sigs; /* individual signatures */
67 \fBlwres_getrrsetbyname()\fR
68 gets a set of resource records associated with a
73 is a pointer a to null\-terminated string. The
75 field is currently unused and must be zero.
77 After a successful call to
78 \fBlwres_getrrsetbyname()\fR,
82 structure, containing a list of one or more
84 structures containing resource records and potentially another list of
86 structures containing SIG resource records associated with those records. The members
90 are copied from the parameters.
94 are properties of the obtained rrset. The resource records contained in
98 are in uncompressed DNS wire format. Properties of the rdataset are represented in the
100 bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC validated and the signatures verified.
102 All of the information returned by
103 \fBlwres_getrrsetbyname()\fR
104 is dynamically allocated: the
108 structures, and the canonical host name strings pointed to by the
109 \fBrrsetinfo\fRstructure. Memory allocated for the dynamically allocated structures created by a successful call to
110 \fBlwres_getrrsetbyname()\fR
112 \fBlwres_freerrset()\fR.
117 \fBlwres_getrrsetbyname()\fR.
121 \fBlwres_getrrsetbyname()\fR
122 returns zero on success, and one of the following error 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
143 Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")