|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
Packit Service |
ae04f2 |
-
|
|
Packit Service |
ae04f2 |
- This Source Code Form is subject to the terms of the Mozilla Public
|
|
Packit Service |
ae04f2 |
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
Packit Service |
ae04f2 |
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
Packit Service |
ae04f2 |
-
|
|
Packit Service |
ae04f2 |
- See the COPYRIGHT file distributed with this work for additional
|
|
Packit Service |
ae04f2 |
- information regarding copyright ownership.
|
|
Packit Service |
ae04f2 |
-->
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
|
|
Packit Service |
ae04f2 |
<info>
|
|
Packit Service |
ae04f2 |
<date>2007-06-18</date>
|
|
Packit Service |
ae04f2 |
</info>
|
|
Packit Service |
ae04f2 |
<refentryinfo>
|
|
Packit Service |
ae04f2 |
<corpname>ISC</corpname>
|
|
Packit Service |
ae04f2 |
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
|
Packit Service |
ae04f2 |
</refentryinfo>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<refmeta>
|
|
Packit Service |
ae04f2 |
<refentrytitle>lwres_getrrsetbyname</refentrytitle>
|
|
Packit Service |
ae04f2 |
<manvolnum>3</manvolnum>
|
|
Packit Service |
ae04f2 |
<refmiscinfo>BIND9</refmiscinfo>
|
|
Packit Service |
ae04f2 |
</refmeta>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<docinfo>
|
|
Packit Service |
ae04f2 |
<copyright>
|
|
Packit Service |
ae04f2 |
<year>2000</year>
|
|
Packit Service |
ae04f2 |
<year>2001</year>
|
|
Packit Service |
ae04f2 |
<year>2004</year>
|
|
Packit Service |
ae04f2 |
<year>2005</year>
|
|
Packit Service |
ae04f2 |
<year>2007</year>
|
|
Packit Service |
ae04f2 |
<year>2014</year>
|
|
Packit Service |
ae04f2 |
<year>2015</year>
|
|
Packit Service |
ae04f2 |
<year>2016</year>
|
|
Packit Service |
ae04f2 |
<year>2018</year>
|
|
Packit Service |
ae04f2 |
<year>2019</year>
|
|
Packit Service |
ae04f2 |
<year>2020</year>
|
|
Packit Service |
ae04f2 |
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
|
Packit Service |
ae04f2 |
</copyright>
|
|
Packit Service |
ae04f2 |
</docinfo>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<refnamediv>
|
|
Packit Service |
ae04f2 |
<refname>lwres_getrrsetbyname</refname>
|
|
Packit Service |
ae04f2 |
<refname>lwres_freerrset</refname>
|
|
Packit Service |
ae04f2 |
<refpurpose>retrieve DNS records</refpurpose>
|
|
Packit Service |
ae04f2 |
</refnamediv>
|
|
Packit Service |
ae04f2 |
<refsynopsisdiv>
|
|
Packit Service |
ae04f2 |
<funcsynopsis>
|
|
Packit Service |
ae04f2 |
<funcsynopsisinfo>#include <lwres/netdb.h></funcsynopsisinfo>
|
|
Packit Service |
ae04f2 |
<funcprototype>
|
|
Packit Service |
ae04f2 |
<funcdef>
|
|
Packit Service |
ae04f2 |
int
|
|
Packit Service |
ae04f2 |
<function>lwres_getrrsetbyname</function></funcdef>
|
|
Packit Service |
ae04f2 |
<paramdef>const char *<parameter>hostname</parameter></paramdef>
|
|
Packit Service |
ae04f2 |
<paramdef>unsigned int <parameter>rdclass</parameter></paramdef>
|
|
Packit Service |
ae04f2 |
<paramdef>unsigned int <parameter>rdtype</parameter></paramdef>
|
|
Packit Service |
ae04f2 |
<paramdef>unsigned int <parameter>flags</parameter></paramdef>
|
|
Packit Service |
ae04f2 |
<paramdef>struct rrsetinfo **<parameter>res</parameter></paramdef>
|
|
Packit Service |
ae04f2 |
</funcprototype>
|
|
Packit Service |
ae04f2 |
<funcprototype>
|
|
Packit Service |
ae04f2 |
<funcdef>
|
|
Packit Service |
ae04f2 |
void
|
|
Packit Service |
ae04f2 |
<function>lwres_freerrset</function></funcdef>
|
|
Packit Service |
ae04f2 |
<paramdef>struct rrsetinfo *<parameter>rrset</parameter></paramdef>
|
|
Packit Service |
ae04f2 |
</funcprototype>
|
|
Packit Service |
ae04f2 |
</funcsynopsis>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
The following structures are used:
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
<para><programlisting>
|
|
Packit Service |
ae04f2 |
struct rdatainfo {
|
|
Packit Service |
ae04f2 |
unsigned int rdi_length; /* length of data */
|
|
Packit Service |
ae04f2 |
unsigned char *rdi_data; /* record data */
|
|
Packit Service |
ae04f2 |
};
|
|
Packit Service |
ae04f2 |
</programlisting>
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
<para><programlisting>
|
|
Packit Service |
ae04f2 |
struct rrsetinfo {
|
|
Packit Service |
ae04f2 |
unsigned int rri_flags; /* RRSET_VALIDATED... */
|
|
Packit Service |
ae04f2 |
unsigned int rri_rdclass; /* class number */
|
|
Packit Service |
ae04f2 |
unsigned int rri_rdtype; /* RR type number */
|
|
Packit Service |
ae04f2 |
unsigned int rri_ttl; /* time to live */
|
|
Packit Service |
ae04f2 |
unsigned int rri_nrdatas; /* size of rdatas array */
|
|
Packit Service |
ae04f2 |
unsigned int rri_nsigs; /* size of sigs array */
|
|
Packit Service |
ae04f2 |
char *rri_name; /* canonical name */
|
|
Packit Service |
ae04f2 |
struct rdatainfo *rri_rdatas; /* individual records */
|
|
Packit Service |
ae04f2 |
struct rdatainfo *rri_sigs; /* individual signatures */
|
|
Packit Service |
ae04f2 |
};
|
|
Packit Service |
ae04f2 |
</programlisting>
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</refsynopsisdiv>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<refsection><info><title>DESCRIPTION</title></info>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<para><function>lwres_getrrsetbyname()</function>
|
|
Packit Service |
ae04f2 |
gets a set of resource records associated with a
|
|
Packit Service |
ae04f2 |
<parameter>hostname</parameter>, <parameter>class</parameter>,
|
|
Packit Service |
ae04f2 |
and <parameter>type</parameter>.
|
|
Packit Service |
ae04f2 |
<parameter>hostname</parameter> is a pointer a to
|
|
Packit Service |
ae04f2 |
null-terminated string. The <parameter>flags</parameter> field
|
|
Packit Service |
ae04f2 |
is currently unused and must be zero.
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
After a successful call to
|
|
Packit Service |
ae04f2 |
<function>lwres_getrrsetbyname()</function>,
|
|
Packit Service |
ae04f2 |
<parameter>*res</parameter> is a pointer to an
|
|
Packit Service |
ae04f2 |
<type>rrsetinfo</type> structure, containing a list of one or
|
|
Packit Service |
ae04f2 |
more <type>rdatainfo</type> structures containing resource
|
|
Packit Service |
ae04f2 |
records and potentially another list of <type>rdatainfo</type>
|
|
Packit Service |
ae04f2 |
structures containing SIG resource records associated with those
|
|
Packit Service |
ae04f2 |
records. The members <constant>rri_rdclass</constant> and
|
|
Packit Service |
ae04f2 |
<constant>rri_rdtype</constant> are copied from the parameters.
|
|
Packit Service |
ae04f2 |
<constant>rri_ttl</constant> and <constant>rri_name</constant>
|
|
Packit Service |
ae04f2 |
are properties of the obtained rrset. The resource records
|
|
Packit Service |
ae04f2 |
contained in <constant>rri_rdatas</constant> and
|
|
Packit Service |
ae04f2 |
<constant>rri_sigs</constant> are in uncompressed DNS wire
|
|
Packit Service |
ae04f2 |
format. Properties of the rdataset are represented in the
|
|
Packit Service |
ae04f2 |
<constant>rri_flags</constant> bitfield. If the RRSET_VALIDATED
|
|
Packit Service |
ae04f2 |
bit is set, the data has been DNSSEC validated and the
|
|
Packit Service |
ae04f2 |
signatures verified.
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
All of the information returned by
|
|
Packit Service |
ae04f2 |
<function>lwres_getrrsetbyname()</function> is dynamically
|
|
Packit Service |
ae04f2 |
allocated: the <constant>rrsetinfo</constant> and
|
|
Packit Service |
ae04f2 |
<constant>rdatainfo</constant> structures, and the canonical
|
|
Packit Service |
ae04f2 |
host name strings pointed to by the
|
|
Packit Service |
ae04f2 |
<constant>rrsetinfo</constant>structure.
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
Memory allocated for the dynamically allocated structures
|
|
Packit Service |
ae04f2 |
created by a successful call to
|
|
Packit Service |
ae04f2 |
<function>lwres_getrrsetbyname()</function> is released by
|
|
Packit Service |
ae04f2 |
<function>lwres_freerrset()</function>.
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<parameter>rrset</parameter> is a pointer to a <type>struct
|
|
Packit Service |
ae04f2 |
rrset</type> created by a call to
|
|
Packit Service |
ae04f2 |
<function>lwres_getrrsetbyname()</function>.
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
<para/>
|
|
Packit Service |
ae04f2 |
</refsection>
|
|
Packit Service |
ae04f2 |
<refsection><info><title>RETURN VALUES</title></info>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<para><function>lwres_getrrsetbyname()</function>
|
|
Packit Service |
ae04f2 |
returns zero on success, and one of the following error codes if
|
|
Packit Service |
ae04f2 |
an error occurred:
|
|
Packit Service |
ae04f2 |
<variablelist>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<varlistentry>
|
|
Packit Service |
ae04f2 |
<term><constant>ERRSET_NONAME</constant></term>
|
|
Packit Service |
ae04f2 |
<listitem>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
the name does not exist
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</listitem>
|
|
Packit Service |
ae04f2 |
</varlistentry>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<varlistentry>
|
|
Packit Service |
ae04f2 |
<term><constant>ERRSET_NODATA</constant></term>
|
|
Packit Service |
ae04f2 |
<listitem>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
the name exists, but does not have data of the desired type
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</listitem>
|
|
Packit Service |
ae04f2 |
</varlistentry>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<varlistentry>
|
|
Packit Service |
ae04f2 |
<term><constant>ERRSET_NOMEMORY</constant></term>
|
|
Packit Service |
ae04f2 |
<listitem>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
memory could not be allocated
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</listitem>
|
|
Packit Service |
ae04f2 |
</varlistentry>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<varlistentry>
|
|
Packit Service |
ae04f2 |
<term><constant>ERRSET_INVAL</constant></term>
|
|
Packit Service |
ae04f2 |
<listitem>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
a parameter is invalid
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</listitem>
|
|
Packit Service |
ae04f2 |
</varlistentry>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<varlistentry>
|
|
Packit Service |
ae04f2 |
<term><constant>ERRSET_FAIL</constant></term>
|
|
Packit Service |
ae04f2 |
<listitem>
|
|
Packit Service |
ae04f2 |
<para>
|
|
Packit Service |
ae04f2 |
other failure
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</listitem>
|
|
Packit Service |
ae04f2 |
</varlistentry>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<varlistentry>
|
|
Packit Service |
ae04f2 |
<term><constant/></term>
|
|
Packit Service |
ae04f2 |
<listitem>
|
|
Packit Service |
ae04f2 |
<para/>
|
|
Packit Service |
ae04f2 |
</listitem>
|
|
Packit Service |
ae04f2 |
</varlistentry>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
</variablelist>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
</refsection>
|
|
Packit Service |
ae04f2 |
<refsection><info><title>SEE ALSO</title></info>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
<para><citerefentry>
|
|
Packit Service |
ae04f2 |
<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
|
|
Packit Service |
ae04f2 |
</citerefentry>.
|
|
Packit Service |
ae04f2 |
</para>
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
</refsection>
|
|
Packit Service |
ae04f2 |
</refentry>
|