lwres_gabn.html revision e21a2904f02a03fa06b6db04d348f65fe9c67b2b
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - Copyright (C) 2000, 2001 Internet Software Consortium.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - Permission to use, copy, modify, and distribute this software for any
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - purpose with or without fee is hereby granted, provided that the above
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - copyright notice and this permission notice appear in all copies.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - PERFORMANCE OF THIS SOFTWARE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<!-- $Id: lwres_gabn.html,v 1.22 2006/12/12 01:45:21 marka Exp $ -->
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<a name="id2476419"></a><div class="titlepage"></div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<p>lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lwres_gabnresponse_parse, lwres_gabnresponse_free, lwres_gabnrequest_free — lightweight resolver getaddrbyname message handling</p>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlwres_result_t
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<b class="fsfunc">lwres_gabnrequest_render</b>(</code></td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<var class="pdparam">b</var><code>)</code>;</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlwres_result_t
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<b class="fsfunc">lwres_gabnresponse_render</b>(</code></td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<var class="pdparam">b</var><code>)</code>;</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlwres_result_t
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<b class="fsfunc">lwres_gabnrequest_parse</b>(</code></td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<var class="pdparam">structp</var><code>)</code>;</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlwres_result_t
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<b class="fsfunc">lwres_gabnresponse_parse</b>(</code></td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<var class="pdparam">structp</var><code>)</code>;</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<b class="fsfunc">lwres_gabnresponse_free</b>(</code></td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<var class="pdparam">structp</var><code>)</code>;</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<b class="fsfunc">lwres_gabnrequest_free</b>(</code></td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<var class="pdparam">structp</var><code>)</code>;</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster These are low-level routines for creating and parsing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster lightweight resolver name-to-address lookup request and
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster response messages.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster There are four main functions for the getaddrbyname opcode.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster One render function converts a getaddrbyname request structure —
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <span class="type">lwres_gabnrequest_t</span> —
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster to the lighweight resolver's canonical format.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster It is complemented by a parse function that converts a packet in this
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster canonical format to a getaddrbyname request structure.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Another render function converts the getaddrbyname response structure
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster — <span class="type">lwres_gabnresponse_t</span> —
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster to the canonical format.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster This is complemented by a parse function which converts a packet in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster canonical format to a getaddrbyname response structure.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster These structures are defined in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <code class="filename"><lwres/lwres.h></code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster They are shown below.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostertypedef struct lwres_addr lwres_addr_t;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostertypedef LWRES_LIST(lwres_addr_t) lwres_addrlist_t;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostertypedef struct {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster lwres_uint32_t flags;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster lwres_uint32_t addrtypes;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster lwres_uint16_t namelen;