lwres_resutil.docbook revision 938440694b33cd752e9e4b71a526368b4811c177
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore [<!ENTITY mdash "—">]>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - Copyright (C) 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - Copyright (C) 2000, 2001 Internet Software Consortium.
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - Permission to use, copy, modify, and/or distribute this software for any
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - purpose with or without fee is hereby granted, provided that the above
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - copyright notice and this permission notice appear in all copies.
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore - PERFORMANCE OF THIS SOFTWARE.
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <refentryinfo>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </refentryinfo>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <refentrytitle>lwres_resutil</refentrytitle>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <holder>Internet Software Consortium.</holder>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <refpurpose>lightweight resolver utility functions</refpurpose>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </refnamediv>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <refsynopsisdiv>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <funcsynopsis>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<funcsynopsisinfo>#include <lwres/lwres.h></funcsynopsisinfo>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amorelwres_result_t
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<function>lwres_string_parse</function></funcdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe <paramdef>char **<parameter>c</parameter></paramdef>
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe <paramdef>lwres_uint16_t *<parameter>len</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amorelwres_result_t
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<function>lwres_addr_parse</function></funcdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_addr_t *<parameter>addr</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amorelwres_result_t
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<function>lwres_getaddrsbyname</function></funcdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>const char *<parameter>name</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_uint32_t <parameter>addrtypes</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_gabnresponse_t **<parameter>structp</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amorelwres_result_t
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore<function>lwres_getnamebyaddr</function></funcdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_uint32_t <parameter>addrtype</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_uint16_t <parameter>addrlen</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>const unsigned char *<parameter>addr</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <paramdef>lwres_gnbaresponse_t **<parameter>structp</parameter></paramdef>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </funcprototype>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore</funcsynopsis>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore </refsynopsisdiv>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <para><function>lwres_string_parse()</function>
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore retrieves a DNS-encoded string starting the current pointer of
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore lightweight resolver buffer <parameter>b</parameter>: i.e.
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore <constant>b->current</constant>. When the function returns,
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore the address of the first byte of the encoded string is returned
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore via <parameter>*c</parameter> and the length of that string is
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore given by <parameter>*len</parameter>. The buffer's current
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore pointer is advanced to point at the character following the
992413f4053d9470046876b234fe094062b730b7Garrett D'Amore string length, the encoded string, and the trailing