15153N/A - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 10017N/A - Copyright (C) 2001 Internet Software Consortium. 10017N/A - Permission to use, copy, modify, and distribute this software for any 10017N/A - purpose with or without fee is hereby granted, provided that the above 10017N/A - copyright notice and this permission notice appear in all copies. 10017N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 15153N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 15225N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 10017N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 10017N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 10017N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 10017N/A - PERFORMANCE OF THIS SOFTWARE. 15225N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.73 15225N/A>lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lwres_gabnresponse_parse, lwres_gabnresponse_free, lwres_gabnrequest_free -- lightweight resolver getaddrbyname message handling</
DIV 15225N/A>(lwres_context_t *ctx, lwres_gabnrequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</
CODE 15225N/A>(lwres_context_t *ctx, lwres_gabnresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</
CODE 15225N/A>(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnrequest_t **structp);</
CODE 15225N/A>(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnresponse_t **structp);</
CODE 15225N/A>(lwres_context_t *ctx, lwres_gabnresponse_t **structp);</
CODE 15225N/A>(lwres_context_t *ctx, lwres_gabnrequest_t **structp);</
CODE 15225N/A>These are low-level routines for creating and parsing
15225N/Alightweight resolver name-to-address lookup request and
15225N/A>There are four main functions for the getaddrbyname opcode.
15225N/AOne render function converts a getaddrbyname request structure —
15225N/Ato the lighweight resolver's canonical format.
15225N/AIt is complemented by a parse function that converts a packet in this
15225N/Acanonical format to a getaddrbyname request structure.
15225N/AAnother render function converts the getaddrbyname response structure —
15225N/AThis is complemented by a parse function which converts a packet in
15225N/Acanonical format to a getaddrbyname response structure.</
P 15225N/A>These structures are defined in
15225N/A>#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
15225N/Atypedef struct lwres_addr lwres_addr_t;
15225N/Atypedef LWRES_LIST(lwres_addr_t) lwres_addrlist_t;
15225N/Ato convert getaddrbyname request structure
15225N/Ais initialised and transferred to
15225N/Aare then appended to the buffer in canonical format.
15225N/A>lwres_gabnresponse_render()</
TT 15225N/Aperforms the same task, except it converts a getaddrbyname response structure
15225N/Ato the lightweight resolver's canonical format.</
P 15225N/Ato convert the contents of packet
15225N/Aprovides space to be used for storing this structure.
15225N/AWhen the function succeeds, the resulting
10017N/Arelease the memory in resolver context
10017N/AAny memory associated with ancillary buffers and strings for those
10017N/Astructures is also discarded.</
P 10017N/A>The getaddrbyname opcode functions
15153N/A>lwres_gabnresponse_render()</
TT 15153N/Ais returned if the available space in the buffer
15153N/Ais too small to accommodate the packet header or the
10017N/Aif the buffer is not empty after decoding the received packet.
10017N/Aindicate that the packet is not a response to an earlier query.</
P