lwres_gnba.html revision ea94d370123a5892f6c47a97f21d1b28d44bb168
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews<!--
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater - Copyright (C) 2000, 2001 Internet Software Consortium.
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater -
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater - purpose with or without fee is hereby granted, provided that the above
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater - copyright notice and this permission notice appear in all copies.
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater -
0519188c8e1ae76978fc4e0f799620cd36eba07aAutomatic Updater - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - PERFORMANCE OF THIS SOFTWARE.
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater-->
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater<!-- $Id$ -->
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater<html>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<head>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater<title>lwres_gnba</title>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</head>
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
831f79c4310a7d38fc3475ccfff531b2b2535641Automatic Updater<a name="id2476274"></a><div class="titlepage"></div>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<div class="refnamediv">
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<h2>Name</h2>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<p>lwres_gnbarequest_render, lwres_gnbaresponse_render, lwres_gnbarequest_parse, lwres_gnbaresponse_parse, lwres_gnbaresponse_free, lwres_gnbarequest_free &#8212; lightweight resolver getnamebyaddress message handling</p>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater</div>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<div class="refsynopsisdiv">
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<h2>Synopsis</h2>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<div class="funcsynopsis">
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<pre class="funcsynopsisinfo">
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#include &lt;lwres/lwres.h&gt;
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater</pre>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<tr>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater<td><code class="funcdef">
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterlwres_result_t
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<b class="fsfunc">lwres_gnbarequest_render</b>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater(</code></td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>lwres_context_t *�</td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<var class="pdparam">ctx</var>, </td>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater</tr>
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater<tr>
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<td>�</td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>lwres_gnbarequest_t *�</td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<var class="pdparam">req</var>, </td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater</tr>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<tr>
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater<td>�</td>
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater<td>lwres_lwpacket_t *�</td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<var class="pdparam">pkt</var>, </td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater</tr>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<tr>
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews<td>�</td>
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews<td>lwres_buffer_t *�</td>
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews<td>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<var class="pdparam">b</var><code>)</code>;</td>
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater</tr>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</table>
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8e9f3b69914ee02a80b87c97b1f8093edb3e9ae0Automatic Updater<tr>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<td><code class="funcdef">
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updaterlwres_result_t
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<b class="fsfunc">lwres_gnbaresponse_render</b>
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater(</code></td>
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater<td>lwres_context_t *�</td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<td>
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater<var class="pdparam">ctx</var>, </td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</tr>
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater<tr>
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic Updater<td>�</td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<td>lwres_gnbaresponse_t *�</td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<var class="pdparam">req</var>, </td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater</tr>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<tr>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<td>�</td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td>lwres_lwpacket_t *�</td>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<var class="pdparam">pkt</var>, </td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater</tr>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<tr>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td>�</td>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater<td>lwres_buffer_t *�</td>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater<td>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<var class="pdparam">b</var><code>)</code>;</td>
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updater</tr>
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updater</table>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<tr>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater<td><code class="funcdef">
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updaterlwres_result_t
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<b class="fsfunc">lwres_gnbarequest_parse</b>(</code></td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<td>lwres_context_t *�</td>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater<td>
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater<var class="pdparam">ctx</var>, </td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</tr>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<tr>
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater<td>�</td>
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater<td>lwres_buffer_t *�</td>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<td>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<var class="pdparam">b</var>, </td>
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater</tr>
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater<tr>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<td>�</td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<td>lwres_lwpacket_t *�</td>
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater<td>
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater<var class="pdparam">pkt</var>, </td>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</tr>
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater<tr>
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater<td>�</td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td>lwres_gnbarequest_t **�</td>
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater<td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<var class="pdparam">structp</var><code>)</code>;</td>
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater</tr>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater</table>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater<tr>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td><code class="funcdef">
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterlwres_result_t
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<b class="fsfunc">lwres_gnbaresponse_parse</b>(</code></td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td>lwres_context_t *�</td>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<td>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<var class="pdparam">ctx</var>, </td>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater</tr>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater<tr>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater<td>�</td>
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater<td>lwres_buffer_t *�</td>
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater<td>
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater<var class="pdparam">b</var>, </td>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater</tr>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<tr>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<td>�</td>
4104e236f71eb5108fcfda6711878a97f6f4a8e7Automatic Updater<td>lwres_lwpacket_t *�</td>
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater<td>
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater<var class="pdparam">pkt</var>, </td>
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater</tr>
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater<tr>
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater<td>�</td>
765c97d56ccddc9d7904c7d9ff2e2d825d9687e4Automatic Updater<td>lwres_gnbaresponse_t **�</td>
3e5340279d8875d136a4dd815cccad0044aa2644Automatic Updater<td>
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater<var class="pdparam">structp</var><code>)</code>;</td>
da82e232161d67b77df2d67898bdac693f647be1Automatic Updater</tr>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater</table>
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater<tr>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<td><code class="funcdef">
1d4f4d2db2d69e48fec2dde5c1535853677d22a7Automatic Updatervoid
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<b class="fsfunc">lwres_gnbaresponse_free</b>
da82e232161d67b77df2d67898bdac693f647be1Automatic Updater(</code></td>
9c446b72069d0ab9f710502f4d7048e50875fccbAutomatic Updater<td>lwres_context_t *�</td>
e85565067cf73f8cc21ee29b11761659f1d47ee9Automatic Updater<td>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<var class="pdparam">ctx</var>, </td>
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater</tr>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<tr>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<td>�</td>
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater<td>lwres_gnbaresponse_t **�</td>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<td>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<var class="pdparam">structp</var><code>)</code>;</td>
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater</tr>
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater</table>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
3f616e6f846be57b1717c6beaba0f74de9d5a7c6Automatic Updater<tr>
da82e232161d67b77df2d67898bdac693f647be1Automatic Updater<td><code class="funcdef">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updatervoid
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater<b class="fsfunc">lwres_gnbarequest_free</b>(</code></td>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<td>lwres_context_t *�</td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater<var class="pdparam">ctx</var>, </td>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</tr>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<tr>
5ecad47f69b3fd945472ab2900a9ff826a7ce2f6Automatic Updater<td>�</td>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater<td>lwres_gnbarequest_t **�</td>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<td>
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater<var class="pdparam">structp</var><code>)</code>;</td>
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater</tr>
7262eb86f2b465822206122921e2f357218f0cfdAutomatic Updater</table>
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater<div class="refsect1" lang="en">
bbb069be941f649228760edcc241122933c066d2Automatic Updater<a name="id2543527"></a><h2>DESCRIPTION</h2>
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater<p>
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic Updater These are low-level routines for creating and parsing
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews lightweight resolver address-to-name lookup request and
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater response messages.
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater </p>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater There are four main functions for the getnamebyaddr opcode.
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater One render function converts a getnamebyaddr request structure &#8212;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <span class="type">lwres_gnbarequest_t</span> &#8212;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews to the lightweight resolver's canonical format.
765c97d56ccddc9d7904c7d9ff2e2d825d9687e4Automatic Updater It is complemented by a parse function that converts a packet in this
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews canonical format to a getnamebyaddr request structure.
cafd3a2b9974fe0a4ab95e0289746062bd958d68Automatic Updater Another render function converts the getnamebyaddr response structure
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews &#8212;
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <span class="type">lwres_gnbaresponse_t</span>
3f616e6f846be57b1717c6beaba0f74de9d5a7c6Automatic Updater to the canonical format.
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater This is complemented by a parse function which converts a packet in
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater canonical format to a getnamebyaddr response structure.
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater </p>
f7a71eef29bcbf892270460269c79664f600cffdAutomatic Updater<p>
3e5340279d8875d136a4dd815cccad0044aa2644Automatic Updater These structures are defined in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="filename">lwres/lwres.h</code>.
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater They are shown below.
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater </p>
cf7e98f59148b559946a7f1ca728471374f1eef3Automatic Updater<pre class="programlisting">
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater#define LWRES_OPCODE_GETNAMEBYADDR 0x00010002U
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater</pre>
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
cf7e98f59148b559946a7f1ca728471374f1eef3Automatic Updater<pre class="programlisting">
c3fd32ed29e9e419bb56583f4272a506773b1ea0Automatic Updatertypedef struct {
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson lwres_uint32_t flags;
c3fd32ed29e9e419bb56583f4272a506773b1ea0Automatic Updater lwres_addr_t addr;
c3fd32ed29e9e419bb56583f4272a506773b1ea0Automatic Updater} lwres_gnbarequest_t;
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater</pre>
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater<p>
099b86fb8136a7dff81df85cf395978c16eb254cAutomatic Updater </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<pre class="programlisting">
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updatertypedef struct {
3857cb6fcabeb79d85de4b3e3e4ab99912b701f8Mark Andrews lwres_uint32_t flags;
572cb2c1c931f6bc6a4a019c103ae88239b0eb96Automatic Updater lwres_uint16_t naliases;
7858b0168b866c0c2878fc4ea31fb5e581c1a6a9Automatic Updater char *realname;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews char **aliases;
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater lwres_uint16_t realnamelen;
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson lwres_uint16_t *aliaslen;
e2caa7536302de34de6cc04025abcd53dc3a499aAutomatic Updater void *base;
56e7dc0c24b04210dcbffb180a9e35644fb820daAutomatic Updater size_t baselen;
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater} lwres_gnbaresponse_t;
8292deab031e7599cd7622aa7675fbe139ca6095Mark Andrews</pre>
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews<p>
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews </p>
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews<p><code class="function">lwres_gnbarequest_render()</code>
ca35524ce2b57e6f1b261d23565d1288a355d12fAutomatic Updater uses resolver context <code class="varname">ctx</code> to convert
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews getnamebyaddr request structure <code class="varname">req</code> to
b109432c3a939bff66a463be86c371bd88efe3aaAutomatic Updater canonical format. The packet header structure
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater <code class="varname">pkt</code> is initialised and transferred to buffer
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <code class="varname">b</code>. The contents of <code class="varname">*req</code>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews are then appended to the buffer in canonical format.
3351ccbd5c1961404044f8273d54dad405f53960Mark Andrews <code class="function">lwres_gnbaresponse_render()</code> performs the
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater same task, except it converts a getnamebyaddr response structure
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <span class="type">lwres_gnbaresponse_t</span> to the lightweight resolver's
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews canonical format.
3351ccbd5c1961404044f8273d54dad405f53960Mark Andrews </p>
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater<p><code class="function">lwres_gnbarequest_parse()</code>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews uses context <code class="varname">ctx</code> to convert the contents of
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews packet <code class="varname">pkt</code> to a
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater <span class="type">lwres_gnbarequest_t</span> structure. Buffer
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews <code class="varname">b</code> provides space to be used for storing this
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater structure. When the function succeeds, the resulting
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater <span class="type">lwres_gnbarequest_t</span> is made available through
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater <code class="varname">*structp</code>.
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater <code class="function">lwres_gnbaresponse_parse()</code> offers the same
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater semantics as <code class="function">lwres_gnbarequest_parse()</code>
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater except it yields a <span class="type">lwres_gnbaresponse_t</span> structure.
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater </p>
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater<p><code class="function">lwres_gnbaresponse_free()</code>
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater and <code class="function">lwres_gnbarequest_free()</code> release the
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater memory in resolver context <code class="varname">ctx</code> that was
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allocated to the <span class="type">lwres_gnbaresponse_t</span> or
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater <span class="type">lwres_gnbarequest_t</span> structures referenced via
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater <code class="varname">structp</code>. Any memory associated with
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews ancillary buffers and strings for those structures is also
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater discarded.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</div>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<div class="refsect1" lang="en">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<a name="id2543667"></a><h2>RETURN VALUES</h2>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<p>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews The getnamebyaddr opcode functions
06f5acb11f1c32228d93eefd1eb841dbfb1c7f4dAutomatic Updater <code class="function">lwres_gnbarequest_render()</code>,
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="function">lwres_gnbaresponse_render()</code>
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater <code class="function">lwres_gnbarequest_parse()</code>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater and
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <code class="function">lwres_gnbaresponse_parse()</code>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater all return
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews <span class="errorcode">LWRES_R_SUCCESS</span>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews on success.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews They return
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="errorcode">LWRES_R_NOMEMORY</span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if memory allocation fails.
b13d89bd89878137c81b36a36596cca3920f27a4Automatic Updater <span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
5ecad47f69b3fd945472ab2900a9ff826a7ce2f6Automatic Updater is returned if the available space in the buffer
b13d89bd89878137c81b36a36596cca3920f27a4Automatic Updater <code class="varname">b</code>
b13d89bd89878137c81b36a36596cca3920f27a4Automatic Updater is too small to accommodate the packet header or the
b13d89bd89878137c81b36a36596cca3920f27a4Automatic Updater <span class="type">lwres_gnbarequest_t</span>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater and
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <span class="type">lwres_gnbaresponse_t</span>
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater structures.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="function">lwres_gnbarequest_parse()</code>
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater and
d6317350b1180aa4517f2e8a92fa8fbcbf904ad8Automatic Updater <code class="function">lwres_gnbaresponse_parse()</code>
bc0a4c01beede169df81a3ee5b614ed9e82339dbAutomatic Updater will return
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic Updater if the buffer is not empty after decoding the received packet.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington These functions will return
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="errorcode">LWRES_R_FAILURE</span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="structfield"><code>pktflags</code></em>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington in the packet header structure
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="type">lwres_lwpacket_t</span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington indicate that the packet is not a response to an earlier query.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington</div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="refsect1" lang="en">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2543733"></a><h2>SEE ALSO</h2>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p><span class="citerefentry"><span class="refentrytitle">lwres_packet</span>(3)</span>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington</div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington</div></body>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington</html>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington