1 .\" Copyright (C) 2004, 2005, 2007, 2014, 2015 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.
19 .\" Title: lwres_getrrsetbyname
21 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
27 .TH "LWRES_GETRRSETBYNAME" "3" "2007\-06\-18" "ISC" "BIND9"
28 .\" -----------------------------------------------------------------
29 .\" * Define some portability stuff
30 .\" -----------------------------------------------------------------
31 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 .\" http://bugs.debian.org/507673
33 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 .\" -----------------------------------------------------------------
38 .\" * set default formatting
39 .\" -----------------------------------------------------------------
40 .\" disable hyphenation
42 .\" disable justification (adjust text to left margin only)
44 .\" -----------------------------------------------------------------
45 .\" * MAIN CONTENT STARTS HERE *
46 .\" -----------------------------------------------------------------
48 lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
53 #include <lwres/netdb\&.h>
56 .HP \w'int\ lwres_getrrsetbyname('u
57 .BI "int lwres_getrrsetbyname(const\ char\ *" "hostname" ", unsigned\ int\ " "rdclass" ", unsigned\ int\ " "rdtype" ", unsigned\ int\ " "flags" ", struct\ rrsetinfo\ **" "res" ");"
58 .HP \w'void\ lwres_freerrset('u
59 .BI "void lwres_freerrset(struct\ rrsetinfo\ *" "rrset" ");"
61 The following structures are used:
65 unsigned int rdi_length; /* length of data */
66 unsigned char *rdi_data; /* record data */
72 unsigned int rri_flags; /* RRSET_VALIDATED\&.\&.\&. */
73 unsigned int rri_rdclass; /* class number */
74 unsigned int rri_rdtype; /* RR type number */
75 unsigned int rri_ttl; /* time to live */
76 unsigned int rri_nrdatas; /* size of rdatas array */
77 unsigned int rri_nsigs; /* size of sigs array */
78 char *rri_name; /* canonical name */
79 struct rdatainfo *rri_rdatas; /* individual records */
80 struct rdatainfo *rri_sigs; /* individual signatures */
86 \fBlwres_getrrsetbyname()\fR
87 gets a set of resource records associated with a
92 is a pointer a to null\-terminated string\&. The
94 field is currently unused and must be zero\&.
96 After a successful call to
97 \fBlwres_getrrsetbyname()\fR,
101 structure, containing a list of one or more
103 structures containing resource records and potentially another list of
105 structures containing SIG resource records associated with those records\&. The members
109 are copied from the parameters\&.
113 are properties of the obtained rrset\&. The resource records contained in
117 are in uncompressed DNS wire format\&. Properties of the rdataset are represented in the
119 bitfield\&. If the RRSET_VALIDATED bit is set, the data has been DNSSEC validated and the signatures verified\&.
121 All of the information returned by
122 \fBlwres_getrrsetbyname()\fR
123 is dynamically allocated: the
127 structures, and the canonical host name strings pointed to by the
128 \fBrrsetinfo\fRstructure\&. Memory allocated for the dynamically allocated structures created by a successful call to
129 \fBlwres_getrrsetbyname()\fR
131 \fBlwres_freerrset()\fR\&.
136 \fBlwres_getrrsetbyname()\fR\&.
140 \fBlwres_getrrsetbyname()\fR
141 returns zero on success, and one of the following error codes if an error occurred:
145 the name does not exist
150 the name exists, but does not have data of the desired type
153 \fBERRSET_NOMEMORY\fR
155 memory could not be allocated
160 a parameter is invalid
175 \fBInternet Systems Consortium, Inc\&.\fR
178 Copyright \(co 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
180 Copyright \(co 2000, 2001 Internet Software Consortium.