source: trunk/athena/lib/ares/ares_expand_name.3 @ 11855

Revision 11855, 2.1 KB checked in by ghudson, 26 years ago (diff)
Documentation for libares, an asynchronous resolver library
Line 
1.\" $Id: ares_expand_name.3,v 1.1 1998-08-13 18:07:28 ghudson Exp $
2.\"
3.\" Copyright 1998 by the Massachusetts Institute of Technology.
4.\"
5.\" Permission to use, copy, modify, and distribute this
6.\" software and its documentation for any purpose and without
7.\" fee is hereby granted, provided that the above copyright
8.\" notice appear in all copies and that both that copyright
9.\" notice and this permission notice appear in supporting
10.\" documentation, and that the name of M.I.T. not be used in
11.\" advertising or publicity pertaining to distribution of the
12.\" software without specific, written prior permission.
13.\" M.I.T. makes no representations about the suitability of
14.\" this software for any purpose.  It is provided "as is"
15.\" without express or implied warranty.
16.\"
17.TH ARES_EXPAND_NAME 3 "23 July 1998"
18.SH NAME
19ares_expand_name \- Expand a DNS-encoded domain name
20.SH SYNOPSIS
21.nf
22.B #include <ares.h>
23.PP
24.B int ares_expand_name(const unsigned char *\fIencoded\fP,
25.B
26        const unsigned char *\fIabuf\fP, int \fIalen\fP, char **\fIs\fP,
27.B      int *\fIenclen\fP)
28.fi
29.SH DESCRIPTION
30The
31.B ares_expand_name
32function converts a DNS-encoded domain name to a dot-separated C
33string.  The argument
34.I encoded
35gives the beginning of the encoded domain name, and the arguments
36.I abuf
37and
38.I alen
39give the containing message buffer (necessary for the processing of
40indirection pointers within the encoded domain name).  The result is
41placed in a NUL-terminated allocated buffer, a pointer to which is
42stored in the variable pointed to by
43.IR s .
44The length of the encoded name is stored in the variable pointed to by
45.I enclen
46so that the caller can advance past the encoded domain name to read
47further data in the message.
48.SH RETURN VALUES
49.B ares_expand_name
50can return any of the following values:
51.TP 15
52.B ARES_SUCCESS
53Expansion of the encoded name succeeded.
54.TP 15
55.B ARES_EBADNAME
56The encoded domain name was malformed and could not be expanded.
57.TP 15
58.B ARES_ENOMEM
59Memory was exhausted.
60.SH SEE ALSO
61.BR ares_mkquery (3)
62.SH AUTHOR
63Greg Hudson, MIT Information Systems
64.br
65Copyright 1998 by the Massachusetts Institute of Technology.
Note: See TracBrowser for help on using the repository browser.