/[resiprocate]/main/contrib/ares/ares_expand_name.3
ViewVC logotype

Contents of /main/contrib/ares/ares_expand_name.3

Parent Directory Parent Directory | Revision Log Revision Log


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

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27