1 .\" $NetBSD: lwres_getrrsetbyname.3,v 1.5 2014/12/10 04:38:02 christos Exp $
3 .\" Copyright (C) 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
4 .\" Copyright (C) 2000, 2001 Internet Software Consortium.
6 .\" Permission to use, copy, modify, and/or distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 .\" PERFORMANCE OF THIS SOFTWARE.
22 .\" Title: lwres_getrrsetbyname
24 .\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
25 .\" Date: June 18, 2007
29 .TH "LWRES_GETRRSETBYNAME" "3" "June 18, 2007" "BIND9" "BIND9"
30 .\" disable hyphenation
32 .\" disable justification (adjust text to left margin only)
35 lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
38 #include <lwres/netdb.h>
41 .BI "int lwres_getrrsetbyname(const\ char\ *" "hostname" ", unsigned\ int\ " "rdclass" ", unsigned\ int\ " "rdtype" ", unsigned\ int\ " "flags" ", struct\ rrsetinfo\ **" "res" ");"
43 .BI "void lwres_freerrset(struct\ rrsetinfo\ *" "rrset" ");"
45 The following structures are used:
50 unsigned int rdi_length; /* length of data */
51 unsigned char *rdi_data; /* record data */
60 unsigned int rri_flags; /* RRSET_VALIDATED... */
61 unsigned int rri_rdclass; /* class number */
62 unsigned int rri_rdtype; /* RR type number */
63 unsigned int rri_ttl; /* time to live */
64 unsigned int rri_nrdatas; /* size of rdatas array */
65 unsigned int rri_nsigs; /* size of sigs array */
66 char *rri_name; /* canonical name */
67 struct rdatainfo *rri_rdatas; /* individual records */
68 struct rdatainfo *rri_sigs; /* individual signatures */
75 \fBlwres_getrrsetbyname()\fR
76 gets a set of resource records associated with a
81 is a pointer a to null\-terminated string. The
83 field is currently unused and must be zero.
85 After a successful call to
86 \fBlwres_getrrsetbyname()\fR,
90 structure, containing a list of one or more
92 structures containing resource records and potentially another list of
94 structures containing SIG resource records associated with those records. The members
98 are copied from the parameters.
102 are properties of the obtained rrset. The resource records contained in
106 are in uncompressed DNS wire format. Properties of the rdataset are represented in the
108 bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC validated and the signatures verified.
110 All of the information returned by
111 \fBlwres_getrrsetbyname()\fR
112 is dynamically allocated: the
116 structures, and the canonical host name strings pointed to by the
117 \fBrrsetinfo\fRstructure. Memory allocated for the dynamically allocated structures created by a successful call to
118 \fBlwres_getrrsetbyname()\fR
120 \fBlwres_freerrset()\fR.
125 \fBlwres_getrrsetbyname()\fR.
129 \fBlwres_getrrsetbyname()\fR
130 returns zero on success, and one of the following error codes if an error occurred:
134 the name does not exist
139 the name exists, but does not have data of the desired type
142 \fBERRSET_NOMEMORY\fR
144 memory could not be allocated
149 a parameter is invalid
163 Copyright \(co 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
165 Copyright \(co 2000, 2001 Internet Software Consortium.