2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
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.
16 .TH ARES_EXPAND_NAME 3 "20 Nov 2009"
18 ares_expand_name \- Expand a DNS-encoded domain name
23 .B int ares_expand_name(const unsigned char *\fIencoded\fP,
24 .B const unsigned char *\fIabuf\fP, int \fIalen\fP, char **\fIs\fP,
25 .B long *\fIenclen\fP)
30 function converts a DNS-encoded domain name to a dot-separated C
33 gives the beginning of the encoded domain name, and the arguments
37 give the containing message buffer (necessary for the processing of
38 indirection pointers within the encoded domain name). The result is
39 placed in a NUL-terminated allocated buffer, a pointer to which is
40 stored in the variable pointed to by
42 The length of the encoded name is stored in the variable pointed to by
44 so that the caller can advance past the encoded domain name to read
45 further data in the message.
48 can return any of the following values:
51 Expansion of the encoded name succeeded.
54 The encoded domain name was malformed and could not be expanded.
61 Greg Hudson, MIT Information Systems
63 Copyright 1998 by the Massachusetts Institute of Technology.