3 .\" Copyright 1998 by the Massachusetts Institute of Technology.
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.
17 .TH ARES_EXPAND_NAME 3 "23 July 1998"
19 ares_expand_string \- Expand a length encoded string
24 .B int ares_expand_string(const unsigned char *\fIencoded\fP,
25 .B const unsigned char *\fIabuf\fP, int \fIalen\fP, unsigned char **\fIs\fP,
31 function converts a length encoded string to a NUL-terminated C
34 gives the beginning of the encoded string, and the arguments
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
43 The length of the encoded string is stored in the variable pointed to by
45 so that the caller can advance past the encoded string to read
46 further data in the message.
49 can return any of the following values:
52 Expansion of the encoded string succeeded.
55 The encoded string was malformed and could not be expanded.
60 .BR ares_free_string (3)